All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
StripCluster.h
Go to the documentation of this file.
1 #ifndef STRIPCLUSTER_H
2 #define STRIPCLUSTER_H 1
3 
4 #include "Signal.h"
5 
6 // Include CLHEP header files
7 #include <CLHEP/Vector/ThreeVector.h>
8 
9 /**
10 \addtogroup SiStripDigi SiStripDigi
11 @{
12 */
13 
14 namespace sistrip {
15 
16 //! This class holds all information about strip clusters, where the strip
17 //! cluster is defined as a bunch of strips, where at least one strip has its
18 //! signal above so-called seed threshold and other strips above threshold lower
19 //! than seed.
20 //!
21 //! @author Z. Drasal, Charles University Prague
22 //!
23 
25 {
26  public:
27  //!Constructor
28  StripCluster( short int layerID , short int ladderID , short int sensorID,
29  CLHEP::Hep3Vector position, CLHEP::Hep3Vector posSigma,
30  double charge, short int size) :
31  _iLayer(layerID) , _iLadder(ladderID) , _iSensor(sensorID),
32  _position(position), _posSigma(posSigma), _charge(charge), _size(size)
33  { _stripFront = 0; _stripRear = 0;}
34  //!Constructor with strips ID
35  StripCluster( short int layerID , short int ladderID , short int sensorID,
36  CLHEP::Hep3Vector position, CLHEP::Hep3Vector posSigma,
37  double charge, short int size,
38  short int stripFront, short int stripRear) :
39  _iLayer(layerID) , _iLadder(ladderID) , _iSensor(sensorID),
40  _position(position), _posSigma(posSigma), _charge(charge),
41  _size(size), _stripFront(stripFront), _stripRear(stripRear)
42  {;}
43  //!Destructor
44  ~StripCluster();
45 
46  // SET METHODS
47 
48  //!Set cluster layer ID
49  inline void setLayerID(short int iLayer) {_iLayer = iLayer;}
50 
51  //!Set cluster ladder ID
52  inline void setLadderID(short int iLadder) {_iLadder = iLadder;}
53 
54  //!Set cluster sensor ID
55  inline void setSensorID(short int iSensor) {_iSensor = iSensor;}
56 
57  //!Set cluster position X in cm
58  inline void setPosX( double posX) {_position.setX(posX);}
59 
60  //!Set cluster position Y in cm
61  inline void setPosY( double posY) {_position.setY(posY);}
62 
63  //!Set cluster position Z in cm
64  inline void setPosZ( double posZ) {_position.setZ(posZ);}
65 
66  //!Set cluster position Three vector in cm
67  void set3Position( const CLHEP::Hep3Vector & position);
68 
69  //!Set cluster - position sigma X in cm
70  inline void setPosSigmaX( double posSigmaX) {_posSigma.setX(posSigmaX);}
71 
72  //!Set cluster - position sigma Y in cm
73  inline void setPosSigmaY( double posSigmaY) {_posSigma.setY(posSigmaY);}
74 
75  //!Set cluster - position sigma Z in cm
76  inline void setPosSigmaZ( double posSigmaZ) {_posSigma.setZ(posSigmaZ);}
77 
78  //!Set cluster position Three vector in cm
79  void set3PosSigma( const CLHEP::Hep3Vector & position);
80 
81  //!Set cluster charge
82  inline void setCharge( double charge) {_charge = charge;}
83 
84  //!Set time when the cluster has been created by a particle in s
85  inline void setTime( double time) {_time = time;}
86 
87  //!Set cluster size (how many strips contributed)
88  inline void setSize( short int size) {_size = size;}
89 
90  //!Update MC truth information about SimTrackerHits, which contributed
91  void updateSimHitMap(SimTrackerHitMap simHitMap);
92 
93  //!Set front strip ID
94  inline void setStripFront(const int & stripId) {_stripFront = stripId;}
95 
96  //!Set rear strip ID
97  inline void setStripRear(const int & stripId) {_stripRear = stripId;}
98 
99  // GET METHODS
100 
101 //!Get cluster layer ID
102  inline short int getLayerID() const {return _iLayer;}
103 
104 //!Get cluster ladder ID
105  inline short int getLadderID() const {return _iLadder;}
106 
107 //!Get cluster sensor ID
108  inline short int getSensorID() const {return _iSensor;}
109 
110 //!Get cluster position X
111  inline double getPosX() const {return _position.getX();}
112 
113 //!Get cluster position Y
114  inline double getPosY() const {return _position.getY();}
115 
116 //!Get cluster position Z
117  inline double getPosZ() const {return _position.getZ();}
118 
119 //!Get cluster position Three vector
120  inline CLHEP::Hep3Vector get3Position() const {return _position;}
121 
122 //!Get cluster - position sigma X
123  inline double getPosSigmaX() const {return _posSigma.getX();}
124 
125 //!Get cluster - position sigma Y
126  inline double getPosSigmaY() const {return _posSigma.getY();}
127 
128 //!Get cluster - position sigma Z
129  inline double getPosSigmaZ() const {return _posSigma.getZ();}
130 
131 //!Get cluster position Three vector
132  inline CLHEP::Hep3Vector get3PosSigma() const {return _posSigma;}
133 
134 //!Get cluster charge
135  inline double getCharge() const {return _charge;}
136 
137 //!Get time when the cluster has been created by a particle
138  inline double getTime() const {return _time;}
139 
140 //!Get cluster size
141  inline short int getSize() const {return _size;}
142 
143 //!Get MC truth information about SimTrackerHits, which contributed
144  inline const SimTrackerHitMap & getSimHitMap() const {return _simHitMap;}
145 
146 //!Get MC truth information - total sum of individual weights
147  float getSimHitWeightSum();
148 
149  //!Get front strip ID
150  inline int getStripFront() const { return _stripFront;}
151 
152  //!Get rear strip ID
153  inline int getStripRear() const { return _stripRear;}
154 
155 
156  protected:
157 
158  short int _iLayer; //!<ID number of a layer
159  short int _iLadder; //!<ID number of a ladder
160  short int _iSensor; //!<ID number of a sensor
161 
162  CLHEP::Hep3Vector _position; //!<Cluster position in cm
163  CLHEP::Hep3Vector _posSigma; //!<Cluster - position sigma in cm
164 
165  double _charge; //!<Total charge deposited
166  double _time; //!<Time when the cluster has been created by a particle
167  short int _size; //!<Cluster size
168 
169  short int _stripFront; //!<Strip ID of the front sensor
170  short int _stripRear; //!<Strip ID of the rear sensor
171 
172  SimTrackerHitMap _simHitMap; //!< Map of SimTrkHits which contributed to the signal
173 
174 }; // Class
175 
176 } // Namespace
177 
178 /** @} */
179 
180 #endif // STRIPCLUSTER_H
double getTime() const
Get time when the cluster has been created by a particle.
Definition: StripCluster.h:138
void set3Position(const CLHEP::Hep3Vector &position)
Set cluster position Three vector in cm.
Definition: StripCluster.cc:26
void updateSimHitMap(SimTrackerHitMap simHitMap)
Update MC truth information about SimTrackerHits, which contributed.
Definition: StripCluster.cc:46
void setLadderID(short int iLadder)
Set cluster ladder ID.
Definition: StripCluster.h:52
short int getSensorID() const
Get cluster sensor ID.
Definition: StripCluster.h:108
void setCharge(double charge)
Set cluster charge.
Definition: StripCluster.h:82
void setPosZ(double posZ)
Set cluster position Z in cm.
Definition: StripCluster.h:64
This class holds all information about strip clusters, where the strip cluster is defined as a bunch ...
Definition: StripCluster.h:24
~StripCluster()
Destructor.
Definition: StripCluster.cc:18
double getPosSigmaY() const
Get cluster - position sigma Y.
Definition: StripCluster.h:126
CLHEP::Hep3Vector _position
Cluster position in cm.
Definition: StripCluster.h:162
double _time
Time when the cluster has been created by a particle.
Definition: StripCluster.h:166
std::map< EVENT::SimTrackerHit *, float > SimTrackerHitMap
Definition: Signal.h:17
int getStripFront() const
Get front strip ID.
Definition: StripCluster.h:150
void setLayerID(short int iLayer)
Set cluster layer ID.
Definition: StripCluster.h:49
double _charge
Total charge deposited.
Definition: StripCluster.h:165
short int _stripFront
Strip ID of the front sensor.
Definition: StripCluster.h:169
StripCluster(short int layerID, short int ladderID, short int sensorID, CLHEP::Hep3Vector position, CLHEP::Hep3Vector posSigma, double charge, short int size)
Constructor.
Definition: StripCluster.h:28
const SimTrackerHitMap & getSimHitMap() const
Get MC truth information about SimTrackerHits, which contributed.
Definition: StripCluster.h:144
CLHEP::Hep3Vector get3PosSigma() const
Get cluster position Three vector.
Definition: StripCluster.h:132
void setPosY(double posY)
Set cluster position Y in cm.
Definition: StripCluster.h:61
double getPosY() const
Get cluster position Y.
Definition: StripCluster.h:114
double getPosSigmaZ() const
Get cluster - position sigma Z.
Definition: StripCluster.h:129
short int getLadderID() const
Get cluster ladder ID.
Definition: StripCluster.h:105
short int _size
Cluster size.
Definition: StripCluster.h:167
void setPosSigmaX(double posSigmaX)
Set cluster - position sigma X in cm.
Definition: StripCluster.h:70
void setTime(double time)
Set time when the cluster has been created by a particle in s.
Definition: StripCluster.h:85
SimTrackerHitMap _simHitMap
Map of SimTrkHits which contributed to the signal.
Definition: StripCluster.h:172
double getCharge() const
Get cluster charge.
Definition: StripCluster.h:135
void setStripFront(const int &stripId)
Set front strip ID.
Definition: StripCluster.h:94
short int _iSensor
ID number of a sensor.
Definition: StripCluster.h:160
StripCluster(short int layerID, short int ladderID, short int sensorID, CLHEP::Hep3Vector position, CLHEP::Hep3Vector posSigma, double charge, short int size, short int stripFront, short int stripRear)
Constructor with strips ID.
Definition: StripCluster.h:35
short int getSize() const
Get cluster size.
Definition: StripCluster.h:141
short int _stripRear
Strip ID of the rear sensor.
Definition: StripCluster.h:170
float getSimHitWeightSum()
Get MC truth information - total sum of individual weights.
Definition: StripCluster.cc:61
void setStripRear(const int &stripId)
Set rear strip ID.
Definition: StripCluster.h:97
CLHEP::Hep3Vector _posSigma
Cluster - position sigma in cm.
Definition: StripCluster.h:163
void setPosX(double posX)
Set cluster position X in cm.
Definition: StripCluster.h:58
int getStripRear() const
Get rear strip ID.
Definition: StripCluster.h:153
short int getLayerID() const
Get cluster layer ID.
Definition: StripCluster.h:102
double getPosX() const
Get cluster position X.
Definition: StripCluster.h:111
void setSize(short int size)
Set cluster size (how many strips contributed)
Definition: StripCluster.h:88
void setPosSigmaZ(double posSigmaZ)
Set cluster - position sigma Z in cm.
Definition: StripCluster.h:76
double getPosSigmaX() const
Get cluster - position sigma X.
Definition: StripCluster.h:123
short int _iLadder
ID number of a ladder.
Definition: StripCluster.h:159
double getPosZ() const
Get cluster position Z.
Definition: StripCluster.h:117
void setSensorID(short int iSensor)
Set cluster sensor ID.
Definition: StripCluster.h:55
void set3PosSigma(const CLHEP::Hep3Vector &position)
Set cluster position Three vector in cm.
Definition: StripCluster.cc:36
short int _iLayer
ID number of a layer.
Definition: StripCluster.h:158
void setPosSigmaY(double posSigmaY)
Set cluster - position sigma Y in cm.
Definition: StripCluster.h:73
CLHEP::Hep3Vector get3Position() const
Get cluster position Three vector.
Definition: StripCluster.h:120