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