-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPfoAnalysis.h
203 lines (167 loc) · 7.75 KB
/
PfoAnalysis.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
/**
* @file PandoraAnalysis/include/PfoAnalysis.h
*
* @brief Header file for the pfo analysis class.
*
* $Log: $
*/
#ifndef PFO_ANALYSIS_H
#define PFO_ANALYSIS_H 1
#include "EVENT/ReconstructedParticle.h"
#include "marlin/Processor.h"
class TFile;
class TH1F;
class TTree;
//------------------------------------------------------------------------------------------------------------------------------------------
/**
* @brief PfoAnalysis class
*/
class PfoAnalysis : public marlin::Processor
{
public:
/**
* @brief Default constructor
*/
PfoAnalysis();
/**
* @brief Create new processor
*/
virtual Processor *newProcessor();
/**
* @brief Initialize, called at startup
*/
virtual void init();
/**
* @brief Process run header
*
* @param pLCRunHeader the lc run header
*/
virtual void processRunHeader(lcio::LCRunHeader *pLCRunHeader);
/**
* @brief Process event, main entry point
*
* @param pLCEvent the lc event
*/
virtual void processEvent(EVENT::LCEvent *pLCEvent);
/**
* @brief Checks for event
*
* @param pLCEvent the lc event
*/
virtual void check(EVENT::LCEvent *pLCEvent);
/**
* @brief End, called at shutdown
*/
virtual void end();
private:
/**
* @brief Clear current event details
*/
void Clear();
/**
* @brief Extract lcio collections
*
* @param pLCEvent the lc event
*/
void ExtractCollections(EVENT::LCEvent *pLCEvent);
/**
* @brief Make quark variables
*/
void MakeQuarkVariables();
/**
* @brief Perform pfo analysis
*/
void PerformPfoAnalysis();
typedef std::vector<ReconstructedParticle *> ParticleVector;
typedef std::vector<MCParticle*> MCParticleVector;
typedef std::vector<std::string> StringVector;
int m_nRun; ///<
int m_nEvt; ///<
int m_nRunSum; ///<
int m_nEvtSum; ///<
float m_hadronicEnergyResolution; ///<
StringVector m_inputQuarkParticleCollections; ///<
StringVector m_inputMCParticleCollections; ///<
StringVector m_inputParticleCollections; ///<
StringVector m_inputReclusterMonitoringCollections; ///<
StringVector m_mcParticleCollections; ///<
StringVector m_coilCollections; ///<
int m_printing; ///<
std::string m_rootFile; ///<
ParticleVector m_pfoVector; ///<
ParticleVector m_mcPfoVector; ///<
ParticleVector m_quarkPfoVector; ///<
MCParticleVector m_pfoTargetVector; ///<
int m_nPfosTotal; ///<
int m_nPfosNeutralHadrons; ///<
int m_nPfosPhotons; ///<
int m_nPfosTracks; ///<
int m_nPfosClusterless; ///<
float m_pfoEnergyTotal; ///<
float m_pfoEnergyNeutralHadrons; ///<
float m_pfoEnergyPhotons; ///<
float m_pfoEnergyClusterless; ///<
float m_pfoChi2TrackTotal; ///<
float m_pfoClusterEnergySum;
float m_pfoEnergyTracks; ///<
float m_pfoClusterEnergyTracks; ///<
float m_pfoClusterEnergyNeutral; ///<
float m_pfoECalToEmEnergy; ///<
float m_pfoECalToHadEnergy; ///<
float m_pfoHCalToEmEnergy; ///<
float m_pfoHCalToHadEnergy; ///<
float m_pfoMuonToEnergy; ///<
float m_pfoOtherEnergy; ///<
float m_pfoMassTotal; ///<
float m_mcEnergyTotal; ///<
float m_mcEnergyENu; ///<
float m_mcEnergyCoil; ///<
float m_mcEnergyFwd; ///<
float m_eQQ; ///<
float m_eQ1; ///<
float m_eQ2; ///<
float m_costQQ; ///<
float m_costQ1; ///<
float m_costQ2; ///<
float m_mQQ; ///<
float m_thrust; ///<
int m_qPdg; ///<
float m_netEnergyChange; ///<
float m_sumModulusEnergyChanges; ///<
float m_sumSquaredEnergyChanges; ///<
typedef std::vector<float> FloatVector;
FloatVector m_pfoEnergies; ///<
FloatVector m_pfoClusterEnergies; ///<
FloatVector m_pfoPx; ///<
FloatVector m_pfoPy; ///<
FloatVector m_pfoPz; ///<
FloatVector m_pfoCosTheta; ///<
FloatVector m_pfoChiTrack; ///<
FloatVector m_pfoTargetEnergies; ///<
FloatVector m_pfoTargetPx; ///<
FloatVector m_pfoTargetPy; ///<
FloatVector m_pfoTargetPz; ///<
FloatVector m_pfoTargetCosTheta; ///<
typedef std::vector<int> IntVector;
IntVector m_pfoPdgCodes; ///<
IntVector m_pfoTargetPdgCodes; ///<
int m_nPfoTargetsTotal; ///<
int m_nPfoTargetsNeutralHadrons; ///<
int m_nPfoTargetsPhotons; ///<
int m_nPfoTargetsTracks; ///<
float m_pfoTargetsEnergyTotal; ////<
float m_pfoTargetsEnergyNeutralHadrons; ////<
float m_pfoTargetsEnergyPhotons; ////<
float m_pfoTargetsEnergyTracks; ////<
TFile *m_pTFile; ///<
TTree *m_tree; ///<
TH1F *m_hPfoEnergySum; ///<
TH1F *m_hPfoEnergySumL7A; ///<
TH1F *m_hpfoEnergyNoCluster; ///<
};
//------------------------------------------------------------------------------------------------------------------------------------------
inline marlin::Processor *PfoAnalysis::newProcessor()
{
return new PfoAnalysis;
}
#endif // #ifndef PFO_ANALYSIS_H