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 |
#include "MitAna/DataTree/interface/TrackCol.h"
|
16 |
#include "MitAna/DataTree/interface/Electron.h"
|
17 |
#include "MitAna/DataTree/interface/ElectronCol.h"
|
18 |
#include "MitAna/DataTree/interface/BaseVertex.h"
|
19 |
#include "MitAna/DataTree/interface/DecayParticleCol.h"
|
20 |
#include "MitAna/DataTree/interface/VertexCol.h"
|
21 |
#include "MitAna/DataTree/interface/BeamSpotCol.h"
|
22 |
#include "MitAna/DataTree/interface/TriggerObjectCol.h"
|
23 |
#include "MitAna/DataTree/interface/MCParticleCol.h"
|
24 |
#include "MitCommon/MathTools/interface/MathUtils.h"
|
25 |
|
26 |
class TRandom3;
|
27 |
|
28 |
namespace mithep {
|
29 |
class PhotonTools {
|
30 |
public:
|
31 |
PhotonTools();
|
32 |
|
33 |
enum DiphotonR9EtaCats {
|
34 |
kCat1 = 0, //barrel-barrel highr9/highr9
|
35 |
kCat2, //barrel-barrel highr9/lowr9+lowr9/lowr9
|
36 |
kCat3, //barrel-endcap+endcap/endcap highr9/highr9
|
37 |
kCat4 //barrel-endcap+endcap-endcap highr9/lowr9 + lowr9-lowr9
|
38 |
};
|
39 |
|
40 |
enum DiphotonR9EtaPtCats {
|
41 |
kOctCat0,
|
42 |
kOctCat1,
|
43 |
kOctCat2,
|
44 |
kOctCat3,
|
45 |
kOctCat4,
|
46 |
kOctCat5,
|
47 |
kOctCat6,
|
48 |
kOctCat7
|
49 |
};
|
50 |
|
51 |
enum DiphotonR9EtaConversionCats {
|
52 |
kNewCat1 = 0, //barrel-barrel highr9/highr9
|
53 |
kNewCat2, //barrel-barrel highr9/lowr9+lowr9/lowr9 one/two conversion
|
54 |
kNewCat3, //barrel-barrel highr9/lowr9+lowr9/lowr9 no conversion
|
55 |
kNewCat4, //barrel-endcap+endcap/endcap highr9/highr9
|
56 |
kNewCat5, //barrel-endcap+endcap-endcap highr9/lowr9 + lowr9-lowr9 one/two conversion
|
57 |
kNewCat6 //barrel-endcap+endcap-endcap highr9/lowr9 + lowr9-lowr9 no conversion
|
58 |
};
|
59 |
|
60 |
enum CiCBaseLineCats {
|
61 |
kCiCNoCat = 0,
|
62 |
kCiCCat1,
|
63 |
kCiCCat2,
|
64 |
kCiCCat3,
|
65 |
kCiCCat4
|
66 |
};
|
67 |
|
68 |
// Methods for scaling/smearing Photons
|
69 |
static void ScalePhoton(Photon* p, Double_t scale);
|
70 |
static void SmearPhoton(Photon* p, TRandom3* rng, Double_t width, UInt_t iSeed);
|
71 |
|
72 |
static Bool_t PassConversionId(const Photon *p, const DecayParticle *c);
|
73 |
static Bool_t PassElectronVeto(const Photon *p, const ElectronCol *els);
|
74 |
static Double_t ElectronVetoCiC(const Photon *p, const ElectronCol *els);
|
75 |
static Bool_t PassElectronVetoConvRecovery(const Photon *p, const ElectronCol *els, const DecayParticleCol *conversions, const BaseVertex *v);
|
76 |
static Bool_t PassTriggerMatching(const Photon *p, const TriggerObjectCol *trigobjs);
|
77 |
static const DecayParticle *MatchedConversion(const Photon *p, const DecayParticleCol *conversions,
|
78 |
const BaseVertex *vtx, Int_t nWrongHitsMax=1, Double_t probMin=1e-6,
|
79 |
Double_t lxyMin = 2.0, Double_t dRMin = 0.1);
|
80 |
static const DecayParticle *MatchedConversion(const Track *t, const DecayParticleCol *conversions,
|
81 |
const BaseVertex *vtx, Int_t nWrongHitsMax=1, Double_t probMin=1e-6,
|
82 |
Double_t lxyMin = 2.0);
|
83 |
static DiphotonR9EtaCats DiphotonR9EtaCat(const Photon *p1, const Photon *p2);
|
84 |
static DiphotonR9EtaPtCats DiphotonR9EtaPtCat(const Photon *p1, const Photon *p2);
|
85 |
static DiphotonR9EtaConversionCats DiphotonR9EtaConversionCat(const Photon *p1, const Photon *p2, const DecayParticleCol *conversions, const BaseVertex *v);
|
86 |
static CiCBaseLineCats CiCBaseLineCat(const Photon *p);
|
87 |
|
88 |
static const DecayParticle *MatchedCiCConversion(const Photon *p, const DecayParticleCol *conversions,
|
89 |
Double_t dPhiMin=0.1, Double_t dEtaMin=0.1,Double_t dRMin=0.1,
|
90 |
bool print = false);
|
91 |
|
92 |
static bool PassCiCSelection(const Photon* ph,
|
93 |
const Vertex* vtx,
|
94 |
const TrackCol* trackCol,
|
95 |
const ElectronCol* eleCol,
|
96 |
const VertexCol* vtxCol,
|
97 |
double rho, double ptmin,
|
98 |
bool applyEleVeto = true,
|
99 |
bool print = false, float* kin=NULL);
|
100 |
|
101 |
|
102 |
static const MCParticle *MatchMC(const Photon *ph, const MCParticleCol *c, Bool_t matchElectrons = kFALSE);
|
103 |
|
104 |
ClassDef(PhotonTools, 0) // Muon tools
|
105 |
};
|
106 |
}
|
107 |
|
108 |
#endif
|