00001
00002 #ifndef CALOEVENT_CALOTOWER_V1_H
00003 #define CALOEVENT_CALOTOWER_V1_H
00004
00005 #include "xAODBase/IParticle.h"
00006
00007 namespace xAOD {
00008
00009 class CaloTower_v1 : public IParticle
00010 {
00011 public:
00012
00013 enum {
00014 INVALIDINDEX=-1
00015 };
00016
00017
00021 CaloTower_v1();
00022
00024 ~CaloTower_v1();
00025
00029 void reset();
00030
00034 void addEnergy(double energy);
00038 void setEnergy(double energy);
00039
00042 virtual double pt() const;
00043 virtual double eta() const;
00044 virtual double phi() const;
00045 virtual double rapidity() const;
00046 virtual double m() const;
00047 virtual double e() const;
00048 virtual const IParticle::FourMom_t& p4() const;
00049
00050
00053 virtual Type::ObjectType type() const;
00054
00055
00056 private:
00057
00060 float& f_ref_e();
00061
00062
00063
00064 float f_val_e() const;
00065
00066
00069 mutable IParticle::FourMom_t m_fourmom;
00070 mutable double m_eta;
00071 mutable double m_phi;
00072 mutable double m_invcosheta;
00073 static double m_towerMass;
00074
00075
00076
00077
00078
00079 void setupFourMom() const;
00080 mutable bool m_isComplete;
00081
00082 };
00083 }
00084
00085 inline float& xAOD::CaloTower_v1::f_ref_e() { static Accessor<float> acc("towerE"); return acc(*this); }
00086
00087 inline float xAOD::CaloTower_v1::f_val_e() const { static ConstAccessor<float> acc("towerE"); return acc(*this); }
00088
00120 #endif