LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ClusterImpl.h
Go to the documentation of this file.
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 
147  float _energy{0} ;
148  float _energyError{0} ;
149  float _position[3]={0,0,0} ;
151  float _theta{0};
152  float _phi{0} ;
160 
161 }; // class
162 
163 } // namespace IMPL
164 #endif /* ifndef IMPL_CLUSTERIMLP_H */
void setEnergyError(float energyError)
Definition: ClusterImpl.cc:63
EVENT::FloatVec _subdetectorEnergies
Definition: ClusterImpl.h:159
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:143
virtual ~ClusterImpl()
Destructor.
Definition: ClusterImpl.cc:16
virtual const EVENT::FloatVec & getSubdetectorEnergies() const
A vector that holds the energy observed in a particular subdetectors.
Definition: ClusterImpl.cc:50
void setPositionError(const EVENT::FloatVec &errpos)
Definition: ClusterImpl.cc:71
void setDirectionError(const EVENT::FloatVec &errdir)
Definition: ClusterImpl.cc:87
EVENT::FloatVec _shape
Definition: ClusterImpl.h:154
EVENT::ParticleIDVec _pid
Definition: ClusterImpl.h:155
virtual float getEnergyError() const
Returns the error on the energy of the cluster.
Definition: ClusterImpl.cc:31
virtual float getIPhi() const
Intrinsic direction of cluster at position: Phi.
Definition: ClusterImpl.cc:35
void addCluster(EVENT::Cluster *cluster)
Definition: ClusterImpl.cc:127
virtual int getType() const
Flagword that defines the type of cluster.
Definition: ClusterImpl.cc:23
virtual const EVENT::ParticleIDVec & getParticleIDs() const
Type hypotheses: 3 Parameters: compatible with EM, HAD, muon cluster.
Definition: ClusterImpl.cc:39
virtual const EVENT::FloatVec & getDirectionError() const
Covariance matrix of the direction (3 Parameters)
Definition: ClusterImpl.cc:36
void setEnergy(float energy)
Definition: ClusterImpl.cc:59
void setTypeBit(int index, bool val=true)
Definition: ClusterImpl.cc:138
vector< level > position
Definition: lsh.cc:64
virtual const EVENT::FloatVec & getPositionError() const
Covariance matrix of the position (6 Parameters)
Definition: ClusterImpl.cc:33
void addParticleID(EVENT::ParticleID *pid)
Definition: ClusterImpl.cc:120
void addHit(EVENT::CalorimeterHit *hit, float contribution)
Definition: ClusterImpl.cc:133
EVENT::CalorimeterHitVec _hits
Definition: ClusterImpl.h:157
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:34
std::bitset< 32 > _type
Definition: ClusterImpl.h:146
virtual const EVENT::FloatVec & getHitContributions() const
Returns the energy contribution of the hits Runs parallel to the CalorimeterHitVec from getCalorimete...
Definition: ClusterImpl.cc:47
virtual const float * getPosition() const
Position of the cluster.
Definition: ClusterImpl.cc:32
virtual const EVENT::ClusterVec & getClusters() const
The clusters that have been combined to this cluster.
Definition: ClusterImpl.cc:41
void setType(int type)
Definition: ClusterImpl.cc:55
Persistent interface for LCIO ParticleIDs.
Definition: ParticleID.h:28
EVENT::FloatVec _weights
Definition: ClusterImpl.h:158
virtual int simpleUID() const
Definition: AccessChecked.h:26
void setIPhi(float phi)
Definition: ClusterImpl.cc:83
Controls access to objects.
Definition: AccessChecked.h:18
virtual float getEnergy() const
Energy of the cluster.
Definition: ClusterImpl.cc:30
EVENT::FloatVec _errpos
Definition: ClusterImpl.h:150
The generic calorimeter hit - created from SimCalorimeterHit or RawCalorimeterHit.
void setShape(const EVENT::FloatVec &shape)
Definition: ClusterImpl.cc:99
virtual const EVENT::CalorimeterHitVec & getCalorimeterHits() const
The hits that have been combined to this cluster.
Definition: ClusterImpl.cc:44
EVENT::ClusterVec _clusters
Definition: ClusterImpl.h:156
void setITheta(float theta)
Definition: ClusterImpl.cc:79
float _position[3]
Definition: ClusterImpl.h:149
EVENT::FloatVec _errdir
Definition: ClusterImpl.h:153
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:37
void setPosition(const float *position)
Definition: ClusterImpl.cc:67