CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/DataFormats/JetReco/interface/PileupJetIdentifier.h

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------------------------------
00002 // $Id $
00003 //
00004 // PileupJetIdentifier
00005 //
00006 // Author: P. Musella, P. Harris
00007 //--------------------------------------------------------------------------------------------------
00008 
00009 #include <string>
00010 #include <map>
00011 
00012 #ifndef RecoJets_JetProducers_interface_PileupJetIdentifier_h
00013 #define RecoJets_JetProducers_interface_PileupJetIdentifier_h
00014 
00015 #define DECLARE_VARIABLE(NAME,TYPE)             \
00016         private: \
00017         TYPE NAME ## _;                 \
00018         public: \
00019         const TYPE & NAME() const { return NAME ## _; } \
00020         void NAME(const TYPE val) { NAME ## _ = val; } 
00021 
00022 // ----------------------------------------------------------------------------------------------------
00023 class StoredPileupJetIdentifier {
00024 public:
00025         friend class PileupJetIdAlgo;
00026 
00027         StoredPileupJetIdentifier();
00028         ~StoredPileupJetIdentifier(); 
00029         
00030         DECLARE_VARIABLE(jetEta   ,float);
00031         DECLARE_VARIABLE(jetPt    ,float);
00032 
00033         DECLARE_VARIABLE(nCharged   ,float);
00034         DECLARE_VARIABLE(nNeutrals,float);
00035 
00036         DECLARE_VARIABLE(dZ         ,float);  
00037         DECLARE_VARIABLE(nParticles ,float);  
00038 
00039         DECLARE_VARIABLE(dR2Mean    ,float);  
00040         void          RMS(const float val) { dR2Mean(val);     }
00041         const float & RMS() const          { return dR2Mean(); }
00042         
00043         DECLARE_VARIABLE(dRMean     ,float);  
00044 
00045         DECLARE_VARIABLE(frac01    ,float);  
00046         DECLARE_VARIABLE(frac02    ,float);  
00047         DECLARE_VARIABLE(frac03    ,float);  
00048         DECLARE_VARIABLE(frac04    ,float);  
00049         DECLARE_VARIABLE(frac05   ,float);  
00050         DECLARE_VARIABLE(frac06   ,float);  
00051         DECLARE_VARIABLE(frac07   ,float);  
00052         
00053         DECLARE_VARIABLE(beta       ,float);  
00054         DECLARE_VARIABLE(betaStar   ,float);  
00055         DECLARE_VARIABLE(betaClassic   ,float);  
00056         DECLARE_VARIABLE(betaStarClassic   ,float);  
00057         
00058         DECLARE_VARIABLE(ptD        ,float);
00059 
00060         DECLARE_VARIABLE(nvtx   ,float);  
00061 };
00062 
00063 // ----------------------------------------------------------------------------------------------------
00064 class PileupJetIdentifier : public StoredPileupJetIdentifier {
00065 public:
00066         friend class PileupJetIdAlgo;
00067 
00068         PileupJetIdentifier();
00069         ~PileupJetIdentifier(); 
00070 
00071         PileupJetIdentifier & operator= (const StoredPileupJetIdentifier & lhs) { ((StoredPileupJetIdentifier &)(*this)) = lhs; return *this;}
00072 
00073         enum Id {
00074           kTight  = 0,
00075           kMedium = 1,
00076           kLoose  = 2
00077         };
00078 
00079         static bool passJetId(int flag, Id level) { return ( flag & (1 << level) ) != 0 ; }
00080         
00081         DECLARE_VARIABLE(idFlag      ,int);
00082         bool passJetId   (Id level) { return passJetId(idFlag_,level); }        
00083 
00084         DECLARE_VARIABLE(mva      ,float);
00085 
00086         DECLARE_VARIABLE(jetPhi   ,float);
00087         DECLARE_VARIABLE(jetM     ,float);
00088 
00089         DECLARE_VARIABLE(chgEMfrac  ,float);
00090         DECLARE_VARIABLE(neuEMfrac  ,float);
00091         DECLARE_VARIABLE(chgHadrfrac,float);
00092         DECLARE_VARIABLE(neuHadrfrac,float);
00093         
00094         DECLARE_VARIABLE(d0         ,float);   
00095         DECLARE_VARIABLE(leadPt     ,float);  
00096         DECLARE_VARIABLE(leadEta    ,float);  
00097         DECLARE_VARIABLE(leadPhi    ,float);  
00098         DECLARE_VARIABLE(secondPt   ,float);  
00099         DECLARE_VARIABLE(secondEta  ,float);  
00100         DECLARE_VARIABLE(secondPhi  ,float);  
00101         DECLARE_VARIABLE(leadNeutPt ,float);  
00102         DECLARE_VARIABLE(leadNeutEta,float);  
00103         DECLARE_VARIABLE(leadNeutPhi,float);  
00104         DECLARE_VARIABLE(leadEmPt   ,float);  
00105         DECLARE_VARIABLE(leadEmEta  ,float);  
00106         DECLARE_VARIABLE(leadEmPhi  ,float);  
00107         DECLARE_VARIABLE(leadChPt   ,float);  
00108         DECLARE_VARIABLE(leadChEta  ,float);  
00109         DECLARE_VARIABLE(leadChPhi  ,float);  
00110 
00111         DECLARE_VARIABLE(dRLeadCent ,float);  
00112         DECLARE_VARIABLE(dRLead2nd  ,float);  
00113         DECLARE_VARIABLE(dRMeanNeut ,float);  
00114         DECLARE_VARIABLE(dRMeanEm   ,float);  
00115         DECLARE_VARIABLE(dRMeanCh   ,float);  
00116 
00117         DECLARE_VARIABLE(ptMean     ,float);
00118         DECLARE_VARIABLE(ptRMS      ,float);
00119         DECLARE_VARIABLE(pt2A       ,float);
00120         DECLARE_VARIABLE(ptDCh      ,float);
00121         DECLARE_VARIABLE(ptDNe      ,float);
00122         DECLARE_VARIABLE(sumPt      ,float);
00123         DECLARE_VARIABLE(sumChPt    ,float);
00124         DECLARE_VARIABLE(sumNePt    ,float);
00125 
00126         DECLARE_VARIABLE(leadFrac    ,float);  
00127         DECLARE_VARIABLE(secondFrac  ,float);  
00128         DECLARE_VARIABLE(thirdFrac   ,float);  
00129         DECLARE_VARIABLE(fourthFrac  ,float);  
00130 
00131         DECLARE_VARIABLE(leadChFrac    ,float);  
00132         DECLARE_VARIABLE(secondChFrac  ,float);  
00133         DECLARE_VARIABLE(thirdChFrac   ,float);  
00134         DECLARE_VARIABLE(fourthChFrac  ,float);  
00135 
00136         DECLARE_VARIABLE(leadNeutFrac    ,float);  
00137         DECLARE_VARIABLE(secondNeutFrac  ,float);  
00138         DECLARE_VARIABLE(thirdNeutFrac   ,float);  
00139         DECLARE_VARIABLE(fourthNeutFrac  ,float);  
00140 
00141         DECLARE_VARIABLE(leadEmFrac    ,float);  
00142         DECLARE_VARIABLE(secondEmFrac  ,float);  
00143         DECLARE_VARIABLE(thirdEmFrac   ,float);  
00144         DECLARE_VARIABLE(fourthEmFrac  ,float);  
00145 
00146         DECLARE_VARIABLE(jetW  ,float);  
00147         DECLARE_VARIABLE(etaW  ,float);  
00148         DECLARE_VARIABLE(phiW  ,float);  
00149 
00150         DECLARE_VARIABLE(majW  ,float);  
00151         DECLARE_VARIABLE(minW  ,float);  
00152 
00153         DECLARE_VARIABLE(chFrac01    ,float);  
00154         DECLARE_VARIABLE(chFrac02    ,float);  
00155         DECLARE_VARIABLE(chFrac03    ,float);  
00156         DECLARE_VARIABLE(chFrac04    ,float);  
00157         DECLARE_VARIABLE(chFrac05   ,float);  
00158         DECLARE_VARIABLE(chFrac06   ,float);  
00159         DECLARE_VARIABLE(chFrac07   ,float);  
00160 
00161         DECLARE_VARIABLE(neutFrac01    ,float);  
00162         DECLARE_VARIABLE(neutFrac02    ,float);  
00163         DECLARE_VARIABLE(neutFrac03    ,float);  
00164         DECLARE_VARIABLE(neutFrac04    ,float);  
00165         DECLARE_VARIABLE(neutFrac05   ,float);  
00166         DECLARE_VARIABLE(neutFrac06   ,float);  
00167         DECLARE_VARIABLE(neutFrac07   ,float);  
00168 
00169         DECLARE_VARIABLE(emFrac01    ,float);  
00170         DECLARE_VARIABLE(emFrac02    ,float);  
00171         DECLARE_VARIABLE(emFrac03    ,float);  
00172         DECLARE_VARIABLE(emFrac04    ,float);  
00173         DECLARE_VARIABLE(emFrac05   ,float);  
00174         DECLARE_VARIABLE(emFrac06   ,float);  
00175         DECLARE_VARIABLE(emFrac07   ,float);  
00176 
00177 };
00178 
00179 #undef DECLARE_VARIABLE
00180 
00181 #endif