forked from UCATLAS/xAODAnaHelpers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PhotonSelector.h
131 lines (94 loc) · 4.22 KB
/
PhotonSelector.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#ifndef xAODAnaHelpers_PhotonSelector_H
#define xAODAnaHelpers_PhotonSelector_H
// algorithm wrapper
#include <xAODAnaHelpers/Algorithm.h>
#include <xAODTracking/VertexContainer.h>
#include <xAODEgamma/PhotonContainer.h>
namespace CP {
class IsolationSelectionTool;
}
namespace Trig {
class TrigDecisionTool;
//class TrigEgammaMatchingTool;
}
#include <TH1D.h>
class PhotonSelector : public xAH::Algorithm
{
public:
bool m_useCutFlow;
/* configuration variables */
std::string m_inContainerName; /* input container name */
std::string m_outContainerName; /* output container name */
std::string m_outAuxContainerName; /* output auxiliary container name */
std::string m_inputAlgoSystNames;
std::string m_outputAlgoSystNames;
bool m_decorateSelectedObjects; /* decorate selected objects - default "passSel" */
bool m_createSelectedContainer; /* fill using SG::VIEW_ELEMENTS to be light weight */
int m_nToProcess; /* look at n objects */
int m_pass_min; /* minimum number of objects passing cuts */
int m_pass_max; /* maximum number of objects passing cuts */
float m_pT_max; /* require pT < pt_max */
float m_pT_min; /* require pT > pt_min */
float m_eta_max; /* require |eta| < eta_max */
bool m_vetoCrack; /* require |eta| outside crack region */
bool m_doAuthorCut;
bool m_doOQCut;
/* photon PID */
std::string m_photonIdCut; /* Name of ID variable to cut */
/* isolation */
std::string m_MinIsoWPCut; /* reject objects which do not pass this isolation cut - default = "" (no cut) */
std::string m_IsoWPList; /* decorate objects with 'isIsolated_*' flag for each WP in this input list - default = all current ASG WPs */
/* trigger matching */
std::string m_PhTrigChains; /* A comma-separated string w/ alll the HLT electron trigger chains for which you want to perform the matching.
This is passed by the user as input in configuration
If left empty (as it is by default), no trigger matching will be attempted at all */
private:
int m_numEvent; //!
int m_numObject; //!
int m_numEventPass; //!
int m_weightNumEventPass; //!
int m_numObjectPass; //!
/* event-level cutflow */
TH1D* m_cutflowHist; //!
TH1D* m_cutflowHistW; //!
int m_cutflow_bin; //!
/* object-level cutflow */
TH1D* m_ph_cutflowHist_1; //!
int m_ph_cutflow_all; //!
int m_ph_cutflow_author_cut; //!
int m_ph_cutflow_OQ_cut; //!
int m_ph_cutflow_PID_cut; //!
int m_ph_cutflow_ptmax_cut; //!
int m_ph_cutflow_ptmin_cut; //!
int m_ph_cutflow_eta_cut; //!
int m_ph_cutflow_iso_cut; //!
std::vector<std::string> m_IsoKeys; //!
/* tools */
CP::IsolationSelectionTool* m_IsolationSelectionTool; //!
/* trigger decision and matching */
Trig::TrigDecisionTool* m_trigDecTool; //!
//Trig::TrigEgammaMatchingTool* m_match_Tool; //!
std::vector<std::string> m_PhTrigChainsList; //! /* contains all the HLT trigger chains tokens extracted from m_ElTrigChains */
public:
/* this is a standard constructor */
PhotonSelector (std::string className = "PhotonSelector");
~PhotonSelector();
/* these are the functions inherited from Algorithm */
virtual EL::StatusCode setupJob (EL::Job& job);
virtual EL::StatusCode fileExecute ();
virtual EL::StatusCode histInitialize ();
virtual EL::StatusCode changeInput (bool firstFile);
virtual EL::StatusCode initialize ();
virtual EL::StatusCode execute ();
virtual EL::StatusCode postExecute ();
virtual EL::StatusCode finalize ();
virtual EL::StatusCode histFinalize ();
/* these are the functions not inherited from Algorithm */
bool executeSelection( const xAOD::PhotonContainer* inPhotons, float mcEvtWeight, bool countPass,
ConstDataVector<xAOD::PhotonContainer>* selectedPhotons );
virtual bool passCuts( const xAOD::Photon* photon );
/// @cond
ClassDef(PhotonSelector, 1);
/// @endcond
};
#endif //#ifndef xAODAnaHelpers_PhotonSelector_H