12 |
|
#define MITPHYSICS_UTILS_PHOTONTOOLS_H |
13 |
|
|
14 |
|
#include "MitAna/DataTree/interface/Photon.h" |
15 |
+ |
#include "MitAna/DataTree/interface/PhotonCol.h" |
16 |
|
#include "MitAna/DataTree/interface/TrackCol.h" |
17 |
|
#include "MitAna/DataTree/interface/Electron.h" |
18 |
|
#include "MitAna/DataTree/interface/ElectronCol.h" |
22 |
|
#include "MitAna/DataTree/interface/BeamSpotCol.h" |
23 |
|
#include "MitAna/DataTree/interface/TriggerObjectCol.h" |
24 |
|
#include "MitAna/DataTree/interface/MCParticleCol.h" |
25 |
+ |
#include "MitAna/DataTree/interface/SuperCluster.h" |
26 |
+ |
#include "MitAna/DataTree/interface/SuperClusterCol.h" |
27 |
|
#include "MitCommon/MathTools/interface/MathUtils.h" |
28 |
|
|
29 |
|
class TRandom3; |
40 |
|
kCat4 //barrel-endcap+endcap-endcap highr9/lowr9 + lowr9-lowr9 |
41 |
|
}; |
42 |
|
|
43 |
+ |
enum DiphotonR9EtaPtCats { |
44 |
+ |
kOctCat0, |
45 |
+ |
kOctCat1, |
46 |
+ |
kOctCat2, |
47 |
+ |
kOctCat3, |
48 |
+ |
kOctCat4, |
49 |
+ |
kOctCat5, |
50 |
+ |
kOctCat6, |
51 |
+ |
kOctCat7 |
52 |
+ |
}; |
53 |
+ |
|
54 |
|
enum DiphotonR9EtaConversionCats { |
55 |
|
kNewCat1 = 0, //barrel-barrel highr9/highr9 |
56 |
|
kNewCat2, //barrel-barrel highr9/lowr9+lowr9/lowr9 one/two conversion |
67 |
|
kCiCCat3, |
68 |
|
kCiCCat4 |
69 |
|
}; |
70 |
+ |
|
71 |
+ |
enum eScaleCats { |
72 |
+ |
kEBlowEtaGold = 0, |
73 |
+ |
kEBlowEtaBad, |
74 |
+ |
kEBhighEtaGold, |
75 |
+ |
kEBhighEtaBad, |
76 |
+ |
kEElowEtaGold, |
77 |
+ |
kEElowEtaBad, |
78 |
+ |
kEEhighEtaGold, |
79 |
+ |
kEEhighEtaBad |
80 |
+ |
}; |
81 |
+ |
|
82 |
+ |
|
83 |
+ |
static eScaleCats EScaleCat(const Photon *p); |
84 |
|
|
85 |
|
// Methods for scaling/smearing Photons |
86 |
|
static void ScalePhoton(Photon* p, Double_t scale); |
87 |
|
static void SmearPhoton(Photon* p, TRandom3* rng, Double_t width, UInt_t iSeed); |
88 |
+ |
static void SmearPhotonError(Photon* p, Double_t width); |
89 |
+ |
static void ScalePhotonR9(Photon *p, Double_t scale); |
90 |
+ |
static void ScalePhotonError(Photon *p, Double_t scale); |
91 |
|
|
92 |
+ |
static Bool_t PassSinglePhotonPresel(const Photon *p,const ElectronCol *els, const DecayParticleCol *conversions, const BaseVertex *v); |
93 |
|
static Bool_t PassConversionId(const Photon *p, const DecayParticle *c); |
94 |
|
static Bool_t PassElectronVeto(const Photon *p, const ElectronCol *els); |
95 |
|
static Double_t ElectronVetoCiC(const Photon *p, const ElectronCol *els); |
97 |
|
static Bool_t PassTriggerMatching(const Photon *p, const TriggerObjectCol *trigobjs); |
98 |
|
static const DecayParticle *MatchedConversion(const Photon *p, const DecayParticleCol *conversions, |
99 |
|
const BaseVertex *vtx, Int_t nWrongHitsMax=1, Double_t probMin=1e-6, |
100 |
< |
Double_t lxyMin = 2.0, Double_t dRMin = 0.1); |
100 |
> |
Double_t lxyMin = 2.0, Double_t dRMin = 0.1); |
101 |
> |
static const DecayParticle *MatchedConversion(const SuperCluster *sc, const DecayParticleCol *conversions, |
102 |
> |
const BaseVertex *vtx, Int_t nWrongHitsMax=1, Double_t probMin=1e-6, |
103 |
> |
Double_t lxyMin = 2.0, Double_t dRMin = 0.1); |
104 |
|
static const DecayParticle *MatchedConversion(const Track *t, const DecayParticleCol *conversions, |
105 |
|
const BaseVertex *vtx, Int_t nWrongHitsMax=1, Double_t probMin=1e-6, |
106 |
|
Double_t lxyMin = 2.0); |
107 |
|
static DiphotonR9EtaCats DiphotonR9EtaCat(const Photon *p1, const Photon *p2); |
108 |
+ |
static DiphotonR9EtaPtCats DiphotonR9EtaPtCat(const Photon *p1, const Photon *p2); |
109 |
|
static DiphotonR9EtaConversionCats DiphotonR9EtaConversionCat(const Photon *p1, const Photon *p2, const DecayParticleCol *conversions, const BaseVertex *v); |
110 |
|
static CiCBaseLineCats CiCBaseLineCat(const Photon *p); |
111 |
|
|
112 |
|
static const DecayParticle *MatchedCiCConversion(const Photon *p, const DecayParticleCol *conversions, |
113 |
|
Double_t dPhiMin=0.1, Double_t dEtaMin=0.1,Double_t dRMin=0.1, |
114 |
|
bool print = false); |
115 |
< |
|
115 |
> |
|
116 |
> |
|
117 |
> |
static const Electron *MatchedElectron(const Photon *p, const ElectronCol *els); |
118 |
> |
static const Photon *MatchedPhoton(const Electron *e, const PhotonCol *phs); |
119 |
> |
static const SuperCluster *MatchedSC(const SuperCluster *psc, const SuperClusterCol *scs, Double_t drMin=0.3); |
120 |
> |
|
121 |
|
static bool PassCiCSelection(const Photon* ph, |
122 |
|
const Vertex* vtx, |
123 |
|
const TrackCol* trackCol, |
127 |
|
bool applyEleVeto = true, |
128 |
|
bool print = false, float* kin=NULL); |
129 |
|
|
89 |
– |
|
90 |
– |
static bool PassCiCSelection(Photon* ph, |
91 |
– |
const Vertex* vtx, |
92 |
– |
const TrackCol* trackCol, |
93 |
– |
const ElectronCol* eleCol, |
94 |
– |
const VertexCol* vtxCol, |
95 |
– |
double rho, double ptmin, |
96 |
– |
bool applyEleVeto = true, |
97 |
– |
bool print = false, float* kin=NULL); |
130 |
|
|
131 |
< |
static const MCParticle *MatchMC(const Photon *ph, const MCParticleCol *c); |
100 |
< |
|
131 |
> |
static const MCParticle *MatchMC(const Particle *ph, const MCParticleCol *c, Bool_t matchElectrons = kFALSE); |
132 |
|
ClassDef(PhotonTools, 0) // Muon tools |
133 |
|
}; |
134 |
|
} |