ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Utils/interface/PhotonTools.h
Revision: 1.6
Committed: Fri Jul 8 17:54:27 2011 UTC (13 years, 9 months ago) by fabstoec
Content type: text/plain
Branch: MAIN
Changes since 1.5: +35 -28 lines
Log Message:
*** empty log message ***

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 "MitCommon/MathTools/interface/MathUtils.h"
24
25 class TRandom3;
26
27 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 enum CiCBaseLineCats {
49 kCiCNoCat = 0,
50 kCiCCat1,
51 kCiCCat2,
52 kCiCCat3,
53 kCiCCat4
54 };
55
56 // Methods for scaling/smearing Photons
57 static void ScalePhoton(Photon* p, Double_t scale);
58 static void SmearPhoton(Photon* p, TRandom3* rng, Double_t width, UInt_t iSeed=0);
59
60 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 static bool PassCiCSelection(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 print = false, float* kin=NULL);
86
87 ClassDef(PhotonTools, 0) // Muon tools
88 };
89 }
90
91 #endif