NtupleReader/NtupleReader/MyParticleJet.h

00001 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00002 // 23.10.2006, AUTHOR: OLIVER KORTNER
00003 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00004 
00005 #ifndef MyParticleJetH
00006 #define MyParticleJetH
00007 
00008 //:::::::::::::::::::::::::
00009 //:: CLASS MyParticleJet ::
00010 //:::::::::::::::::::::::::
00011 
00020 
00021 //::::::::::::::::::
00022 //:: HEADER FILES ::
00023 //::::::::::::::::::
00024 
00025 // standard C++ //
00026 #include <iostream>
00027 #include <string>
00028 #include <vector>
00029 
00030 // ROOT //
00031 #include "TLorentzVector.h"
00032 
00033 // MyParticle base class //
00034 #include "MyParticle.h"
00035 
00036 class MyParticleJet : public MyParticle {
00037 
00038 public:
00039 // Constructors //
00040         MyParticleJet(void) {
00041             init(TLorentzVector(0.0, 0.0, 0.0, 0.0), 0, 0, 0.0, 0, false, 0,
00042                  std::vector<double>(0),
00043                  std::vector<TLorentzVector>(0),
00044                  std::vector<int>(0) );
00045         }
00047         MyParticleJet(const TLorentzVector & p,
00048                       const int & rec_flag,
00049                       const int & index,
00050                       const double & tag_weight,
00051                       const int & truthflavour,
00052                       const bool & truthjet_flag,
00053                       const int & nb_tracks,
00054                       const std::vector<double> tracks_charge,
00055                       const std::vector<TLorentzVector> tracks_tlv,
00056                       const std::vector<int> tracks_vertex_index) {
00057             init(p, rec_flag, index, tag_weight, truthflavour, truthjet_flag, nb_tracks,
00058                      tracks_charge, tracks_tlv, tracks_vertex_index);
00059         }
00071 
00072 // Methods //
00073 // get methods //
00074         inline int reconstruction_flag(void) const;
00077         inline double b_tag_weight(void) const;
00080         inline int truth_flavour(void) const;
00083         inline int nb_tracks(void) const;
00086         inline double tracks_charge(int itrack) const;
00088         
00089         inline TLorentzVector tracks_tlv(int itrack) const;
00091 
00092         inline int tracks_vertex_index(int itrack) const;
00094       
00095 
00096         inline double tracks_ptratio(int vertex_index) const;
00099         inline double tracks_cmsptratio(int vertex_index) const;
00102 
00103         inline double pt_pucorr(int vertex_index) const;
00106 
00107 // set methods //
00108         inline void set_reconstruction_flag(const int & flag);
00111         inline void set_b_tag_weight(const double & weight);
00114         
00115         inline void PrintParticle(std::string option = "");
00117 
00118 private:
00119 // jet data //
00120         int m_rec_flag; // reconstruction flag (see the definition above)
00121         double m_b_tag_weight; // b-tag weight
00122         int m_truthflavour; // truth flavour of the jet
00123         int m_nb_tracks; // number of tracks in the jet
00124         std::vector<double> m_tracks_charge; // charges of the tracks
00125         std::vector<TLorentzVector> m_tracks_tlv; // charges of the tracks
00126         std::vector<int> m_tracks_vertex_index; // charges of the tracks
00127 
00128 // private methods //
00129         inline void init(const TLorentzVector & p,
00130                          const int & rec_flag,
00131                          const int & index,
00132                          const double & tag_weight,
00133                          const int & truthflavour,
00134                          const bool & truthjet_flag,
00135                          const int & nb_tracks,
00136                          const std::vector<double> tracks_charge,
00137                          const std::vector<TLorentzVector> tracks_tlv,
00138                          const std::vector<int> tracks_vertex_index);
00139         // initialization method;
00140         // rec_flag: reconstruction flag:
00141         //    = 0: unknown algorithm,
00142         //    = 1: cone-4 algorithm,
00143         //    = 2: cone-7 algorithm,
00144         //    = 3: kt algorithm;
00145         // index = index in original vector
00146         // b_tag_weight = b-tag weight
00147 
00148 };
00149 
00150 //::::::::::::::::::::::::::::::::::::::
00151 //:: IMPLEMENTATION OF INLINE METHODS ::
00152 //::::::::::::::::::::::::::::::::::::::
00153 
00154 #include "MyParticleJet.ixx"
00155 
00156 #endif

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