Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MultiDetectorMultiplicity.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file MultiDetectorMultiplicity.cc
2 
3 // Centrality
5 
6 // Calo includes
7 #include <calobase/TowerInfov1.h>
8 #include <calobase/TowerInfoContainerv1.h>
9 
10 #include <phool/getClass.h>
11 #include <phool/phool.h>
12 
13 // Vertex includes
16 
17 // Tracking includes
21 #include <trackbase/TrkrHitSet.h>
23 
26 
28 #include <TFile.h>
29 #include <TH2F.h>
30 #include <TH1I.h>
31 #include <TTree.h>
32 
34 #include <string>
35 
45  : SubsysReco(name)
46  , _outfilename(filename)
47 {
50 }
51 
57 {
58 
59 }
60 
65 {
66  if (Verbosity() > 5)
67  {
68  std::cout << "Beginning Init in MultiDetectorMultiplicity" << std::endl;
69  }
70 
72 
73  return 0;
74 }
75 
81 {
82  if (Verbosity() > 5)
83  {
84  std::cout << "Beginning process_event in MultiDetectorMultiplicity" << std::endl;
85  }
86 
87  float Ntracks = getFilteredNtracks(topNode);
88  float MVTXclusters = getMVTXnclusters(topNode);
89  float EMCalTotalEnergy = getEMCalTotalEnergy(topNode);
90  float IHCalTotalEnergy = getIHCalTotalEnergy(topNode);
91  float OHCalTotalEnergy = getOHCalTotalEnergy(topNode);
92  float EPDTotalEnergy = getsEPDTotalEnergy(topNode);
93 
94  bool acceptVertex = isVertexAccepted(topNode);
95 
96  CentralityInfo* cent_node = findNode::getClass<CentralityInfo>(topNode, "CentralityInfo");
97  if (!cent_node)
98  {
99  std::cout << "MultiDetectorMultiplicity::process_event - Error can not find centrality node " << std::endl;
102  }
103 
104  if(!acceptVertex) return Fun4AllReturnCodes::ABORTEVENT;
105 
106  _mbd_centrality = cent_node->get_centile(CentralityInfo::PROP::mbd_NS);
107  _epd_centrality = cent_node->get_centile(CentralityInfo::PROP::epd_NS);
108 
109  _tracks_EMCALenergy->Fill(Ntracks, EMCalTotalEnergy);
110  _tracks_IHCALenergy->Fill(Ntracks, IHCalTotalEnergy);
111  _tracks_OHCALenergy->Fill(Ntracks, OHCalTotalEnergy);
112  _tracks_AllCALenergy->Fill(Ntracks, EMCalTotalEnergy+IHCalTotalEnergy+OHCalTotalEnergy);
113  _tracks_MVTXclusters->Fill(Ntracks, MVTXclusters);
114 
115  _MVTXclusters_EMCALenergy->Fill(MVTXclusters, EMCalTotalEnergy);
116  _MVTXclusters_IHCALenergy->Fill(MVTXclusters, IHCalTotalEnergy);
117  _MVTXclusters_OHCALenergy->Fill(MVTXclusters, OHCalTotalEnergy);
118  _MVTXclusters_AllCALenergy->Fill(MVTXclusters, EMCalTotalEnergy+IHCalTotalEnergy+OHCalTotalEnergy);
119 
120  _EMCALenergy_IHCALenergy->Fill(EMCalTotalEnergy, IHCalTotalEnergy);
121  _EMCALenergy_OHCALenergy->Fill(EMCalTotalEnergy, OHCalTotalEnergy);
122  _IHCALenergy_OHCALenergy->Fill(IHCalTotalEnergy, OHCalTotalEnergy);
123 
124  float centBinMBD = 100.-_mbd_centrality;
125 
126  _MBDcentrality_tracks->Fill(centBinMBD, Ntracks);
127  _MBDcentrality_MVTXclusters->Fill(centBinMBD, MVTXclusters);
128  _MBDcentrality_EMCALenergy->Fill(centBinMBD, EMCalTotalEnergy);
129  _MBDcentrality_IHCALenergy->Fill(centBinMBD, IHCalTotalEnergy);
130  _MBDcentrality_OHCALenergy->Fill(centBinMBD, OHCalTotalEnergy);
131  _MBDcentrality_AllCALenergy->Fill(centBinMBD, EMCalTotalEnergy+IHCalTotalEnergy+OHCalTotalEnergy);
132  _MBDcentrality_EPDenergy->Fill(centBinMBD, EPDTotalEnergy);
133 
134  float centBinEPD = 100.-_epd_centrality;
135 
136  _EPDcentrality_tracks->Fill(centBinEPD, Ntracks);
137  _EPDcentrality_MVTXclusters->Fill(centBinEPD, MVTXclusters);
138  _EPDcentrality_EMCALenergy->Fill(centBinEPD, EMCalTotalEnergy);
139  _EPDcentrality_IHCALenergy->Fill(centBinEPD, IHCalTotalEnergy);
140  _EPDcentrality_OHCALenergy->Fill(centBinEPD, OHCalTotalEnergy);
141  _EPDcentrality_AllCALenergy->Fill(centBinEPD, EMCalTotalEnergy+IHCalTotalEnergy+OHCalTotalEnergy);
142  _EPDcentrality_EPDenergy->Fill(centBinEPD, EPDTotalEnergy);
143 
144  _EPDcentrality_MBDcentrality->Fill(centBinEPD, centBinMBD);
145 
146  _EPDenergy_tracks->Fill(EPDTotalEnergy, Ntracks);
147  _EPDenergy_MVTXclusters->Fill(EPDTotalEnergy, MVTXclusters);
148  _EPDenergy_EMCALenergy->Fill(EPDTotalEnergy, EMCalTotalEnergy);
149  _EPDenergy_IHCALenergy->Fill(EPDTotalEnergy, IHCalTotalEnergy);
150  _EPDenergy_OHCALenergy->Fill(EPDTotalEnergy, OHCalTotalEnergy);
151  _EPDenergy_AllCALenergy->Fill(EPDTotalEnergy, EMCalTotalEnergy+IHCalTotalEnergy+OHCalTotalEnergy);
152 
154 }
155 
161 {
162  if (Verbosity() > 1)
163  {
164  std::cout << "Ending MultiDetectorMultiplicity analysis package" << std::endl;
165  }
166 
168  _outfile->cd();
169 
171  _tracks_EMCALenergy->Write();
172  _tracks_IHCALenergy->Write();
173  _tracks_OHCALenergy->Write();
174  _tracks_AllCALenergy->Write();
175  _tracks_MVTXclusters->Write();
176 
177  _MVTXclusters_EMCALenergy->Write();
178  _MVTXclusters_IHCALenergy->Write();
179  _MVTXclusters_OHCALenergy->Write();
181 
182  _EMCALenergy_IHCALenergy->Write();
183  _EMCALenergy_OHCALenergy->Write();
184  _IHCALenergy_OHCALenergy->Write();
185 
186  _MBDcentrality_tracks->Write();
192  _MBDcentrality_EPDenergy->Write();
193 
194  _EPDcentrality_tracks->Write();
200  _EPDcentrality_EPDenergy->Write();
201 
203 
204  _EPDenergy_tracks->Write();
205  _EPDenergy_MVTXclusters->Write();
206  _EPDenergy_EMCALenergy->Write();
207  _EPDenergy_IHCALenergy->Write();
208  _EPDenergy_OHCALenergy->Write();
209  _EPDenergy_AllCALenergy->Write();
210 
211  _SubsystemObjectsFail->Write();
212 
213  _outfile->Close();
214 
216  delete _outfile;
217 
218  if (Verbosity() > 1)
219  {
220  std::cout << "Finished MultiDetectorMultiplicity analysis package" << std::endl;
221  }
222 
223  return 0;
224 }
225 
227 {
228  _outfile = new TFile(_outfilename.c_str(), "RECREATE");
229 
230  _tracks_EMCALenergy = new TH2F("tracks_EMCALenergy", ";Track multiplicity;EMCal Energy (GeV)",_nbins,0.,_track_bin_max,_nbins,0.,_emcal_bin_max);
231  _tracks_IHCALenergy = new TH2F("tracks_IHCALenergy", ";Track multiplicity;IHCal Energy (GeV)",_nbins,0.,_track_bin_max,_nbins,0.,_ihcal_bin_max);
232  _tracks_OHCALenergy = new TH2F("tracks_OHCALenergy", ";Track multiplicity;OHCal Energy (GeV)",_nbins,0.,_track_bin_max,_nbins,0.,_ohcal_bin_max);
233  _tracks_AllCALenergy = new TH2F("tracks_AllCALenergy", ";Track multiplicity;EMCal+IHCal+OHCal Energy (GeV)",_nbins,0.,_track_bin_max,_nbins,0.,_allcal_bin_max);
234  _tracks_MVTXclusters = new TH2F("tracks_MVTXclusters", ";Track multiplicity;MVTX cluster multiplicity",_nbins,0.,_track_bin_max,_nbins,0.,_mvtx_bin_max);
235 
236  _MVTXclusters_EMCALenergy = new TH2F("MVTXclusters_EMCALenergy", ";MVTX cluster multiplicity;EMCal Energy (GeV)",_nbins,0.,_mvtx_bin_max,_nbins,0.,_emcal_bin_max);
237  _MVTXclusters_IHCALenergy = new TH2F("MVTXclusters_IHCALenergy", ";MVTX cluster multiplicity;IHCal Energy (GeV)",_nbins,0.,_mvtx_bin_max,_nbins,0.,_ihcal_bin_max);
238  _MVTXclusters_OHCALenergy = new TH2F("MVTXclusters_OHCALenergy", ";MVTX cluster multiplicity;OHCal Energy (GeV)",_nbins,0.,_mvtx_bin_max,_nbins,0.,_ohcal_bin_max);
239  _MVTXclusters_AllCALenergy = new TH2F("MVTXclusters_AllCALenergy", ";MVTX cluster multiplicity;EMCal+IHCal+OHCal Energy (GeV)",_nbins,0.,_mvtx_bin_max,_nbins,0.,_allcal_bin_max);
240 
241  _EMCALenergy_IHCALenergy = new TH2F("EMCALenergy_IHCALenergy", ";EMCal Energy (GeV);IHCal Energy (GeV)",_nbins,0.,_emcal_bin_max,_nbins,0.,_ihcal_bin_max);
242  _EMCALenergy_OHCALenergy = new TH2F("EMCALenergy_OHCALenergy", ";EMCal Energy (GeV);OHCal Energy (GeV)",_nbins,0.,_emcal_bin_max,_nbins,0.,_ohcal_bin_max);
243  _IHCALenergy_OHCALenergy = new TH2F("IHCALenergy_OHCALenergy", ";IHCal Energy (GeV);OHCal Energy (GeV)",_nbins,0.,_ihcal_bin_max,_nbins,0.,_ohcal_bin_max);
244 
245  _MBDcentrality_tracks = new TH2F("MBDcentrality_tracks", ";MBD Centrality;Track multiplicity",10,0.,100.,_nbins,0.,_track_bin_max);
247 
248  _MBDcentrality_MVTXclusters = new TH2F("MBDcentrality_MVTXclusters", ";MBD Centrality;MVTX cluster multiplicity",10,0.,100.,_nbins,0.,_mvtx_bin_max);
250 
251  _MBDcentrality_EMCALenergy = new TH2F("MBDcentrality_EMCALenergy", ";MBD Centrality;EMCal Energy (GeV)",10,0.,100.,_nbins,0.,_emcal_bin_max);
253 
254  _MBDcentrality_IHCALenergy = new TH2F("MBDcentrality_IHCALenergy", ";MBD Centrality;IHCal Energy (GeV)",10,0.,100.,_nbins,0.,_ihcal_bin_max);
256 
257  _MBDcentrality_OHCALenergy = new TH2F("MBDcentrality_OHCALenergy", ";MBD Centrality;OHCal Energy (GeV)",10,0.,100.,_nbins,0.,_ohcal_bin_max);
259 
260  _MBDcentrality_AllCALenergy = new TH2F("MBDcentrality_AllCALenergy", ";MBD Centrality;EMCal+IHCal+OHCal Energy (GeV)",10,0.,100.,_nbins,0.,_allcal_bin_max);
262 
263  _MBDcentrality_EPDenergy = new TH2F("MBDcentrality_EPDenergy", ";MBD Centrality;EPD Energy (GeV)",10,0.,100.,_nbins,0.,_epd_bin_max);
265 
266  _EPDcentrality_tracks = new TH2F("EPDcentrality_tracks", ";EPD Centrality;Track multiplicity",10,0.,100.,_nbins,0.,_track_bin_max);
268 
269  _EPDcentrality_MVTXclusters = new TH2F("EPDcentrality_MVTXclusters", ";EPD Centrality;MVTX cluster multiplicity",10,0.,100.,_nbins,0.,_mvtx_bin_max);
271 
272  _EPDcentrality_EMCALenergy = new TH2F("EPDcentrality_EMCALenergy", ";EPD Centrality;EMCal Energy (GeV)",10,0.,100.,_nbins,0.,_emcal_bin_max);
274 
275  _EPDcentrality_IHCALenergy = new TH2F("EPDcentrality_IHCALenergy", ";EPD Centrality;IHCal Energy (GeV)",10,0.,100.,_nbins,0.,_ihcal_bin_max);
277 
278  _EPDcentrality_OHCALenergy = new TH2F("EPDcentrality_OHCALenergy", ";EPD Centrality;OHCal Energy (GeV)",10,0.,100.,_nbins,0.,_ohcal_bin_max);
280 
281  _EPDcentrality_AllCALenergy = new TH2F("EPDcentrality_AllCALenergy", ";EPD Centrality;EMCal+IHCal+OHCal Energy (GeV)",10,0.,100.,_nbins,0.,_allcal_bin_max);
283 
284  _EPDcentrality_EPDenergy = new TH2F("EPDcentrality_EPDenergy", ";EPD Centrality;EPD Energy (GeV)",10,0.,100.,_nbins,0.,_epd_bin_max);
286 
287  _EPDcentrality_MBDcentrality = new TH2F("EPDcentrality_MBDcentrality", ";EPD Centrality;MBD Centrality",10,0.,100.,10,0.,100);
289 
290  _EPDenergy_tracks = new TH2F("EPDenergy_tracks", ";EPD Energy (GeV);Track multiplicity",_nbins,0.,_epd_bin_max,_nbins,0.,_track_bin_max);
291  _EPDenergy_MVTXclusters = new TH2F("EPDenergy_MVTXclusters", ";EPD Energy (GeV);MVTX cluster multiplicity",_nbins,0.,_epd_bin_max,_nbins,0.,_mvtx_bin_max);
292  _EPDenergy_EMCALenergy = new TH2F("EPDenergy_EMCALenergy", ";EPD Energy (GeV);EMCal Energy (GeV)",_nbins,0.,_epd_bin_max,_nbins,0.,_emcal_bin_max);
293  _EPDenergy_IHCALenergy = new TH2F("EPDenergy_IHCALenergy", ";EPD Energy (GeV);IHCal Energy (GeV)",_nbins,0.,_epd_bin_max,_nbins,0.,_ihcal_bin_max);
294  _EPDenergy_OHCALenergy = new TH2F("EPDenergy_OHCALenergy", ";EPD Energy (GeV);OHCal Energy (GeV)",_nbins,0.,_epd_bin_max,_nbins,0.,_ohcal_bin_max);
295  _EPDenergy_AllCALenergy = new TH2F("EPDenergy_AllCALenergy", ";EPD Energy (GeV);EMCal+IHCal+OHCal Energy (GeV)",_nbins,0.,_epd_bin_max,_nbins,0.,_allcal_bin_max);
296 
297  // This histo keeps track of the number of times certain objects were not found.
298  // Ideally this histogram should be EMPTY!!!
299  // For future updates including other objects, be sure to not reject the event before all objects are checked
300  _SubsystemObjectsFail = new TH1I("SubsystemObjectsFail", "Times objects were NOT found;;Entries",8,0.,8.);
301 
302  _SubsystemObjectsFail->GetXaxis()->SetBinLabel(1,"Vertex");
303  _SubsystemObjectsFail->GetXaxis()->SetBinLabel(2,"Centrality");
304  _SubsystemObjectsFail->GetXaxis()->SetBinLabel(3,"Tracks");
305  _SubsystemObjectsFail->GetXaxis()->SetBinLabel(4,"MVTX clusters");
306  _SubsystemObjectsFail->GetXaxis()->SetBinLabel(5,"EMCal towers");
307  _SubsystemObjectsFail->GetXaxis()->SetBinLabel(6,"IHCal towers");
308  _SubsystemObjectsFail->GetXaxis()->SetBinLabel(7,"OHCal towers");
309  _SubsystemObjectsFail->GetXaxis()->SetBinLabel(8,"sEPD towers");
310 
311 }
312 
314 {
315  SvtxTrackMap *trackmap = findNode::getClass<SvtxTrackMap>(topNode, "SvtxTrackMap");
316 
317  if (!trackmap)
318  {
319  std::cout << PHWHERE
320  << "SvtxTrackMap node is missing, can't collect tracks"
321  << std::endl;
322  _SubsystemObjectsFail->Fill(OBJECT::TRACKS);
323  return -1;
324  }
325 
326  float Ntracks = 0;
327 
328  for(SvtxTrackMap::Iter iter = trackmap->begin(); iter != trackmap->end(); ++iter)
329  {
330  SvtxTrack* track = iter->second;
331  float quality = track->get_quality();
332 
333  if (quality > 10) continue;
334 
335  // DCA units and values have to be cross-checked
336  //float DCAxy = track->get_dca3d_xy(); //DCAxy in micrometer
337  //if(std::abs(DCAxy) > 20) continue;
338  //float DCAz = track->get_dca3d_z() * 10000; //DCAz in cm?, so multipli by 10^4
339  //if(std::abs(DCAz) > 10) continue;
340 
341  auto silicon_seed = track->get_silicon_seed();
342  auto tpc_seed = track->get_tpc_seed();
343  int nsiliconhits = 0;
344 
345  int nTPChits = 0;
346 
347  // Getting number of TPC hits as done in SvtxEvaluator.h
348 
349  if(tpc_seed)
350  {
351  for (TrackSeed::ConstClusterKeyIter iter = tpc_seed->begin_cluster_keys(); iter != tpc_seed->end_cluster_keys(); ++iter)
352  {
353  TrkrDefs::cluskey cluster_key = *iter;
354  unsigned int layer = TrkrDefs::getLayer(cluster_key);
355  if (_nlayers_tpc > 0 && layer >= (_nlayers_maps + _nlayers_intt) && layer < (_nlayers_maps + _nlayers_intt + _nlayers_tpc))
356  {
357  nTPChits++;
358  }
359  }
360  }
361 
362  if (silicon_seed)
363  {
364  for (TrackSeed::ConstClusterKeyIter iter = silicon_seed->begin_cluster_keys(); iter != silicon_seed->end_cluster_keys(); ++iter)
365  {
366  TrkrDefs::cluskey cluster_key = *iter;
367  unsigned int layer = TrkrDefs::getLayer(cluster_key);
368  if (_nlayers_tpc > 0 && layer >= (_nlayers_maps + _nlayers_intt) && layer < (_nlayers_maps + _nlayers_intt + _nlayers_tpc))
369  {
370  nTPChits++;
371  }
372  }
373  nsiliconhits = silicon_seed->size_cluster_keys(); // Get number of hits on silicon detectors (INTT+MVTX)
374  }
375 
376  if(nTPChits < 20) continue; // Require at least 20 TPC hits
377 
378  if (nsiliconhits < 2) continue; // Require at least 2 hits on silicon detectors
379 
380  Ntracks += 1.;
381  }
382 
383  return Ntracks;
384 }
385 
387 {
388  TrkrClusterContainer *MVTXclusterMap = findNode::getClass<TrkrClusterContainer>(topNode,"TRKR_CLUSTER");
389 
390  if(!MVTXclusterMap)
391  {
392  std::cout << PHWHERE
393  << "TRKR_CLUSTER node is missing, can't collect hits"
394  << std::endl;
395  _SubsystemObjectsFail->Fill(OBJECT::MVTXCLUSTERS);
396  return -1;
397  }
398 
399  float MVTXclusters = 0.;
400 
401  for(const auto& hitsetkey : MVTXclusterMap->getHitSetKeys(TrkrDefs::TrkrId::mvtxId))
402  {
403  auto range = MVTXclusterMap->getClusters(hitsetkey);
404  for( auto clusIter = range.first; clusIter != range.second; ++clusIter )
405  {
406  const auto cluster = clusIter->second;
407 
408  if(!cluster) continue;
409 
410  MVTXclusters += 1.;
411 
412  }
413  }
414 
415  return MVTXclusters;
416 
417 }
418 
420 {
421  TowerInfoContainer *towerinfosEM = findNode::getClass<TowerInfoContainer>(topNode, "TOWERINFO_CALIB_CEMC");
422 
423  if(!towerinfosEM)
424  {
425  std::cout << PHWHERE
426  << "TOWERINFO_CALIB_CEMC node is missing, can't collect EMCal towers"
427  << std::endl;
428  _SubsystemObjectsFail->Fill(OBJECT::EMCALTOWERS);
429  return -1.;
430  }
431 
432  float EMCalTotalEnergy = 0.;
433 
434  TowerInfo *towerInfo = nullptr;
435  for(unsigned int i = 0; i < towerinfosEM->size(); i++)
436  {
437  towerInfo = towerinfosEM->get_tower_at_channel(i);
438  EMCalTotalEnergy += towerInfo->get_energy();
439  }
440 
441  return EMCalTotalEnergy;
442 }
443 
445 {
446  TowerInfoContainer *towerinfosIH = findNode::getClass<TowerInfoContainer>(topNode, "TOWERINFO_CALIB_HCALIN");
447 
448  if(!towerinfosIH)
449  {
450  std::cout << PHWHERE
451  << "TOWERINFO_CALIB_HCALIN node is missing, can't collect IHCal towers"
452  << std::endl;
453  _SubsystemObjectsFail->Fill(OBJECT::IHCALTOWERS);
454  return -1.;
455  }
456 
457  float IHCalTotalEnergy = 0.;
458 
459  TowerInfo *towerInfo = nullptr;
460  for(unsigned int i = 0; i < towerinfosIH->size(); i++)
461  {
462  towerInfo = towerinfosIH->get_tower_at_channel(i);
463  IHCalTotalEnergy += towerInfo->get_energy();
464  }
465 
466  return IHCalTotalEnergy;
467 }
468 
470 {
471  TowerInfoContainer *towerinfosOH = findNode::getClass<TowerInfoContainer>(topNode, "TOWERINFO_CALIB_HCALOUT");
472 
473  if(!towerinfosOH)
474  {
475  std::cout << PHWHERE
476  << "TOWERINFO_CALIB_HCALOUT node is missing, can't collect OHCal towers"
477  << std::endl;
478  _SubsystemObjectsFail->Fill(OBJECT::OHCALTOWERS);
479  return -1.;
480  }
481 
482  float OHCalTotalEnergy = 0.;
483 
484  TowerInfo *towerInfo = nullptr;
485  for(unsigned int i = 0; i < towerinfosOH->size(); i++)
486  {
487  towerInfo = towerinfosOH->get_tower_at_channel(i);
488  OHCalTotalEnergy += towerInfo->get_energy();
489  }
490 
491  return OHCalTotalEnergy;
492 }
493 
495 {
496  TowerInfoContainer *towerinfosEPD = findNode::getClass<TowerInfoContainer>(topNode, "TOWERINFO_CALIB_EPD");
497 
498  if(!towerinfosEPD)
499  {
500  std::cout << PHWHERE
501  << "TOWERINFO_CALIB_EPD node is missing, can't collect sEPD towers"
502  << std::endl;
503  _SubsystemObjectsFail->Fill(OBJECT::EPDTOWERS);
504  return -1.;
505  }
506 
507  float EPDTotalEnergy = 0.;
508 
509  TowerInfo *towerInfo = nullptr;
510  for(unsigned int i = 0; i < towerinfosEPD->size(); i++)
511  {
512  towerInfo = towerinfosEPD->get_tower_at_channel(i);
513  EPDTotalEnergy += towerInfo->get_energy();
514  }
515 
516  return EPDTotalEnergy;
517 }
518 
519 void MultiDetectorMultiplicity::setCentralityHistoLabel(TH2 *histo, bool doYaxisLabels)
520 {
521  for(int i = 0; i < 10; i++)
522  {
523  histo->GetXaxis()->SetBinLabel(i+1,Form("%d-%d%%",90-(i*10),100-(i*10)));
524  if(doYaxisLabels) histo->GetYaxis()->SetBinLabel(i+1,Form("%d-%d%%",90-(i*10),100-(i*10)));
525  }
526 }
527 
529 {
530  GlobalVertexMap *vertexmap = findNode::getClass<GlobalVertexMap>(topNode, "GlobalVertexMap");
531  if (!vertexmap)
532  {
533  std::cout << "GlobalVertexMap node is missing. Event aborted!" << std::endl;
534  _SubsystemObjectsFail->Fill(OBJECT::VERTEX);
535  return false;
536  }
537 
538  if (vertexmap->empty())
539  {
540  std::cout << "GlobalVertexMap node is empty. Event aborted!" << std::endl;
541  _SubsystemObjectsFail->Fill(OBJECT::VERTEX);
542  return false;
543  }
544 
545  GlobalVertex *vtx = vertexmap->begin()->second;
546  if (vtx == nullptr)
547  {
548  _SubsystemObjectsFail->Fill(OBJECT::VERTEX);
549  return false;
550  }
551 
552  if(std::abs(vtx->get_z()) > _zVertexAcceptance) return false;
553 
554  return true;
555 }