All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Signal.h
Go to the documentation of this file.
1 #ifndef SIGNAL_H
2 #define SIGNAL_H
3 
4 // Include LCIO header files
5 #include <lcio.h>
6 #include <map>
7 #include <EVENT/SimTrackerHit.h>
8 
9 /**
10 \addtogroup SiStripDigi SiStripDigi
11 @{
12 */
13 
14 namespace sistrip {
15 
16 // Typedefs
17 typedef std::map<EVENT::SimTrackerHit *, float> SimTrackerHitMap; // Hit, weight
18 
19 //!
20 //! Signal class holds all information that one gets from strip, pixel, etc ...
21 //!
22 //! @author Z. Drasal, Charles University Prague
23 //!
24 class Signal {
25 
26  public:
27 
28 //!Constructor
29  Signal(double charge, double time) : _charge(charge), _time(time) {;}
30 
31 //!Destructor
32  ~Signal() {};
33 
34 
35 // SET METHODS
36 
37 //!Set signal
38  inline void setCharge(double charge) {_charge = charge;}
39 
40 //!Update signal
41  inline void updateCharge(double charge) {_charge += charge;}
42 
43 //!Set time when signal was created
44  inline void setTime(double time) {_time = time;}
45 
46 //!Update MC truth information about SimTrackerHits, which contributed
47  void updateSimHitMap(EVENT::SimTrackerHit * simHit, float weight);
48 
49 //!Update MC truth information about SimTrackerHits, which contributed
50  void updateSimHitMap(SimTrackerHitMap simHitMap);
51 
52 
53 // GET METHODS
54 
55 //!Get signal
56  inline double getCharge() const {return _charge;}
57 
58 //!Get time when signal was created
59  inline double getTime() const {return _time;}
60 
61 //!Get MC truth information about SimTrackerHits, which contributed
62  inline const SimTrackerHitMap & getSimHitMap() const {return _simHitMap;}
63 
64 //!Get MC truth information - total sum of individual weights
65  float getSimHitWeightSum();
66 
67 
68  private:
69 
70  double _charge; //!< Signal charge
71  double _time; //!< Time when signal has been created
72 
73  SimTrackerHitMap _simHitMap; //!< Map of SimTrkHits which contributed to the signal
74 
75 }; // Class
76 
77 } // Namespace
78 
79 /** @} */
80 
81 
82 #endif // SIGNAL_H
~Signal()
Destructor.
Definition: Signal.h:32
double getCharge() const
Get signal.
Definition: Signal.h:56
void setCharge(double charge)
Set signal.
Definition: Signal.h:38
Signal(double charge, double time)
Constructor.
Definition: Signal.h:29
std::map< EVENT::SimTrackerHit *, float > SimTrackerHitMap
Definition: Signal.h:17
void setTime(double time)
Set time when signal was created.
Definition: Signal.h:44
Signal class holds all information that one gets from strip, pixel, etc ...
Definition: Signal.h:24
double _charge
Signal charge.
Definition: Signal.h:70
double getTime() const
Get time when signal was created.
Definition: Signal.h:59
float getSimHitWeightSum()
Get MC truth information - total sum of individual weights.
Definition: Signal.cc:46
void updateCharge(double charge)
Update signal.
Definition: Signal.h:41
double _time
Time when signal has been created.
Definition: Signal.h:71
void updateSimHitMap(EVENT::SimTrackerHit *simHit, float weight)
Update MC truth information about SimTrackerHits, which contributed.
Definition: Signal.cc:19
SimTrackerHitMap _simHitMap
Map of SimTrkHits which contributed to the signal.
Definition: Signal.h:73
const SimTrackerHitMap & getSimHitMap() const
Get MC truth information about SimTrackerHits, which contributed.
Definition: Signal.h:62