ATLAS Offline Software
Loading...
Searching...
No Matches
electronMonTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
6//
7// 2014-05-21 Author: Remi Lafaye (Annecy)
8// 2015-01-26 Author: Bertrand LAFORGE (LPNHE Paris)
9//
10// 2015-05-22 Add monitoring of LH Medium and Tight electrons, cut based Medium and Tight electrons
11// Add LumiAware distributions
12//
13// NAME: electronMonTool.cxx
14// PACKAGE: offline/Reconstruction/egamma/egammaPerformance
15// PURPOSE: Shifter should look for the following defects:
16// taken from https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/EgammaShifts
17//
18// in energies (Et plots for electrons and photons)
19// ===========
20// LOWSTAT : For short runs and not enough statistics when not being able
21// to judge the result using the egamma stream. Needs to be commented.
22//
23// ENERGY_(BARREL,ENDCAP,CRACK,FORWARD) : This defect is a significant energy
24// mis-calibration is observed for a certain part of the detector. This flag
25// is then intolerable for that detector region.
26//
27// LARNOISE_(BARREL,ENDCAP,FORWARD) : If some part of the detector is miscalibrated
28// causing an energy shift of at least 5% this intolerable defect should be set.
29//
30// in eta,phi (eta,phi 2D plots for electrons and photons)
31// ==========
32// ETAPHI_SPIKES/LOWOCCUPANCY : Non standard distribution (eta phi plane) of egamma
33// objects. Region with unusual density of electrons / photons. This could be produced
34// by a problem in the LAR calorimeter. If there is a spike in the distribution set
35// EGAMMA_ETAPHI_SPIKES as defect. Examples of runs with this problem can be found in
36// Click for image. (hot spot) and Click for image. (FEB with 100% rejection during part
37// of the run). If a HV trip could not be recovered during the run, there will be a region
38// in the eta phi plane with low occupancy. Then set the defect EGAMMA_LOWOCCUPANCY.
39//
40// in eta and phi (eta,phi 1D plots for electrons)
41// ==============
42// BEAMSPOT : When the beamspot is shifted with respect to the nominal position the
43// azimuthal distribution (phi) of tracks is different than normal. When the new
44// constants for the beam spot get uploaded and reprocessed this defect vanishes.
45// This is an intolerable defect so only use it after checking the bulk reconstruction,
46// in some cases express reconstruction can have this problem but usually is solved at
47// the bulk. Example of the run with a failure in the determination of the beam spot can
48// be found in Click for image..
49//
50// BAD_BLAYER : To be used when the distributions (eta, phi) for medium and tight electrons
51// have marked excess or defect of entries due to a problem with the b-layer. If this happens
52// the loose distributions will look fine. To distinguish between this and TRT problem more
53// details on the run and investigation will be needed. If you have to use this defect you
54// should document it in the EgammaShiftsBadRuns page. Example of the result of a b-layer
55// module with low efficiency can be found in Click for image..
56//
57// BAD_TRT : To be used when the distributions (eta, phi) for tight electrons / photons have
58// marked excess or defect of entries due to a problem with the TRT (due to the high threshold
59// requirement). If this happens the loose and medium distributions will look fine. To distinguish
60// between this and pixel (b-layer) problem more details on the run and investigation will be needed.
61// If you have to use this defect you should document it in the Runs List page. Example of the result
62// of a few RODs disabled in TRT can be found in Click for image..
63//
64// in electron ID
65// ==============
66// SHAPES : Bad shape for defining variables of electrons or photons. Distributions do not match
67// the references. As the other defects they can be recoverable or not recoverable. In case, of
68// a hardware related issue, it will be likely not recoverable, problems related with alignment
69// or calibration will be likely recoverable. Example of this defect can be found in Click for image.
70// (decrease in the number of Si Hits due to BCID problem in SCT).
71//
73
74
75#include "electronMonTool.h"
76
77electronMonTool::electronMonTool(const std::string & type, const std::string & name, const IInterface* parent) :
78 egammaMonToolBase(type,name,parent)
79{
80 bool WithFullHistList = true;
81 bool WithLimitedHistList = false;
82
83 m_LhLooseElectrons = new electronHist(std::string("LhLoose"), WithFullHistList);
84 m_LhMediumElectrons = new electronHist(std::string("LhMedium"), WithFullHistList);
85 m_CbLooseElectrons = new electronHist(std::string("CbLoose"), WithLimitedHistList);
86 m_LhTightElectrons = new electronHist(std::string("LhTight"), WithFullHistList);
87 m_CbTightElectrons = new electronHist(std::string("CbTight"), WithLimitedHistList);
88
89 m_currentLB = -1;
90}
91
102
104{
106 ATH_CHECK( m_ElectronContainer.initialize() );
107 return StatusCode::SUCCESS;
108}
109
111{
112
113 ATH_MSG_DEBUG("electronMonTool::bookHistogramsForOneElectron()");
114
115 int start = 0;
116 int end = ENDCAP;
117
118 // MAIN PANEL
119 bookTH1F(myHist.m_hN, *m_electronGroup, "electronN", "Number of electrons", 20, 0.0, 20.0, myHist.m_nameOfEgammaType);
120 bookTH1F(myHist.m_hEt, *m_electronGroup, "electronEt", "Electron transverse energy [MeV]", 100, -1000.0, 250000.0, myHist.m_nameOfEgammaType);
121 bookTH2F(myHist.m_hEtaPhi4GeV, *m_electronGroup, "electronEtaPhiPtgt4GeV", "Electron #eta,#phi map (candidates with Pt>4GeV)", 64, -3.2, 3.2, 64, -3.2, 3.2, myHist.m_nameOfEgammaType);
122 bookTH1F(myHist.m_hEta, *m_electronGroup, "electronEta", "Electron #eta", 64, -3.2, 3.2, myHist.m_nameOfEgammaType);
123 bookTH1F(myHist.m_hPhi, *m_electronGroup, "electronPhi", "Electron #phi", 64, -3.2, 3.2, myHist.m_nameOfEgammaType);
124 bookTH1F(myHist.m_hTopoEtCone40, *m_electronGroup, "electronTopoEtCone40", "Electron Topocluster Isolation Energy", 64, -10000., 40000., myHist.m_nameOfEgammaType);
125 bookTH1F(myHist.m_hPtCone20, *m_electronGroup, "electronPtCone20", "Electron Track Isolation Energy", 64, -10000., 40000., myHist.m_nameOfEgammaType);
126 bookTH1F(myHist.m_hTime, *m_electronGroup, "electronTime", "Time associated with electron cluster [ns]", 90, -30., 60., myHist.m_nameOfEgammaType);
127
128 // EXPERT PANEL
129 bookTH2F(myHist.m_hEtaPhi, *m_electronGroup, "electronEtaPhiPtgt2.5GeV", "Electron #eta,#phi map (candidates with Pt>2.5GeV)", 64, -3.2, 3.2, 64, -3.2, 3.2, myHist.m_nameOfEgammaType);
130 bookTH2F(myHist.m_hEtaPhi20GeV, *m_electronGroup, "electronEtaPhiPtgt20GeV", "Electron #eta,#phi map (candidates with Pt>20GeV)", 64, -3.2, 3.2, 64, -3.2, 3.2, myHist.m_nameOfEgammaType);
131
132 // PER REGION IN EXPERT PANEL
133 if (myHist.m_fullHistoList) {
134 bookTH1FperRegion(myHist.m_hvN, *m_electronGroup, "electronN", "Electron number ; Nel ; Nevents",20, 0.0, 20.0,start,end, myHist.m_nameOfEgammaType);
135 bookTH1FperRegion(myHist.m_hvEta, *m_electronGroup, "electronEta", "Electron #eta distribution ; #eta ; Nevents",64, -3.2, 3.2,start,end, myHist.m_nameOfEgammaType);
136 bookTH1FperRegion(myHist.m_hvPhi, *m_electronGroup, "electronPhi", "Electron #phi distribution ; #phi ; Nevents", 64, -3.2, 3.2,start,end, myHist.m_nameOfEgammaType);
137 bookTH1FperRegion(myHist.m_hvEt, *m_electronGroup, "electronEt", "Electron Et distribution ; Et [MeV] ; Nevents", 100, -1000.0, 250000.0,start,end, myHist.m_nameOfEgammaType);
138 bookTH1FperRegion(myHist.m_hvTopoEtCone40, *m_electronGroup, "electronTopoEtCone40", "Electron Isolation Energy TopoEtCone40 [MeV] ; Eiso ; Nevents", 64, -10000., 40000.,start,end, myHist.m_nameOfEgammaType);
139 bookTH1FperRegion(myHist.m_hvPtCone20, *m_electronGroup, "electronPtCone20", "Electron PtCone20 distribution ; PtCone20 ; Nevents", 64, -10000., 40000.,start,end, myHist.m_nameOfEgammaType);
140 bookTH1FperRegion(myHist.m_hvTime, *m_electronGroup, "electronTime", "Electron time [ns] ; Time [ns] ; Nevents", 90, -30.0, 60.0,start,end, myHist.m_nameOfEgammaType);
141
142 // TRACK PANEL
143 bookTH1FperRegion(myHist.m_hvNOfBLayerHits, *m_electronTrkGroup, "electronNOfBLayersHits", "Electron number of track B-Layer Hits ; N B-layer hits ; Nevents", 6,-0.5,5.5,start,end, myHist.m_nameOfEgammaType);
144 bookTH1FperRegion(myHist.m_hvNOfSiHits, *m_electronTrkGroup,"electronNOfSiHits", "Electron number of track precision Hits ;N Si hits;Nevents", 26,-0.5,25.5,start,end, myHist.m_nameOfEgammaType);
145 bookTH1FperRegion(myHist.m_hvNOfTRTHits, *m_electronTrkGroup, "electronNOfTRTHits", "Electron number of TRT Hits ;N TRT hits;Nevents", 51,-0.5,50.5,start,end, myHist.m_nameOfEgammaType);
146 bookTH1FperRegion(myHist.m_hvNOfTRTHighThresholdHits, *m_electronTrkGroup, "electronNOfTRTHighThresholdHits", "Electron number of High Threshold TRT Hits ;N TRT High Threshold hits;Nevents", 51,-0.5,50.5,start,end, myHist.m_nameOfEgammaType);
147 bookTH1FperRegion(myHist.m_hvDeltaEta1, *m_electronTrkGroup,"electronDeltaEta1", "electron track match #Delta #eta (1st sampling) ;#Delta #eta;Nevents", 50,-0.05,0.05,start,end, myHist.m_nameOfEgammaType);
148 bookTH1FperRegion(myHist.m_hvDeltaPhi2, *m_electronTrkGroup, "electronDeltaPhi2", "electron track match #Delta #phi (2nd sampling) ;#Delta #phi ; Nevents", 50,-0.15,0.1,start,end, myHist.m_nameOfEgammaType);
149 bookTH1FperRegion(myHist.m_hvd0, *m_electronTrkGroup, "electronTrackd0", "electron track match d0 ; d0 ; Nevents", 100,-5.,5.,start,end, myHist.m_nameOfEgammaType);
150
151 // ID PANEL
152 bookTH1FperRegion(myHist.m_hvEhad1, *m_electronIdGroup, "electronEhad1", "Electron energy leakage in 1st hadronic sampling ; Ehad 1; Nevents", 50, -1000., 10000.,start,end, myHist.m_nameOfEgammaType);
153 bookTH1FperRegion(myHist.m_hvEoverP, *m_electronIdGroup, "electronEoverP", "Electron match track E over P ; E/p ; Nevents", 50,0,5,start,end, myHist.m_nameOfEgammaType);
154 bookTH1FperRegion(myHist.m_hvCoreEM, *m_electronIdGroup, "electronCoreEM", "Electron core energy in EM calorimeter ;E [MeV]; Nevents", 50, -5000., 250000.,start,end, myHist.m_nameOfEgammaType);
155 bookTH1FperRegion(myHist.m_hvF0, *m_electronIdGroup, "electronF0", "Electron fractional energy in PreSampler ; F0 ; Nevents", 50, -0.2,1.0,start,end, myHist.m_nameOfEgammaType);
156 bookTH1FperRegion(myHist.m_hvF1, *m_electronIdGroup, "electronF1", "Electron fractional energy in 1st sampling ; F1 ; Nevents", 50, -0.2,1.0,start,end, myHist.m_nameOfEgammaType);
157 bookTH1FperRegion(myHist.m_hvF2, *m_electronIdGroup,"electronF2", "Electron fractional energy in 2nd sampling ; F2 ; Nevents", 50, -0.2,1.0,start,end, myHist.m_nameOfEgammaType);
158 bookTH1FperRegion(myHist.m_hvF3, *m_electronIdGroup, "electronF3", "Electron fractional energy in 3rd sampling ; F3 ; Nevents", 50, -0.2,1.0,start,end, myHist.m_nameOfEgammaType);
159 bookTH1FperRegion(myHist.m_hvRe233e237, *m_electronIdGroup, "electronRe233e237", "Electron uncor. energy fraction in 3x3/3x7 cells in em sampling 2 ;R 3x3/3x7; Nevents", 50, 0., 2.,start,end, myHist.m_nameOfEgammaType);
160 bookTH1FperRegion(myHist.m_hvRe237e277, *m_electronIdGroup, "electronRe237e277", "Electron uncor. energy fraction in 3x7/7x7 cells in em sampling 2 ;R 3x7/7x7; Nevents", 50, 0., 2.,start,end, myHist.m_nameOfEgammaType);
161 }
162
163 // LUMI DEPENDANT PANEL
164 bookTH1F(myHist.m_hLB_N, *m_electronLBGroup, "LBEvoNElectrons", "Number of Electrons vs LB", 2000, -0.5, 1999.5, myHist.m_nameOfEgammaType);
165
166 return StatusCode::SUCCESS;
167
168}
169
170
172{
173 ATH_MSG_DEBUG("electronMonTool::bookHistograms()");
174
175 // Create groups
176 m_electronGroup = new MonGroup(this,"egamma/electrons"+m_GroupExtension,run); // to be re-booked every new run
177 // Create sub groups
178 m_electronTrkGroup = new MonGroup(this,"egamma/electrons"+m_GroupExtension+"/Track", run); // to be re-booked every new run
179 m_electronIdGroup = new MonGroup(this,"egamma/electrons"+m_GroupExtension+"/ID", run); // to be re-booked every new run
180 m_electronLBGroup = new MonGroup(this,"egamma/electrons"+m_GroupExtension+"/LBMon", run, ATTRIB_X_VS_LB, "", "merge"); // to be re-booked every new run
181
187
188 return StatusCode::SUCCESS;
189}
190
192 electronHist& myHist){
193
194 // Basic kinematics
195
196 float et = (*e_iter)->pt();
197 float eta = (*e_iter)->eta();
198 float phi = (*e_iter)->phi();
199 int ir = GetRegion(eta);
200
201 ATH_MSG_DEBUG("electrons et, eta and phi" << et << " " << eta << " " << phi);
202
203 if (et<2500) return StatusCode::SUCCESS;
204
205 ++myHist.m_nElectronsPerRegion[ir];
206 ++myHist.m_nElectrons;
207
209
210 if(myHist.m_hEt) myHist.m_hEt->Fill(et);
211 if(myHist.m_hEtaPhi) myHist.m_hEtaPhi->Fill(eta,phi);
212 if(myHist.m_hEtaPhi4GeV&&et>4000) myHist.m_hEtaPhi4GeV->Fill(eta,phi);
213 if(myHist.m_hEtaPhi20GeV&&et>20000) myHist.m_hEtaPhi20GeV->Fill(eta,phi);
214 if(myHist.m_hEta) myHist.m_hEta->Fill(eta);
215 if(myHist.m_hPhi) myHist.m_hPhi->Fill(phi);
216
217 myHist.m_hLB_N->Fill(m_currentLB);
218
219 if (myHist.m_fullHistoList) {
223
224 // Cluster track match details
225 float deltaEta1 = -999.0;
226 if( (*e_iter)->trackCaloMatchValue(deltaEta1, xAOD::EgammaParameters::deltaEta1) ) {
227 fillTH1FperRegion(myHist.m_hvDeltaEta1,ir,deltaEta1);
228 }
229 float deltaPhi2 = -999.0;
230 if( (*e_iter)->trackCaloMatchValue(deltaPhi2, xAOD::EgammaParameters::deltaPhi2) ) {
231 fillTH1FperRegion(myHist.m_hvDeltaPhi2,ir,deltaPhi2);
232 }
233 }
234
235 // Isolation Energy
236 float topoetcone40;
237 if( (*e_iter)->isolationValue(topoetcone40,xAOD::Iso::topoetcone40)) {
238 myHist.m_hTopoEtCone40->Fill(topoetcone40);
239 }
240 float ptcone20;
241 if( (*e_iter)->isolationValue(ptcone20,xAOD::Iso::ptcone20)) {
242 myHist.m_hPtCone20->Fill(ptcone20);
243 }
244
245 if (myHist.m_fullHistoList) {
246 fillTH1FperRegion(myHist.m_hvTopoEtCone40,ir,topoetcone40);
247 fillTH1FperRegion(myHist.m_hvPtCone20,ir,ptcone20);
248 }
249
250 ATH_MSG_DEBUG("isolation topocone40=" << topoetcone40 << " ptcone20=" << ptcone20 );
251
252 // Shower shape variable details
253 float ehad1 = 0.0;
254 float ecore = 0.0;
255 float f1 = 0.0;
256 float f3 = 0.0;
257 float e233 = 0.0;
258 float e237 = 0.0;
259 float e277 = 0.0;
260
261 if (myHist.m_fullHistoList) {
262 if( (*e_iter)->showerShapeValue(ehad1, xAOD::EgammaParameters::ehad1) ) {
263 fillTH1FperRegion(myHist.m_hvEhad1,ir,ehad1);
264 }
265 if( (*e_iter)->showerShapeValue(ecore, xAOD::EgammaParameters::ecore) ) {
266 fillTH1FperRegion(myHist.m_hvCoreEM,ir,ecore);
267 }
268 if( (*e_iter)->showerShapeValue(f1, xAOD::EgammaParameters::f1) ) {
269 fillTH1FperRegion(myHist.m_hvF1,ir,f1);
270 }
271 if( (*e_iter)->showerShapeValue(f3, xAOD::EgammaParameters::f3) ) {
272 fillTH1FperRegion(myHist.m_hvF3,ir,f3);
273 }
274 if( (*e_iter)->showerShapeValue(e237, xAOD::EgammaParameters::e237) ) {
275 float Re233e237 = 0.0;
276 if( e237!=0 && (*e_iter)->showerShapeValue(e233, xAOD::EgammaParameters::e233) ) {
277 Re233e237 = e233 / e237;
278 }
279 fillTH1FperRegion(myHist.m_hvRe233e237,ir,Re233e237);
280 float Re237e277 = 0.0;
281 if( e237!=0 && (*e_iter)->showerShapeValue(e277, xAOD::EgammaParameters::e277) ) {
282 if(e277!=0) Re237e277 = e237 / e277;
283 }
284 fillTH1FperRegion(myHist.m_hvRe237e277,ir,Re237e277);
285 }
286 }
287
288 // Associated track details
289 const xAOD::TrackParticle *t = (*e_iter)->trackParticle();
290 double trackp = 0;
291 unsigned char numberOfInnermostPixelLayerHits=-1;
292 unsigned char numberOfPixelHits=-1;
293 unsigned char numberOfSCTHits=-1;
294 unsigned char numberOfTRTHits=-1;
295
296 if (myHist.m_fullHistoList) {
297 if(t) {
298 trackp = t->pt()*cosh(t->eta());
299 // retrieve track summary information
300 if( t->summaryValue(numberOfInnermostPixelLayerHits,xAOD::numberOfInnermostPixelLayerHits) ) {
301 fillTH1FperRegion(myHist.m_hvNOfBLayerHits,ir,numberOfInnermostPixelLayerHits);
302 }
303 if( t->summaryValue(numberOfPixelHits,xAOD::numberOfPixelHits) && t->summaryValue(numberOfSCTHits,xAOD::numberOfSCTHits) ) {
304 fillTH1FperRegion(myHist.m_hvNOfSiHits,ir,numberOfPixelHits+numberOfSCTHits);
305 }
306 if( t->summaryValue(numberOfTRTHits,xAOD::numberOfTRTHits) ) {
307 fillTH1FperRegion(myHist.m_hvNOfTRTHits,ir,numberOfTRTHits);
308 }
309 if(t->d0()) {
310 fillTH1FperRegion(myHist.m_hvd0,ir,t->d0());
311 }
312 } else ATH_MSG_DEBUG( "Error attempting to retrieve associated track");
313 }
314
315 // Associated cluster details
316 const xAOD::CaloCluster *aCluster = (*e_iter)->caloCluster();
317 if (aCluster) {
318 float time= aCluster->time();
319 myHist.m_hTime->Fill(time);
320 if (myHist.m_fullHistoList) {
321 fillTH1FperRegion(myHist.m_hvTime,ir,time);
322 float ep = 0;
323 if(trackp !=0) ep = aCluster->e()/trackp;
325 double ec = aCluster->et()*cosh(aCluster->eta());
326 float f0=0.0;
327 if (ec!=0) f0 = aCluster->energyBE(0)/ec;
328 fillTH1FperRegion(myHist.m_hvF0,ir,f0);
329 float f1=0.0;
330 if (ec!=0) f1 = aCluster->energyBE(1)/ec;
331 fillTH1FperRegion(myHist.m_hvF1,ir,f1);
332 float f2 = 0.0;
333 if(ec!=0) f2 = aCluster->energyBE(2)/ec;
334 fillTH1FperRegion(myHist.m_hvF2,ir,f2);
335 float f3=0.0;
336 if (ec!=0) f3 = aCluster->energyBE(3)/ec;
337 fillTH1FperRegion(myHist.m_hvF3,ir,f3);
338 }
339 } else ATH_MSG_WARNING("Can't get CaloCluster");
340
341 return StatusCode::SUCCESS;
342}
343
345 ATH_MSG_DEBUG("electronMonTool::fillHistograms()");
346
347 if (!hasGoodTrigger("single electron")) return StatusCode::SUCCESS;
348
349 const EventContext& ctx = Gaudi::Hive::currentContext();
350
351 //check whether Lar signalled event bad
352 if(hasBadLar(ctx)) {
353 ATH_MSG_DEBUG("electronMonTool::hasBadLar()");
354 return StatusCode::SUCCESS;
355 }
356
357 //--------------------
358 //figure out current LB
359 //--------------------
360 unsigned int previousLB = m_currentLB;
362
363 //deal with the change of LB
364 if (m_currentLB>previousLB) {
365
366 // update the by LB variables
367 m_LhLooseElectrons->m_nElectronsPerLumiBlock.push_back(m_LhLooseElectrons->m_nElectronsInCurrentLB);
368 m_LhMediumElectrons->m_nElectronsPerLumiBlock.push_back(m_LhMediumElectrons->m_nElectronsInCurrentLB);
369 m_CbLooseElectrons->m_nElectronsPerLumiBlock.push_back(m_CbLooseElectrons->m_nElectronsInCurrentLB);
370 m_LhTightElectrons->m_nElectronsPerLumiBlock.push_back(m_LhTightElectrons->m_nElectronsInCurrentLB);
371 m_CbTightElectrons->m_nElectronsPerLumiBlock.push_back(m_CbTightElectrons->m_nElectronsInCurrentLB);
372
373 // Reset counters
374 m_LhLooseElectrons->m_nElectronsInCurrentLB=0;
375 m_LhMediumElectrons->m_nElectronsInCurrentLB=0;
376 m_CbLooseElectrons->m_nElectronsInCurrentLB=0;
377 m_LhTightElectrons->m_nElectronsInCurrentLB=0;
378 m_CbTightElectrons->m_nElectronsInCurrentLB=0;
379 }
380
381 // Get electron container
383 ATH_CHECK(electron_container.isValid());
384
385 // Check that the auxiliary store association was made successfully:
386 if( ! electron_container->hasStore() ) {
387 ATH_MSG_DEBUG("No auxiliary store got associated to the electron container with key: " << m_ElectronContainer);
388 return StatusCode::FAILURE;
389 }
390
391 // Loop on electron container
392
393 xAOD::ElectronContainer::const_iterator e_iter = electron_container->begin();
394 xAOD::ElectronContainer::const_iterator e_end = electron_container->end();
395 ATH_MSG_DEBUG("Number of electrons: " << electron_container->size());
396
397 m_LhLooseElectrons->m_nElectrons = 0;
398 m_LhMediumElectrons->m_nElectrons = 0;
399 m_CbLooseElectrons->m_nElectrons = 0;
400 m_LhTightElectrons->m_nElectrons = 0;
401 m_CbTightElectrons->m_nElectrons = 0;
402
403 m_LhLooseElectrons->m_nElectronsPerRegion.resize(NREGION,0);
404 m_LhMediumElectrons->m_nElectronsPerRegion.resize(NREGION,0);
405 m_CbLooseElectrons->m_nElectronsPerRegion.resize(NREGION,0);
406 m_LhTightElectrons->m_nElectronsPerRegion.resize(NREGION,0);
407 m_CbTightElectrons->m_nElectronsPerRegion.resize(NREGION,0);
408
409 for (; e_iter!=e_end; ++e_iter){
410 if(!(*e_iter)) continue;
411
412 // Formally unnecessary because all electrons in the container have these authors by construction
413 if (!((*e_iter)->author(xAOD::EgammaParameters::AuthorElectron)|| (*e_iter)->author(xAOD::EgammaParameters::AuthorAmbiguous))) continue;
414
415 //reject electrons outside the kinematic acceptance
416 if ((*e_iter)->pt()<= 7000. && std::abs((*e_iter)->eta()) >= 2.47 ) continue;
417
418 // Check what electron is being processed
419 bool isGood;
420 // CbMedium
421 if((*e_iter)->passSelection(isGood,"Medium")) {
422 if(isGood) {
424 }
425 } else ATH_MSG_WARNING( "Electron selection menu Medium is not defined" );
426
427 // LhLoose
428 if((*e_iter)->passSelection(isGood,"LHLoose")) {
429 if(isGood) {
431 }
432 } else ATH_MSG_WARNING( "Electron selection LHLoose is not defined" );
433
434 // LhMedium
435 if((*e_iter)->passSelection(isGood,"LHMedium")) {
436 if(isGood) {
438 }
439 } else ATH_MSG_WARNING( "Electron selection LHMedium is not defined" );
440
441 // CbTight
442 if((*e_iter)->passSelection(isGood,"Tight")) {
443 if(isGood) {
445 }
446 } else ATH_MSG_WARNING( "Electron selection menu Tight is not defined" );
447
448 // LhTight
449 if((*e_iter)->passSelection(isGood,"LHTight")) {
450 if(isGood) {
452 }
453 } else ATH_MSG_WARNING( "Electron selection menu LHTight is not defined" );
454
455 }
456
457 // Fill number of electrons histograms
458 m_CbLooseElectrons->m_hN->Fill(m_CbLooseElectrons->m_nElectrons);
459 m_LhLooseElectrons->m_hN->Fill(m_LhLooseElectrons->m_nElectrons);
460 m_LhMediumElectrons->m_hN->Fill(m_LhMediumElectrons->m_nElectrons);
461 m_CbTightElectrons->m_hN->Fill(m_CbTightElectrons->m_nElectrons);
462 m_LhTightElectrons->m_hN->Fill(m_LhTightElectrons->m_nElectrons);
463
464 for(int i=0;i<NREGION;i++) {
470 }
471
472 return StatusCode::SUCCESS;
473}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
A container of information describing a monitoring object.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual StatusCode initialize() override
std::string m_GroupExtension
void bookTH1FperRegion(std::vector< TH1 * > &vhist, MonGroup &mygroup, const std::string &hname, const std::string &htitle, int nbins, float low, float high, unsigned int min_region, unsigned int max_region)
unsigned int getCurrentLB(const EventContext &ctx)
bool hasBadLar(const EventContext &ctx)
bool hasGoodTrigger(const std::string &comment)
void bookTH2F(TH2 *&h, MonGroup &mygroup, const std::string &hname, const std::string &htitle, int nbinsx, float xlow, float xhigh, int nbinsy, float ylow, float yhigh)
egammaMonToolBase(const std::string &type, const std::string &name, const IInterface *parent)
static void fillTH1FperRegion(std::vector< TH1 * > &vhist, unsigned int ir, float x)
static int GetRegion(float eta)
void bookTH1F(TH1 *&h, MonGroup &mygroup, const std::string &hname, const std::string &htitle, int nbins, float low, float high)
electronHist * m_LhLooseElectrons
SG::ReadHandleKey< xAOD::ElectronContainer > m_ElectronContainer
electronHist * m_LhTightElectrons
virtual StatusCode initialize() override
virtual StatusCode fillHistograms() override
An inheriting class should either override this function or fillHists().
MonGroup * m_electronLBGroup
electronMonTool(const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode fillHistogramsForOneElectron(xAOD::ElectronContainer::const_iterator e_iter, electronHist &myHist)
virtual StatusCode bookHistogramsForOneElectronType(electronHist &myHist)
electronHist * m_LhMediumElectrons
virtual ~electronMonTool()
electronHist * m_CbTightElectrons
virtual StatusCode bookHistograms() override
An inheriting class should either override this function or bookHists().
MonGroup * m_electronGroup
MonGroup * m_electronIdGroup
electronHist * m_CbLooseElectrons
MonGroup * m_electronTrkGroup
flt_t time() const
Access cluster time.
virtual double eta() const
The pseudorapidity ( ) of the particle.
virtual double e() const
The total energy of the particle.
float energyBE(const unsigned layer) const
Get the energy in one layer of the EM Calo.
int ir
counter of the current depth
Definition fastadd.cxx:49
Definition run.py:1
@ deltaPhi2
difference between the cluster phi (second sampling) and the phi of the track extrapolated to the sec...
@ deltaEta1
difference between the cluster eta (first sampling) and the eta of the track extrapolated to the firs...
const uint16_t AuthorElectron
Object Reconstructed by standard cluster-based algorithm.
Definition EgammaDefs.h:24
const uint16_t AuthorAmbiguous
Object Reconstructed by standard cluster-based algorithm.
Definition EgammaDefs.h:32
@ e277
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 7x7
Definition EgammaEnums.h:81
@ e237
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 3x7
Definition EgammaEnums.h:78
@ f3
fraction of energy reconstructed in 3rd sampling
Definition EgammaEnums.h:55
@ ecore
core energy in em calo E(core) = E0(3x3) + E1(15x2) + E2(5x5) + E3(3x5)
@ f1
E1/E = fraction of energy reconstructed in the first sampling, where E1 is energy in all strips belon...
Definition EgammaEnums.h:53
@ ehad1
E leakage into 1st sampling of had calo (CaloSampling::HEC0 + CaloSampling::TileBar0 + CaloSampling::...
Definition EgammaEnums.h:49
@ e233
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 3x3 (in cell units e...
Definition EgammaEnums.h:69
@ ptcone20
Track isolation.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
@ numberOfTRTHits
number of TRT hits [unit8_t].
@ numberOfSCTHits
number of hits in SCT [unit8_t].
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
std::vector< TH1 * > m_hvTopoEtCone40
std::vector< TH1 * > m_hvF2
std::vector< TH1 * > m_hvEt
std::vector< TH1 * > m_hvCoreEM
std::vector< TH1 * > m_hvN
std::vector< TH1 * > m_hvRe233e237
std::string m_nameOfEgammaType
std::vector< TH1 * > m_hvF3
std::vector< TH1 * > m_hvEta
std::vector< TH1 * > m_hvRe237e277
std::vector< TH1 * > m_hvF1
std::vector< TH1 * > m_hvF0
std::vector< TH1 * > m_hvEhad1
std::vector< TH1 * > m_hvPtCone20
std::vector< TH1 * > m_hvTime
std::vector< TH1 * > m_hvPhi
unsigned int m_nElectrons
std::vector< TH1 * > m_hvd0
std::vector< TH1 * > m_hvNOfSiHits
std::vector< int > m_nElectronsPerRegion
unsigned int m_nElectronsInCurrentLB
std::vector< TH1 * > m_hvNOfTRTHighThresholdHits
std::vector< TH1 * > m_hvDeltaPhi2
std::vector< TH1 * > m_hvEoverP
std::vector< TH1 * > m_hvNOfBLayerHits
std::vector< TH1 * > m_hvDeltaEta1
std::vector< TH1 * > m_hvNOfTRTHits
Extra patterns decribing particle interation process.