00001 #ifndef FASTSHOWER_PARTICLEPARAMETERS_H
00002 #define FASTSHOWER_PARTICLEPARAMETERS_H
00003
00004 #ifndef FASTSHOWER_SP_H
00005 #include "FastShowerUtils/SP.h"
00006 #endif
00007
00008 #ifndef FASTSHOWER_ENERGYLIMITER_H
00009 #include "FastShowerUtils/EnergyLimiter.h"
00010 #endif
00011
00012 #ifndef FASTSHOWER_PARTICLETYPE_H
00013 #include "FastShowerUtils/ParticleType.h"
00014 #endif
00015
00016 #ifndef FASTSHOWER_IDEBUG_H
00017 #include "FastShowerUtils/IDebug.h"
00018 #endif
00019
00020 #ifndef FASTSHOWER_TRACEBACK_H
00021 #include "FastShowerUtils/TraceBack.h"
00022 #endif
00023
00024 #ifndef STD_IOSTREAM_H
00025 #define STD_IOSTREAM_H
00026 #include <iostream>
00027 #endif
00028
00029 class ostream;
00030 namespace FastShower{
00031
00036 class ParticleParameters{
00037 public:
00038 enum Region{barrel, endcap, fcal, beyond};
00041 ParticleParameters();
00042 ParticleParameters(double eta, double phi, double energy, int pdgId);
00043 ParticleParameters(double eta, double phi, double delPhi, double delEta,
00044 double energy, Region reg, int pdgId);
00045
00046 void setEnergyLimiter(const EnergyLimiter*);
00047 double phi() const;
00048 double eta() const;
00049 double delPhi() const;
00050 double delEta() const;
00051 double energy() const;
00052 double rawEnergy() const;
00053 Region region() const;
00054 unsigned short int quadrant() const;
00055 bool isHadron() const;
00056 bool isPhoton() const;
00057 bool isElectron() const;
00058 void fromIDebug(const IDebug*) const;
00059 void dumpTrace() const;
00060 private:
00061 void calcQuadrant();
00062
00063 double m_phi;
00064 double m_eta;
00065 double m_delPhi;
00066 double m_delEta;
00067 double m_energy;
00068 Region m_region;
00069 unsigned short int m_quadrant;
00070 SP<EnergyLimiter> m_eLimiter;
00071 ParticleType m_particleType;
00072 SP<TraceBack> m_traceBack;
00073 };
00074 std::ostream& operator<<(std::ostream&, const ParticleParameters&);
00075 std::ostream& operator<<(std::ostream&, const ParticleParameters*);
00077
00079
00080 void ParticleParameters::setEnergyLimiter(const EnergyLimiter* el){
00081 m_eLimiter=new EnergyLimiter(*el);
00082 }
00084 inline
00085 double ParticleParameters::phi() const { return m_phi;}
00087 inline
00088 double ParticleParameters::eta() const { return m_eta;}
00090 inline
00091 double ParticleParameters::delPhi() const { return m_delPhi;}
00093 inline
00094 double ParticleParameters::delEta() const { return m_delEta;}
00096 inline
00097 double ParticleParameters::energy() const {
00098 return m_eLimiter->limit(m_energy);
00099 }
00101 inline
00102 double ParticleParameters::rawEnergy() const { return m_energy;}
00104 inline
00105 ParticleParameters::Region ParticleParameters::region() const {
00106 return m_region;
00107 }
00109 inline
00110 unsigned short int ParticleParameters::quadrant() const {
00111 return m_quadrant;}
00113 inline
00114 bool ParticleParameters::isHadron() const{
00115 return m_particleType.isHadron();
00116 }
00118 inline
00119 bool ParticleParameters::isPhoton() const{
00120 return m_particleType.isPhoton();
00121 }
00123 inline
00124 bool ParticleParameters::isElectron() const {
00125 return m_particleType.isElectron();
00126 }
00127 }
00128 #endif
00129
00130
00131
00132
00133
00134
00135
00136