91{
92
93 bool pass = false;
94
95 auto mon_dEta = Monitored::Scalar( "dEta", -1.0 );
96 auto mon_dPhi = Monitored::Scalar( "dPhi", -1.0 );
97 auto mon_eT_T2Calo = Monitored::Scalar( "Et_em", -1.0 );
98 auto mon_hadET_T2Calo = Monitored::Scalar( "Et_had", -1.0 );
99 auto mon_rCore = Monitored::Scalar( "RCore", -1.0 );
100 auto mon_energyRatio = Monitored::Scalar( "Eratio", -1.0 );
101 auto mon_etaBin = Monitored::Scalar( "EtaBin", -1.0 );
102 auto mon_Eta = Monitored::Scalar( "Eta", -99. );
103 auto mon_Phi = Monitored::Scalar( "Phi", -99. );
104 auto mon_F1 = Monitored::Scalar( "F1", -1.0 );
105 auto mon_Weta2 = Monitored::Scalar( "Weta2", -1.0 );
106 auto mon_Wstot = Monitored::Scalar( "Wstot", -1.0 );
107 auto mon_F3 = Monitored::Scalar( "F3", -1.0 );
108 auto PassedCuts = Monitored::Scalar<int>( "CutCounter", -1 );
109 auto monitorIt = Monitored::Group(
m_monTool,
110 mon_dEta, mon_dPhi, mon_eT_T2Calo, mon_hadET_T2Calo,
111 mon_rCore, mon_energyRatio, mon_etaBin, mon_Eta,
112 mon_Phi, mon_F1, mon_Weta2, mon_Wstot, mon_F3, PassedCuts );
113
114 PassedCuts = PassedCuts + 1;
115
116 float dEta(0),
dPhi(0), eT_T2Calo(0), rCore(0), hadET_T2Calo(0), energyRatio(0),
eta(0),
phi(0), F1(0), Weta2(0), Wstot(0), F3(0);
117
119 pass = true;
120 ATH_MSG_DEBUG(
"AcceptAll property is set: taking all events" );
121 } else {
122 pass = false;
123 ATH_MSG_DEBUG(
"AcceptAll property not set: applying selection" );
124 }
125
126 auto roiDescriptor =
input.roi;
127
128 if ( fabs( roiDescriptor->eta() ) > 2.6 ) {
129 ATH_MSG_DEBUG(
"REJECT The cluster had eta coordinates beyond the EM fiducial volume : " << roiDescriptor->eta() <<
"; stop the chain now" );
130 pass=false;
131 return pass;
132 }
133
135 << ": Eta = " << roiDescriptor->eta()
136 << ", Phi = " << roiDescriptor->phi() );
137
138
139 double etaRef = roiDescriptor->eta();
140 double phiRef = roiDescriptor->phi();
141
142 if ( fabs( phiRef ) >
M_PI ) phiRef -= 2*
M_PI;
143
144 auto pClus =
input.cluster;
145 float absEta = fabs( pClus->eta() );
146
150
151
153 dEta = pClus->eta() - etaRef;
154
155
156 dPhi = fabs( pClus->phi() - phiRef );
158
159
160 if ( pClus->emaxs1() + pClus->e2tsts1() > 0 )
161 energyRatio = ( pClus->emaxs1() - pClus->e2tsts1() ) / ( pClus->emaxs1() + pClus->e2tsts1() );
162
163
164 if ( pClus->e277()!= 0. ) rCore = pClus->e237() / pClus->e277();
165
166
167 if ( fabs( pClus->energy() ) > 0.00001 ) F1 = ( pClus->energy( CaloSampling::EMB1 )+pClus->energy( CaloSampling::EME1 ) )/pClus->energy();
168 eT_T2Calo = pClus->et();
169 if ( eT_T2Calo!=0 && pClus->eta()!=0 ) hadET_T2Calo = pClus->ehad1()/cosh( fabs( pClus->eta() ) )/eT_T2Calo;
170
171
172 Weta2 = pClus->weta2();
173
174
175 Wstot = pClus->wstot();
176
177
178 float e0 = pClus->energy( CaloSampling::PreSamplerB ) + pClus->energy( CaloSampling::PreSamplerE );
179 float e1 = pClus->energy( CaloSampling::EMB1 ) + pClus->energy( CaloSampling::EME1 );
180 float e2 = pClus->energy( CaloSampling::EMB2 ) + pClus->energy( CaloSampling::EME2 );
181 float e3 = pClus->energy( CaloSampling::EMB3 ) + pClus->energy( CaloSampling::EME3 );
183 F3 = fabs( eallsamples )>0. ?
e3/eallsamples : 0.;
184
185
187 << " roi eta=" << etaRef << " DeltaEta=" << dEta
189
192 return pass;
193 }
196 PassedCuts = PassedCuts + 1;
197
198
200 << " roi phi="<< phiRef << " DeltaPhi="<< dPhi
202
205 return pass;
206 }
209 PassedCuts = PassedCuts + 1;
210
211
212 if ( cutIndex == -1 ) {
214 return pass;
215 }
216 else {
218 }
220 PassedCuts = PassedCuts + 1;
221
222
227 return pass;
228 }
229 mon_rCore = rCore;
230 PassedCuts = PassedCuts + 1;
231
232
234 if ( inCrack || F1 <
m_F1thr[0] ) {
235 ATH_MSG_DEBUG (
"TrigEMCluster: InCrack= " << inCrack <<
" F1=" << F1 );
236 }
237 else {
240 return pass;
241 }
242 }
243 PassedCuts = PassedCuts + 1;
244 if( inCrack ) energyRatio = -1;
245 mon_energyRatio = energyRatio;
246
247
249 if ( eT_T2Calo <
m_eTthr[cutIndex] ) {
251 return pass;
252 }
253 mon_eT_T2Calo = eT_T2Calo;
254 PassedCuts = PassedCuts + 1;
255
256 float hadET_cut = 0.0;
257
258 if ( eT_T2Calo >
m_eT2thr[cutIndex] ) {
261 }
262 else {
265 }
266
267
268 ATH_MSG_DEBUG (
"TrigEMCluster: ET_had=" << hadET_T2Calo <<
" cut: <" << hadET_cut );
269 if ( hadET_T2Calo > hadET_cut ) {
271 return pass;
272 }
273 mon_hadET_T2Calo = hadET_T2Calo;
274 PassedCuts = PassedCuts + 1;
275
276
278 mon_F1 = F1;
279 PassedCuts = PassedCuts + 1;
280
281
285 return pass;
286 }
287 mon_Weta2 = Weta2;
288 PassedCuts = PassedCuts + 1;
289
290
294 return pass;
295 }
296 mon_Wstot = Wstot;
297 PassedCuts = PassedCuts + 1;
298
299
301 if ( F3 >
m_F3thr[cutIndex] ) {
303 return pass;
304 }
305 mon_F3 = F3;
306 PassedCuts = PassedCuts + 1;
307
308
309 pass = true;
310
311
313
314
315
316 return pass;
317
318}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
bool dPhi(const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
bool dEta(const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
bool absEta(const xAOD::TauJet &tau, float &out)
double e2(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 2nd sampling
double e0(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in pre-sampler
double e1(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 1st sampling