ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Utils/interface/PhotonTools.h
Revision: 1.15
Committed: Sun Dec 11 00:03:05 2011 UTC (13 years, 4 months ago) by bendavid
Content type: text/plain
Branch: MAIN
Changes since 1.14: +3 -2 lines
Log Message:
more photon updates for mva plus id analysis

File Contents

# User Rev Content
1 bendavid 1.1 //--------------------------------------------------------------------------------------------------
2     // $Id $
3     //
4     // PhotonTools
5     //
6     // Helper Class for photon Identification decisions.
7     //
8     // Authors: J.Bendavid
9     //--------------------------------------------------------------------------------------------------
10    
11     #ifndef MITPHYSICS_UTILS_PHOTONTOOLS_H
12     #define MITPHYSICS_UTILS_PHOTONTOOLS_H
13    
14     #include "MitAna/DataTree/interface/Photon.h"
15 bendavid 1.11 #include "MitAna/DataTree/interface/PhotonCol.h"
16 fabstoec 1.4 #include "MitAna/DataTree/interface/TrackCol.h"
17 bendavid 1.1 #include "MitAna/DataTree/interface/Electron.h"
18     #include "MitAna/DataTree/interface/ElectronCol.h"
19     #include "MitAna/DataTree/interface/BaseVertex.h"
20     #include "MitAna/DataTree/interface/DecayParticleCol.h"
21     #include "MitAna/DataTree/interface/VertexCol.h"
22     #include "MitAna/DataTree/interface/BeamSpotCol.h"
23     #include "MitAna/DataTree/interface/TriggerObjectCol.h"
24 bendavid 1.9 #include "MitAna/DataTree/interface/MCParticleCol.h"
25 bendavid 1.11 #include "MitAna/DataTree/interface/SuperCluster.h"
26     #include "MitAna/DataTree/interface/SuperClusterCol.h"
27 bendavid 1.1 #include "MitCommon/MathTools/interface/MathUtils.h"
28    
29 fabstoec 1.6 class TRandom3;
30    
31 bendavid 1.1 namespace mithep {
32     class PhotonTools {
33     public:
34     PhotonTools();
35    
36     enum DiphotonR9EtaCats {
37     kCat1 = 0, //barrel-barrel highr9/highr9
38     kCat2, //barrel-barrel highr9/lowr9+lowr9/lowr9
39     kCat3, //barrel-endcap+endcap/endcap highr9/highr9
40     kCat4 //barrel-endcap+endcap-endcap highr9/lowr9 + lowr9-lowr9
41     };
42    
43 bendavid 1.10 enum DiphotonR9EtaPtCats {
44     kOctCat0,
45     kOctCat1,
46     kOctCat2,
47     kOctCat3,
48     kOctCat4,
49     kOctCat5,
50     kOctCat6,
51     kOctCat7
52     };
53    
54 bendavid 1.1 enum DiphotonR9EtaConversionCats {
55     kNewCat1 = 0, //barrel-barrel highr9/highr9
56     kNewCat2, //barrel-barrel highr9/lowr9+lowr9/lowr9 one/two conversion
57     kNewCat3, //barrel-barrel highr9/lowr9+lowr9/lowr9 no conversion
58     kNewCat4, //barrel-endcap+endcap/endcap highr9/highr9
59     kNewCat5, //barrel-endcap+endcap-endcap highr9/lowr9 + lowr9-lowr9 one/two conversion
60     kNewCat6 //barrel-endcap+endcap-endcap highr9/lowr9 + lowr9-lowr9 no conversion
61     };
62    
63 fabstoec 1.3 enum CiCBaseLineCats {
64 fabstoec 1.6 kCiCNoCat = 0,
65     kCiCCat1,
66 fabstoec 1.3 kCiCCat2,
67     kCiCCat3,
68     kCiCCat4
69     };
70 bendavid 1.12
71     enum eScaleCats {
72 bendavid 1.15 kEBlowEtaGoldCenter = 0,
73     kEBlowEtaGoldGap,
74 bendavid 1.12 kEBlowEtaBad,
75     kEBhighEtaGold,
76     kEBhighEtaBad,
77     kEElowEtaGold,
78     kEElowEtaBad,
79     kEEhighEtaGold,
80     kEEhighEtaBad
81     };
82    
83    
84     static eScaleCats EScaleCat(const Photon *p);
85 fabstoec 1.3
86 fabstoec 1.6 // Methods for scaling/smearing Photons
87     static void ScalePhoton(Photon* p, Double_t scale);
88 fabstoec 1.8 static void SmearPhoton(Photon* p, TRandom3* rng, Double_t width, UInt_t iSeed);
89 bendavid 1.11 static void SmearPhotonError(Photon* p, Double_t width);
90 bendavid 1.12 static void ScalePhotonR9(Photon *p, Double_t scale);
91     static void ScalePhotonError(Photon *p, Double_t scale);
92 fabstoec 1.4
93 bendavid 1.15 static Bool_t PassSinglePhotonPresel(const Photon *p,const ElectronCol *els, const DecayParticleCol *conversions, const BaseVertex *v, const TrackCol* trackCol,double rho, Bool_t applyElectronVeto = kTRUE);
94 fabstoec 1.6 static Bool_t PassConversionId(const Photon *p, const DecayParticle *c);
95     static Bool_t PassElectronVeto(const Photon *p, const ElectronCol *els);
96     static Double_t ElectronVetoCiC(const Photon *p, const ElectronCol *els);
97     static Bool_t PassElectronVetoConvRecovery(const Photon *p, const ElectronCol *els, const DecayParticleCol *conversions, const BaseVertex *v);
98     static Bool_t PassTriggerMatching(const Photon *p, const TriggerObjectCol *trigobjs);
99     static const DecayParticle *MatchedConversion(const Photon *p, const DecayParticleCol *conversions,
100     const BaseVertex *vtx, Int_t nWrongHitsMax=1, Double_t probMin=1e-6,
101 bendavid 1.11 Double_t lxyMin = 2.0, Double_t dRMin = 0.1);
102     static const DecayParticle *MatchedConversion(const SuperCluster *sc, const DecayParticleCol *conversions,
103     const BaseVertex *vtx, Int_t nWrongHitsMax=1, Double_t probMin=1e-6,
104     Double_t lxyMin = 2.0, Double_t dRMin = 0.1);
105 fabstoec 1.6 static const DecayParticle *MatchedConversion(const Track *t, const DecayParticleCol *conversions,
106     const BaseVertex *vtx, Int_t nWrongHitsMax=1, Double_t probMin=1e-6,
107     Double_t lxyMin = 2.0);
108     static DiphotonR9EtaCats DiphotonR9EtaCat(const Photon *p1, const Photon *p2);
109 bendavid 1.10 static DiphotonR9EtaPtCats DiphotonR9EtaPtCat(const Photon *p1, const Photon *p2);
110 fabstoec 1.6 static DiphotonR9EtaConversionCats DiphotonR9EtaConversionCat(const Photon *p1, const Photon *p2, const DecayParticleCol *conversions, const BaseVertex *v);
111     static CiCBaseLineCats CiCBaseLineCat(const Photon *p);
112    
113     static const DecayParticle *MatchedCiCConversion(const Photon *p, const DecayParticleCol *conversions,
114     Double_t dPhiMin=0.1, Double_t dEtaMin=0.1,Double_t dRMin=0.1,
115     bool print = false);
116 bendavid 1.11
117    
118     static const Electron *MatchedElectron(const Photon *p, const ElectronCol *els);
119     static const Photon *MatchedPhoton(const Electron *e, const PhotonCol *phs);
120     static const SuperCluster *MatchedSC(const SuperCluster *psc, const SuperClusterCol *scs, Double_t drMin=0.3);
121    
122 fabstoec 1.7 static bool PassCiCSelection(const Photon* ph,
123     const Vertex* vtx,
124     const TrackCol* trackCol,
125     const ElectronCol* eleCol,
126     const VertexCol* vtxCol,
127     double rho, double ptmin,
128     bool applyEleVeto = true,
129     bool print = false, float* kin=NULL);
130    
131 bendavid 1.9
132 bendavid 1.11 static const MCParticle *MatchMC(const Particle *ph, const MCParticleCol *c, Bool_t matchElectrons = kFALSE);
133 bendavid 1.1 ClassDef(PhotonTools, 0) // Muon tools
134 fabstoec 1.6 };
135 bendavid 1.1 }
136    
137     #endif