ATLAS Offline Software
egammaConversion0FillerTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // $Id$
15 #include "xAODTracking/Vertex.h"
17 
18 
19 namespace D3PD {
20 
21 
29  (const std::string& type,
30  const std::string& name,
31  const IInterface* parent)
33 {
34  book().ignore(); // Avoid coverity warnings.
35 }
36 
37 
42 {
43  CHECK( addVariable ("convFlag", m_convFlag,
44  "Number of tracks for the first conversion candidate; "
45  "0 if no conversion or if there are more than "
46  "two tracks.") );
47  CHECK( addVariable ("isConv", m_isConv,
48  "True if the first conversion candidate has "
49  "1 or 2 tracks.") );
50  CHECK( addVariable ("nConv", m_nConv,
51  "Number of conversion vertices.") );
52  CHECK( addVariable ("nSingleTrackConv", m_nSingleTrackConv,
53  "Number of conversion vertices with exactly one track.") );
54  CHECK( addVariable ("nDoubleTrackConv", m_nDoubleTrackConv,
55  "Number of conversion vertices with exactly two tracks.") );
56 
57  return StatusCode::SUCCESS;
58 }
59 
60 
70 {
71  const xAOD::Vertex* conv = p.vertex();
72 
73  if (conv && conv->nTrackParticles()<=2)
74  *m_convFlag = conv->nTrackParticles();
75  else
76  *m_convFlag = 0;
77 
78  *m_isConv = (*m_convFlag > 0);
79 
80  *m_nConv = p.nVertices();
81  for (int i = 0; i < *m_nConv; i++) {
82  const xAOD::Vertex* conv = p.vertex(i);
83  if (conv) {
84  int ntr = conv->nTrackParticles();
85  if (ntr == 1)
87  else if (ntr == 2)
89  }
90  }
91 
92  return StatusCode::SUCCESS;
93 }
94 
95 
96 } // namespace D3PD
D3PD::egammaConversion0FillerTool::m_nDoubleTrackConv
int * m_nDoubleTrackConv
Variable: Number of conversion vertices with exactly two tracks.
Definition: egammaConversion0FillerTool.h:71
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
D3PD::AddVariable::addVariable
virtual StatusCode addVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
Add a variable to the tuple.
Definition: AddVariable.cxx:85
D3PD::egammaConversion0FillerTool::m_convFlag
int * m_convFlag
Variable: Conversion flag.
Definition: egammaConversion0FillerTool.h:59
Photon
Class describing an photon
D3PD
Block filler tool for noisy FEB information.
Definition: CaloCellDetailsFillerTool.cxx:29
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
D3PD::egammaConversion0FillerTool::book
virtual StatusCode book() final
Book variables for this block.
Definition: egammaConversion0FillerTool.cxx:41
egammaConversion0FillerTool.h
Block filler tool for photon conversion information, for LOD 0.
lumiFormat.i
int i
Definition: lumiFormat.py:85
D3PD::egammaConversion0FillerTool::m_nConv
int * m_nConv
Variable: Number of conversion vertices.
Definition: egammaConversion0FillerTool.h:65
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
D3PD::egammaConversion0FillerTool::m_nSingleTrackConv
int * m_nSingleTrackConv
Variable: Number of conversion vertices with exactly one track.
Definition: egammaConversion0FillerTool.h:68
test_pyathena.parent
parent
Definition: test_pyathena.py:15
D3PD::BlockFillerTool
Type-safe wrapper for block filler tools.
Definition: BlockFillerTool.h:65
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
Vertex.h
D3PD::egammaConversion0FillerTool::egammaConversion0FillerTool
egammaConversion0FillerTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
Definition: egammaConversion0FillerTool.cxx:29
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
errorcheck.h
Helpers for checking error return status codes and reporting errors.
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
xAOD::Photon_v1
Definition: Photon_v1.h:37
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
D3PD::egammaConversion0FillerTool::fill
virtual StatusCode fill(const xAOD::Photon &p) override
Fill one block — type-safe version.
Definition: egammaConversion0FillerTool.cxx:69
pdg_comparison.conv
conv
Definition: pdg_comparison.py:321
D3PD::egammaConversion0FillerTool::m_isConv
int * m_isConv
Variable: Is there a conversion?
Definition: egammaConversion0FillerTool.h:62