NtupleReader/NtupleReader/MyPhoton.ixx

00001 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00002 // 23.10.2006, AUTHOR: OLIVER KORTNER
00003 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00004 
00005 //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
00006 //:: IMPLEMENTATION OF INLINE METHODS DEFINED IN THE CLASS MyPhoton ::
00007 //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
00008 
00009 //*****************************************************************************
00010 
00011   //:::::::::::::::::
00012   //:: METHOD init ::
00013   //:::::::::::::::::
00014 
00015 inline void MyPhoton::init(const TLorentzVector & p,
00016                              const double & echarge,
00017                              const bool & egamma_flag,
00018                              const double & isem,
00019                              const double & neuralnet,
00020                              const int & index,
00021                              const double et_cone[4]) {
00022 
00023     m_tlv = p;
00024     m_charge = echarge;
00025     m_egamma_flag = egamma_flag;
00026     m_isEM = (int)isem;
00027     m_NeuralNet = neuralnet;
00028     m_index = index;
00029     m_type = "photon";
00030     m_pdgId = (int)m_charge*22;
00031     for (unsigned int k=0; k<4; k++) {
00032         if (et_cone!=0) {
00033             m_Et_in_cone[k] = et_cone[k];
00034         } else {
00035             m_Et_in_cone[k] = 0.0;
00036         }
00037     }
00038     m_matchingflag = 0;
00039 
00040     return;
00041 
00042   }
00043 
00044 //*****************************************************************************
00045 
00046   //:::::::::::::::::::::::::
00047   //:: METHOD e_gamma_flag ::
00048   //:::::::::::::::::::::::::
00049 
00050 inline bool MyPhoton::e_gamma_flag(void) const {
00051 
00052     return m_egamma_flag;
00053 
00054   }
00055 
00056 //*****************************************************************************
00057 
00058   //::::::::::::::::::
00059   //:: METHOD is_em ::
00060   //::::::::::::::::::
00061 
00062 inline int MyPhoton::is_em(void) const {
00063 
00064     return m_isEM;
00065 
00066   }
00067 //*****************************************************************************
00068 
00069   //::::::::::::::::::::::
00070   //:: METHOD NeuralNet ::
00071   //::::::::::::::::::::::
00072 
00073 inline double MyPhoton::NeuralNet(void) const {
00074 
00075     return m_NeuralNet;
00076 
00077   }
00078 
00079 //*****************************************************************************
00080 
00081   //:::::::::::::::::::::::
00082   //:: METHOD Et_in_cone ::
00083   //:::::::::::::::::::::::
00084 
00085 inline double MyPhoton::Et_in_cone(const int & delta_R_index) const {
00086 
00088     // CHECK INDEX //
00090 
00091     if (delta_R_index<0 || delta_R_index>4) {
00092         std::cerr << "\n"
00093                   << "Class MyPhoton, method Et_in_cone: ERROR!\n"
00094                   << "Wrong delta_R_index " << delta_R_index
00095                   << ", must be >=0 and <=3.\n";
00096         exit(1);
00097     }
00098 
00100     // RETURN THE REQUESTED ENERGY //
00102 
00103     return m_Et_in_cone[delta_R_index];
00104 
00105   }
00106 
00107 //*****************************************************************************
00108 
00109   //:::::::::::::::::::::::::::::
00110   //:: METHOD set_e_gamma_flag ::
00111   //:::::::::::::::::::::::::::::
00112 
00113 inline void MyPhoton::set_e_gamma_flag(const bool & flag) {
00114 
00115     m_egamma_flag = flag;
00116     return;
00117 
00118   }
00119 
00120 //*****************************************************************************
00121 
00122   //:::::::::::::::::::::::::::
00123   //:: METHOD set_Et_in_cone ::
00124   //:::::::::::::::::::::::::::
00125 
00126 inline void MyPhoton::set_Et_in_cone(const double et_in_cone[4]) {
00127 
00128     for (int k=0; k<4; k++) {
00129         m_Et_in_cone[k] = et_in_cone[k];
00130     }
00131 
00132     return;
00133 
00134   }
00135 
00136 //*****************************************************************************
00137 
00138   //::::::::::::::::::::::::::
00139   //:: METHOD PrintParticle ::
00140   //::::::::::::::::::::::::::
00141 
00142 inline void MyPhoton::PrintParticle(std::string option) {
00143     
00144     if(option=="v"){
00145         std::cout << "   is_em:                       " 
00146                   <<  m_isEM << std::endl;
00147     }
00148     
00149     return;
00150   }

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