LCIO  "2.7.4"
 All Classes Namespaces Functions Variables Typedefs Friends Pages
ClusterImpl.h
1 #ifndef IMPL_CLUSTERIMPL_H
2 #define IMPL_CLUSTERIMPL_H 1
3 
4 
5 #include "EVENT/Cluster.h"
6 #include "AccessChecked.h"
7 #include <map>
8 #include <bitset>
9 
10 #define NERRPOS 6
11 #define NERRDIR 3
12 
13 #define NSHAPE_OLD 6
14 
15 namespace IMPL {
16 
17 
24  class ClusterImpl : public EVENT::Cluster, public AccessChecked {
25 
26  public:
27 
30  ClusterImpl() ;
31 
33  virtual ~ClusterImpl() ;
34 
35  virtual int id() const { return simpleUID() ; }
36 
41  virtual int getType() const ;
42 
45  virtual float getEnergy() const ;
46 
49  virtual float getEnergyError() const ;
50 
53  virtual const float* getPosition() const ;
54 
57  virtual const EVENT::FloatVec & getPositionError() const ;
58 
61  virtual float getITheta() const ;
62 
65  virtual float getIPhi() const ;
66 
69  virtual const EVENT::FloatVec & getDirectionError() const ;
70 
74  virtual const EVENT::FloatVec & getShape() const ;
75 
76 // /** Type hypotheses: 3 Parameters: compatible with EM, HAD, muon cluster
77 // */
78 // virtual const EVENT::FloatVec & getParticleType() const ;
79 
80 
84  virtual const EVENT::ParticleIDVec & getParticleIDs() const ;
85 
86 
89  virtual const EVENT::ClusterVec & getClusters() const ;
90 
91 
94  virtual const EVENT::CalorimeterHitVec & getCalorimeterHits() const ;
95 
99  virtual const EVENT::FloatVec & getHitContributions() const ;
100 
101 
109  virtual const EVENT::FloatVec & getSubdetectorEnergies() const ;
110 
111  //setters
112  void setTypeBit( int index , bool val=true) ;
113  void setEnergy(float energy ) ;
114  void setEnergyError(float energyError ) ;
115  void setPosition(const float* position) ;
116  void setPositionError(const EVENT::FloatVec &errpos) ;
117  void setPositionError(const float* errpos) ;
118  void setITheta(float theta) ;
119  void setIPhi(float phi) ;
120  void setDirectionError(const EVENT::FloatVec &errdir) ;
121  void setDirectionError(const float* errdir) ;
122  // void setShape(const float* shape) ;
123  void setShape(const EVENT::FloatVec &shape) ;
124 
125  void addParticleID( EVENT::ParticleID* pid ) ;
126 
127 // void setEMWeight(float emWeight ) ;
128 // void setHADWeight(float hadWeight ) ;
129 // void setMuonWeight(float muonWeight ) ;
130 
131  void addCluster(EVENT::Cluster* cluster) ;
132  void addHit(EVENT::CalorimeterHit* hit , float contribution) ;
133 
134 
142 
143  protected:
144  void setType(int type ) ;
145 
146  // int _type ;
147  // std::string _type ;
148  std::bitset<32> _type ;
149  float _energy ;
150  float _energyError ;
151  float _position[3] ;
152  EVENT::FloatVec _errpos ;
153  float _theta;
154  float _phi ;
155  EVENT::FloatVec _errdir ;
156  EVENT::FloatVec _shape ;
157  EVENT::ParticleIDVec _pid ;
158  EVENT::ClusterVec _clusters ;
160  EVENT::FloatVec _weights ;
161  EVENT::FloatVec _subdetectorEnergies ;
162 
163 }; // class
164 
165 } // namespace IMPL
166 #endif /* ifndef IMPL_CLUSTERIMLP_H */
virtual int id() const
Returns an object id for internal (debugging) use in LCIO.
Definition: ClusterImpl.h:35
EVENT::FloatVec & subdetectorEnergies()
To be used for modifying the subdetector energies, e.g.
Definition: ClusterImpl.cc:154
virtual ~ClusterImpl()
Destructor.
Definition: ClusterImpl.cc:27
virtual const EVENT::FloatVec & getSubdetectorEnergies() const
A vector that holds the energy observed in a particular subdetectors.
Definition: ClusterImpl.cc:61
std::vector< CalorimeterHit * > CalorimeterHitVec
Vector of (pointers to) CalorimeterHits.
Definition: CalorimeterHit.h:20
virtual float getEnergyError() const
Returns the error on the energy of the cluster.
Definition: ClusterImpl.cc:42
virtual float getIPhi() const
Intrinsic direction of cluster at position: Phi.
Definition: ClusterImpl.cc:46
virtual int getType() const
Flagword that defines the type of cluster.
Definition: ClusterImpl.cc:34
std::vector< ParticleID * > ParticleIDVec
Vector of (pointers to) ParticleIDs.
Definition: ParticleID.h:16
std::vector< float > FloatVec
Vector of floats.
Definition: LCIOSTLTypes.h:18
virtual const EVENT::ParticleIDVec & getParticleIDs() const
Type hypotheses: 3 Parameters: compatible with EM, HAD, muon cluster.
Definition: ClusterImpl.cc:50
std::vector< Cluster * > ClusterVec
Vector of (pointers to) Clusters.
Definition: Cluster.h:20
virtual const EVENT::FloatVec & getDirectionError() const
Covariance matrix of the direction (3 Parameters)
Definition: ClusterImpl.cc:47
virtual const EVENT::FloatVec & getPositionError() const
Covariance matrix of the position (6 Parameters)
Definition: ClusterImpl.cc:44
The LCIO cluster.
Definition: Cluster.h:30
ClusterImpl()
Default constructor, initializes values to 0.
Definition: ClusterImpl.cc:11
virtual float getITheta() const
Intrinsic direction of cluster at position: Theta.
Definition: ClusterImpl.cc:45
virtual const EVENT::FloatVec & getHitContributions() const
Returns the energy contribution of the hits Runs parallel to the CalorimeterHitVec from getCalorimete...
Definition: ClusterImpl.cc:58
virtual const float * getPosition() const
Position of the cluster.
Definition: ClusterImpl.cc:43
virtual const EVENT::ClusterVec & getClusters() const
The clusters that have been combined to this cluster.
Definition: ClusterImpl.cc:52
Persistent interface for LCIO ParticleIDs.
Definition: ParticleID.h:28
Controls access to objects.
Definition: AccessChecked.h:17
virtual float getEnergy() const
Energy of the cluster.
Definition: ClusterImpl.cc:41
The generic calorimeter hit - created from SimCalorimeterHit or RawCalorimeterHit.
Definition: CalorimeterHit.h:34
virtual const EVENT::CalorimeterHitVec & getCalorimeterHits() const
The hits that have been combined to this cluster.
Definition: ClusterImpl.cc:55
Implementation of Cluster.
Definition: ClusterImpl.h:24
virtual const EVENT::FloatVec & getShape() const
Shape parameters - check/set collection parameter ClusterShapeParameters for size and names of parame...
Definition: ClusterImpl.cc:48