ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Utils/interface/PhotonTools.h
Revision: 1.9
Committed: Wed Jul 27 15:17:37 2011 UTC (13 years, 9 months ago) by bendavid
Content type: text/plain
Branch: MAIN
Changes since 1.8: +3 -0 lines
Log Message:
update photon stuff

File Contents

# Content
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 DiphotonR9EtaConversionCats {
41 kNewCat1 = 0, //barrel-barrel highr9/highr9
42 kNewCat2, //barrel-barrel highr9/lowr9+lowr9/lowr9 one/two conversion
43 kNewCat3, //barrel-barrel highr9/lowr9+lowr9/lowr9 no conversion
44 kNewCat4, //barrel-endcap+endcap/endcap highr9/highr9
45 kNewCat5, //barrel-endcap+endcap-endcap highr9/lowr9 + lowr9-lowr9 one/two conversion
46 kNewCat6 //barrel-endcap+endcap-endcap highr9/lowr9 + lowr9-lowr9 no conversion
47 };
48
49 enum CiCBaseLineCats {
50 kCiCNoCat = 0,
51 kCiCCat1,
52 kCiCCat2,
53 kCiCCat3,
54 kCiCCat4
55 };
56
57 // Methods for scaling/smearing Photons
58 static void ScalePhoton(Photon* p, Double_t scale);
59 static void SmearPhoton(Photon* p, TRandom3* rng, Double_t width, UInt_t iSeed);
60
61 static Bool_t PassConversionId(const Photon *p, const DecayParticle *c);
62 static Bool_t PassElectronVeto(const Photon *p, const ElectronCol *els);
63 static Double_t ElectronVetoCiC(const Photon *p, const ElectronCol *els);
64 static Bool_t PassElectronVetoConvRecovery(const Photon *p, const ElectronCol *els, const DecayParticleCol *conversions, const BaseVertex *v);
65 static Bool_t PassTriggerMatching(const Photon *p, const TriggerObjectCol *trigobjs);
66 static const DecayParticle *MatchedConversion(const Photon *p, const DecayParticleCol *conversions,
67 const BaseVertex *vtx, Int_t nWrongHitsMax=1, Double_t probMin=1e-6,
68 Double_t lxyMin = 2.0, Double_t dRMin = 0.1);
69 static const DecayParticle *MatchedConversion(const Track *t, const DecayParticleCol *conversions,
70 const BaseVertex *vtx, Int_t nWrongHitsMax=1, Double_t probMin=1e-6,
71 Double_t lxyMin = 2.0);
72 static DiphotonR9EtaCats DiphotonR9EtaCat(const Photon *p1, const Photon *p2);
73 static DiphotonR9EtaConversionCats DiphotonR9EtaConversionCat(const Photon *p1, const Photon *p2, const DecayParticleCol *conversions, const BaseVertex *v);
74 static CiCBaseLineCats CiCBaseLineCat(const Photon *p);
75
76 static const DecayParticle *MatchedCiCConversion(const Photon *p, const DecayParticleCol *conversions,
77 Double_t dPhiMin=0.1, Double_t dEtaMin=0.1,Double_t dRMin=0.1,
78 bool print = false);
79
80 static bool PassCiCSelection(const Photon* ph,
81 const Vertex* vtx,
82 const TrackCol* trackCol,
83 const ElectronCol* eleCol,
84 const VertexCol* vtxCol,
85 double rho, double ptmin,
86 bool applyEleVeto = true,
87 bool print = false, float* kin=NULL);
88
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);
98
99 static const MCParticle *MatchMC(const Photon *ph, const MCParticleCol *c);
100
101 ClassDef(PhotonTools, 0) // Muon tools
102 };
103 }
104
105 #endif