NtupleReader/NtupleReader/MyParticle.h

00001 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00002 // 21.11.2006, AUTHOR: STEFFEN KAISER
00003 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00004 
00005 #ifndef MyParticleH
00006 #define MyParticleH
00007 
00008 //::::::::::::::::::::::
00009 //:: CLASS MyParticle ::
00010 //::::::::::::::::::::::
00011 
00019 
00020 //::::::::::::::::::
00021 //:: HEADER FILES ::
00022 //::::::::::::::::::
00023 
00024 // ROOT //
00025 //#include "TLorentzVector.h"
00026 #include <iostream>
00027 #include <string>
00028 
00029 
00030 class MyParticle {
00031 
00032 public:
00033 // Constructors //
00034         MyParticle(void) {
00035             init(TLorentzVector(0.0, 0.0, 0.0, 0.0), 0, 0.0, 0, "N/A", -1);
00036         }
00038         
00039         MyParticle( const TLorentzVector tlv,
00040                     Int_t matchingflag,
00041                     double charge,
00042                     int index,
00043                     std::string type,
00044                     int vertex_index=-1) {
00045             init(tlv, matchingflag, charge, index, type, vertex_index);
00046         }
00048         
00049         virtual ~MyParticle(void) {}
00051 
00052 // Methods //
00053 // get methods //
00054         inline TLorentzVector tlv(void) const;
00057         inline Int_t matchingflag(void) const;
00062         
00063         inline double charge(void) const;
00065         
00066         inline std::string type(void) const;
00072                                         
00073         inline int index(void) const;
00076         
00077         inline int pdgId(void) const;
00079         inline int vertexIndex(void) const;
00082                 
00083 // set methods //
00084         inline void set_tlv(const TLorentzVector & p);
00087 
00088         inline void set_matchingflag(const Int_t & flag);
00091                                         
00092         inline void setVertexIndex(const int & vertex_index);
00094 
00095         inline void Print(std::string option = "");
00100 
00101 
00102         virtual void PrintParticle(std::string option);
00104 
00105 protected:
00106         inline void init(const TLorentzVector tlv,
00107                          Int_t matchingflag,
00108                          double charge,
00109                          int index,
00110                          std::string type,
00111                          int vertex_index
00112                          ); // init method
00113 
00114         TLorentzVector m_tlv; // fourmomentum of the jet
00115         Int_t m_matchingflag; // matching flag of the particle
00116         double m_charge; // electric charge
00117         int m_index; // index in original vector
00118         std::string m_type; // string that holds the type of particle
00119                 // "electron", "muon", "truth_particle",
00120                 // "gamma", "particle_jet", "tau_jet", "truth_jet",
00121                 // "truth_tau_jet"
00122         int m_pdgId; // PDG-ID
00123         int m_vertex_index; // vertex index in the vertex array
00124 
00125 };
00126 
00127 //::::::::::::::::::::::::::::::::::::::
00128 //:: IMPLEMENTATION OF INLINE METHODS ::
00129 //::::::::::::::::::::::::::::::::::::::
00130 
00131 #include "MyParticle.ixx"
00132 
00133 #endif

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