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; |
67 |
|
kCiCCat3, |
68 |
|
kCiCCat4 |
69 |
|
}; |
70 |
+ |
|
71 |
+ |
enum eScaleCats { |
72 |
+ |
kEBlowEtaGoldCenter = 0, |
73 |
+ |
kEBlowEtaGoldGap, |
74 |
+ |
kEBlowEtaBad, |
75 |
+ |
kEBhighEtaGold, |
76 |
+ |
kEBhighEtaBad, |
77 |
+ |
kEElowEtaGold, |
78 |
+ |
kEElowEtaBad, |
79 |
+ |
kEEhighEtaGold, |
80 |
+ |
kEEhighEtaBad |
81 |
+ |
}; |
82 |
+ |
|
83 |
+ |
|
84 |
+ |
static eScaleCats EScaleCat(const Photon *p); |
85 |
|
|
86 |
|
// Methods for scaling/smearing Photons |
87 |
|
static void ScalePhoton(Photon* p, Double_t scale); |
88 |
|
static void SmearPhoton(Photon* p, TRandom3* rng, Double_t width, UInt_t iSeed); |
89 |
+ |
static void SmearPhotonError(Photon* p, Double_t width); |
90 |
+ |
static void ScalePhotonR9(Photon *p, Double_t scale); |
91 |
+ |
static void ScalePhotonError(Photon *p, Double_t scale); |
92 |
|
|
93 |
+ |
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); |
94 |
|
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); |
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 |
< |
Double_t lxyMin = 2.0, Double_t dRMin = 0.1); |
101 |
> |
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 |
|
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); |
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 |
< |
|
116 |
> |
|
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 |
|
static bool PassCiCSelection(const Photon* ph, |
123 |
|
const Vertex* vtx, |
124 |
|
const TrackCol* trackCol, |
129 |
|
bool print = false, float* kin=NULL); |
130 |
|
|
131 |
|
|
132 |
< |
static const MCParticle *MatchMC(const Photon *ph, const MCParticleCol *c, Bool_t matchElectrons = kFALSE); |
103 |
< |
|
132 |
> |
static const MCParticle *MatchMC(const Particle *ph, const MCParticleCol *c, Bool_t matchElectrons = kFALSE); |
133 |
|
ClassDef(PhotonTools, 0) // Muon tools |
134 |
|
}; |
135 |
|
} |