ATLAS Offline Software
SecVtxHelper.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
8  // get variable mass
10  static const SG::AuxElement::Accessor<float> a("mass");
11  if(!a.isAvailable(*vtx)){
12  std::cout << "ERROR: Failed to get mass" << std::endl;
13  return 0;
14  }
15  return a(*vtx);
16  }
17  // set variable mass
19  static const SG::AuxElement::Accessor<float> a("mass");
20  a(*vtx)=val;
21 
22  }
23  // get variable energyFraction
25  static const SG::AuxElement::Accessor<float> a("energyFraction");
26  if(!a.isAvailable(*vtx)){
27  std::cout << "ERROR: Failed to get energyFraction" << std::endl;
28  return 0;
29  }
30  return a(*vtx);
31  }
32  // set variable energyFraction
34  static const SG::AuxElement::Accessor<float> a("energyFraction");
35  a(*vtx)=val;
36 
37  }
38  //
40  static const SG::AuxElement::Accessor<int> a("ntrk");
41  if(!a.isAvailable(*vtx)){
42  std::cout << "ERROR: Failed to get ntrk" << std::endl;
43  return 0;
44  }
45  return a(*vtx);
46  }
47  //
49  static const SG::AuxElement::Accessor<int> a("ntrk");
50  a(*vtx)=val;
51  }
52  //
54  static const SG::AuxElement::Accessor<float> a("pt");
55  if(!a.isAvailable(*vtx)){
56  std::cout << "ERROR: Failed to get pt" << std::endl;
57  return 0;
58  }
59  return a(*vtx);
60  }
61  //
63  static const SG::AuxElement::Accessor<float> a("pt");
64  a(*vtx)=val;
65  }
66  //
68  static const SG::AuxElement::Accessor<float> a("eta");
69  if(!a.isAvailable(*vtx)){
70  std::cout << "ERROR: Failed to get eta" << std::endl;
71  return 0;
72  }
73  return a(*vtx);
74  }
75  //
77  static const SG::AuxElement::Accessor<float> a("eta");
78  a(*vtx)=val;
79  }
80  //
82  static const SG::AuxElement::Accessor<float> a("phi");
83  if(!a.isAvailable(*vtx)){
84  std::cout << "ERROR: Failed to get phi" << std::endl;
85  return 0;
86  }
87  return a(*vtx);
88  }
89  //
91  static const SG::AuxElement::Accessor<float> a("phi");
92  a(*vtx)=val;
93  }
94  //
96  static const SG::AuxElement::Accessor<float> a("normDist");
97  if(!a.isAvailable(*vtx)){
98  std::cout << "ERROR: Failed to get normDist" << std::endl;
99  return 0;
100  }
101  return a(*vtx);
102  }
103  //
105  static const SG::AuxElement::Accessor<float> a("normDist");
106  a(*vtx)=val;
107  }
108 
109 
110 
111 
112 
113 
114 
115 
116 
117 
118 
119 
120 
121 
122 
123 
124 
125 
126 
127 
128 
129 
130 
131 
132 
133 
134 
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:66
xAOD::SecVtxHelper::setVtxNtrk
void setVtxNtrk(xAOD::Vertex *, int value)
Definition: SecVtxHelper.cxx:48
xAOD::SecVtxHelper::VtxNtrk
int VtxNtrk(const xAOD::Vertex *)
Definition: SecVtxHelper.cxx:39
SecVtxHelper.h
xAOD::SecVtxHelper::setEnergyFraction
void setEnergyFraction(xAOD::Vertex *, float value)
Definition: SecVtxHelper.cxx:33
xAOD::SecVtxHelper::VertexMass
float VertexMass(const xAOD::Vertex *)
Definition: SecVtxHelper.cxx:9
xAOD::SecVtxHelper::VtxnormDist
float VtxnormDist(const xAOD::Vertex *)
Definition: SecVtxHelper.cxx:95
xAOD::SecVtxHelper::Vtxphi
float Vtxphi(const xAOD::Vertex *)
Definition: SecVtxHelper.cxx:81
xAOD::SecVtxHelper::setVtxpt
void setVtxpt(xAOD::Vertex *, float value)
Definition: SecVtxHelper.cxx:62
xAOD::SecVtxHelper::setVtxeta
void setVtxeta(xAOD::Vertex *, float value)
Definition: SecVtxHelper.cxx:76
xAOD::SecVtxHelper::setVtxphi
void setVtxphi(xAOD::Vertex *, float value)
Definition: SecVtxHelper.cxx:90
xAOD::SecVtxHelper::setVtxnormDist
void setVtxnormDist(xAOD::Vertex *, float value)
Definition: SecVtxHelper.cxx:104
a
TList * a
Definition: liststreamerinfos.cxx:10
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
xAOD::SecVtxHelper::EnergyFraction
float EnergyFraction(const xAOD::Vertex *)
Definition: SecVtxHelper.cxx:24
xAOD::SecVtxHelper::Vtxpt
float Vtxpt(const xAOD::Vertex *)
Definition: SecVtxHelper.cxx:53
xAOD::SecVtxHelper::Vtxeta
float Vtxeta(const xAOD::Vertex *)
Definition: SecVtxHelper.cxx:67
xAOD::SecVtxHelper::setVertexMass
void setVertexMass(xAOD::Vertex *, float value)
Definition: SecVtxHelper.cxx:18