1 |
//--------------------------------------------------------------------------------------------------
|
2 |
// $Id: PhotonCiCMod.h,v 1.4 2011/07/03 11:04:50 fabstoec Exp $
|
3 |
//
|
4 |
// PhotonCiCMod
|
5 |
//
|
6 |
// This module applies photon identification criteria and exports a pointer to a collection
|
7 |
// of "good photons" according to the specified identification scheme.
|
8 |
//
|
9 |
// Authors: S.Xie, C.Loizides
|
10 |
//--------------------------------------------------------------------------------------------------
|
11 |
|
12 |
#ifndef MITPHYSICS_MODS_PHOTONCICMOD_H
|
13 |
#define MITPHYSICS_MODS_PHOTONCICMOD_H
|
14 |
|
15 |
#include "MitAna/TreeMod/interface/BaseMod.h"
|
16 |
#include "MitAna/DataTree/interface/PhotonFwd.h"
|
17 |
#include "MitAna/DataTree/interface/TrackCol.h"
|
18 |
#include "MitAna/DataTree/interface/VertexCol.h"
|
19 |
#include "MitAna/DataTree/interface/BeamSpotCol.h"
|
20 |
#include "MitAna/DataTree/interface/PileupEnergyDensityCol.h"
|
21 |
#include "MitAna/DataTree/interface/DecayParticleCol.h"
|
22 |
#include "MitAna/DataTree/interface/ElectronCol.h"
|
23 |
#include "MitAna/DataTree/interface/DecayParticleCol.h"
|
24 |
#include "MitAna/DataTree/interface/PileupInfoCol.h"
|
25 |
#include "MitAna/DataTree/interface/MCParticleCol.h"
|
26 |
|
27 |
class TNtuple;
|
28 |
class TRandom3;
|
29 |
|
30 |
namespace mithep
|
31 |
{
|
32 |
class PhotonCiCMod : public BaseMod
|
33 |
{
|
34 |
public:
|
35 |
PhotonCiCMod(const char *name="PhotonCiCMod",
|
36 |
const char *title="Photon identification module");
|
37 |
|
38 |
~PhotonCiCMod();
|
39 |
|
40 |
Bool_t GetApplySpikeRemoval() const { return fApplySpikeRemoval; }
|
41 |
const char *GetGoodName() const { return GetGoodPhotonsName(); }
|
42 |
const char *GetGoodPhotonsName() const { return fGoodPhotonsName; }
|
43 |
const char *GetInputName() const { return fPhotonBranchName; }
|
44 |
const char *GetOutputName() const { return GetGoodPhotonsName(); }
|
45 |
Double_t GetPtMin() const { return fPhotonPtMin; }
|
46 |
Double_t GetAbsEtaMax() const { return fAbsEtaMax; }
|
47 |
void SetApplySpikeRemoval(Bool_t b) { fApplySpikeRemoval = b; }
|
48 |
void SetGoodName(const char *n) { SetGoodPhotonsName(n); }
|
49 |
void SetGoodPhotonsName(const char *n) { fGoodPhotonsName = n; }
|
50 |
void SetInputName(const char *n) { fPhotonBranchName= n; }
|
51 |
void SetTrackName(const char *n) { fTrackBranchName = n; }
|
52 |
void SetOutputName(const char *n) { SetGoodPhotonsName(n); }
|
53 |
void SetPtMin(Double_t pt) { fPhotonPtMin = pt; }
|
54 |
void SetAbsEtaMax(Double_t x) { fAbsEtaMax = x; }
|
55 |
|
56 |
void SetPVName (TString s) {fPVName = s; fPVFromBranch = false;};
|
57 |
|
58 |
void SetIsData (Bool_t b) { fIsData = b;};
|
59 |
|
60 |
void AddEnCorrPerRun( UInt_t sRun, UInt_t eRun,
|
61 |
Double_t corr_EB_hR9,
|
62 |
Double_t corr_EB_lR9,
|
63 |
Double_t corr_EE_hR9,
|
64 |
Double_t corr_EE_lR9) {
|
65 |
fDataEnCorr_EB_hR9.push_back(corr_EB_hR9);
|
66 |
fDataEnCorr_EB_lR9.push_back(corr_EB_lR9);
|
67 |
fDataEnCorr_EE_hR9.push_back(corr_EE_hR9);
|
68 |
fDataEnCorr_EE_lR9.push_back(corr_EE_lR9);
|
69 |
|
70 |
fRunStart.push_back(sRun);
|
71 |
fRunEnd.push_back(eRun);
|
72 |
};
|
73 |
|
74 |
void SetMCSmearFactors(Double_t _EB_hR9, Double_t _EB_lR9, Double_t _EE_hR9, Double_t _EE_lR9) {
|
75 |
fMCSmear_EB_hR9 = _EB_hR9;
|
76 |
fMCSmear_EB_lR9 = _EB_lR9;
|
77 |
fMCSmear_EE_hR9 = _EE_hR9;
|
78 |
fMCSmear_EE_lR9 = _EE_lR9;
|
79 |
};
|
80 |
|
81 |
void findHiggsPtAndZ(Float_t&, Float_t&);
|
82 |
|
83 |
protected:
|
84 |
void Process();
|
85 |
void SlaveBegin();
|
86 |
unsigned int findBestVertex(Photon* ph1, Photon* ph2, const BaseVertex* bsp, bool print=false);
|
87 |
|
88 |
TString fPhotonBranchName; //name of photon collection (input)
|
89 |
TString fGoodPhotonsName; //name of exported "good photon" collection
|
90 |
TString fTrackBranchName; // name of the track collection (only needed for PU corrected isolation)
|
91 |
TString fPileUpDenName; //name of the PU density collection
|
92 |
TString fElectronName;
|
93 |
Double_t fPhotonPtMin; //min pt cut
|
94 |
Bool_t fApplySpikeRemoval; //whether apply spike removal
|
95 |
Double_t fAbsEtaMax; //max Abs Eta
|
96 |
const PhotonCol *fPhotons; //!photon branch
|
97 |
const TrackCol *fTracks; //!track branch
|
98 |
const PileupEnergyDensityCol *fPileUpDen; //!rho branch
|
99 |
const ElectronCol *fElectrons; //!electron branch
|
100 |
|
101 |
TString fPVName;
|
102 |
const VertexCol *fPV;
|
103 |
Bool_t fPVFromBranch;
|
104 |
|
105 |
const DecayParticleCol *fConversions;
|
106 |
TString fConversionName;
|
107 |
|
108 |
const BeamSpotCol *fBeamspot;
|
109 |
|
110 |
std::vector<Double_t> fDataEnCorr_EB_hR9;
|
111 |
std::vector<Double_t> fDataEnCorr_EB_lR9;
|
112 |
std::vector<Double_t> fDataEnCorr_EE_hR9;
|
113 |
std::vector<Double_t> fDataEnCorr_EE_lR9;
|
114 |
|
115 |
std::vector<UInt_t> fRunStart;
|
116 |
std::vector<UInt_t> fRunEnd;
|
117 |
|
118 |
Double_t fMCSmear_EB_hR9;
|
119 |
Double_t fMCSmear_EB_lR9;
|
120 |
Double_t fMCSmear_EE_hR9;
|
121 |
Double_t fMCSmear_EE_lR9;
|
122 |
|
123 |
Bool_t fIsData;
|
124 |
|
125 |
TNtuple* hCiCTuple;
|
126 |
|
127 |
TRandom3* rng;
|
128 |
|
129 |
TString fMCParticleName;
|
130 |
const MCParticleCol* fMCParticles;
|
131 |
|
132 |
TString fPileUpName;
|
133 |
const PileupInfoCol *fPileUp;
|
134 |
|
135 |
ClassDef(PhotonCiCMod, 1) // Photon identification module
|
136 |
};
|
137 |
}
|
138 |
#endif
|