ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
DerivationFramework::BVertexClosestTrackTool::CtItem Class Reference

#include <BVertexClosestTrackTool.h>

Inheritance diagram for DerivationFramework::BVertexClosestTrackTool::CtItem:
Collaboration diagram for DerivationFramework::BVertexClosestTrackTool::CtItem:

Public Member Functions

 CtItem (const std::string &Name="_none_", const std::string &Bname="ctrk", const std::string &Prefix="", double Dca=-999., double DcaErr=-99., double Zca=-999., double ZcaErr=-99., double VtxNDErr2=-99., double TrkNDErr2=-99., double Phi0Used=-999., int NTrksChi2=0, xAOD::TrackParticle *CloseTrack=NULL, const TrackBag &Tracks={}, const std::vector< std::vector< double > > &Vtap={}, const std::vector< unsigned short > &Selpat={})
 
virtual ~CtItem ()
 
virtual void setup (const std::string &Name="_none_", const std::string &Bname="ctrk", const std::string &Prefix="")
 
virtual void setup (const std::string &Name, const std::string &Bname, const std::string &Prefix, double Dca, double DcaErr, double Zca, double ZcaErr, double VtxNDErr2, double TrkNDErr2, double Phi0Used, int NTrksChi2, xAOD::TrackParticle *CloseTrack=NULL, TrackBag Tracks={}, std::vector< std::vector< double > > Vtap={}, std::vector< unsigned short > Selpat={})
 
virtual void resetVals ()
 
virtual void copyVals (const BaseItem &item)
 
virtual void copyVals (const CtItem &item)
 
virtual std::string dcaName () const
 
virtual std::string dcaErrName () const
 
virtual std::string zcaName () const
 
virtual std::string zcaErrName () const
 
virtual std::string vtxNDErr2Name () const
 
virtual std::string trkNDErr2Name () const
 
virtual std::string phi0UsedName () const
 
virtual std::string nTrksChi2Name () const
 
virtual std::string closeTrackName () const
 
virtual std::string toString () const
 

Public Attributes

double dca
 
double dcaErr
 
double zca
 
double zcaErr
 
double vtxNDErr2
 
double trkNDErr2
 
double phi0Used
 
int nTrksChi2
 
const xAOD::TrackParticlecloseTrack
 
TrackBag tracks
 
std::vector< std::vector< double > > vtap
 
std::vector< unsigned short > selpat
 

Detailed Description

Definition at line 40 of file BVertexClosestTrackTool.h.

Constructor & Destructor Documentation

◆ CtItem()

DerivationFramework::BVertexClosestTrackTool::CtItem::CtItem ( const std::string &  Name = "_none_",
const std::string &  Bname = "ctrk",
const std::string &  Prefix = "",
double  Dca = -999.,
double  DcaErr = -99.,
double  Zca = -999.,
double  ZcaErr = -99.,
double  VtxNDErr2 = -99.,
double  TrkNDErr2 = -99.,
double  Phi0Used = -999.,
int  NTrksChi2 = 0,
xAOD::TrackParticle CloseTrack = NULL,
const TrackBag Tracks = {},
const std::vector< std::vector< double > > &  Vtap = {},
const std::vector< unsigned short > &  Selpat = {} 
)

Definition at line 59 of file BVertexClosestTrackTool.cxx.

70  : BaseItem(Name, Bname, Prefix), dca(Dca), dcaErr(DcaErr),
71  zca(Zca), zcaErr(ZcaErr), vtxNDErr2(VtxNDErr2), trkNDErr2(TrkNDErr2),
72  phi0Used(Phi0Used),
73  nTrksChi2(NTrksChi2), closeTrack(CloseTrack),
74  tracks(Tracks), vtap(Vtap), selpat(Selpat) {
75  }

◆ ~CtItem()

DerivationFramework::BVertexClosestTrackTool::CtItem::~CtItem ( )
virtual

Definition at line 77 of file BVertexClosestTrackTool.cxx.

77  {
78  }

Member Function Documentation

◆ closeTrackName()

std::string DerivationFramework::BVertexClosestTrackTool::CtItem::closeTrackName ( ) const
virtual

Definition at line 191 of file BVertexClosestTrackTool.cxx.

191  {
192  return buildName("CloseTrack", "_Link");
193  }

◆ copyVals() [1/2]

void DerivationFramework::BVertexClosestTrackTool::CtItem::copyVals ( const BaseItem item)
virtual

Definition at line 140 of file BVertexClosestTrackTool.cxx.

140  {
141  copyVals((const CtItem&)item);
142  }

◆ copyVals() [2/2]

void DerivationFramework::BVertexClosestTrackTool::CtItem::copyVals ( const CtItem item)
virtual

Definition at line 144 of file BVertexClosestTrackTool.cxx.

144  {
145  dca = item.dca;
146  dcaErr = item.dcaErr;
147  zca = item.zca;
148  zcaErr = item.zcaErr;
149  vtxNDErr2 = item.vtxNDErr2;
150  trkNDErr2 = item.trkNDErr2;
151  phi0Used = item.phi0Used;
152  nTrksChi2 = item.nTrksChi2;
153  closeTrack = item.closeTrack;
154  tracks = item.tracks;
155  vtap = item.vtap;
156  selpat = item.selpat;
157  }

◆ dcaErrName()

std::string DerivationFramework::BVertexClosestTrackTool::CtItem::dcaErrName ( ) const
virtual

Definition at line 163 of file BVertexClosestTrackTool.cxx.

163  {
164  return buildName("DCAError");
165  }

◆ dcaName()

std::string DerivationFramework::BVertexClosestTrackTool::CtItem::dcaName ( ) const
virtual

Definition at line 159 of file BVertexClosestTrackTool.cxx.

159  {
160  return buildName("DCA");
161  }

◆ nTrksChi2Name()

std::string DerivationFramework::BVertexClosestTrackTool::CtItem::nTrksChi2Name ( ) const
virtual

Definition at line 187 of file BVertexClosestTrackTool.cxx.

187  {
188  return buildName("NTracksChi2");
189  }

◆ phi0UsedName()

std::string DerivationFramework::BVertexClosestTrackTool::CtItem::phi0UsedName ( ) const
virtual

Definition at line 183 of file BVertexClosestTrackTool.cxx.

183  {
184  return buildName("Phi0Used");
185  }

◆ resetVals()

void DerivationFramework::BVertexClosestTrackTool::CtItem::resetVals ( )
virtual

Definition at line 125 of file BVertexClosestTrackTool.cxx.

125  {
126  dca = -999.;
127  dcaErr = -99.;
128  zca = -999.;
129  zcaErr = -99.;
130  vtxNDErr2 = -99.;
131  trkNDErr2 = -99.;
132  phi0Used = -999.;
133  nTrksChi2 = 0;
134  closeTrack = NULL;
135  tracks.clear();
136  vtap.clear();
137  selpat.clear();
138  }

◆ setup() [1/2]

void DerivationFramework::BVertexClosestTrackTool::CtItem::setup ( const std::string &  Name,
const std::string &  Bname,
const std::string &  Prefix,
double  Dca,
double  DcaErr,
double  Zca,
double  ZcaErr,
double  VtxNDErr2,
double  TrkNDErr2,
double  Phi0Used,
int  NTrksChi2,
xAOD::TrackParticle CloseTrack = NULL,
TrackBag  Tracks = {},
std::vector< std::vector< double > >  Vtap = {},
std::vector< unsigned short >  Selpat = {} 
)
virtual

Definition at line 98 of file BVertexClosestTrackTool.cxx.

109  {
110  BaseItem::setup(Name, Bname, Prefix);
111  dca = Dca;
112  dcaErr = DcaErr;
113  zca = Zca;
114  zcaErr = ZcaErr;
115  vtxNDErr2 = VtxNDErr2;
116  trkNDErr2 = TrkNDErr2;
117  phi0Used = Phi0Used;
118  nTrksChi2 = NTrksChi2;
119  closeTrack = CloseTrack;
120  tracks = Tracks;
121  vtap = Vtap;
122  selpat = Selpat;
123  }

◆ setup() [2/2]

void DerivationFramework::BVertexClosestTrackTool::CtItem::setup ( const std::string &  Name = "_none_",
const std::string &  Bname = "ctrk",
const std::string &  Prefix = "" 
)
virtual

Definition at line 80 of file BVertexClosestTrackTool.cxx.

82  {
83  BaseItem::setup(Name, Bname, Prefix);
84  dca = -999.;
85  dcaErr = -99.;
86  zca = -999.;
87  zcaErr = -99.;
88  vtxNDErr2 = -99.;
89  trkNDErr2 = -99.;
90  phi0Used = -999.;
91  nTrksChi2 = 0;
92  closeTrack = NULL;
93  tracks.clear();
94  vtap.clear();
95  selpat.clear();
96  }

◆ toString()

std::string DerivationFramework::BVertexClosestTrackTool::CtItem::toString ( ) const
virtual

Definition at line 195 of file BVertexClosestTrackTool.cxx.

195  {
196  std::string f1 = std::format("dca: {:10.6f} {:10.6f} zca: {:10.6f} {:10.6f} nt: {:10d}",
198  std::string f2 = std::format("{}\n {}\n",
200  f1);
201  std::string rstr = f2;
202  rstr += "per track: p(px, py, pz)\n";
203  rstr += " d(d0, z0, phi, theta, qoverp)\n";
204  rstr += " d0, d0Err, z0, z0Err, logChi2, dca, okFlag\n";
205  rstr += " vtxNDErr2, trkNDErr2, phi0Used\n";
206  rstr += " vtxNDErr, trkNDErr, log(chi2Err2Sum)\n";
207  // loop over tracks
208  if (tracks.size() == vtap.size() && vtap.size() == selpat.size()) {
209  for (unsigned int i=0; i<tracks.size(); ++i) {
210  std::string f3str = std::format(" {:3d} {:2d} ", i, selpat[i]);
211  // 0: d0, 1: d0Err, 2: z0, 3: z0Err, 4: logChi2, 5: dca, 6: okFlag
212  // 7: vtxNDErr2, 8: trkNDErr2, 9: phi0Used
213  std::string f4 = std::format("%s\nd0: %10.4f %10.4f z0: %10.4f %10.4f "
214  "lc2: %10.4f dca: %10.4f ok: %3f\n"
215  "vtxNDErr2: %10.4f trkNDErr2: %10.4f "
216  "phi0Used: %10.4f\n"
217  "vtxNDErr: %10.4f trkNDErr2 %10.4f "
218  "logChi2Err2Sum: %10.4f"
220  , vtap[i][0] , vtap[i][1] , vtap[i][2] , vtap[i][3]
221  , vtap[i][4] , vtap[i][5] , vtap[i][6]
222  , vtap[i][7] , vtap[i][8] , vtap[i][9]
223  , (vtap[i][7] < 0. ? -99. : sqrt(vtap[i][7]))
224  , (vtap[i][8] < 0. ? -99. : sqrt(vtap[i][8]))
225  , ((vtap[i][7]+vtap[i][8] > 0.) ?
226  log(vtap[i][5]*vtap[i][5]/(vtap[i][7]+vtap[i][8])) : -999.));
227  std::string tstr = wrapLines(f4,
228  std::string(f3str.length(), ' '));
229  tstr.replace(0,f3str.length(),f3str);
230  rstr.append(tstr+"\n");
231  } // for i
232  } else {
233  std::string f5 = std::format("Mismatch: nTracks: {} nVtap: {} nSelpat: {}\n",tracks.size(), vtap.size(), selpat.size());
234  rstr.append(f5);
235  } // if sizes
236 
237  rstr.erase(rstr.length()-1);
238  return rstr;
239  }

◆ trkNDErr2Name()

std::string DerivationFramework::BVertexClosestTrackTool::CtItem::trkNDErr2Name ( ) const
virtual

Definition at line 179 of file BVertexClosestTrackTool.cxx.

179  {
180  return buildName("TrkNDError2");
181  }

◆ vtxNDErr2Name()

std::string DerivationFramework::BVertexClosestTrackTool::CtItem::vtxNDErr2Name ( ) const
virtual

Definition at line 175 of file BVertexClosestTrackTool.cxx.

175  {
176  return buildName("VtxNDError2");
177  }

◆ zcaErrName()

std::string DerivationFramework::BVertexClosestTrackTool::CtItem::zcaErrName ( ) const
virtual

Definition at line 171 of file BVertexClosestTrackTool.cxx.

171  {
172  return buildName("ZCAError");
173  }

◆ zcaName()

std::string DerivationFramework::BVertexClosestTrackTool::CtItem::zcaName ( ) const
virtual

Definition at line 167 of file BVertexClosestTrackTool.cxx.

167  {
168  return buildName("ZCA");
169  }

Member Data Documentation

◆ closeTrack

const xAOD::TrackParticle* DerivationFramework::BVertexClosestTrackTool::CtItem::closeTrack

Definition at line 95 of file BVertexClosestTrackTool.h.

◆ dca

double DerivationFramework::BVertexClosestTrackTool::CtItem::dca

Definition at line 87 of file BVertexClosestTrackTool.h.

◆ dcaErr

double DerivationFramework::BVertexClosestTrackTool::CtItem::dcaErr

Definition at line 88 of file BVertexClosestTrackTool.h.

◆ nTrksChi2

int DerivationFramework::BVertexClosestTrackTool::CtItem::nTrksChi2

Definition at line 94 of file BVertexClosestTrackTool.h.

◆ phi0Used

double DerivationFramework::BVertexClosestTrackTool::CtItem::phi0Used

Definition at line 93 of file BVertexClosestTrackTool.h.

◆ selpat

std::vector<unsigned short> DerivationFramework::BVertexClosestTrackTool::CtItem::selpat

Definition at line 98 of file BVertexClosestTrackTool.h.

◆ tracks

TrackBag DerivationFramework::BVertexClosestTrackTool::CtItem::tracks

Definition at line 96 of file BVertexClosestTrackTool.h.

◆ trkNDErr2

double DerivationFramework::BVertexClosestTrackTool::CtItem::trkNDErr2

Definition at line 92 of file BVertexClosestTrackTool.h.

◆ vtap

std::vector<std::vector<double> > DerivationFramework::BVertexClosestTrackTool::CtItem::vtap

Definition at line 97 of file BVertexClosestTrackTool.h.

◆ vtxNDErr2

double DerivationFramework::BVertexClosestTrackTool::CtItem::vtxNDErr2

Definition at line 91 of file BVertexClosestTrackTool.h.

◆ zca

double DerivationFramework::BVertexClosestTrackTool::CtItem::zca

Definition at line 89 of file BVertexClosestTrackTool.h.

◆ zcaErr

double DerivationFramework::BVertexClosestTrackTool::CtItem::zcaErr

Definition at line 90 of file BVertexClosestTrackTool.h.


The documentation for this class was generated from the following files:
DerivationFramework::BVertexClosestTrackTool::CtItem::vtxNDErr2
double vtxNDErr2
Definition: BVertexClosestTrackTool.h:91
DerivationFramework::BVertexClosestTrackTool::CtItem::copyVals
virtual void copyVals(const BaseItem &item)
Definition: BVertexClosestTrackTool.cxx:140
DerivationFramework::BPhysVertexTrackBase::BaseItem::toString
virtual std::string toString() const
Definition: BPhysVertexTrackBase.cxx:212
InDetGNNHardScatterSelection::getter_utils::Tracks
std::vector< const xAOD::TrackParticle * > Tracks
Definition: InnerDetector/InDetRecTools/InDetGNNHardScatterSelection/InDetGNNHardScatterSelection/CustomGetterUtils.h:49
vtune_athena.format
format
Definition: vtune_athena.py:14
DerivationFramework::BVertexClosestTrackTool::CtItem::tracks
TrackBag tracks
Definition: BVertexClosestTrackTool.h:96
DerivationFramework::BPhysVertexTrackBase::BaseItem::setup
virtual void setup(const std::string &Name, const std::string &Bname="iso", const std::string &Prefix="")
Definition: BPhysVertexTrackBase.cxx:185
DerivationFramework::BVertexClosestTrackTool::CtItem::dcaErr
double dcaErr
Definition: BVertexClosestTrackTool.h:88
DerivationFramework::BVertexClosestTrackTool::CtItem::CtItem
CtItem(const std::string &Name="_none_", const std::string &Bname="ctrk", const std::string &Prefix="", double Dca=-999., double DcaErr=-99., double Zca=-999., double ZcaErr=-99., double VtxNDErr2=-99., double TrkNDErr2=-99., double Phi0Used=-999., int NTrksChi2=0, xAOD::TrackParticle *CloseTrack=NULL, const TrackBag &Tracks={}, const std::vector< std::vector< double > > &Vtap={}, const std::vector< unsigned short > &Selpat={})
Definition: BVertexClosestTrackTool.cxx:59
DerivationFramework::BVertexClosestTrackTool::CtItem::phi0Used
double phi0Used
Definition: BVertexClosestTrackTool.h:93
DerivationFramework::BVertexClosestTrackTool::CtItem::nTrksChi2
int nTrksChi2
Definition: BVertexClosestTrackTool.h:94
read_hist_ntuple.f2
f2
Definition: read_hist_ntuple.py:20
lumiFormat.i
int i
Definition: lumiFormat.py:85
DerivationFramework::BVertexClosestTrackTool::CtItem::zca
double zca
Definition: BVertexClosestTrackTool.h:89
DerivationFramework::BVertexClosestTrackTool::CtItem::zcaErr
double zcaErr
Definition: BVertexClosestTrackTool.h:90
DerivationFramework::BPhysVertexTrackBase::trackToString
static std::string trackToString(const xAOD::TrackParticle *track)
Definition: BPhysVertexTrackBase.cxx:338
DerivationFramework::BVertexClosestTrackTool::CtItem::dca
double dca
Definition: BVertexClosestTrackTool.h:87
item
Definition: ItemListSvc.h:43
DerivationFramework::BPhysVertexTrackBase::wrapLines
static std::string wrapLines(const std::string &lines, const std::string &prefix)
Definition: BPhysVertexTrackBase.cxx:353
DerivationFramework::BVertexClosestTrackTool::CtItem::vtap
std::vector< std::vector< double > > vtap
Definition: BVertexClosestTrackTool.h:97
Name
JetDumper::Name Name
Definition: JetDumper.cxx:19
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
DerivationFramework::BVertexClosestTrackTool::CtItem::trkNDErr2
double trkNDErr2
Definition: BVertexClosestTrackTool.h:92
DerivationFramework::BVertexClosestTrackTool::CtItem::closeTrack
const xAOD::TrackParticle * closeTrack
Definition: BVertexClosestTrackTool.h:95
DerivationFramework::BVertexClosestTrackTool::CtItem::selpat
std::vector< unsigned short > selpat
Definition: BVertexClosestTrackTool.h:98
read_hist_ntuple.f1
f1
Definition: read_hist_ntuple.py:4