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 |
+ |
#include "MitAna/DataTree/interface/PFCandidateCol.h" |
30 |
+ |
|
31 |
|
class TRandom3; |
32 |
|
|
33 |
|
namespace mithep { |
42 |
|
kCat4 //barrel-endcap+endcap-endcap highr9/lowr9 + lowr9-lowr9 |
43 |
|
}; |
44 |
|
|
45 |
+ |
enum DiphotonR9EtaPtCats { |
46 |
+ |
kOctCat0, |
47 |
+ |
kOctCat1, |
48 |
+ |
kOctCat2, |
49 |
+ |
kOctCat3, |
50 |
+ |
kOctCat4, |
51 |
+ |
kOctCat5, |
52 |
+ |
kOctCat6, |
53 |
+ |
kOctCat7 |
54 |
+ |
}; |
55 |
+ |
|
56 |
|
enum DiphotonR9EtaConversionCats { |
57 |
|
kNewCat1 = 0, //barrel-barrel highr9/highr9 |
58 |
|
kNewCat2, //barrel-barrel highr9/lowr9+lowr9/lowr9 one/two conversion |
69 |
|
kCiCCat3, |
70 |
|
kCiCCat4 |
71 |
|
}; |
72 |
+ |
|
73 |
+ |
enum eScaleCats { |
74 |
+ |
kEBlowEtaGoldCenter = 0, |
75 |
+ |
kEBlowEtaGoldGap, |
76 |
+ |
kEBlowEtaBad, |
77 |
+ |
kEBhighEtaGold, |
78 |
+ |
kEBhighEtaBad, |
79 |
+ |
kEElowEtaGold, |
80 |
+ |
kEElowEtaBad, |
81 |
+ |
kEEhighEtaGold, |
82 |
+ |
kEEhighEtaBad |
83 |
+ |
}; |
84 |
+ |
|
85 |
+ |
enum ShowerShapeScales { |
86 |
+ |
kNoShowerShapeScaling = 0, |
87 |
+ |
k2011ShowerShape, |
88 |
+ |
k2012ShowerShape |
89 |
+ |
}; |
90 |
+ |
|
91 |
+ |
static eScaleCats EScaleCat(const Photon *p); |
92 |
|
|
93 |
|
// Methods for scaling/smearing Photons |
94 |
|
static void ScalePhoton(Photon* p, Double_t scale); |
95 |
|
static void SmearPhoton(Photon* p, TRandom3* rng, Double_t width, UInt_t iSeed); |
96 |
+ |
static void SmearPhotonError(Photon* p, Double_t width); |
97 |
+ |
static void ScalePhotonR9(Photon *p, Double_t scale); |
98 |
+ |
static void ScalePhotonError(Photon *p, Double_t scale); |
99 |
+ |
|
100 |
+ |
static void ScalePhotonShowerShapes(Photon *p, ShowerShapeScales scale); |
101 |
|
|
102 |
+ |
|
103 |
+ |
static Bool_t PassSinglePhotonPresel(const Photon *p,const ElectronCol *els, const DecayParticleCol *conversions, const BaseVertex *bs, const TrackCol* trackCol, const Vertex *vtx, double rho, Bool_t applyElectronVeto = kTRUE, Bool_t invertElectronVeto = kFALSE); |
104 |
+ |
static Bool_t PassSinglePhotonPreselPFISO(const Photon *p,const ElectronCol *els, const DecayParticleCol *conversions, const BaseVertex *bs, const TrackCol* trackCol,const Vertex *vtx, double rho, const PFCandidateCol *fPFCands, Bool_t applyElectronVeto = kTRUE, Bool_t invertElectronVeto = kFALSE); |
105 |
|
static Bool_t PassConversionId(const Photon *p, const DecayParticle *c); |
106 |
|
static Bool_t PassElectronVeto(const Photon *p, const ElectronCol *els); |
107 |
|
static Double_t ElectronVetoCiC(const Photon *p, const ElectronCol *els); |
109 |
|
static Bool_t PassTriggerMatching(const Photon *p, const TriggerObjectCol *trigobjs); |
110 |
|
static const DecayParticle *MatchedConversion(const Photon *p, const DecayParticleCol *conversions, |
111 |
|
const BaseVertex *vtx, Int_t nWrongHitsMax=1, Double_t probMin=1e-6, |
112 |
< |
Double_t lxyMin = 2.0, Double_t dRMin = 0.1); |
112 |
> |
Double_t lxyMin = 2.0, Double_t dRMin = 0.1); |
113 |
> |
static const DecayParticle *MatchedConversion(const SuperCluster *sc, const DecayParticleCol *conversions, |
114 |
> |
const BaseVertex *vtx, Int_t nWrongHitsMax=1, Double_t probMin=1e-6, |
115 |
> |
Double_t lxyMin = 2.0, Double_t dRMin = 0.1); |
116 |
|
static const DecayParticle *MatchedConversion(const Track *t, const DecayParticleCol *conversions, |
117 |
|
const BaseVertex *vtx, Int_t nWrongHitsMax=1, Double_t probMin=1e-6, |
118 |
|
Double_t lxyMin = 2.0); |
119 |
|
static DiphotonR9EtaCats DiphotonR9EtaCat(const Photon *p1, const Photon *p2); |
120 |
+ |
static DiphotonR9EtaPtCats DiphotonR9EtaPtCat(const Photon *p1, const Photon *p2); |
121 |
|
static DiphotonR9EtaConversionCats DiphotonR9EtaConversionCat(const Photon *p1, const Photon *p2, const DecayParticleCol *conversions, const BaseVertex *v); |
122 |
|
static CiCBaseLineCats CiCBaseLineCat(const Photon *p); |
123 |
|
|
124 |
|
static const DecayParticle *MatchedCiCConversion(const Photon *p, const DecayParticleCol *conversions, |
125 |
|
Double_t dPhiMin=0.1, Double_t dEtaMin=0.1,Double_t dRMin=0.1, |
126 |
|
bool print = false); |
127 |
+ |
|
128 |
+ |
|
129 |
+ |
static const Electron *MatchedElectron(const Photon *p, const ElectronCol *els); |
130 |
+ |
static const Photon *MatchedPhoton(const Electron *e, const PhotonCol *phs); |
131 |
+ |
static const SuperCluster *MatchedSC(const SuperCluster *psc, const SuperClusterCol *scs, Double_t drMin=0.3); |
132 |
+ |
|
133 |
+ |
static const SuperCluster *MatchedPFSC(const SuperCluster *psc, const PhotonCol *pfphos, const ElectronCol *eles, Double_t drMin=0.1); |
134 |
|
|
135 |
|
static bool PassCiCSelection(const Photon* ph, |
136 |
|
const Vertex* vtx, |
141 |
|
bool applyEleVeto = true, |
142 |
|
bool print = false, float* kin=NULL); |
143 |
|
|
144 |
< |
|
145 |
< |
static bool PassCiCSelection(Photon* ph, |
146 |
< |
const Vertex* vtx, |
147 |
< |
const TrackCol* trackCol, |
148 |
< |
const ElectronCol* eleCol, |
149 |
< |
const VertexCol* vtxCol, |
95 |
< |
double rho, double ptmin, |
96 |
< |
bool applyEleVeto = true, |
97 |
< |
bool print = false, float* kin=NULL); |
98 |
< |
|
99 |
< |
static const MCParticle *MatchMC(const Photon *ph, const MCParticleCol *c); |
144 |
> |
static bool PassCiCPFIsoSelection(const Photon* ph, |
145 |
> |
const Vertex* vtx, |
146 |
> |
const PFCandidateCol* pfCol, |
147 |
> |
const VertexCol* vtxCol, |
148 |
> |
double rho, double ptmin, |
149 |
> |
std::vector<double>* kin = NULL); |
150 |
|
|
151 |
+ |
static bool PassVgamma2011Selection(const Photon* ph, double rho); |
152 |
+ |
|
153 |
+ |
static const MCParticle *MatchMC(const Particle *ph, const MCParticleCol *c, Bool_t matchElectrons = kFALSE); |
154 |
|
ClassDef(PhotonTools, 0) // Muon tools |
155 |
|
}; |
156 |
|
} |