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.7 by lethuill, Fri Dec 19 12:26:01 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 +                ,genJetEnergy_(-9999.)
44 +                ,genJetIndex_(-9999)
45                  ,genJet_(0)
46 +                ,isTopJet_(false)
47                  {;}
48  
49          TRootJet(const TRootJet& jet) :
# Line 80 | Line 77 | public:
77                  ,cCorrection_(jet.cCorrection_)
78                  ,udsCorrection_(jet.udsCorrection_)
79                  ,gCorrection_(jet.gCorrection_)
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 114 | Line 114 | public:
114                  ,cCorrection_(-9999.)
115                  ,udsCorrection_(-9999.)
116                  ,gCorrection_(-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 148 | Line 151 | public:
151                  ,cCorrection_(-9999.)
152                  ,udsCorrection_(-9999.)
153                  ,gCorrection_(-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 182 | Line 188 | public:
188                  ,cCorrection_(-9999.)
189                  ,udsCorrection_(-9999.)
190                  ,gCorrection_(-9999.)
191 +                ,genJetEnergy_(-9999.)
192 +                ,genJetIndex_(-9999)
193                  ,genJet_(0)
194 +                ,isTopJet_(false)
195                  {;}
196  
197          TRootJet(const TLorentzVector &momentum) :
# Line 216 | Line 225 | public:
225                  ,cCorrection_(-9999.)
226                  ,udsCorrection_(-9999.)
227                  ,gCorrection_(-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 250 | Line 262 | public:
262                  ,cCorrection_(-9999.)
263                  ,udsCorrection_(-9999.)
264                  ,gCorrection_(-9999.)
265 +                ,genJetEnergy_(-9999.)
266 +                ,genJetIndex_(-9999)
267                  ,genJet_(0)
268 +                ,isTopJet_(false)
269                  {;}
270  
271          ~TRootJet() {;}
# Line 285 | 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 <        TObject* genJet() const { return genJet_.GetObject(); }
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  
# Line 320 | 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 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 <
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 333 | 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 349 | 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 360 | 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 <        TRef genJet_;
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 <  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