ATLAS Offline Software
ALFA_GloRec.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 //
7 //
8 // ALFA_GloRec class implementation
9 //
10 //
12 //
13 //
14 // PURPOSE:
15 // - reconstruction of global tracks in ALFA
16 //
17 //
18 // INPUT JOB OPTIONS:
19 // - data type: DataType
20 // - patterns of tracks through detectors: TrackPathPatterns
21 // - analysis root file: AnalysisFile
22 // - name of input collection: InputLocRecCollectionName
23 // - name of output collection: InputGloRecCollectionName
24 // - name of truth info collection: TruthEventCollectionName
25 //
26 // OUTPUT:
27 // - GloRecEvCollection of ALFA_GloRecEvent
28 // - some analysis histograms
29 //
30 // OTHER INFO:
31 // Uses aux. classes
32 // 1) AlfaLocalHit
33 // - stores one local hit
34 // x, y, z, pot name, pot number, pointer to ALFA_LocRecCorrEvent
35 //
36 // 2) AlfaLocalHits
37 // - stores stl vector of AlfaLocalHit
38 // - may contain stl vector of itself to define path of the track
39 // ... the path is defined as pattern string
40 // ... string = names of detectors separated by _ or X for any possibility
41 // ... there's one pattern at a time for the object, it can be reset
42 // - if the pattern is applied m_paths (of AlfaLocalHits) is filled
43 // ... there may be more paths for one pattern
44 // (if there were more local hit combinations)
45 // - in job options the TrackPathPatterns may contain multiple patterns
46 // separated by comas (without spaces), it is then looped over all
47 // patterns
48 // - detector names are ALFA standard names:
49 // B7L1U A7L1U B7L1L A7L1L B7R1U A7R1U B7R1L A7R1L
50 //
51 // 3) AlfaTrackCand
52 // - is declared with ONE path from AlfaLocalHits object
53 // - contains x and y halfway between the pots and slope x' and y' of the gloabl track
54 // - contains two pointers of ALFA_LocRecEvent the track is constructed from
55 //
56 // There many methods of the above aux. classes not described at the moment.
57 // Things are under development.
58 //
59 //
61 
62 
63 #include "ALFA_GloRec.h"
66 #include "AlfaLocalHits.h"
67 
68 #include "TH1F.h"
69 #include "TH2F.h"
70 #include "TObjString.h"
71 #include "TFile.h"
72 
74 #include "CLHEP/Geometry/Point3D.h"
75 
76 #include <cmath> //std::abs
77 
78 
80 //
81 // ALFA_GloRec constructor
82 //
84 ALFA_GloRec::ALFA_GloRec(const std::string& name, ISvcLocator* pSvcLocator) :
85 AthAlgorithm(name, pSvcLocator)
86 {
87 
88  MsgStream LogStream(Athena::getMessageSvc(), "ALFA_GloRec::ALFA_GloRec");
89  LogStream << MSG::DEBUG << "begin ALFA_GloRec::ALFA_GloRec" << endmsg;
90 
92  // ... steerable job options
94  declareProperty("DataType", m_iDataType);
95  declareProperty("TrackPathPatterns", m_strTrackPathPatterns);
97 
98  declareProperty("OutputGloRecCollectionName",m_strGloRecCollectionName);
99  declareProperty("InputLocRecCollectionName",m_strLocRecCorrCollectionName);
100  declareProperty("TruthEventCollectionName",m_TruthCollectionName);
101 
102 }
103 
105 //
106 // ALFA_GloRec destructor
107 //
110  MsgStream LogStream(Athena::getMessageSvc(), "ALFA_GloRec::~ALFA_GloRec");
111  LogStream << MSG::DEBUG << "begin ALFA_GloRec::~ALFA_GloRec" << endmsg;
112  LogStream << MSG::DEBUG << "end ALFA_GloRec::~ALFA_GloRec" << endmsg;
113 }
114 
116 //
117 // initialize method
118 //
121  MsgStream LogStream(Athena::getMessageSvc(), "ALFA_GloRec::initialize()");
122  LogStream << MSG::DEBUG << "begin ALFA_GloRec::initialize()" << endmsg;
123 
124  msg(MSG::DEBUG) << "======================================" << endmsg;
125  msg(MSG::DEBUG) << "ALFA_GloRec::initialize - data type " << endmsg;
126  msg(MSG::DEBUG) << "======================================" << endmsg;
127  msg(MSG::DEBUG) << "DataType = " << m_iDataType << endmsg;
128 
129  TString l_strtmp(m_strTrackPathPatterns);
131  msg(MSG::DEBUG) << "==========================================================" << endmsg;
132  msg(MSG::DEBUG) << "ALFA_GloRec::initialize - Path patterns from job options " << endmsg;
133  msg(MSG::DEBUG) << "==========================================================" << endmsg;
134  m_TObjArrTrackPathPatterns = *(l_strtmp.Tokenize(","));
135  for(int i = 0; i < m_TObjArrTrackPathPatterns.GetEntries(); i++){
136  msg(MSG::DEBUG) << "pattern[" << i << "] = " << ((TObjString*) m_TObjArrTrackPathPatterns.At(i))->GetString().Data() << endmsg;
137  }
138 
139 
141  // ... declare histograms for some analysis
143  InitHistos();
144 
145 
146  return StatusCode::SUCCESS;
147 }
148 
150 //
151 // execute method
152 //
155 
156  MsgStream LogStream(Athena::getMessageSvc(), "ALFA_GloRec::execute()");
157  LogStream << MSG::DEBUG << "begin ALFA_GloRec::execute()" << endmsg;
158  StatusCode sc = StatusCode::SUCCESS;
159 
160 
161 
162 
163 
165  // get truth information
167  if(m_iDataType == 0){
168  LogStream << MSG::DEBUG << "truth info()" << endmsg;
169  sc = Truth_info();
170  if (sc.isFailure()) {
171  LogStream << MSG::WARNING << "ALFA digi, Truth_info failed" << endmsg;
172  return StatusCode::SUCCESS;
173  }
174  }
175 
177  // ... record output collection
180  sc = evtStore()->record(m_pGloRecEvCollection, "ALFA_GloRecEvCollection");
181  if (sc.isFailure()) {
182  msg(MSG::ERROR) << "Could not create the empty LocRecEv collection in StoreGate" << endmsg;
183  }
184 
185 
187  // ... get LocRecCorr data
189  const ALFA_LocRecCorrEvCollection* pLocRecCorrCol = nullptr;
190  sc = evtStore()->retrieve(pLocRecCorrCol, m_strLocRecCorrCollectionName);
191  if(sc.isFailure() || !pLocRecCorrCol)
192  {
193  msg(MSG::ERROR) << "Container "<< m_strLocRecCorrCollectionName <<" NOT FOUND !!!!!!!" << endmsg;
194  return sc;
195  }
196 
197 
199  // ... collect the local hits and contain them in an auxiliary hit collection
201  ALFA_LocRecCorrEvCollection::const_iterator mcColBeg = pLocRecCorrCol->begin();
202  ALFA_LocRecCorrEvCollection::const_iterator mcColEnd = pLocRecCorrCol->end();
204  for(; mcColBeg!=mcColEnd; ++mcColBeg) {
205  HepGeom::Point3D<double> PointInAtlasCS;
206  const ALFA_LocRecCorrEvent* pLocRecCorr_tmp = static_cast<const ALFA_LocRecCorrEvent*> (*mcColBeg);
207  AlfaLocalHit l_hit(pLocRecCorr_tmp);
208  hits.AddHit(l_hit);
209  //PointInAtlasCS = m_pGeometryReader->GetDetPointInAtlas((eRPotName)(iRPot+1), Point3D<double>(fRecPosX, fRecPosY, 10.0));
210  }
211  //hits.Dump();
212 
213 
214 
216  // ... apply path pattern
218  for(int i = 0; i < m_TObjArrTrackPathPatterns.GetEntries(); i++){
219  TString l_pathpattern(((TObjString*) m_TObjArrTrackPathPatterns.At(i))->GetString());
220  hits.ApplyPathPattern(l_pathpattern.Data());
221  //hits.DumpPaths();
222  for(int i = 0 ; i < hits.GetNpaths() ; i++){
223  AlfaTrackCand trkcand(hits.GetPathHits(i));
224  if(trkcand.IsValidTrack()){
225  m_pGloRecEvCollection->push_back(new ALFA_GloRecEvent(trkcand.GetArmNum(),trkcand.GetX(),trkcand.GetY(),trkcand.GetXslope(),trkcand.GetXslope(),trkcand.GetNearLocRecCorr(),trkcand.GetFarLocRecCorr()));
226  FillTrackCandHistos(&trkcand);
227  }
228  }
229  hits.ResetPaths();
230  }
231 
232 
233 
234 
235  return sc;
236 }
237 
238 
239 
240 
242 //
243 // finalize method
244 //
247 
248  MsgStream LogStream(Athena::getMessageSvc(), "ALFA_GloRec::finalize()");
249  LogStream << MSG::DEBUG << "begin ALFA_GloRec::finalize()" << endmsg;
250 
251  WriteHistos();
252 
253  return StatusCode::SUCCESS;
254 }
255 
256 
257 
258 
260 //
261 // Returns truth info
262 //
263 // - this may be specific to the way the sample was
264 // generated, i.e. part. gun, full MC etc.
265 // - the user needs to consider how to retrieve
266 // the information he/she wants
267 //
270 
271  const McEventCollection* mcTru = nullptr;
272  StatusCode sc = evtStore()->retrieve(mcTru,m_TruthCollectionName);
273  if(sc.isFailure() || !mcTru){
274  msg(MSG::DEBUG) << "Container "<< m_TruthCollectionName <<" NOT FOUND !!!!!!!" << endmsg;
275  return StatusCode::FAILURE;
276  }
277 
278 
279  //int VertexFoundInFrontOfALFA = 0;
280 
281 
282  McEventCollection::const_iterator mcTruBeg = mcTru->begin();
283  McEventCollection::const_iterator mcTruEnd = mcTru->end();
284 
285  //loop over collection (container) with hits (i.e. over 1 event)
286  for(;mcTruBeg!=mcTruEnd;++mcTruBeg){
287 
288  //loop over one event
289  m_z_g_pos = -1.e10;
290  m_z_g_neg = 1.e10;
291  for(const HepMC::ConstGenParticlePtr& begGen: (**mcTruBeg)){
292  if(((std::abs(begGen->pdg_id())==2212)||(std::abs(begGen->pdg_id())==211))){
293  double px, py, pz;
294  double x, y, z;
295  px = begGen->momentum().px();
296  py = begGen->momentum().py();
297  pz = begGen->momentum().pz();
298  HepMC::ConstGenVertexPtr l_prodvert = begGen->production_vertex();
299  x = l_prodvert->position().x();
300  y = l_prodvert->position().y();
301  z = l_prodvert->position().z();
302  if(z > 236000.){
303  m_px_g_pos = px;
304  m_py_g_pos = py;
305  m_pz_g_pos = pz;
306  m_x_g_pos = x;
307  m_y_g_pos = y;
308  m_z_g_pos = z;
309  continue;
310  }else if(z < -236000.){
311  m_px_g_neg = px;
312  m_py_g_neg = py;
313  m_pz_g_neg = pz;
314  m_x_g_neg = x;
315  m_y_g_neg = y;
316  m_z_g_neg = z;
317  continue;
318  }
319 
320  // ... break the loop if both suitable vertices were found
321  if (m_z_g_pos > 0. && m_z_g_neg < 0.){
322  msg(MSG::DEBUG) << "gen px, py, pz = " << m_px_g_pos << " " << m_py_g_pos << " " << m_pz_g_pos << endmsg;
323  msg(MSG::DEBUG) << "prod x, y, z = " << m_x_g_pos << " " << m_y_g_pos << " " << m_z_g_pos << endmsg;
324  msg(MSG::DEBUG) << "gen px, py, pz = " << m_px_g_neg << " " << m_py_g_neg << " " << m_pz_g_neg << endmsg;
325  msg(MSG::DEBUG) << "prod x, y, z = " << m_x_g_neg << " " << m_y_g_neg << " " << m_z_g_neg << endmsg;
326  break;
327  }
328  }
329  }
330  }
331  return StatusCode::SUCCESS;
332 }
333 
334 
336 //
337 // Declare histograms for user analysis
338 //
341  m_th1_x_g = new TH1F("x_g","x^{vertex}_{gen}", 100, -5,5);
342  m_th1_y_g = new TH1F("y_g","y^{vertex}_{gen}", 100, -5,5);
343  m_th1_xslope_g = new TH1F("xslope_g","x'^{vertex}_{gen}", 100, -1.e-3,1.e3);
344  m_th1_yslope_g = new TH1F("yslope_g","y'^{vertex}_{gen}", 100, -1.e-3,1.e3);
345 
346  m_th1_xnearuppotresiduals = new TH1F("xnearuppotresiduals","trk x extrap. minus near IP U loc hit",100, -10., 10.);
347  m_th1_ynearuppotresiduals = new TH1F("ynearuppotresiduals","trk y extrap. minus near IP U loc hit",100, -10., 10.);
348  m_th1_xfaruppotresiduals = new TH1F("xfaruppotresiduals","trk x extrap. minus far IP U loc hit",100, -10., 10.);
349  m_th1_yfaruppotresiduals = new TH1F("yfaruppotresiduals","trk y extrap. minus far IP U loc hit",100, -10., 10.);
350  m_th1_xnearlwpotresiduals = new TH1F("xnearlwpotresiduals","trk x extrap. minus near IP L loc hit",100, -10., 10.);
351  m_th1_ynearlwpotresiduals = new TH1F("ynearlwpotresiduals","trk y extrap. minus near IP L loc hit",100, -10., 10.);
352  m_th1_xfarlwpotresiduals = new TH1F("xfarlwpotresiduals","trk x extrap. minus far IP L loc hit",100, -10., 10.);
353  m_th1_yfarlwpotresiduals = new TH1F("yfarlwpotresiduals","trk y extrap. minus far IP L loc hit",100, -10., 10.);
354 
355  m_th2_truexvsrecx = new TH2F("truexvsrecx","gen x vs rec x", 100, -50, 50, 100, -50, 50);
356  m_th2_trueyvsrecy = new TH2F("trueyvsrecy","gen y vs rec y", 100, -50, 50, 100, -50, 50);
357  m_th2_truexslopevsrecxslope = new TH2F("truexslopevsrecxslope","gen xslope vs rec xslope", 100,-0.002,0.002,100,-0.002,0.002);
358  m_th2_trueyslopevsrecyslope = new TH2F("trueyslopevsrecyslope","gen yslope vs rec yslope", 100,-0.002,0.002,100,-0.002,0.002);
359  m_th1_recxovertruex = new TH1F("recxovertruex","rec x over true x", 100, -2, 2);
360  m_th1_recyovertruey = new TH1F("recyovertruey","rec y over true y", 100, -2, 2);
361  m_th1_recxslopeovertruexslope = new TH1F("recxslopeovertruexslope","rec xslope over true xslope", 100,-2,2);
362  m_th1_recyslopeovertrueyslope = new TH1F("recyslopeovertrueyslope","rec yslope over true yslope", 100,-2,2);
363  m_th1_recxminustruex = new TH1F("recxminustruex","rec x minus true x", 100, -10, 10);
364  m_th1_recyminustruey = new TH1F("recyminustruey","rec y minus true y", 100, -10, 10);
365  m_th1_recxslopeminustruexslope = new TH1F("recxslopeminustruexslope","rec xslope minus true xslope", 100,-0.001,0.001);
366  m_th1_recyslopeminustrueyslope = new TH1F("recyslopeminustrueyslope","rec yslope minus true yslope", 100,-0.001,0.001);
367 
368  m_th2_extrapxvsrecxnearpot = new TH2F("extrapxvsrecxnearpot","extrapolated gen x vs rec x nearpot", 100, -50, 50, 100, -50, 50);
369  m_th2_extrapyvsrecynearpot = new TH2F("extrapyvsrecynearpot","extrapolated gen y vs rec y nearpot", 100, -50, 50, 100, -50, 50);
370  m_th1_recxoverextrapxnearpot = new TH1F("recxoverextrapxnearpot","rec x over extrap x nearpot", 100, 1.-0.2, 1.+0.2);
371  m_th1_recyoverextrapynearpot = new TH1F("recyoverextrapynearpot","rec y over extrap y nearpot", 100, 1.-0.2, 1.+0.2);
372  m_th1_recxminusextrapxnearpot = new TH1F("recxminusextrapxnearpot","rec x minus extrap x nearpot", 100, -0.5, 0.5);
373  m_th1_recyminusextrapynearpot = new TH1F("recyminusextrapynearpot","rec y minus extrap y nearpot", 100, -0.5, 0.5);
374 
375  m_th2_extrapxvsrecxfarpot = new TH2F("extrapxvsrecxfarpot","extrapolated gen x vs rec x farpot", 100, -50, 50, 100, -50, 50);
376  m_th2_extrapyvsrecyfarpot = new TH2F("extrapyvsrecyfarpot","extrapolated gen y vs rec y farpot", 100, -50, 50, 100, -50, 50);
377  m_th1_recxoverextrapxfarpot = new TH1F("recxoverextrapxfarpot","rec x over extrap x farpot", 100, 1.-0.2, 1.+0.2);
378  m_th1_recyoverextrapyfarpot = new TH1F("recyoverextrapyfarpot","rec y over extrap y farpot", 100, 1.-0.2, 1.+0.2);
379  m_th1_recxminusextrapxfarpot = new TH1F("recxminusextrapxfarpot","rec x minus extrap x farpot", 100, -0.5, 0.5);
380  m_th1_recyminusextrapyfarpot = new TH1F("recyminusextrapyfarpot","rec y minus extrap y farpot", 100, -0.5, 0.5);
381 }
382 
383 
385 //
386 // Fill histograms in user analysis
387 //
390 
391  if(m_iDataType==0){
392  double x_g, y_g, z_g, px_g, py_g, pz_g;
393  if(trkcand->IsLeftTrack()){ // left is positive
394  x_g = m_x_g_pos;
395  y_g = m_y_g_pos;
396  z_g = m_z_g_pos;
397  px_g = m_px_g_pos;
398  py_g = m_py_g_pos;
399  pz_g = m_pz_g_pos;
400  }else if(trkcand->IsRightTrack()){ // right is negative
401  x_g = m_x_g_neg;
402  y_g = m_y_g_neg;
403  z_g = m_z_g_neg;
404  px_g = m_px_g_neg;
405  py_g = m_py_g_neg;
406  pz_g = m_pz_g_neg;
407  }else{
408  ATH_MSG_ERROR("ALFA_GloRec::FillTrackCandHistos : Track candidate neither left nor right !!!");
409  return;
410  }
411  m_th1_xnearuppotresiduals -> Fill(trkcand->GetNearImpactPoint()->x()-trkcand->GetNearLocalHit()->GetX(),1.);
412  m_th1_ynearuppotresiduals -> Fill(trkcand->GetNearImpactPoint()->y()-trkcand->GetNearLocalHit()->GetY(),1.);
413  m_th1_xfaruppotresiduals -> Fill(trkcand->GetFarImpactPoint()->x()-trkcand->GetFarLocalHit()->GetX(),1.);
414  m_th1_yfaruppotresiduals -> Fill(trkcand->GetFarImpactPoint()->y()-trkcand->GetFarLocalHit()->GetY(),1.);
415  m_th2_truexvsrecx -> Fill(x_g, trkcand->GetX(), 1.);
416  m_th2_trueyvsrecy -> Fill(y_g, trkcand->GetY(), 1.);
417  m_th1_recxovertruex -> Fill(trkcand->GetX()/x_g, 1.);
418  m_th1_recyovertruey -> Fill(trkcand->GetY()/y_g, 1.);
419  //double p_gen = TMath::Sqrt(px_g*px_g+px_g*px_g+py_g*pz_g);
420  double px_norm = px_g / pz_g;//p_gen;
421  double py_norm = py_g / pz_g;//p_gen;
422  m_th2_truexslopevsrecxslope -> Fill(px_norm, trkcand->GetXslope(), 1.);
423  m_th2_trueyslopevsrecyslope -> Fill(py_norm, trkcand->GetYslope(), 1.);
424  m_th1_recxovertruex -> Fill(trkcand->GetX()/x_g, 1.);
425  m_th1_recyovertruey -> Fill(trkcand->GetY()/y_g, 1.);
426  m_th1_recxslopeovertruexslope -> Fill(trkcand->GetXslope()/px_norm, 1.);
427  m_th1_recyslopeovertrueyslope -> Fill(trkcand->GetYslope()/py_norm, 1.);
428  m_th1_recxminustruex -> Fill(trkcand->GetX()-x_g, 1.);
429  m_th1_recyminustruey -> Fill(trkcand->GetY()-y_g, 1.);
430  m_th1_recxslopeminustruexslope -> Fill(trkcand->GetXslope()-px_norm, 1.);
431  m_th1_recyslopeminustrueyslope -> Fill(trkcand->GetYslope()-py_norm, 1.);
432  // ... extrapolate x any of gen track to near pot
433  double nearhitx = trkcand->GetNearLocalHit()->GetX();
434  double nearhity = trkcand->GetNearLocalHit()->GetY();
435  double nearhitz = trkcand->GetNearLocalHit()->GetZ();
436  double genxextrtonearpot = x_g + px_norm * (nearhitz - z_g);
437  double genyextrtonearpot = y_g + py_norm * (nearhitz - z_g);
438  //double genzextrtonearpot = nearhitz;
439  m_th2_extrapxvsrecxnearpot -> Fill(genxextrtonearpot, nearhitx,1.);
440  m_th2_extrapyvsrecynearpot -> Fill(genyextrtonearpot, nearhity,1.);
441  m_th1_recxoverextrapxnearpot -> Fill(nearhitx / genxextrtonearpot, 1.);
442  m_th1_recyoverextrapynearpot -> Fill(nearhity / genyextrtonearpot, 1.);
443  m_th1_recxminusextrapxnearpot -> Fill(nearhitx - genxextrtonearpot, 1.);
444  m_th1_recyminusextrapynearpot -> Fill(nearhity - genyextrtonearpot, 1.);
445  // ... extrapolate x any of gen track to far pot
446  double farhitx = trkcand->GetFarLocalHit()->GetX();
447  double farhity = trkcand->GetFarLocalHit()->GetY();
448  double farhitz = trkcand->GetFarLocalHit()->GetZ();
449  double genxextrtofarpot = x_g + px_norm * (farhitz - z_g);
450  double genyextrtofarpot = y_g + py_norm * (farhitz - z_g);
451  //double genzextrtofarpot = farhitz;
452  m_th2_extrapxvsrecxfarpot -> Fill(genxextrtofarpot, farhitx,1.);
453  m_th2_extrapyvsrecyfarpot -> Fill(genyextrtofarpot, farhity,1.);
454  m_th1_recxoverextrapxfarpot -> Fill(farhitx / genxextrtofarpot, 1.);
455  m_th1_recyoverextrapyfarpot -> Fill(farhity / genyextrtofarpot, 1.);
456  m_th1_recxminusextrapxfarpot -> Fill(farhitx - genxextrtofarpot, 1.);
457  m_th1_recyminusextrapyfarpot -> Fill(farhity - genyextrtofarpot, 1.);
458  }
459 }
460 
461 
462 
463 
465 //
466 // Write histograms into file
467 //
471  // ... write the histograms into a root file
473  TFile fw_glorecanalysis(m_strGloRecAnalysisFile.data(), "RECREATE", m_strGloRecAnalysisFile.data(), 0);
474  m_th1_xnearuppotresiduals -> Write();
475  m_th1_ynearuppotresiduals -> Write();
476  m_th1_xfaruppotresiduals -> Write();
477  m_th1_yfaruppotresiduals -> Write();
478  m_th1_xnearlwpotresiduals -> Write();
479  m_th1_ynearlwpotresiduals -> Write();
480  m_th1_xfarlwpotresiduals -> Write();
481  m_th1_yfarlwpotresiduals -> Write();
482  m_th2_truexvsrecx -> Write();
483  m_th2_trueyvsrecy -> Write();
484  m_th2_truexslopevsrecxslope -> Write();
485  m_th2_trueyslopevsrecyslope -> Write();
486  m_th1_recxovertruex -> Write();
487  m_th1_recyovertruey -> Write();
488  m_th1_recxslopeovertruexslope -> Write();
489  m_th1_recyslopeovertrueyslope -> Write();
490  m_th1_recxminustruex -> Write();
491  m_th1_recyminustruey -> Write();
492  m_th1_recxslopeminustruexslope -> Write();
493  m_th1_recyslopeminustrueyslope -> Write();
494  m_th2_extrapxvsrecxnearpot -> Write();
495  m_th2_extrapyvsrecynearpot -> Write();
496  m_th1_recxoverextrapxnearpot -> Write();
497  m_th1_recyoverextrapynearpot -> Write();
500  m_th2_extrapxvsrecxfarpot -> Write();
501  m_th2_extrapyvsrecyfarpot -> Write();
502  m_th1_recxoverextrapxfarpot -> Write();
503  m_th1_recyoverextrapyfarpot -> Write();
504  m_th1_recxminusextrapxfarpot -> Write();
505  m_th1_recyminusextrapyfarpot -> Write();
506 
507  fw_glorecanalysis.Write();
508  fw_glorecanalysis.Close();
509 }
510 
511 
ALFA_GloRec::m_th1_recxslopeovertruexslope
TH1F * m_th1_recxslopeovertruexslope
Definition: ALFA_GloRec.h:108
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
ALFA_GloRec::FillTrackCandHistos
void FillTrackCandHistos(AlfaTrackCand *trkcand)
Definition: ALFA_GloRec.cxx:389
ALFA_GloRec::m_th1_recxminusextrapxfarpot
TH1F * m_th1_recxminusextrapxfarpot
Definition: ALFA_GloRec.h:126
ALFA_GloRec::m_TruthCollectionName
std::string m_TruthCollectionName
Definition: ALFA_GloRec.h:53
ALFA_GloRec::m_z_g_neg
double m_z_g_neg
Definition: ALFA_GloRec.h:83
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
ALFA_GloRec::m_TObjArrTrackPathPatterns
TObjArray m_TObjArrTrackPathPatterns
Definition: ALFA_GloRec.h:49
ALFA_GloRec::m_x_g_neg
double m_x_g_neg
Definition: ALFA_GloRec.h:81
ALFA_GloRec::m_pz_g_pos
double m_pz_g_pos
Definition: ALFA_GloRec.h:73
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
test_pyathena.px
px
Definition: test_pyathena.py:18
AlfaTrackCand::GetFarLocalHit
AlfaLocalHit * GetFarLocalHit()
Definition: AlfaLocalHits.h:117
AlfaTrackCand::GetNearLocRecCorr
const ALFA_LocRecCorrEvent * GetNearLocRecCorr() const
Definition: AlfaLocalHits.h:118
AlfaTrackCand::GetY
float GetY()
Definition: AlfaLocalHits.h:112
ALFA_GloRec::m_py_g_neg
double m_py_g_neg
Definition: ALFA_GloRec.h:79
ALFA_GloRec::m_x_g_pos
double m_x_g_pos
Definition: ALFA_GloRec.h:74
ALFA_GloRec::m_th2_extrapyvsrecynearpot
TH2F * m_th2_extrapyvsrecynearpot
Definition: ALFA_GloRec.h:116
ALFA_GloRec::m_th1_xslope_g
TH1F * m_th1_xslope_g
Definition: ALFA_GloRec.h:90
ALFA_GloRec::Truth_info
StatusCode Truth_info()
Definition: ALFA_GloRec.cxx:269
ALFA_GloRec::m_th2_extrapxvsrecxfarpot
TH2F * m_th2_extrapxvsrecxfarpot
Definition: ALFA_GloRec.h:122
ALFA_GloRec::m_th1_xfaruppotresiduals
TH1F * m_th1_xfaruppotresiduals
Definition: ALFA_GloRec.h:95
ALFA_GloRec::m_th1_recyslopeminustrueyslope
TH1F * m_th1_recyslopeminustrueyslope
Definition: ALFA_GloRec.h:113
ALFA_GloRec::ALFA_GloRec
ALFA_GloRec(const std::string &name, ISvcLocator *pSvcLocator)
Definition: ALFA_GloRec.cxx:84
ALFA_GloRec::m_th1_recyslopeovertrueyslope
TH1F * m_th1_recyslopeovertrueyslope
Definition: ALFA_GloRec.h:109
ALFA_GloRec::m_th1_recxslopeminustruexslope
TH1F * m_th1_recxslopeminustruexslope
Definition: ALFA_GloRec.h:112
ALFA_GloRec::~ALFA_GloRec
~ALFA_GloRec()
Definition: ALFA_GloRec.cxx:109
ALFA_LocRecCorrEvCollection
Definition: ALFA_LocRecCorrEvCollection.h:13
ALFA_GloRec::m_strGloRecCollectionName
std::string m_strGloRecCollectionName
Definition: ALFA_GloRec.h:51
AlfaLocalHits
Definition: AlfaLocalHits.h:58
AlfaTrackCand::GetXslope
float GetXslope()
Definition: AlfaLocalHits.h:114
ALFA_GloRec::m_th1_xfarlwpotresiduals
TH1F * m_th1_xfarlwpotresiduals
Definition: ALFA_GloRec.h:99
python.TrigEgammaMonitorHelper.TH2F
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:45
x
#define x
ALFA_GloRec::m_th1_yslope_g
TH1F * m_th1_yslope_g
Definition: ALFA_GloRec.h:91
AlfaTrackCand::GetFarLocRecCorr
const ALFA_LocRecCorrEvent * GetFarLocRecCorr() const
Definition: AlfaLocalHits.h:119
ALFA_GloRec::m_th1_yfarlwpotresiduals
TH1F * m_th1_yfarlwpotresiduals
Definition: ALFA_GloRec.h:100
AlfaTrackCand::IsLeftTrack
int IsLeftTrack()
Definition: AlfaLocalHits.cxx:296
ALFA_GloRec::m_th1_recxminusextrapxnearpot
TH1F * m_th1_recxminusextrapxnearpot
Definition: ALFA_GloRec.h:119
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
ALFA_GloRec::m_y_g_neg
double m_y_g_neg
Definition: ALFA_GloRec.h:82
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
ALFA_GloRecEvCollection
Definition: ALFA_GloRecEvCollection.h:13
ALFA_GloRec::m_th1_recyminusextrapynearpot
TH1F * m_th1_recyminusextrapynearpot
Definition: ALFA_GloRec.h:120
ALFA_GloRec::m_iDataType
int m_iDataType
Definition: ALFA_GloRec.h:47
ALFA_GloRec::m_th1_y_g
TH1F * m_th1_y_g
Definition: ALFA_GloRec.h:89
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
ALFA_GloRec::m_y_g_pos
double m_y_g_pos
Definition: ALFA_GloRec.h:75
ALFA_GloRecEvent
Definition: ALFA_GloRecEvent.h:12
ALFA_GloRec::m_th2_trueyvsrecy
TH2F * m_th2_trueyvsrecy
Definition: ALFA_GloRec.h:103
ALFA_GloRec::m_pz_g_neg
double m_pz_g_neg
Definition: ALFA_GloRec.h:80
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
CheckAppliedSFs.e3
e3
Definition: CheckAppliedSFs.py:264
ALFA_GloRec::m_th2_extrapxvsrecxnearpot
TH2F * m_th2_extrapxvsrecxnearpot
Definition: ALFA_GloRec.h:115
McEventCollection.h
lumiFormat.i
int i
Definition: lumiFormat.py:85
z
#define z
ALFA_GloRec::m_strLocRecCorrCollectionName
std::string m_strLocRecCorrCollectionName
Definition: ALFA_GloRec.h:52
ALFA_GloRec::m_th2_extrapyvsrecyfarpot
TH2F * m_th2_extrapyvsrecyfarpot
Definition: ALFA_GloRec.h:123
ALFA_GloRec::finalize
StatusCode finalize()
Definition: ALFA_GloRec.cxx:246
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AlfaLocalHit::GetY
float GetY() const
Definition: AlfaLocalHits.h:38
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
AlfaTrackCand::GetYslope
float GetYslope()
Definition: AlfaLocalHits.h:115
ALFA_GloRec::m_th1_recyoverextrapyfarpot
TH1F * m_th1_recyoverextrapyfarpot
Definition: ALFA_GloRec.h:125
ALFA_GloRec::m_strTrackPathPatterns
std::string m_strTrackPathPatterns
Definition: ALFA_GloRec.h:48
ALFA_LocRecCorrEvent
Definition: ALFA_LocRecCorrEvent.h:8
Amg::pz
@ pz
Definition: GeoPrimitives.h:40
ALFA_LocRecCorrEvCollection.h
AlfaTrackCand::GetFarImpactPoint
HepGeom::Point3D< double > * GetFarImpactPoint()
Definition: AlfaLocalHits.h:122
AlfaTrackCand::GetNearLocalHit
AlfaLocalHit * GetNearLocalHit()
Definition: AlfaLocalHits.h:116
AlfaLocalHit::GetZ
float GetZ() const
Definition: AlfaLocalHits.h:39
ALFA_GloRec::m_th1_xnearuppotresiduals
TH1F * m_th1_xnearuppotresiduals
Definition: ALFA_GloRec.h:93
ALFA_GloRec::InitHistos
void InitHistos()
Definition: ALFA_GloRec.cxx:340
ALFA_GloRec::m_th1_yfaruppotresiduals
TH1F * m_th1_yfaruppotresiduals
Definition: ALFA_GloRec.h:96
McEventCollection
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
Definition: McEventCollection.h:32
ALFA_GloRec::execute
StatusCode execute()
Definition: ALFA_GloRec.cxx:154
ALFA_GloRec::m_th2_truexslopevsrecxslope
TH2F * m_th2_truexslopevsrecxslope
Definition: ALFA_GloRec.h:104
ALFA_GloRec::m_th1_recxminustruex
TH1F * m_th1_recxminustruex
Definition: ALFA_GloRec.h:110
AthAlgorithm
Definition: AthAlgorithm.h:47
ALFA_GloRec::m_th1_recyoverextrapynearpot
TH1F * m_th1_recyoverextrapynearpot
Definition: ALFA_GloRec.h:118
AlfaTrackCand::GetX
float GetX()
Definition: AlfaLocalHits.h:111
HepMC::ConstGenParticlePtr
const GenParticle * ConstGenParticlePtr
Definition: GenParticle.h:38
Amg::py
@ py
Definition: GeoPrimitives.h:39
ALFA_GloRec::m_th1_recxovertruex
TH1F * m_th1_recxovertruex
Definition: ALFA_GloRec.h:106
ALFA_GloRec::m_th2_trueyslopevsrecyslope
TH2F * m_th2_trueyslopevsrecyslope
Definition: ALFA_GloRec.h:105
ALFA_GloRec::initialize
StatusCode initialize()
Definition: ALFA_GloRec.cxx:120
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
ALFA_GloRec::m_px_g_pos
double m_px_g_pos
Definition: ALFA_GloRec.h:71
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
AlfaLocalHits.h
ALFA_GloRec::m_th1_recyovertruey
TH1F * m_th1_recyovertruey
Definition: ALFA_GloRec.h:107
AlfaTrackCand::IsValidTrack
int IsValidTrack()
Definition: AlfaLocalHits.h:106
ALFA_GloRec::m_th2_truexvsrecx
TH2F * m_th2_truexvsrecx
Definition: ALFA_GloRec.h:102
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
ALFA_GloRec::m_th1_recxoverextrapxnearpot
TH1F * m_th1_recxoverextrapxnearpot
Definition: ALFA_GloRec.h:117
ALFA_GloRec::m_th1_recyminusextrapyfarpot
TH1F * m_th1_recyminusextrapyfarpot
Definition: ALFA_GloRec.h:127
y
#define y
AlfaLocalHit
Definition: AlfaLocalHits.h:23
ALFA_GloRec::m_th1_xnearlwpotresiduals
TH1F * m_th1_xnearlwpotresiduals
Definition: ALFA_GloRec.h:97
ALFA_GloRec::m_th1_x_g
TH1F * m_th1_x_g
Definition: ALFA_GloRec.h:88
ALFA_GloRec.h
DEBUG
#define DEBUG
Definition: page_access.h:11
ALFA_GloRec::WriteHistos
void WriteHistos()
Definition: ALFA_GloRec.cxx:469
AthCommonMsg< Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
ALFA_GloRec::m_strGloRecAnalysisFile
std::string m_strGloRecAnalysisFile
Definition: ALFA_GloRec.h:50
ALFA_GloRec::m_py_g_pos
double m_py_g_pos
Definition: ALFA_GloRec.h:72
ALFA_GloRec::m_th1_ynearuppotresiduals
TH1F * m_th1_ynearuppotresiduals
Definition: ALFA_GloRec.h:94
ALFA_GloRec::m_th1_recxoverextrapxfarpot
TH1F * m_th1_recxoverextrapxfarpot
Definition: ALFA_GloRec.h:124
ALFA_GloRec::m_th1_recyminustruey
TH1F * m_th1_recyminustruey
Definition: ALFA_GloRec.h:111
AlfaLocalHit::GetX
float GetX() const
Definition: AlfaLocalHits.h:37
AlfaTrackCand::GetArmNum
int GetArmNum()
Definition: AlfaLocalHits.h:110
AlfaTrackCand::IsRightTrack
int IsRightTrack()
Definition: AlfaLocalHits.cxx:310
ALFA_GloRec::m_z_g_pos
double m_z_g_pos
Definition: ALFA_GloRec.h:76
HepMC::ConstGenVertexPtr
const HepMC::GenVertex * ConstGenVertexPtr
Definition: GenVertex.h:60
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
ALFA_GloRec::m_px_g_neg
double m_px_g_neg
Definition: ALFA_GloRec.h:78
AlfaTrackCand::GetNearImpactPoint
HepGeom::Point3D< double > * GetNearImpactPoint()
Definition: AlfaLocalHits.h:121
AlfaTrackCand
Definition: AlfaLocalHits.h:90
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
ALFA_GloRec::m_pGloRecEvCollection
ALFA_GloRecEvCollection * m_pGloRecEvCollection
Definition: ALFA_GloRec.h:41
ALFA_GloRecEvCollection.h
ALFA_GloRec::m_th1_ynearlwpotresiduals
TH1F * m_th1_ynearlwpotresiduals
Definition: ALFA_GloRec.h:98