NtupleReader/NtupleReader/MyElectron.h

00001 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00002 // 23.10.2006, AUTHOR: OLIVER KORTNER
00003 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00004 
00005 #ifndef MyElectronH
00006 #define MyElectronH
00007 
00008 //::::::::::::::::::::::
00009 //:: CLASS MyElectron ::
00010 //::::::::::::::::::::::
00011 
00020 
00021 //::::::::::::::::::
00022 //:: HEADER FILES ::
00023 //::::::::::::::::::
00024 
00025 // standard C++ //
00026 #include <iostream>
00027 
00028 // ROOT //
00029 #include "TLorentzVector.h"
00030 
00031 // MyParticle base class //
00032 #include "MyParticle.h"
00033 
00034 class MyElectron : public MyParticle {
00035 
00036 public:
00037     // Constructors //
00038     MyElectron(void) {
00039         init( TLorentzVector(0.0, 0.0, 0.0, 0.0),TLorentzVector(0.0, 0.0, 0.0, 0.0), 
00040               0.0, false, false, 0.0, 0.0, 0.0, 0, 0, 0.0, 0, -1, 0);
00041     }
00043     MyElectron(const TLorentzVector & p,
00044                const TLorentzVector & p_track,
00045                const double & echarge,
00046                const bool & egamma_flag,
00047                const bool & softe_flag,
00048                const double & eoverp,
00049                const double & isem,
00050                const double & neuralnet,
00051                const int & index,
00052                const double et_cone[4],
00053                const double ethad1,
00054                const std::vector<double> * et_track_cone=0,
00055                int vertex_index=-1,
00056                const std::vector<double> * trackIsolationEnergy=0) {
00057     
00058         init(p, p_track, echarge, egamma_flag, softe_flag, eoverp, 
00059              isem, neuralnet, index, et_cone, ethad1,
00060              et_track_cone, vertex_index, trackIsolationEnergy);
00061     }
00078 
00079     // Methods //
00080     // get methods //
00081     inline bool e_gamma_flag(void) const;
00085     inline int is_em(void) const;
00087     inline double NeuralNet(void) const;
00089     inline bool soft_e_flag(void) const;
00092     inline double e_over_p(void) const;
00094     inline double Et_in_cone(const int & delta_R_index) const;
00101     inline double ethad1(void) const;
00103 
00104     inline double track_Et_in_cone(const int & delta_r_index) const;
00115     
00116     inline double trackIsolationEnergy(const int & delta_r_index) const;
00123 
00124     inline int id_flag(void) const; 
00125 
00126     // set methods //
00127     inline void set_e_gamma_flag(const bool & flag);
00131     inline void set_soft_e_flag(const bool & flag);
00135     inline void set_e_over_p(const double & eoverp);
00138     inline void set_Et_in_cone(const double et_in_cone[4]);
00145     inline void set_ethad1(const double & ethad1);
00147     inline void set_track_Et_in_cone(const double et_in_cone[4]);
00158     inline void set_trackIsolationEnergy(const double et_in_cone[4]);
00164 
00165     inline void set_id_flag(const int & flag);
00166 
00167     inline void PrintParticle(std::string option = "");
00169     inline TLorentzVector tlv_track(void) const;
00170     
00171     private:
00172     // electron data //
00173     bool m_egamma_flag; // m_egamma_flag = true, if author==1, a track is 
00174     // associated with the electron, a neural-network 
00175     // output>0.1, and isEM%16==0
00176     bool m_softe_flag; // m_softe_flag = true, if author==2,  a track is 
00177     // associated with the electron, and isEM%16==0
00178     double m_E_over_p; // E(calorimeter)/p(inner tracker)
00179     int m_isEM;         // isEM variable
00180     double m_NeuralNet;         // NeuralNet variable (up to 11.x.x this was epiNN)
00181     double m_Et_in_cone[4]; // transverse energy in a cone around the 
00182     // electron;
00183     // m_Et_in_cone[0]: a cone of 0.20,
00184     // m_Et_in_cone[1]: a cone of 0.30,
00185     // m_Et_in_cone[2]: a cone of 0.40,
00186     // m_Et_in_cone[3]: a cone of 0.45
00187     double m_ethad1; // ethad1
00188 
00189     double m_track_Et_in_cone[4]; // transverse energy of tracks from the
00190                                   // same vertex in a cone around the 
00191                                   // electron;
00192                                   // m_track_Et_in_cone[0]: a cone of 0.20,
00193                                   // m_track_Et_in_cone[1]: a cone of 0.30,
00194                                   // m_track_Et_in_cone[2]: a cone of 0.40,
00195                                   // m_track_Et_in_cone[3]: a cone of 0.45   
00196     
00197     double m_trackIsolationEnergy[4]; // transverse energy of tracks 
00198                                       // m_track_Et_in_cone[0]: a cone of 0.20,
00199                                       // m_track_Et_in_cone[1]: a cone of 0.30,
00200                                       // m_track_Et_in_cone[2]: a cone of 0.40,
00201                                       // m_track_Et_in_cone[3]: a cone of 0.45   
00202 
00203 
00204     int m_id_flag; //id flag
00205     
00206     TLorentzVector m_tlv_track; //track of the electron
00207     
00208     // private methods //
00209     inline void init(const TLorentzVector & p,
00210                      const TLorentzVector & p_track,
00211                      const double & echarge,
00212                      const bool & egamma_flag,
00213                      const bool & softe_flag,
00214                      const double & eoverp,
00215                      const double & isem,
00216                      const double & neuralnet,
00217                      const int & index,
00218                      const double et_cone[4],
00219                      const double & ethad1,
00220                      const std::vector<double> * track_et_cone,
00221                      int vertex_index,
00222                      const std::vector<double> * trackIsolationEnergy);
00223     // initialization method,
00224     // set the fourmomentum of the electron
00225     // to p;
00226     // echarge: charge of the particle
00227     // egamma_flag = true, if the e-gamma
00228     // algorithm identified the particle as
00229     // electron;
00230     // softe_flag = true, if the particle
00231     // was identified as soft electron,
00232     // eoverp = E(calorimeter)/
00233     //                    p(inner tracker);
00234     // et_cone[0]: Et in a cone of 0.20,
00235     // et_cone[1]: Et in a cone of 0.30,
00236     // et_cone[2]: Et in a cone of 0.40,
00237     // et_cone[3]: Et in a cone of 0.45
00238     // ethad1
00239     // track_et_cone[0]: track Et in a cone
00240     //                   of 0.20,
00241     // track_et_cone[1]: track Et in a cone
00242     //                   of 0.30,
00243     // track_et_cone[2]: track Et in a cone
00244     //                   of 0.40,
00245     // track_et_cone[3]: track Et in a cone
00246     //                   of 0.45;
00247     // vertex_index: index of the associated
00248     //               primary vertex                                
00249 
00250 };
00251 
00252 //::::::::::::::::::::::::::::::::::::::
00253 //:: IMPLEMENTATION OF INLINE METHODS ::
00254 //::::::::::::::::::::::::::::::::::::::
00255 
00256 #include "MyElectron.ixx"
00257 
00258 #endif

Generated on Tue Oct 21 11:50:45 2008 for NtupleAnalysis by  doxygen 1.5.1