ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/Morgan/interface/TRootJet.h
(Generate patch)

Comparing UserCode/Morgan/interface/TRootJet.h (file contents):
Revision 1.5 by lethuill, Mon Dec 15 19:08:52 2008 UTC vs.
Revision 1.9 by lethuill, Tue Apr 7 17:09:06 2009 UTC

# Line 3 | Line 3
3  
4   #include "../interface/TRootParticle.h"
5  
6 #include "Rtypes.h"
7 #include "TObject.h"
8
9 #include <iostream>
10 #include <iomanip>
11
6   using namespace std;
7  
8   class TRootJet : public TRootParticle
# Line 46 | Line 40 | public:
40                  ,cCorrection_(-9999.)
41                  ,udsCorrection_(-9999.)
42                  ,gCorrection_(-9999.)
43 <                ,genParton_()
44 <                ,momentumMCParton_()
45 <                ,vertexMCParton_()
46 <                ,pdgIdMCParton_(-9999)
53 <                ,momentumMCJet_()
54 <                ,vertexMCJet_()
55 <                ,pdgIdMCJet_(-9999)
43 >                ,genJetEnergy_(-9999.)
44 >                ,genJetIndex_(-9999)
45 >                ,genJet_(0)
46 >                ,isTopJet_(false)
47                  {;}
48  
49          TRootJet(const TRootJet& jet) :
# Line 86 | Line 77 | public:
77                  ,cCorrection_(jet.cCorrection_)
78                  ,udsCorrection_(jet.udsCorrection_)
79                  ,gCorrection_(jet.gCorrection_)
80 <                ,genParton_(jet.genParton_)
81 <                ,momentumMCParton_(jet.momentumMCParton_)
82 <                ,vertexMCParton_(jet.vertexMCParton_)
83 <                ,pdgIdMCParton_(-jet.pdgIdMCParton_)
93 <                ,momentumMCJet_(jet.momentumMCJet_)
94 <                ,vertexMCJet_(jet.vertexMCJet_)
95 <                ,pdgIdMCJet_(-jet.pdgIdMCJet_)
80 >                ,genJetEnergy_(jet.genJetEnergy_)
81 >                ,genJetIndex_(jet.genJetIndex_)
82 >                ,genJet_(jet.genJet_)
83 >                ,isTopJet_(jet.isTopJet_)
84                  {;}
85  
86          TRootJet(Double_t px, Double_t py, Double_t pz, Double_t e) :
# Line 126 | Line 114 | public:
114                  ,cCorrection_(-9999.)
115                  ,udsCorrection_(-9999.)
116                  ,gCorrection_(-9999.)
117 <                ,genParton_()
118 <                ,momentumMCParton_()
119 <                ,vertexMCParton_()
120 <                ,pdgIdMCParton_(-9999)
133 <                ,momentumMCJet_()
134 <                ,vertexMCJet_()
135 <                ,pdgIdMCJet_(-9999)
117 >                ,genJetEnergy_(-9999.)
118 >                ,genJetIndex_(-9999)
119 >                ,genJet_(0)
120 >                ,isTopJet_(false)
121                  {;}
122          
123          TRootJet(Double_t px, Double_t py, Double_t pz, Double_t e, Double_t vtx_x, Double_t vtx_y, Double_t vtx_z) :
# Line 166 | Line 151 | public:
151                  ,cCorrection_(-9999.)
152                  ,udsCorrection_(-9999.)
153                  ,gCorrection_(-9999.)
154 <                ,genParton_()
155 <                ,momentumMCParton_()
156 <                ,vertexMCParton_()
157 <                ,pdgIdMCParton_(-9999)
173 <                ,momentumMCJet_()
174 <                ,vertexMCJet_()
175 <                ,pdgIdMCJet_(-9999)
154 >                ,genJetEnergy_(-9999.)
155 >                ,genJetIndex_(-9999)
156 >                ,genJet_(0)
157 >                ,isTopJet_(false)
158                  {;}
159  
160          TRootJet(Double_t px, Double_t py, Double_t pz, Double_t e, Double_t vtx_x, Double_t vtx_y, Double_t vtx_z, Int_t type, Float_t charge) :
# Line 206 | Line 188 | public:
188                  ,cCorrection_(-9999.)
189                  ,udsCorrection_(-9999.)
190                  ,gCorrection_(-9999.)
191 <                ,genParton_()
192 <                ,momentumMCParton_()
193 <                ,vertexMCParton_()
194 <                ,pdgIdMCParton_(-9999)
213 <                ,momentumMCJet_()
214 <                ,vertexMCJet_()
215 <                ,pdgIdMCJet_(-9999)
191 >                ,genJetEnergy_(-9999.)
192 >                ,genJetIndex_(-9999)
193 >                ,genJet_(0)
194 >                ,isTopJet_(false)
195                  {;}
196  
197          TRootJet(const TLorentzVector &momentum) :
# Line 246 | Line 225 | public:
225                  ,cCorrection_(-9999.)
226                  ,udsCorrection_(-9999.)
227                  ,gCorrection_(-9999.)
228 <                ,genParton_()
229 <                ,momentumMCParton_()
230 <                ,vertexMCParton_()
231 <                ,pdgIdMCParton_(-9999)
253 <                ,momentumMCJet_()
254 <                ,vertexMCJet_()
255 <                ,pdgIdMCJet_(-9999)
228 >                ,genJetEnergy_(-9999.)
229 >                ,genJetIndex_(-9999)
230 >                ,genJet_(0)
231 >                ,isTopJet_(false)
232                  {;}
233  
234          TRootJet(const TLorentzVector &momentum, const TVector3 &vertex, Int_t type, Float_t charge) :
# Line 286 | Line 262 | public:
262                  ,cCorrection_(-9999.)
263                  ,udsCorrection_(-9999.)
264                  ,gCorrection_(-9999.)
265 <                ,genParton_()
266 <                ,momentumMCParton_()
267 <                ,vertexMCParton_()
268 <                ,pdgIdMCParton_(-9999)
293 <                ,momentumMCJet_()
294 <                ,vertexMCJet_()
295 <                ,pdgIdMCJet_(-9999)
265 >                ,genJetEnergy_(-9999.)
266 >                ,genJetIndex_(-9999)
267 >                ,genJet_(0)
268 >                ,isTopJet_(false)
269                  {;}
270  
271          ~TRootJet() {;}
# Line 327 | Line 300 | public:
300          Float_t cCorrection() const { return cCorrection_; }
301          Float_t udsCorrection() const { return udsCorrection_; }
302          Float_t gCorrection() const { return gCorrection_; }
303 <        TObject* genParton() const { return genParton_.GetObject(); }
304 <        TLorentzVector momentumMCParton() const { return momentumMCParton_; }
305 <        TVector3 vertexMCParton() const { return vertexMCParton_; }
306 <        Int_t pdgIdMCParton() const { return pdgIdMCParton_; }
307 <        TLorentzVector momentumMCJet() const { return momentumMCJet_; }
308 <        TVector3 vertexMCJet() const { return vertexMCJet_; }
309 <        Int_t pdgIdMCJet() const { return pdgIdMCJet_; }
303 >        Double_t genJetEnergy() const { return genJetEnergy_; }
304 >        Int_t genJetIndex() const { return genJetIndex_; }
305 >        TRootParticle* genParton() const { return genParticle(); }
306 >        TRootParticle* genJet() const { return (TRootParticle*) genJet_.GetObject() ;}
307 >        Bool_t isTopJet() const { return isTopJet_; }
308 >
309 >        virtual TString typeName() const { return "TRootJet"; }
310  
311  
312          void setJetType(Int_t jetType) { jetType_ = jetType; }
# Line 365 | Line 338 | public:
338          void setCCorrection(Float_t cCorrection) { cCorrection_ = cCorrection; }
339          void setUDSCorrection(Float_t udsCorrection) { udsCorrection_ = udsCorrection; }
340          void setGCorrection(Float_t gCorrection) { gCorrection_ = gCorrection; }
341 <        void setGenParton(TObject* genParton) { genParton_ = genParton; }
342 <        void setMomentumMCParton(TLorentzVector momentumMCParton) { momentumMCParton_ = momentumMCParton; }
343 <        void setVertexMCParton(TVector3 vertexMCParton) { vertexMCParton_ = vertexMCParton; }
344 <        void setPdgIdMCParton(Int_t pdgIdMCParton) { pdgIdMCParton_ = pdgIdMCParton; }
345 <        void setMomentumMCJet(TLorentzVector momentumMCJet) { momentumMCJet_ = momentumMCJet; }
373 <        void setVertexMCJet(TVector3 vertexMCJet) { vertexMCJet_ = vertexMCJet; }
374 <        void setPdgIdMCJet(Int_t pdgIdMCJet) { pdgIdMCJet_ = pdgIdMCJet; }
375 <
376 <
341 >        void setGenJetEnergy(Double_t genJetEnergy) { genJetEnergy_ = genJetEnergy; }
342 >        void setGenJetIndex(Int_t genJetIndex) { genJetIndex_ = genJetIndex; }
343 >        //void setGenParton(TObject* genParton) { genParton_ = genParton; }
344 >        void setGenJet(TObject* genJet) { genJet_ = genJet; }
345 >        void setIsTopJet(Bool_t isTopJet) { isTopJet_ = isTopJet; }
346  
347          friend std::ostream& operator<< (std::ostream& stream, const TRootJet& jet) {
348                  stream << "TRootJet - Charge=" << setw(2) << jet.charge() << " (Et,eta,phi)=("<< setw(10) << jet.Et() <<","<< setw(10) << jet.Eta() <<","<< setw(10) << jet.Phi() << ")"
# Line 384 | Line 353 | public:
353  
354   private:
355  
356 +        
357          // Variables from reco::Jet
358          Int_t jetType_;                     // 0 = Unknown ; 1 = CaloJet ; 2 = PFJet
359          Int_t nConstituents_;               // Number of constituents of the jet (calotowers for CaloJet / PFParticles for PFJet)
# Line 400 | Line 370 | private:
370          Float_t dR05EnergyFraction_;        // Fraction of the jet energy in a DeltaR=0.1 cone
371          Float_t ecalEnergyFraction_;        // ECAL Energy Fraction
372          Float_t hcalEnergyFraction_;        // HCAL Energy Fraction
373 <        Float_t chargedEnergyFraction_;     // Charged Energy Fraction - Only available for reco::PFJet
373 >        Float_t chargedEnergyFraction_;     // Charged Energy Fraction - Only available for reco::PFJet
374  
375  
376          // Variables from pat::Jet
# Line 411 | Line 381 | private:
381          Float_t chargedBroadnessDR04_;      // charged energy in a cone DR=0.4 / jet charged energy
382          Float_t chargedBroadnessDR05_;      // charged energy in a cone DR=0.5 / jet charged energy
383          Float_t btag_trackCountingHighEff_; // b-tagging ; Track counting High Efficiency
384 <        Float_t btag_trackCountingHighPur_; // b-tagging ; Track counting High Purity
384 >        Float_t btag_trackCountingHighPur_; // b-tagging ; Track counting High Purity
385          Float_t btag_jetProbability_;       // b-tagging ; Jet probability
386          Float_t bCorrection_;               // correction factor for b hypothesis
387          Float_t cCorrection_;               // correction factor for c hypothesis
388          Float_t udsCorrection_;             // correction factor for uds hypothesis
389          Float_t gCorrection_;               // correction factor for gluon hypothesis
390  
391 +        Double_t genJetEnergy_;             // energy of matched genJet
392 +        Int_t genJetIndex_;                // index of matched genJet in genJets TCloneArray
393 +        TRef genJet_;                       // reference to matched genJet (kept in genJets branch)
394  
395 <        // Matched genParticle
396 <        TRef genParton_;
397 <        TLorentzVector momentumMCParton_;
425 <        TVector3 vertexMCParton_;
426 <        Int_t pdgIdMCParton_;
427 <        TLorentzVector momentumMCJet_;
428 <        TVector3 vertexMCJet_;
429 <        Int_t pdgIdMCJet_;
430 <
431 <
432 <  ClassDef (TRootJet,1);
395 >        Bool_t isTopJet_;                   // Is parton matched to the jet a decay product of the top quark ?
396 >        
397 >  ClassDef (TRootJet,2);
398   };
399  
400   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines