ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
Trk::Z0PVTrackCompatibilityEstimator Class Reference

Z0PVTrackCompatibilityEstimator.h. More...

#include <Z0PVTrackCompatibilityEstimator.h>

Inheritance diagram for Trk::Z0PVTrackCompatibilityEstimator:
Collaboration diagram for Trk::Z0PVTrackCompatibilityEstimator:

Public Member Functions

 Z0PVTrackCompatibilityEstimator (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~Z0PVTrackCompatibilityEstimator ()
 
virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
bool isCompatible (const xAOD::TrackParticle *track, const xAOD::VertexContainer *pvContainer, unsigned int pvIndex=0) const
 
bool isCompatible (const TrackParameters *track, const xAOD::VertexContainer *pvContainer, unsigned int pvIndex=0) const
 

Private Attributes

ToolHandle< Trk::ITrackToVertexIPEstimatorm_ipEstimator
 
double m_z0SignificanceMax
 

Detailed Description

Z0PVTrackCompatibilityEstimator.h.

Assigns tracks to the primary vertex based on their z0 significance. Tracks that are close to a pileup vertex are not assigned to the primary vertex.

ruwie.nosp@m.del@.nosp@m.physi.nosp@m.k.un.nosp@m.i-bon.nosp@m.n.de


Changes:

David Shope david.nosp@m..ric.nosp@m.hard..nosp@m.shop.nosp@m.e@cer.nosp@m.n.ch (2016-04-19)

EDM Migration to xAOD - Replace Trk::VxContainer with xAOD::VertexContainer

Definition at line 44 of file Z0PVTrackCompatibilityEstimator.h.

Constructor & Destructor Documentation

◆ Z0PVTrackCompatibilityEstimator()

Trk::Z0PVTrackCompatibilityEstimator::Z0PVTrackCompatibilityEstimator ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 20 of file Z0PVTrackComaptibilityEstimator.cxx.

22  :
23  base_class(type, name, parent),
24  m_ipEstimator("Trk::TrackToVertexIPEstimator"),
26  {
27  declareProperty("IPEstimator", m_ipEstimator, "Impact parameter estimator tool");
28  declareProperty("Z0SignificanceMax", m_z0SignificanceMax);
29  }

◆ ~Z0PVTrackCompatibilityEstimator()

Trk::Z0PVTrackCompatibilityEstimator::~Z0PVTrackCompatibilityEstimator ( )
virtualdefault

Member Function Documentation

◆ finalize()

StatusCode Trk::Z0PVTrackCompatibilityEstimator::finalize ( )
virtual

Definition at line 48 of file Z0PVTrackComaptibilityEstimator.cxx.

48  {
49 
50  ATH_MSG_INFO( "Finalizing Z0PVTrackCompatibilityEstimator" );
51 
52  return StatusCode::SUCCESS;
53  }

◆ initialize()

StatusCode Trk::Z0PVTrackCompatibilityEstimator::initialize ( )
virtual

Definition at line 34 of file Z0PVTrackComaptibilityEstimator.cxx.

34  {
35 
36  ATH_MSG_INFO( "Initializing Z0PVTrackCompatibilityEstimator" );
37 
38  StatusCode sc = m_ipEstimator.retrieve();
39  if( !sc.isSuccess() ){
40  msg(MSG::FATAL) << "Unable to retrieve impact parameter estimator tool" << endmsg;
41  return sc;
42  }
43 
44  return StatusCode::SUCCESS;
45  }

◆ isCompatible() [1/2]

bool Trk::Z0PVTrackCompatibilityEstimator::isCompatible ( const TrackParameters track,
const xAOD::VertexContainer pvContainer,
unsigned int  pvIndex = 0 
) const

Definition at line 63 of file Z0PVTrackComaptibilityEstimator.cxx.

64  {
65 
66  // TODO: do we want to doRemoval here? (I have it as false for now)
67  std::unique_ptr<ImpactParametersAndSigma> ip = m_ipEstimator->estimate(track, track, (*primaryVertexContainer)[index], false);
68 
69  bool pileup = false;
70 
71  double sumptPV = 0;
72 
73  /*
74  for(std::vector<Trk::VxTrackAtVertex*>::const_iterator track =
75  (*primaryVertexContainer)[index]->vxTrackAtVertex()->begin();
76  track != (*primaryVertexContainer)[index]->vxTrackAtVertex()->end(); ++track){
77 
78  sumptPV += (*track)->initialPerigee()->momentum().perp();
79  }
80  */
81 
82  // TODO: perhaps calculate sumptPV using VxTracksAtVertex in xAOD::Vertex? -David S.
83  for(unsigned int i = 0; i < (*primaryVertexContainer)[index]->nTrackParticles(); ++i){
84 
85  sumptPV += (*primaryVertexContainer)[index]->trackParticle(i)->perigeeParameters().momentum().perp();
86  }
87 
88  for(unsigned int i = 0; i < primaryVertexContainer->size(); i++){
89 
90  double sumpt = 0.;
91 
92  if( i != index &&
93  (*primaryVertexContainer)[i]->vertexType() != xAOD::VxType::NoVtx ){
94  /*
95  for(std::vector<Trk::VxTrackAtVertex*>::const_iterator track =
96  (*primaryVertexContainer)[i]->vxTrackAtVertex()->begin();
97  track != (*primaryVertexContainer)[i]->vxTrackAtVertex()->end(); ++track){
98 
99  sumpt += (*track)->initialPerigee()->momentum().perp();
100  }
101  */
102 
103  // TODO: perhaps calculate sumptPV using VxTracksAtVertex in xAOD::Vertex? -David S.
104  for(unsigned int itrk = 0; itrk < (*primaryVertexContainer)[i]->nTrackParticles(); ++itrk){
105 
106  sumpt += (*primaryVertexContainer)[i]->trackParticle(itrk)->perigeeParameters().momentum().perp();
107  }
108  double vxReach =
109  std::abs((*primaryVertexContainer)[i]->position().z()
110  - (*primaryVertexContainer)[index]->position().z()) * sumpt / (sumpt + sumptPV);
111 
112  if(std::abs(ip->IPz0 + (*primaryVertexContainer)[index]->position().z() -
113  (*primaryVertexContainer)[i]->position().z()) < vxReach){
114 
115  pileup = true;
116  }
117  }
118  }
119 
120  return std::abs(ip->IPz0) / ip->sigmaz0 < m_z0SignificanceMax && !pileup;
121  }

◆ isCompatible() [2/2]

bool Trk::Z0PVTrackCompatibilityEstimator::isCompatible ( const xAOD::TrackParticle track,
const xAOD::VertexContainer pvContainer,
unsigned int  pvIndex = 0 
) const

Definition at line 57 of file Z0PVTrackComaptibilityEstimator.cxx.

58  {
59 
60  return isCompatible( &(track->perigeeParameters()), primaryVertexContainer, index );
61  }

Member Data Documentation

◆ m_ipEstimator

ToolHandle< Trk::ITrackToVertexIPEstimator > Trk::Z0PVTrackCompatibilityEstimator::m_ipEstimator
private

Definition at line 60 of file Z0PVTrackCompatibilityEstimator.h.

◆ m_z0SignificanceMax

double Trk::Z0PVTrackCompatibilityEstimator::m_z0SignificanceMax
private

Definition at line 62 of file Z0PVTrackCompatibilityEstimator.h.


The documentation for this class was generated from the following files:
Trk::z
@ z
global position (cartesian)
Definition: ParamDefs.h:57
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:19
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
index
Definition: index.py:1
Trk::Z0PVTrackCompatibilityEstimator::m_z0SignificanceMax
double m_z0SignificanceMax
Definition: Z0PVTrackCompatibilityEstimator.h:62
xAOD::VxType::NoVtx
@ NoVtx
Dummy vertex. TrackParticle was not used in vertex fit.
Definition: TrackingPrimitives.h:570
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
lumiFormat.i
int i
Definition: lumiFormat.py:85
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
test_pyathena.parent
parent
Definition: test_pyathena.py:15
find_tgc_unfilled_channelids.ip
ip
Definition: find_tgc_unfilled_channelids.py:3
Trk::Z0PVTrackCompatibilityEstimator::m_ipEstimator
ToolHandle< Trk::ITrackToVertexIPEstimator > m_ipEstimator
Definition: Z0PVTrackCompatibilityEstimator.h:60
dqt_zlumi_pandas.pileup
pileup
Definition: dqt_zlumi_pandas.py:174
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
Trk::Z0PVTrackCompatibilityEstimator::isCompatible
bool isCompatible(const xAOD::TrackParticle *track, const xAOD::VertexContainer *pvContainer, unsigned int pvIndex=0) const
Definition: Z0PVTrackComaptibilityEstimator.cxx:57
xAOD::vertexType
vertexType
Definition: Vertex_v1.cxx:166
DeMoScan.index
string index
Definition: DeMoScan.py:364
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7