ATLAS Offline Software
IDPerfMonKshort.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // **********************************************************************
6 // IDPerfMonKshort.cxx
7 // AUTHORS: Jed Biesiada, Tobias Golling, Beate Heinemann
8 // **********************************************************************
9 
10 #include <cmath>
11 #include <vector>
12 #include <algorithm>
13 
14 #include "TH1.h"
15 #include "TProfile.h"
16 #include "TGraphErrors.h"
17 #include "TF1.h"
18 #include "TMath.h"
19 #include "TRandom.h"
20 
21 
22 #include "GaudiKernel/SystemOfUnits.h"
23 #include "GaudiKernel/PhysicalConstants.h"
24 
27 
28 #include "xAODTracking/Vertex.h"
30 
33 
38 #include "CLHEP/Vector/LorentzVector.h"
39 // ATLAS headers
40 #include "GaudiKernel/IInterface.h"
41 
44 
45 
46 namespace{ //utility functions
47  //fill a container with a sequence of values
48  template <typename ForwardIterator, typename T>
49  void
50  sequentialFill(ForwardIterator beg, const ForwardIterator stop, T value, const T inc){
51  while (beg!=stop){
52  *beg++ = value;
53  value +=inc;
54  };
55  return;
56  }
57 
58  //find index in sorted array where the given value lies just above the indexed value
59  template <typename Iterator, typename T, typename Compare=std::less<T>>
60  long
61  findLevel(const Iterator beg, const Iterator stop, T value, Compare op=std::less<T>()){
62  auto place = std::lower_bound(beg, stop, value, op);
63  return std::distance(beg, place );
64  }
65  //in range?
66  template <typename T>
67  bool
68  inRange(const T &v, const T &lo, const T &hi){
69  return (v >= lo) and (v<=hi);
70  }
71 
72 }
73 
74 // *********************************************************************
75 // Public Methods
76 // *********************************************************************
77 
78 
79 
80 IDPerfMonKshort::IDPerfMonKshort( const std::string & type, const std::string & name, const IInterface* parent )
82  m_triggerChainName("NoTriggerSelection")
83 
84 {
85  declareProperty("tracksName",m_tracksName);
86  declareProperty("CheckRate",m_checkrate=1000);
87  declareProperty("triggerChainName",m_triggerChainName);
88  declareProperty("VxContainerName",m_VxContainerName="V0UnconstrVertices");
89  declareProperty("VxPrimContainerName",m_VxPrimContainerName="PrimaryVertices");
90 }
91 
93 
94 
96 {
97  ATH_MSG_DEBUG( "IDPerfMonKshort initialize() started");
98  m_histosBooked = 0;
99  if (m_tracksName.empty()) ATH_MSG_ERROR( " no track collection given");
100  StatusCode sc;
102  ATH_MSG_DEBUG( "IDPerfMonKshort initialize() finished");
103  return StatusCode::SUCCESS;
104 }
105 
106 
108 {
109  if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "IDPerfMonKshort bookHistograms() started"<< endmsg;
110  MonGroup al_kshort_mon ( this, "IDPerfMon/Kshort/" + m_triggerChainName, run);
111 
112 
113  //ASK CONFIRMATION for ATTRIB_MANAGED
114  MonGroup al_kshort_mon_average(this, "IDPerfMon/Kshort/" + m_triggerChainName,run,ATTRIB_MANAGED,"","weightedAverage");
115 
116 
118  // book histograms that are only made in the online environment...
119  }
120 
122  // book histograms that are only relevant for cosmics data...
123  }
124 
125 
126 
127 
128 
129  if( newRunFlag() ) {
130 
131  //if user environment specified we don't want to book new histograms at every run boundary
132  //we instead want one histogram per job
133  if(m_histosBooked!=0 && AthenaMonManager::environment()==AthenaMonManager::user) return StatusCode::SUCCESS;
134 
135  Double_t ptBins[m_nFittedBinsPt] = {1.05,1.85,2.45,3.35,4.5};
136  Double_t radiusBins[m_nFittedBinsRadius] = {15.,35.,50.,70.,90.,120.,185.};
137  Double_t phiBins[10]{};
138  Double_t etaBins[10]{};
139  Double_t curvatureDiffBins[6]{};
140  sequentialFill(phiBins, std::end(phiBins), (-4.5*M_PI/5.), (M_PI/5.));
141  sequentialFill(etaBins, std::end(etaBins),-2.25, 0.5);
142  sequentialFill(curvatureDiffBins, std::end(curvatureDiffBins), -0.001,0.0004);
143  m_mass = new TH1F("ks_mass", "Invariant mass of K^{0}_{S} candidate", 60, 0.45, 0.55);
144  m_mass->SetYTitle("K^{0}_{S} Candidates");
145  m_mass->SetXTitle("Mass (Gev / c^{2})");
146  m_mass->SetMarkerStyle(20);
147  m_mass->SetMinimum(0.);
148  RegisterHisto(al_kshort_mon,m_mass) ;
149  m_mass_scaled = new TH1F("ks_mass_scaled", "Invariant mass of K^{0}_{S} candidate scaled to per event", 60, 0.45, 0.55);
150  m_mass_scaled->SetYTitle("K^{0}_{S} Candidates");
151  m_mass_scaled->SetXTitle("Mass (Gev / c^{2})");
152  m_mass_scaled->SetMarkerStyle(20);
153  m_mass_scaled->SetMinimum(0.);
154  RegisterHisto(al_kshort_mon,m_mass_scaled) ;
155 
156  m_massVsPhi = new TH2F("ks_massVsPhi", "Invariant mass - world average of K^{0}_{S} candidate", 10, (-1.0* M_PI), M_PI, 50, -.5, .5);
157  m_massVsPhi->SetXTitle("#phi");
158  m_massVsPhi->SetYTitle("Mass (Gev / c^{2}) - World Average [MeV]");
159  RegisterHisto(al_kshort_mon,m_massVsPhi) ;
160 
161  m_pt = new TH1F("ks_pt", "p_{T} of K^{0}_{S} candidate", 100, 0., 10.);
162  m_pt->SetYTitle("K^{0}_{S} Candidates");
163  m_pt->SetXTitle("p_{T} (Gev / c)");
164  m_pt->SetMarkerStyle(20);
165  RegisterHisto(al_kshort_mon,m_pt) ;
166 
167  m_radiusVsZ_secVertex = new TH2F("secVertex_radiusVsZ", "all sec.vertices (reco);z [mm];Decay radius [mm]",180, -600., 600.,180.,0.,180.);
168  RegisterHisto(al_kshort_mon,m_radiusVsZ_secVertex) ;
169 
170  m_YVsX_secVertex = new TH2F("secVertex_YVsX", "all sec. vertices (reco);x [mm];y [mm]",200, -150.,150., 200, -150., 150.);
171  RegisterHisto(al_kshort_mon,m_YVsX_secVertex) ;
172 
173  m_radiusVsZ_secVertex_sel = new TH2F("secVertex_radiusVsZ_sel", "all sec.vertices (reco);z [mm];Decay radius [mm]",180, -600., 600.,180.,0.,180.);
175 
176  m_YVsX_secVertex_sel = new TH2F("secVertex_YVsX_sel", "all sec. vertices (reco);x [mm];y [mm]",200, -150.,150., 200, -150., 150.);
177  RegisterHisto(al_kshort_mon,m_YVsX_secVertex_sel) ;
178 
179  m_radiusVsZ_secVertex_Ks = new TH2F("secVertex_radiusVsZ_Ks", "sec.vertices (reco) of K^{0}_{S} candidates;z [mm];Decay radius [mm]",180, -600., 600.,180.,0.,180.);
180  RegisterHisto(al_kshort_mon,m_radiusVsZ_secVertex_Ks) ;
181 
182  m_YVsX_secVertex_Ks = new TH2F("secVertex_YVsX_Ks", "sec. vertices (reco) of K^{0}_{S} candidates;x [mm];y [mm]",200, -150.,150., 200, -150., 150.);
183  RegisterHisto(al_kshort_mon,m_YVsX_secVertex_Ks) ;
184 
185  m_radius_secVertices = new TH1F("radius_secVertices", "Decay radius of secondary vertices", 600, 0., 300.);
186  RegisterHisto(al_kshort_mon,m_radius_secVertices) ;
187 
188  m_radius_secVertices_sel = new TH1F("radius_secVertices_sel", "Decay radius of secondary vertices", 600, 0., 300.);
189  RegisterHisto(al_kshort_mon,m_radius_secVertices_sel) ;
190 
191  m_YVsX_primVertex = new TH2F("primVertex_YVsX", "all primary vertices (reco);PV x [mm];PV y [mm]",300, -1.5,1.5, 300, -1.5, 1.5);
192  RegisterHisto(al_kshort_mon,m_YVsX_primVertex) ;
193 
194  m_XVsZ_primVertex = new TH2F("primVertex_XVsZ", "all primary vertices (reco);PV z [mm];PV x [mm]",200, -350.,350, 300, -1.5, 1.5);
195  RegisterHisto(al_kshort_mon,m_XVsZ_primVertex) ;
196 
197  m_YVsZ_primVertex = new TH2F("primVertex_YVsZ", "all primary vertices (reco);PV z [mm];PV y [mm]",200, -350.,350., 100, -1.5, 1.5);
198  RegisterHisto(al_kshort_mon,m_YVsZ_primVertex) ;
199 
200  m_YVsX_primVertex_Ks = new TH2F("primVertex_YVsX_Ks", "all primary vertices (reco);PV x [mm];PV y [mm]",300, -1.5,1.5, 300, -1.5, 1.5);
201  RegisterHisto(al_kshort_mon,m_YVsX_primVertex_Ks) ;
202 
203  m_XVsZ_primVertex_Ks = new TH2F("primVertex_XVsZ_Ks", "all primary vertices (reco);PV z [mm];PV x [mm]",200, -350.,350, 300, -1.5, 1.5);
204  RegisterHisto(al_kshort_mon,m_XVsZ_primVertex_Ks) ;
205 
206  m_YVsZ_primVertex_Ks = new TH2F("primVertex_YVsZ_Ks", "all primary vertices (reco);PV z [mm];PV y [mm]",200, -350.,350., 100, -1.5, 1.5);
207  RegisterHisto(al_kshort_mon,m_YVsZ_primVertex_Ks) ;
208 
209  m_radius = new TH1F("ks_radius", "Decay radius of K^{0}_{S} candidate", 100, 0., 300.);
210  m_radius->SetYTitle("K^{0}_{S} Candidates");
211  m_radius->SetXTitle("Decay Radius (mm)");
212  m_radius->SetMarkerStyle(20);
213  RegisterHisto(al_kshort_mon,m_radius) ;
214 
215 
216  m_eta = new TH1F("ks_eta", "#eta of K^{0}_{S} candidate", 10, -2.5, 2.5);
217  m_eta->SetYTitle("K^{0}_{S} Candidates");
218  m_eta->SetXTitle("#eta");
219  m_eta->SetMarkerStyle(20);
220  RegisterHisto(al_kshort_mon,m_eta) ;
221  m_phi = new TH1F("ks_phi", "#phi of K^{0}_{S} candidate", 10, (-1.0* M_PI), M_PI);
222  m_phi->SetYTitle("K^{0}_{S} Candidates");
223  m_phi->SetXTitle("#phi");
224  m_phi->SetMarkerStyle(20);
225  RegisterHisto(al_kshort_mon,m_phi) ;
226  //
227  //lamda for use below
228  auto quickSet=[](TH1F * h){
229  h->SetXTitle("Mass (Gev / c^{2})");
230  h->SetYTitle("K^{0}_{S} Candidates");
231  h->SetMarkerStyle(20);
232  h->SetMinimum(0.);
233  };
234  //
235  for(int quickInit=0;quickInit<m_nBinsPt;quickInit++) {
236  TString tempName = "MassVptBin";
237  TString tempTitle = "Mass, p_{T} = ";
238  tempName += quickInit;
239  tempTitle += ((Double_t)((quickInit*100)+500))/1000;
240  tempTitle += " GeV";
241  m_massVPtBinHistos[quickInit] = new TH1F(tempName.Data(),tempTitle.Data(),50,0.445,0.555);
242  quickSet(m_massVPtBinHistos[quickInit]);
243 
244  RegisterHisto(al_kshort_mon,m_massVPtBinHistos[quickInit]) ;
245  }
246  for(int quickInit=0;quickInit<m_nFittedBinsPt;quickInit++) {
247  TString tempName = "MassVptBinFitted";
248  TString tempTitle = "Fitted Mass, p_{T} = ";
249  tempName += quickInit;
250  tempTitle += ptBins[quickInit];
251  tempTitle += " GeV";
252  m_massVPtBinFittedHistos[quickInit] = new TH1F(tempName.Data(),tempTitle.Data(),50,0.445,0.555);
253  quickSet(m_massVPtBinFittedHistos[quickInit]);
254  RegisterHisto(al_kshort_mon,m_massVPtBinFittedHistos[quickInit]) ;
255  }
256  for(int quickInit=0;quickInit<m_nBinsRadius;quickInit++) {
257  TString tempName = "MassVradiusBin";
258  TString tempTitle = "Mass, Decay Radius = ";
259  tempName += quickInit;
260  tempTitle += quickInit*10;
261  tempTitle += " mm";
262  m_massVRadiusBinHistos[quickInit] = new TH1F(tempName.Data(),tempTitle.Data(),50,0.445,0.555);
263  quickSet(m_massVRadiusBinHistos[quickInit]);
264  RegisterHisto(al_kshort_mon,m_massVRadiusBinHistos[quickInit]) ;
265  }
266  for(int quickInit=0;quickInit<m_nFittedBinsRadius;quickInit++) {
267  TString tempName = "MassVradiusBinFitted";
268  TString tempTitle = "Fitted Mass, Decay Radius = ";
269  tempName += quickInit;
270  tempTitle += radiusBins[quickInit];
271  tempTitle += " mm";
272  m_massVRadiusBinFittedHistos[quickInit] = new TH1F(tempName.Data(),tempTitle.Data(),50,0.445,0.555);
273  quickSet(m_massVRadiusBinFittedHistos[quickInit]);
274  RegisterHisto(al_kshort_mon,m_massVRadiusBinFittedHistos[quickInit]) ;
275  }
276  for(int quickInit=0;quickInit<10;quickInit++) {
277  TString tempName = "MassVEtaBin";
278  TString tempTitle = "Mass, #eta = ";
279  tempName += quickInit;
280  tempTitle += etaBins[quickInit];
281  m_massVEtaBinHistos[quickInit] = new TH1F(tempName.Data(),tempTitle.Data(),50,0.445,0.555);
282  quickSet(m_massVEtaBinHistos[quickInit]) ;
283  RegisterHisto(al_kshort_mon,m_massVEtaBinHistos[quickInit]) ;
284 
285  tempName = "MassVPhiBin";
286  tempTitle = "Mass, #phi = ";
287  tempName += quickInit;
288  tempTitle += ((Double_t)((Int_t)(phiBins[quickInit]*100)))/100;
289  m_massVPhiBinHistos[quickInit] = new TH1F(tempName.Data(),tempTitle.Data(),50,0.445,0.555);
290  quickSet(m_massVPhiBinHistos[quickInit]);
291  RegisterHisto(al_kshort_mon,m_massVPhiBinHistos[quickInit]) ;
292  }
293 
294  for(int quickInit=0;quickInit<6;quickInit++) {
295  TString tempName = "MassVCurvatureDiffBin";
296  TString tempTitle = "Mass, CurvatureDiff = ";
297  tempName += quickInit;
298  tempTitle += curvatureDiffBins[quickInit];
299  m_massVCurvatureDiffBinHistos[quickInit] = new TH1F(tempName.Data(),tempTitle.Data(),50,0.445,0.555);
300  quickSet(m_massVCurvatureDiffBinHistos[quickInit]);
301  RegisterHisto(al_kshort_mon,m_massVCurvatureDiffBinHistos[quickInit]) ;
302  }
303 
304  m_massVersusPt_merged = new TH1F("KsMassVersusPt_Merged","Dummy TH1F Before Merging",10,-1,1);
305  m_widthVersusPt_merged = new TH1F("KsWidthVersusPt_Merged","Dummy TH1F Before Merging",10,-1,1);
306  m_massVersusRadius_merged = new TH1F("KsMassVersusRadius_Merged","Dummy TH1F Before Merging",10,-1,1);
307  m_widthVersusRadius_merged = new TH1F("KsWidthVersusRadius_Merged","Dummy TH1F Before Merging",10,-1,1);
308  m_massVersusEta_merged = new TH1F("KsMassVersusEta_Merged","Dummy TH1F Before Merging",10,-1,1);
309  m_widthVersusEta_merged = new TH1F("KsWidthVersusEta_Merged","Dummy TH1F Before Merging",10,-1,1);
310  m_massVersusPhi_merged = new TH1F("KsMassVersusPhi_Merged","Dummy TH1F Before Merging",10,-1,1);
311  m_widthVersusPhi_merged = new TH1F("KsWidthVersusPhi_Merged","Dummy TH1F Before Merging",10,-1,1);
312  m_massVersusCurvatureDiff_merged = new TH1F("KsMassVersusCurvatureDiff_Merged","Dummy TH1F Before Merging",10,-1,1);
313  m_widthVersusCurvatureDiff_merged = new TH1F("KsWidthVersusCurvatureDiff_Merged","Dummy TH1F Before Merging",10,-1,1);
314 
315  RegisterHisto(al_kshort_mon_average,m_massVersusPt_merged) ;
316  RegisterHisto(al_kshort_mon_average,m_widthVersusPt_merged) ;
317  RegisterHisto(al_kshort_mon_average,m_massVersusRadius_merged) ;
318  RegisterHisto(al_kshort_mon_average,m_widthVersusRadius_merged) ;
319  RegisterHisto(al_kshort_mon_average,m_massVersusEta_merged) ;
320  RegisterHisto(al_kshort_mon_average,m_widthVersusEta_merged) ;
321  RegisterHisto(al_kshort_mon_average,m_massVersusPhi_merged) ;
322  RegisterHisto(al_kshort_mon_average,m_widthVersusPhi_merged) ;
323  RegisterHisto(al_kshort_mon_average,m_massVersusCurvatureDiff_merged) ;
324  RegisterHisto(al_kshort_mon_average,m_widthVersusCurvatureDiff_merged) ;
325 
326  m_Nevents = new TH1F("Nevents","Number of events processed",1,-.5,.5);
327  RegisterHisto(al_kshort_mon,m_Nevents);
328 
329  ATH_MSG_DEBUG( "IDPerfMonKshort bookHistograms done");
330 
331  m_histosBooked++;
332 
333  }
334 
335 
336 
337  return StatusCode::SUCCESS;
338 }
339 
341  ATH_MSG_VERBOSE( "IDPerfMonKshort RegisterHisto() started");
342  histo->Sumw2();
343  StatusCode sc = mon.regHist(histo);
344  if (sc.isFailure() ) {
345  ATH_MSG_ERROR( "Cannot book TH1 Histogram:" );
346  }
347 }
348 
350  ATH_MSG_VERBOSE( "IDPerfMonKshort RegisterHisto() started");
351  StatusCode sc = mon.regHist(histo);
352  if (sc.isFailure() ) {
353  ATH_MSG_ERROR( "Cannot book TProfile Histogram:" );
354  }
355 }
356 
358  ATH_MSG_VERBOSE( "IDPerfMonKshort RegisterHisto() started");
359  StatusCode sc = mon.regGraph(graph);
360  if (sc.isFailure() ) {
361  ATH_MSG_ERROR( "Cannot book TGraph:" );
362  }
363 }
364 
365 
367 {
368  ATH_MSG_VERBOSE( "IDPerfMonKshort fillHistogram() started");
369  const xAOD::TrackParticleContainer* tracks(nullptr);
370  StatusCode sc = evtStore()->retrieve(tracks,m_tracksName);
371  if (sc.isFailure()) {
372  ATH_MSG_DEBUG( "No Collection with name "<<m_tracksName<<" found in StoreGate" );
373  return StatusCode::SUCCESS;
374  } else {
375  ATH_MSG_DEBUG( "Collection with name "<<m_tracksName<<" found in StoreGate" );
376  }
377 
378  const xAOD::VertexContainer* PrimVxContainer(nullptr);
379  if(evtStore()->contains<xAOD::VertexContainer>(m_VxPrimContainerName)){
380  if ( evtStore()->retrieve(PrimVxContainer,m_VxPrimContainerName).isFailure()) {
381  ATH_MSG_DEBUG("Could not retrieve collection with name "<<m_VxPrimContainerName<<" found in StoreGate");
382  return StatusCode::FAILURE;
383  }
384  else
385  ATH_MSG_DEBUG("Successfully retrieved collection with name "<<m_VxPrimContainerName);
386  }
387  else {
388  ATH_MSG_DEBUG("No collection with name "<<m_VxPrimContainerName<<" found in StoreGate");
389  return StatusCode::SUCCESS;
390  }
391  const xAOD::Vertex *primaryVertex= std::begin(*PrimVxContainer)[0];
392 
393  const xAOD::VertexContainer* SecVxContainer(nullptr);
394  if(evtStore()->contains<xAOD::VertexContainer>(m_VxContainerName)){
395  if (evtStore()->retrieve(SecVxContainer,m_VxContainerName).isFailure()) {
396  ATH_MSG_DEBUG("Could not retrieve collection with name "<<m_VxContainerName<<" found in StoreGate");
397  return StatusCode::FAILURE;
398  }
399  else
400  ATH_MSG_DEBUG("Successfully retrieved collection with name "<<m_VxContainerName);
401  }
402  else {
403  ATH_MSG_DEBUG("No collection with name "<<m_VxContainerName<<" found in StoreGate");
404  return StatusCode::SUCCESS;
405  }
406 
407  m_Nevents->Fill(0.);
408  double ksMassPDG = 497.648;
409  ATH_MSG_DEBUG("@todo : masspdf" <<ksMassPDG );
410  ATH_MSG_DEBUG("@todo Looping over SecVxContainer name : "<< m_VxContainerName);
411  ATH_MSG_DEBUG("@todo >> V0UnconstrVerices container size >> " << SecVxContainer->size());
412  //bin curvature from -0.0008 to 0.0008 in bins of 0.0004
413  std::array<float, 5> curvatureBinning{};
414  sequentialFill(curvatureBinning.begin(), curvatureBinning.end(),-0.0008, 0.0004);
415  //bin phi from -pi to pi in bins of pi/5
416  std::array<double,10> ksPhiBinning{};
417  sequentialFill(ksPhiBinning.begin(), ksPhiBinning.end(), -M_PI, M_PI * 0.2);
418  //bin ksEta from -2.5 to 2.5 in bins of 0.5
419  std::array<double,10> ksEtaBinning{};
420  sequentialFill(ksEtaBinning.begin(), ksEtaBinning.end(),-2.5, 0.5);
421  //bin ksPt, variable bins
422  std::array<double,4> ksPtBinning{1600,2100, 2800,3900};
423  //bin radius, variable binning
424  std::array<double,6> radiusBinning{30,40, 60,80,100,140};
425  //
426  for (const auto* secVx_elem : *SecVxContainer) {
427  ATH_MSG_DEBUG("Looping over SecVxContainer name : "<< m_VxContainerName);
428  static const SG::ConstAccessor< float > Kshort_massAcc("Kshort_mass");
429  static const SG::ConstAccessor< float > pTAcc("pT");
430  static const SG::ConstAccessor< float > pxAcc("px");
431  static const SG::ConstAccessor< float > pyAcc("py");
432  static const SG::ConstAccessor< float > pzAcc("pz");
433  double ksMass = Kshort_massAcc(*secVx_elem);
434  double ksPt = pTAcc(*secVx_elem);
435  double ksPx = pxAcc(*secVx_elem);
436  double ksPy = pyAcc(*secVx_elem);
437  double ksPz = pzAcc(*secVx_elem);
438  ATH_MSG_DEBUG( " mass : "<<ksMass << " pt : "<< ksPt << " px : "<< ksPx << " py : "<< ksPy << " pz : "<< ksPz);
439  CLHEP::Hep3Vector ksMomentumVector = CLHEP::Hep3Vector(ksPx,ksPy,ksPz);
440  double ksMomentum = ksMomentumVector.mag();
441  double transverseFlightDistance, totalFlightDistance;
442  Amg::Vector3D flightVector;
443  const auto & secVxPosition(secVx_elem->position());
444  if(primaryVertex) {
445  if(primaryVertex->nTrackParticles() > 3){
446  ATH_MSG_DEBUG("NTrk of primary vertices : "<< primaryVertex->nTrackParticles());
447  const auto & position (primaryVertex->position());
448  m_YVsX_primVertex->Fill(position.x(),position.y());
449  m_XVsZ_primVertex->Fill(position.z(),position.x());
450  m_YVsZ_primVertex->Fill(position.z(),position.y());
451  }
452  auto vert = secVx_elem->position()-primaryVertex->position();
453  double dx = vert.x();
454  double dy = vert.y();
455  Amg::Vector3D mom(ksPx,ksPy,ksPz);
456  double dxy = (mom.x()*dx + mom.y()*dy)/mom.perp();
457  transverseFlightDistance =dxy;
458  Amg::Vector3D vertex(secVxPosition.x(),secVxPosition.y(),secVxPosition.z());
459  totalFlightDistance = (vertex-primaryVertex->position()).mag();
460  flightVector = vertex-primaryVertex->position();
461  ATH_MSG_DEBUG("dx : "<<dx<<" dy: "<<dy<<" dxy: "<<dxy<< "flight distance (total): "<<totalFlightDistance);
462  }
463  else {
464  transverseFlightDistance = secVxPosition.perp();
465  Amg::Vector3D vertex(secVxPosition.x(),secVxPosition.y(),secVxPosition.z());
466  totalFlightDistance = vertex.mag();
467  flightVector = vertex;
468  }
469  double properDecayTime = 1./Gaudi::Units::c_light*ksMassPDG/ksMomentum*totalFlightDistance;
470 
471 
472  double flightX = flightVector.x();
473  double flightY = flightVector.y();
474  double cosThetaPointing = (ksPx*flightX+ksPy*flightY)/std::sqrt(ksPx*ksPx+ksPy*ksPy)/std::sqrt(flightX*flightX+flightY*flightY);
475  int trackPos_nSVTHits = 0;
476  int trackNeg_nSVTHits = 0;
477  double trackPos_d0 = 0;
478  double trackPos_d0_wrtPV = 0;
479  double trackNeg_d0 = 0;
480  double trackNeg_d0_wrtPV = 0;
481  const xAOD::TrackParticle* trackPos(nullptr);
482  const xAOD::TrackParticle* trackNeg(nullptr);
483 
484  int ntrk(-1);
485  ntrk = secVx_elem->nTrackParticles();
486  ATH_MSG_DEBUG("track particles associated to vertex : "<<ntrk );
487  if(ntrk>0){
488  auto tpLinks = secVx_elem->trackParticleLinks();
489  for (const auto& link: tpLinks){
490  Info("execute()", "V0: TP link = %d %s ", link.isValid(), link.dataID().c_str() );
491  if(ntrk == 2){
492  ATH_MSG_DEBUG("Exactly two track particles!");
493  if( (*link)->charge() > 0. ) {
494  trackPos = *link;
495  ATH_MSG_DEBUG("Track with positive charge!");
496  }
497  else if( (*link)->charge() < 0. ){
498  trackNeg = *link;
499  ATH_MSG_DEBUG("Track with negative charge!"); }
500  }
501  }//trackparticles
502  }//ntrk
503  if(trackPos!=nullptr) {
504  uint8_t dummy(-1);
505  trackPos_nSVTHits = trackPos->summaryValue( dummy , xAOD::numberOfSCTHits )? dummy :-1;
506  trackPos_d0 = trackPos->d0();
507  trackPos_d0_wrtPV = trackPos->d0() - (primaryVertex->position().y()*std::cos(trackPos->phi0()) - primaryVertex->position().x()*std::sin(trackPos->phi0()));
508 
509  }
510  //std::cout <<"@todo : check (2) " << std::endl;
511 
512  if(trackNeg!=nullptr) {
513  uint8_t dummy(-1);
514  trackNeg_nSVTHits = trackNeg->summaryValue( dummy , xAOD::numberOfSCTHits )? dummy :-1;
515  trackNeg_d0 = trackNeg->d0();
516  trackNeg_d0_wrtPV = trackNeg->d0() - (primaryVertex->position().y()*cos(trackNeg->phi0()) - primaryVertex->position().x()*sin(trackNeg->phi0()));
517  }
518  int selectorValue = 0;
519  ATH_MSG_DEBUG( "ksTau = " << properDecayTime << " Lxy = " <<transverseFlightDistance<< " cosTheta = " << cosThetaPointing );
520  ATH_MSG_DEBUG( "trackPos nSVThits = " << trackPos_nSVTHits << " trackNeg nSVThits = " << trackNeg_nSVTHits );
521  ATH_MSG_DEBUG( "ksPt = " << ksPt );
522  static const SG::ConstAccessor< float > RxyAcc("Rxy");
523  double secVertex_radius = RxyAcc(*secVx_elem);
524  ATH_MSG_DEBUG("secondary vertex radius : " << secVertex_radius);
525  m_radius_secVertices->Fill(secVertex_radius);
526  m_radiusVsZ_secVertex->Fill(secVxPosition.z(),secVertex_radius);
527  m_YVsX_secVertex->Fill(secVxPosition.x(),secVxPosition.y());
528  // }
529  ATH_MSG_DEBUG("trackneg d0 : " << trackNeg_d0 << " trackpos d0 : "<< trackPos_d0);
530  ATH_MSG_DEBUG("trackneg d0 (PV): " << trackNeg_d0_wrtPV << " trackpos d0 (PV) : "<< trackPos_d0_wrtPV);
531  if(secVx_elem->chiSquared()/secVx_elem->numberDoF() < 4.5
532  && ksPt > 300.
533  && abs(trackNeg_d0_wrtPV) > 5.
534  && abs(trackPos_d0_wrtPV) > 5.
535  && trackPos_nSVTHits > 2
536  && trackNeg_nSVTHits > 2
537  && secVertex_radius > 20.
538  ){
539  m_radius_secVertices_sel->Fill(secVertex_radius);
540  m_radiusVsZ_secVertex_sel->Fill(secVxPosition.z(),secVertex_radius);
541  m_YVsX_secVertex_sel->Fill(secVxPosition.x(),secVxPosition.y());
542  }
543 
544 
545 
546  if( 1
547  && properDecayTime > 0.004
548  && transverseFlightDistance > 12.
549  && cosThetaPointing > 0.998
550  && ksMass>400.&&ksMass<600.
551  && trackPos_nSVTHits > 2 && trackNeg_nSVTHits > 2
552  ) selectorValue = 1;
553  if(selectorValue != 1) continue;
554  m_radiusVsZ_secVertex_Ks->Fill(secVxPosition.z(),secVertex_radius);
555  m_YVsX_secVertex_Ks->Fill(secVxPosition.x(),secVxPosition.y());
556  m_YVsX_primVertex_Ks->Fill(primaryVertex->position().x(),primaryVertex->position().y());
557  m_XVsZ_primVertex_Ks->Fill(primaryVertex->position().z(),primaryVertex->position().x());
558  m_YVsZ_primVertex_Ks->Fill(primaryVertex->position().z(),primaryVertex->position().y());
559  m_mass->Fill(ksMass*0.001);
560  double ksEta = ksMomentumVector.pseudoRapidity();
561  double ksPhi = ksMomentumVector.phi();
562  double piPlusPt = trackPos->p4().Perp();
563  double piMinusPt = trackNeg->p4().Perp();
564  m_massVsPhi->Fill(ksPhi,ksMass-ksMassPDG);
565  m_pt->Fill(ksPt*0.001);
566  m_eta->Fill(ksEta);
567  m_phi->Fill(ksPhi);
568  Float_t curvatureDiff = (1./(piPlusPt)) - (1./(piMinusPt));
569  const auto fillValue(ksMass*0.001);
570  auto curvatureIdx = findLevel(curvatureBinning.begin(), curvatureBinning.end(),curvatureDiff);
571  m_massVCurvatureDiffBinHistos[curvatureIdx]->Fill(fillValue);
572  if (ksPhi>=-M_PI and ksPhi<M_PI){
573  auto ksPhiIdx = findLevel(ksPhiBinning.begin(), ksPhiBinning.end(), ksPhi, std::less_equal<double>());
574  m_massVPhiBinHistos[ksPhiIdx]->Fill(fillValue);
575  }
576  if (ksEta>=-2.5 and ksEta<2.5){
577  auto ksEtaIdx = findLevel(ksEtaBinning.begin(), ksEtaBinning.end(), ksEta, std::less_equal<double>());
578  m_massVEtaBinHistos[ksEtaIdx]->Fill(fillValue);
579  }
580  if (ksPt>=0.){
581  auto ksPtIdx = findLevel(ksPtBinning.begin(), ksPtBinning.end(), ksPt, std::less_equal<double>());
582  m_massVPtBinFittedHistos[ksPtIdx]->Fill(fillValue);
583  }
584 
585  if (ksPt<500) ksPt = 500;
586  if (ksPt>5000) ksPt=5000;
587  Int_t quickBin = (Int_t)ksPt;
588  quickBin -= quickBin%100;
589  quickBin -= 500;
590  quickBin /= 100;
591  m_massVPtBinHistos[quickBin]->Fill(fillValue);
592  double radius = RxyAcc(*secVx_elem);
593  m_radius->Fill(radius);
594  if (radius>=0.){
595  auto radiusIdx = findLevel(radiusBinning.begin(), radiusBinning.end(), radius, std::less_equal<double>());
596  m_massVRadiusBinFittedHistos[radiusIdx]->Fill(fillValue);
597  }
598  if(radius>700) radius = 700;
599  Int_t radiusTemp = (Int_t)radius;
600  radiusTemp -= radiusTemp%10;
601  m_massVRadiusBinHistos[(Int_t)radiusTemp/10]->Fill(ksMass/1000.);
602  }
603  return StatusCode::SUCCESS;
604 }
605 
606 
608 {
609  ATH_MSG_VERBOSE( "IDPerfMonKshort procHistograms() started");
610  if( endOfRunFlag() ) {
611  MonGroup al_kshort_mon ( this, "IDPerfMon/Kshort/" + m_triggerChainName, run);
612  //CHECK ATTRIB MANAGED
613  MonGroup al_kshort_mon_average ( this, "IDPerfMon/Kshort/" + m_triggerChainName, run, ATTRIB_MANAGED, "", "weightedAverage" );
614  TF1 *func = new TF1("func","gaus(0)+expo(3)",0.450,0.550);
615  func->SetLineColor(4);
616  func->SetParameters(10.,0.500,0.010,2.,-.001);
617  func->SetParLimits(0,0.,10000.);
618  func->SetParLimits(1,0.450,0.550);
619  func->SetParLimits(2,0.,0.100);
620  func->SetParLimits(3,0.,10000.);
621  func->SetParLimits(4,-1000.,0.);
622  func->SetParNames("Constant","Mean","Width","Constant","Slope");
623  Double_t massBins[m_nFittedBinsPt], massErrorBins[m_nFittedBinsPt], widthBins[m_nFittedBinsPt], widthErrorBins[m_nFittedBinsPt];
624  const Int_t nPtBinsHisto = m_nFittedBinsPt+1;
625  Double_t ptBins[nPtBinsHisto] = {0.5,1.6,2.1,2.8,3.9,5.1};
626  for(int binFill=0;binFill<m_nFittedBinsPt;binFill++) {
627  massBins[binFill] = func->GetParameter(1);
628  massErrorBins[binFill] = func->GetParError(1);
629  widthBins[binFill] = func->GetParameter(2);
630  widthErrorBins[binFill] = func->GetParError(2);
631  }
632  const Double_t* ptBinsFinal = ptBins;
633  const Double_t* massBinsFinal = massBins;
634  const Double_t* massErrorBinsFinal = massErrorBins;
635  const Double_t* widthBinsFinal = widthBins;
636  const Double_t* widthErrorBinsFinal = widthErrorBins;
637  //lamda utilities for repetitive code
638  auto setYTitleAndMarker =[](TH1F * theHist,const bool mass){
639  if (mass){
640  theHist->SetYTitle("Mass (Gev / c^{2})");
641  }else {
642  theHist->SetYTitle("Width (Gev / c^{2})");
643  };
644  theHist->SetMarkerStyle(20);
645  };
646  //
647  auto fillFromSource = [](const double * source, const double * uncertainty, TH1F * target, unsigned int nbins){
648  for(unsigned int bin=0;bin<nbins;bin++) {
649  double binContent = source[bin];
650  double binError = uncertainty[bin];
651  target->SetBinContent(bin+1, binContent);
652  target->SetBinError(bin+1,binError);
653  }
654  };
655  constexpr bool massTitle{true};
656  constexpr bool widthTitle{false};
657  if(m_nFittedBinsPt) {
658  m_massVersusPt = new TH1F("KsMassVersusPt","",m_nFittedBinsPt,ptBinsFinal);
659  RegisterHisto(al_kshort_mon_average,m_massVersusPt);
660  m_massVersusPt->SetXTitle("p_{T} (Gev / c)");
661  setYTitleAndMarker(m_massVersusPt, massTitle);
662  fillFromSource(massBinsFinal, massErrorBinsFinal, m_massVersusPt, m_nFittedBinsPt);
663  m_widthVersusPt = new TH1F("KsWidthVersusPt","",m_nFittedBinsPt,ptBinsFinal);
664  RegisterHisto(al_kshort_mon_average,m_widthVersusPt);
665  m_widthVersusPt->SetXTitle("p_{T} (Gev / c)");
666  setYTitleAndMarker(m_widthVersusPt, widthTitle);
667  fillFromSource(widthBinsFinal, widthErrorBinsFinal, m_widthVersusPt, m_nFittedBinsPt);
668  }
669 
670  Double_t massVradiusBins[m_nFittedBinsRadius], massVradiusErrorBins[m_nFittedBinsRadius], widthVradiusBins[m_nFittedBinsRadius], widthVradiusErrorBins[m_nFittedBinsRadius];
671  const Int_t nRadiusBinsHisto = m_nFittedBinsRadius+1;
672  Double_t radiusBins[nRadiusBinsHisto] = {0.,30.,40.,60.,80.,100.,140.,230};
673  for(int binFill=0;binFill<m_nFittedBinsRadius;binFill++) {
674  massVradiusBins[binFill] = func->GetParameter(1);
675  massVradiusErrorBins[binFill] = func->GetParError(1);
676  widthVradiusBins[binFill] = func->GetParameter(2);
677  widthVradiusErrorBins[binFill] = func->GetParError(2);
678  }
679 
680  const Double_t* radiusBinsFinal = radiusBins;
681  const Double_t* massVradiusBinsFinal = massVradiusBins;
682  const Double_t* massVradiusErrorBinsFinal = massVradiusErrorBins;
683  const Double_t* widthVradiusBinsFinal = widthVradiusBins;
684  const Double_t* widthVradiusErrorBinsFinal = widthVradiusErrorBins;
685 
686  if(m_nFittedBinsRadius) {
687  m_massVersusRadius = new TH1F("KsMassVersusRadius","",m_nFittedBinsRadius,radiusBinsFinal);
688  RegisterHisto(al_kshort_mon_average,m_massVersusRadius);
689  m_massVersusRadius->SetXTitle("Decay Radius (mm)");
690  setYTitleAndMarker(m_massVersusRadius, massTitle);
691  fillFromSource(massVradiusBinsFinal, massVradiusErrorBinsFinal, m_massVersusRadius, m_nFittedBinsRadius);
692  m_widthVersusRadius = new TH1F("KsWidthVersusRadius","",m_nFittedBinsRadius,radiusBinsFinal);
693  RegisterHisto(al_kshort_mon_average,m_widthVersusRadius);
694  m_widthVersusRadius->SetXTitle("Decay Radius (mm)");
695  setYTitleAndMarker(m_widthVersusRadius, widthTitle);
696  fillFromSource(widthVradiusBinsFinal, widthVradiusErrorBinsFinal, m_widthVersusRadius, m_nFittedBinsRadius);
697  }
698 
699  Double_t etaBins[11] = {-2.5,-2.0,-1.5,-1.0,-0.5,0.0,0.5,1.0,1.5,2.0,2.5};
700  Double_t massVetaBins[10], massVetaErrorBins[10], widthVetaBins[10], widthVetaErrorBins[10];
701  for(int binFill=0;binFill<10;binFill++) {
702  massVetaBins[binFill] = func->GetParameter(1);
703  massVetaErrorBins[binFill] = func->GetParError(1);
704  widthVetaBins[binFill] = func->GetParameter(2);
705  widthVetaErrorBins[binFill] = func->GetParError(2);
706  }
707  m_massVersusEta = new TH1F("KsMassVersusEta","",10,etaBins);
708  RegisterHisto(al_kshort_mon_average,m_massVersusEta);
709  m_massVersusEta->SetXTitle("#eta");
710  setYTitleAndMarker(m_massVersusEta, massTitle);
711  fillFromSource(massVetaBins, massVetaErrorBins, m_massVersusEta, 10);
712  m_widthVersusEta = new TH1F("KsWidthVersusEta","",10,etaBins);
713  RegisterHisto(al_kshort_mon_average,m_widthVersusEta);
714  m_widthVersusEta->SetXTitle("#eta");
715  setYTitleAndMarker(m_massVersusEta, widthTitle);
716  fillFromSource(widthVetaBins, widthVetaErrorBins, m_widthVersusEta, 10);
717  Double_t phiBins[11]{};
718  sequentialFill(phiBins, phiBins+11, -M_PI, M_PI/5.);
719  Double_t massVphiBins[10], massVphiErrorBins[10], widthVphiBins[10], widthVphiErrorBins[10];
720  for(int binFill=0;binFill<10;binFill++) {
721  massVphiBins[binFill] = func->GetParameter(1);
722  massVphiErrorBins[binFill] = func->GetParError(1);
723  widthVphiBins[binFill] = func->GetParameter(2);
724  widthVphiErrorBins[binFill] = func->GetParError(2);
725  }
726  m_massVersusPhi = new TH1F("KsMassVersusPhi","",10,phiBins);
727  RegisterHisto(al_kshort_mon_average,m_massVersusPhi);
728  m_massVersusPhi->SetXTitle("#phi");
729  setYTitleAndMarker(m_massVersusPhi, massTitle);
730  fillFromSource(massVphiBins, massVphiErrorBins, m_massVersusPhi, 10);
731  m_widthVersusPhi = new TH1F("KsWidthVersusPhi","",10,phiBins);
732  RegisterHisto(al_kshort_mon_average,m_widthVersusPhi);
733  m_widthVersusPhi->SetXTitle("#phi");
734  setYTitleAndMarker(m_widthVersusPhi, widthTitle);
735  fillFromSource(widthVphiBins, widthVphiErrorBins, m_widthVersusPhi, 10);
736  Double_t curvatureDiffBins[7] = {-0.0012,-0.0008,-0.0004,0.0000,0.0004,0.0008,0.0012};
737  Double_t massVcurvatureDiffBins[6], massVcurvatureDiffErrorBins[6], widthVcurvatureDiffBins[6], widthVcurvatureDiffErrorBins[6];
738  for(int binFill=0;binFill<6;binFill++) {
739  massVcurvatureDiffBins[binFill] = func->GetParameter(1);
740  massVcurvatureDiffErrorBins[binFill] = func->GetParError(1);
741  widthVcurvatureDiffBins[binFill] = func->GetParameter(2);
742  widthVcurvatureDiffErrorBins[binFill] = func->GetParError(2);
743  }
744  m_massVersusCurvatureDiff = new TH1F("KsMassVersusCurvatureDiff","",6,curvatureDiffBins);
745  RegisterHisto(al_kshort_mon_average,m_massVersusCurvatureDiff);
746  m_massVersusCurvatureDiff->SetXTitle("1/p_{T}(#pi^{+}) - 1/p_{T}(#pi^{-}) [GeV^{-1}]");
747  setYTitleAndMarker(m_massVersusCurvatureDiff, massTitle);
748  fillFromSource(massVcurvatureDiffBins, massVcurvatureDiffErrorBins, m_massVersusCurvatureDiff, 6);
749  m_widthVersusCurvatureDiff = new TH1F("KsWidthVersusCurvatureDiff","",6,curvatureDiffBins);
750  RegisterHisto(al_kshort_mon_average,m_widthVersusCurvatureDiff);
751  m_widthVersusCurvatureDiff->SetXTitle("1/p_{T}(#pi^{+}) - 1/p_{T}(#pi^{-}) [GeV^{-1}]");
752  setYTitleAndMarker(m_widthVersusCurvatureDiff, widthTitle);
753  fillFromSource(widthVcurvatureDiffBins, widthVcurvatureDiffErrorBins, m_widthVersusCurvatureDiff, 6);
754  }
755 
756  return StatusCode::SUCCESS;
757 
758 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
IDPerfMonKshort::m_YVsX_secVertex
TH2F * m_YVsX_secVertex
Definition: IDPerfMonKshort.h:49
V0Tools.h
IDPerfMonKshort::m_widthVersusEta
TH1F * m_widthVersusEta
Definition: IDPerfMonKshort.h:68
IDPerfMonKshort.h
IDPerfMonKshort::m_checkrate
int m_checkrate
Definition: IDPerfMonKshort.h:104
xAOD::Vertex_v1::nTrackParticles
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
Definition: Vertex_v1.cxx:270
IDPerfMonKshort::m_radius_secVertices_sel
TH1F * m_radius_secVertices_sel
Definition: IDPerfMonKshort.h:46
V0Container.h
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
IDPerfMonKshort::m_massVEtaBinHistos
TH1F * m_massVEtaBinHistos[10]
Definition: IDPerfMonKshort.h:90
IDPerfMonKshort::m_nFittedBinsRadius
static const Int_t m_nFittedBinsRadius
Definition: IDPerfMonKshort.h:87
Base_Fragment.mass
mass
Definition: Sherpa_i/share/common/Base_Fragment.py:59
IDPerfMonKshort::m_widthVersusPhi
TH1F * m_widthVersusPhi
Definition: IDPerfMonKshort.h:70
ManagedMonitorToolBase
Provides functionality for users to implement and save histograms, ntuples, and summary data,...
Definition: ManagedMonitorToolBase.h:73
IDPerfMonKshort::m_massVersusPt
TH1F * m_massVersusPt
Definition: IDPerfMonKshort.h:63
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
V0Candidate.h
IDPerfMonKshort::m_widthVersusPhi_merged
TH1F * m_widthVersusPhi_merged
Definition: IDPerfMonKshort.h:81
xAOD::TrackParticle_v1::summaryValue
bool summaryValue(uint8_t &value, const SummaryType &information) const
Accessor for TrackSummary values.
Definition: TrackParticle_v1.cxx:736
AthenaMonManager::cosmics
@ cosmics
Definition: AthenaMonManager.h:58
ConvertOldUJHistosToNewHistos.etaBins
list etaBins
Definition: ConvertOldUJHistosToNewHistos.py:145
IDPerfMonKshort::m_YVsZ_primVertex_Ks
TH2F * m_YVsZ_primVertex_Ks
Definition: IDPerfMonKshort.h:59
IDPerfMonKshort::m_XVsZ_primVertex
TH2F * m_XVsZ_primVertex
Definition: IDPerfMonKshort.h:55
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
M_PI
#define M_PI
Definition: ActiveFraction.h:11
bin
Definition: BinsDiffFromStripMedian.h:43
IDPerfMonKshort::m_widthVersusPt_merged
TH1F * m_widthVersusPt_merged
Definition: IDPerfMonKshort.h:75
IDPerfMonKshort::m_VxContainerName
std::string m_VxContainerName
Definition: IDPerfMonKshort.h:105
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
athena.value
value
Definition: athena.py:124
xAOD::Vertex_v1::position
const Amg::Vector3D & position() const
Returns the 3-pos.
PixelModuleFeMask_create_db.stop
int stop
Definition: PixelModuleFeMask_create_db.py:76
SG::ConstAccessor< float >
IDPerfMonKshort::m_massVersusRadius_merged
TH1F * m_massVersusRadius_merged
Definition: IDPerfMonKshort.h:76
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
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
SCT_CalibAlgs::nbins
@ nbins
Definition: SCT_CalibNumbers.h:10
xAOD::TrackParticle_v1::d0
float d0() const
Returns the parameter.
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
IDPerfMonKshort::m_radiusVsZ_secVertex_Ks
TH2F * m_radiusVsZ_secVertex_Ks
Definition: IDPerfMonKshort.h:51
AthenaMonManager::environment
static Environment_t environment()
Returns the running environment of the monitoring application to help ManagedMonitorToolBase objects ...
Definition: AthenaMonManager.cxx:298
IDPerfMonKshort::fillHistograms
virtual StatusCode fillHistograms()
An inheriting class should either override this function or fillHists().
Definition: IDPerfMonKshort.cxx:366
IDPerfMonKshort::m_widthVersusPt
TH1F * m_widthVersusPt
Definition: IDPerfMonKshort.h:64
IDPerfMonKshort::m_massVRadiusBinHistos
TH1F * m_massVRadiusBinHistos[m_nBinsRadius]
Definition: IDPerfMonKshort.h:93
V0Hypothesis.h
IDPerfMonKshort::m_massVersusCurvatureDiff
TH1F * m_massVersusCurvatureDiff
Definition: IDPerfMonKshort.h:71
xAOD::TrackParticle_v1::p4
virtual FourMom_t p4() const override final
The full 4-momentum of the particle.
Definition: TrackParticle_v1.cxx:129
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
ManagedMonitorToolBase::MonGroup
A container of information describing a monitoring object.
Definition: ManagedMonitorToolBase.h:137
IDPerfMonKshort::m_massVPhiBinHistos
TH1F * m_massVPhiBinHistos[10]
Definition: IDPerfMonKshort.h:91
IDPerfMonKshort::m_massVersusEta_merged
TH1F * m_massVersusEta_merged
Definition: IDPerfMonKshort.h:78
IDPerfMonKshort::~IDPerfMonKshort
virtual ~IDPerfMonKshort()
Definition: IDPerfMonKshort.cxx:92
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
IDPerfMonKshort::RegisterHisto
void RegisterHisto(MonGroup &mon, TH1 *histo)
Definition: IDPerfMonKshort.cxx:340
AthenaMonManager::dataType
static DataType_t dataType()
Returns the data type that the monitoring application is running over to help ManagedMonitorToolBase ...
Definition: AthenaMonManager.cxx:315
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
IDPerfMonKshort::m_YVsZ_primVertex
TH2F * m_YVsZ_primVertex
Definition: IDPerfMonKshort.h:56
ManagedMonitorToolBase::initialize
virtual StatusCode initialize()
Definition: ManagedMonitorToolBase.cxx:617
IDPerfMonKshort::m_nBinsRadius
static const Int_t m_nBinsRadius
Definition: IDPerfMonKshort.h:88
IDPerfMonKshort::m_VxPrimContainerName
std::string m_VxPrimContainerName
Definition: IDPerfMonKshort.h:106
python.TrigEgammaMonitorHelper.TProfile
def TProfile(*args, **kwargs)
Definition: TrigEgammaMonitorHelper.py:81
IDPerfMonKshort::m_YVsX_primVertex_Ks
TH2F * m_YVsX_primVertex_Ks
Definition: IDPerfMonKshort.h:57
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
extractSporadic.h
list h
Definition: extractSporadic.py:97
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthenaMonManager::online
@ online
Definition: AthenaMonManager.h:49
IDPerfMonKshort::m_nBinsPt
static const Int_t m_nBinsPt
Definition: IDPerfMonKshort.h:86
IDPerfMonKshort::m_pt
TH1F * m_pt
Definition: IDPerfMonKshort.h:60
IDPerfMonKshort::m_massVersusCurvatureDiff_merged
TH1F * m_massVersusCurvatureDiff_merged
Definition: IDPerfMonKshort.h:82
test_pyathena.parent
parent
Definition: test_pyathena.py:15
IDPerfMonKshort::m_nFittedBinsPt
static const Int_t m_nFittedBinsPt
Definition: IDPerfMonKshort.h:85
IDPerfMonKshort::m_radiusVsZ_secVertex
TH2F * m_radiusVsZ_secVertex
Definition: IDPerfMonKshort.h:47
IDPerfMonKshort::m_massVCurvatureDiffBinHistos
TH1F * m_massVCurvatureDiffBinHistos[6]
Definition: IDPerfMonKshort.h:92
IDPerfMonKshort::m_YVsX_secVertex_Ks
TH2F * m_YVsX_secVertex_Ks
Definition: IDPerfMonKshort.h:52
python.xAODType.dummy
dummy
Definition: xAODType.py:4
AthenaMonManager::user
@ user
Definition: AthenaMonManager.h:49
IDPerfMonKshort::m_radius_secVertices
TH1F * m_radius_secVertices
Definition: IDPerfMonKshort.h:45
IDPerfMonKshort::m_massVersusRadius
TH1F * m_massVersusRadius
Definition: IDPerfMonKshort.h:65
run
Definition: run.py:1
ManagedMonitorToolBase::ATTRIB_MANAGED
@ ATTRIB_MANAGED
Definition: ManagedMonitorToolBase.h:130
IDPerfMonKshort::IDPerfMonKshort
IDPerfMonKshort(const std::string &type, const std::string &name, const IInterface *parent)
Definition: IDPerfMonKshort.cxx:80
IDPerfMonKshort::m_triggerChainName
std::string m_triggerChainName
Definition: IDPerfMonKshort.h:103
IDPerfMonKshort::m_radius
TH1F * m_radius
Definition: IDPerfMonKshort.h:44
IDPerfMonKshort::m_histosBooked
int m_histosBooked
Definition: IDPerfMonKshort.h:39
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
Vertex.h
IDPerfMonKshort::m_widthVersusEta_merged
TH1F * m_widthVersusEta_merged
Definition: IDPerfMonKshort.h:79
IDPerfMonKshort::m_widthVersusRadius_merged
TH1F * m_widthVersusRadius_merged
Definition: IDPerfMonKshort.h:77
inRange
bool inRange(const double *boundaries, const double value, const double tolerance=0.02)
Definition: LArSCIdVsIdTest.cxx:5
xAOD::TrackParticle_v1::phi0
float phi0() const
Returns the parameter, which has range to .
Definition: TrackParticle_v1.cxx:158
WriteBchToCool.beg
beg
Definition: WriteBchToCool.py:69
IDPerfMonKshort::m_massVRadiusBinFittedHistos
TH1F * m_massVRadiusBinFittedHistos[m_nFittedBinsRadius]
Definition: IDPerfMonKshort.h:95
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
plotBeamSpotVxVal.bin
int bin
Definition: plotBeamSpotVxVal.py:83
IDPerfMonKshort::initialize
virtual StatusCode initialize()
Definition: IDPerfMonKshort.cxx:95
python.PhysicalConstants.c_light
float c_light
Definition: PhysicalConstants.py:63
IDPerfMonKshort::bookHistograms
virtual StatusCode bookHistograms()
An inheriting class should either override this function or bookHists().
Definition: IDPerfMonKshort.cxx:107
IDPerfMonKshort::m_tracksName
std::string m_tracksName
Definition: IDPerfMonKshort.h:102
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
IDPerfMonKshort::m_eta
TH1F * m_eta
Definition: IDPerfMonKshort.h:61
LocalParameters.h
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
IDPerfMonKshort::m_massVersusEta
TH1F * m_massVersusEta
Definition: IDPerfMonKshort.h:67
IDPerfMonKshort::m_widthVersusCurvatureDiff
TH1F * m_widthVersusCurvatureDiff
Definition: IDPerfMonKshort.h:72
IDPerfMonKshort::m_massVPtBinFittedHistos
TH1F * m_massVPtBinFittedHistos[m_nFittedBinsPt]
Definition: IDPerfMonKshort.h:94
TrackParticle.h
python.PyAthena.v
v
Definition: PyAthena.py:154
makeTRTBarrelCans.dy
tuple dy
Definition: makeTRTBarrelCans.py:21
IDPerfMonKshort::m_XVsZ_primVertex_Ks
TH2F * m_XVsZ_primVertex_Ks
Definition: IDPerfMonKshort.h:58
IDPerfMonKshort::m_massVersusPhi
TH1F * m_massVersusPhi
Definition: IDPerfMonKshort.h:69
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
VertexContainer.h
IDPerfMonKshort::m_mass_scaled
TH1F * m_mass_scaled
Definition: IDPerfMonKshort.h:42
h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
IDPerfMonKshort::m_widthVersusRadius
TH1F * m_widthVersusRadius
Definition: IDPerfMonKshort.h:66
ManagedMonitorToolBase::endOfRunFlag
bool endOfRunFlag() const
Definition: ManagedMonitorToolBase.h:797
copySelective.target
string target
Definition: copySelective.py:37
IDPerfMonKshort::m_mass
TH1F * m_mass
Definition: IDPerfMonKshort.h:41
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
IDPerfMonKshort::m_widthVersusCurvatureDiff_merged
TH1F * m_widthVersusCurvatureDiff_merged
Definition: IDPerfMonKshort.h:83
DEBUG
#define DEBUG
Definition: page_access.h:11
plotBeamSpotMon.mon
mon
Definition: plotBeamSpotMon.py:67
makeTRTBarrelCans.dx
tuple dx
Definition: makeTRTBarrelCans.py:20
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
IDPerfMonKshort::m_radiusVsZ_secVertex_sel
TH2F * m_radiusVsZ_secVertex_sel
Definition: IDPerfMonKshort.h:48
IDPerfMonKshort::m_phi
TH1F * m_phi
Definition: IDPerfMonKshort.h:62
IDPerfMonKshort::m_massVPtBinHistos
TH1F * m_massVPtBinHistos[m_nBinsPt]
Definition: IDPerfMonKshort.h:89
xAOD::numberOfSCTHits
@ numberOfSCTHits
number of hits in SCT [unit8_t].
Definition: TrackingPrimitives.h:268
copySelective.source
string source
Definition: copySelective.py:32
IDPerfMonKshort::m_massVsPhi
TH2F * m_massVsPhi
Definition: IDPerfMonKshort.h:43
IDPerfMonKshort::m_massVersusPhi_merged
TH1F * m_massVersusPhi_merged
Definition: IDPerfMonKshort.h:80
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
ConstAccessor.h
Helper class to provide constant type-safe access to aux data.
IDPerfMonKshort::procHistograms
virtual StatusCode procHistograms()
An inheriting class should either override this function or finalHists().
Definition: IDPerfMonKshort.cxx:607
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
IDPerfMonKshort::m_YVsX_primVertex
TH2F * m_YVsX_primVertex
Definition: IDPerfMonKshort.h:54
FitQuality.h
plotBeamSpotCompare.histo
histo
Definition: plotBeamSpotCompare.py:415
IDPerfMonKshort::m_massVersusPt_merged
TH1F * m_massVersusPt_merged
Definition: IDPerfMonKshort.h:74
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
IDPerfMonKshort::m_Nevents
TH1F * m_Nevents
Definition: IDPerfMonKshort.h:97
mag
Scalar mag() const
mag method
Definition: AmgMatrixBasePlugin.h:26
TrackParticleContainer.h
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
IDPerfMonKshort::m_YVsX_secVertex_sel
TH2F * m_YVsX_secVertex_sel
Definition: IDPerfMonKshort.h:50
ManagedMonitorToolBase::newRunFlag
bool newRunFlag() const
Definition: ManagedMonitorToolBase.h:792