uLib-0.2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
MuonEvent.h
Go to the documentation of this file.
1 /*//////////////////////////////////////////////////////////////////////////////
2 // CMT Cosmic Muon Tomography project //////////////////////////////////////////
4 
5  Copyright (c) 2014, Universita' degli Studi di Padova, INFN sez. di Padova
6  All rights reserved
7 
8  Authors: Andrea Rigoni Garola < andrea.rigoni@pd.infn.it >
9 
10  ------------------------------------------------------------------
11  This library is free software; you can redistribute it and/or
12  modify it under the terms of the GNU Lesser General Public
13  License as published by the Free Software Foundation; either
14  version 3.0 of the License, or (at your option) any later version.
15 
16  This library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  Lesser General Public License for more details.
20 
21  You should have received a copy of the GNU Lesser General Public
22  License along with this library.
23 
25 
26 
27 
28 #ifndef U_MUONEVENT_H
29 #define U_MUONEVENT_H
30 
31 #include "Math/Dense.h"
32 
33 namespace uLib {
34 
35 
36 class MuonEventData {
37 public:
38  inline const HLine3f & LineIn() const { return this->m_LineIn; }
39  inline const HLine3f & LineOut() const { return this->m_LineOut; }
40  inline Scalarf GetMomentum() const { return this->m_Momentum; }
41 
42 protected:
43  HLine3f m_LineIn;
44  HLine3f m_LineOut;
45  Scalarf m_Momentum;
46 };
47 
48 
49 class MuonEvent : public MuonEventData {
50 public:
51  inline HLine3f & LineIn() { return this->m_LineIn; }
52  inline HLine3f & LineOut() { return this->m_LineOut; }
53  inline Scalarf & Momentum() { return this->m_Momentum; }
54 
55 };
56 
57 inline std::ostream&
58 operator<< (std::ostream& stream, const MuonEventData &mu) {
59  stream << " MuonEventData: --------------- \n"
60  << " P: " << mu.GetMomentum() << "\n"
61  << " IN: " << mu.LineIn() << "\n"
62  << " OUT: " << mu.LineOut() << "\n"
63  << " ------------------------------ \n";
64  return stream;
65 }
66 
67 
68 
69 } // end ulib space
70 
71 
72 
73 #endif // U_MUONEVENT_H