ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::JetFitterInitializationHelper Class Reference

Februar 2007 (c) Atlas Detector Reconstruction Software. More...

#include <JetFitterInitializationHelper.h>

Inheritance diagram for Trk::JetFitterInitializationHelper:
Collaboration diagram for Trk::JetFitterInitializationHelper:

Public Member Functions

virtual StatusCode initialize () override
 JetFitterInitializationHelper (const std::string &t, const std::string &n, const IInterface *p)
 Constructor.
 ~JetFitterInitializationHelper ()
 Destructor.
VxJetCandidateinitializeJetCandidate (const std::vector< const Trk::ITrackLink * > &vectorOfLink, const RecVertex *primaryVertex, const Amg::Vector3D *jetdirection=0, const Amg::Vector3D *linearizationjetdirection=0) const
 Initialize the JetCandidate using a vector of Trk::ITrackLink* - needed for example if you run on ESD (Track*), but you have additional neutral tracks (TrackParticleBase*) IMPORTANT: Ownership of ITrackLink objects is taken OVER.
VxJetCandidateinitializeJetCandidate (const std::vector< const Trk::Track * > &vectorOfT, const RecVertex *primaryVertex, const Amg::Vector3D *jetdirection=0, const Amg::Vector3D *linearizationjetdirection=0) const
 Initialize the Jet Candidate using a vector of Tracks, the primary vertex of the event (origin of the flight axis along which the tracks will be constrained) and the jet direction.
VxJetCandidateinitializeJetCandidate (const std::vector< const Trk::TrackParticleBase * > &vectorOfTP, const RecVertex *primaryVertex, const Amg::Vector3D *jetdirection=0, const Amg::Vector3D *linearizationjetdirection=0) const
 Initialize the Jet Candidate using a vector of TrackParticles, the primary vertex of the event (origin of the flight axis along which the tracks will be constrained) and the jet direction.
void linearizeAllTracks (VxJetCandidate *, bool signfliptreatment=false, double maxdistance=1.) const
 Calls the linearization of all the tracks (adds the Linearized Track data member to every VxTrackAtVertex (VxTrackOnJetAxis) involved in the fit).
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()
static void updateTrackNumbering (VxJetCandidate *)
 Does the update of the ordering of the vertices along the jetaxis.

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

VxJetCandidateinitializeJetClusters (VxJetCandidate *myJetCandidate, const RecVertex *primaryVertex, const Amg::Vector3D *jetdirection=0, const Amg::Vector3D *linearizationjetdirection=0) const
 Internal method to initialized a VxJetCandidate.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ToolHandle< IVertexLinearizedTrackFactorym_linearizedFactory
float m_errphiJetAxis
 Error on phi on the flight direction you want to initialize the fit with (set errphiJetAxis by JobOptions, default is 0.07).
float m_erretaJetAxis
 Error on eta on the flight direction you want to initialize the fit with (set erretaJetAxis by JobOptions, default is 0.065).
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Februar 2007 (c) Atlas Detector Reconstruction Software.

Author
Giacinto Piacquadio (University of Freiburg)
Christian Weiser (University of Freiburg)

(In case of problems, please contact: nicol.nosp@m.a.gi.nosp@m.acint.nosp@m.o.pi.nosp@m.acqua.nosp@m.dio@.nosp@m.cern..nosp@m.ch)

This class is used to initialize a VxJetCandidate, which is the class to be provided to the 'JetFitter' algorithm in order to perform the fit of all the vertices on the JetAxis. For using it, please look at the doxygen documentation of its methods.

Definition at line 43 of file JetFitterInitializationHelper.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ JetFitterInitializationHelper()

Trk::JetFitterInitializationHelper::JetFitterInitializationHelper ( const std::string & t,
const std::string & n,
const IInterface * p )

Constructor.

Definition at line 75 of file JetFitterInitializationHelper.cxx.

75 :
76 AthAlgTool(t,n,p),
77 m_linearizedFactory("Trk::FullLinearizedTrackFactory", this),
78 m_errphiJetAxis(0.07),
79 m_erretaJetAxis(0.065)
80 {
81 declareProperty("errphiJetAxis",m_errphiJetAxis);
82 declareProperty("erretaJetAxis",m_erretaJetAxis);
83 declareProperty("LinearizedTrackFactory",m_linearizedFactory);
84 declareInterface< JetFitterInitializationHelper >(this) ;
85
86 }
AthAlgTool()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ToolHandle< IVertexLinearizedTrackFactory > m_linearizedFactory
float m_erretaJetAxis
Error on eta on the flight direction you want to initialize the fit with (set erretaJetAxis by JobOpt...
float m_errphiJetAxis
Error on phi on the flight direction you want to initialize the fit with (set errphiJetAxis by JobOpt...

◆ ~JetFitterInitializationHelper()

Trk::JetFitterInitializationHelper::~JetFitterInitializationHelper ( )
default

Destructor.

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ initialize()

StatusCode Trk::JetFitterInitializationHelper::initialize ( )
overridevirtual

Definition at line 95 of file JetFitterInitializationHelper.cxx.

95 {
96
98 if(sc.isFailure()) {
99 ATH_MSG_ERROR( " Unable to retrieve "<<m_linearizedFactory );
100 return StatusCode::FAILURE;
101 }
102
103
104 return StatusCode::SUCCESS;
105
106 }
#define ATH_MSG_ERROR(x)
static Double_t sc
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ initializeJetCandidate() [1/3]

VxJetCandidate * Trk::JetFitterInitializationHelper::initializeJetCandidate ( const std::vector< const Trk::ITrackLink * > & vectorOfLink,
const RecVertex * primaryVertex,
const Amg::Vector3D * jetdirection = 0,
const Amg::Vector3D * linearizationjetdirection = 0 ) const

Initialize the JetCandidate using a vector of Trk::ITrackLink* - needed for example if you run on ESD (Track*), but you have additional neutral tracks (TrackParticleBase*) IMPORTANT: Ownership of ITrackLink objects is taken OVER.

Definition at line 115 of file JetFitterInitializationHelper.cxx.

119 {
120
121 ATH_MSG_VERBOSE (" Entered initializeJetCandidate() ");
122
123 VxJetCandidate* myJetCandidate=new VxJetCandidate();
124
125 std::vector<Trk::VxVertexOnJetAxis*> setOfVertices=myJetCandidate->getVerticesOnJetAxis();
126 std::vector<Trk::VxTrackAtVertex*>* setOfTracks=myJetCandidate->vxTrackAtVertex();
127
128 std::vector<const Trk::ITrackLink*>::const_iterator vectorOfLinkBegin=vectorOfLink.begin();
129 std::vector<const Trk::ITrackLink*>::const_iterator vectorOfLinkEnd=vectorOfLink.end();
130
131 for (std::vector<const Trk::ITrackLink*>::const_iterator vectorOfLinkIter=vectorOfLinkBegin;
132 vectorOfLinkIter!=vectorOfLinkEnd;++vectorOfLinkIter)
133 {
134 std::vector<Trk::VxTrackAtVertex*> temp_vector_tracksAtVertex;
135 Trk::VxTrackAtVertex* newVxTrack=new Trk::VxTrackAtVertex((*vectorOfLinkIter)->clone());
136 temp_vector_tracksAtVertex.push_back(newVxTrack);
137 setOfTracks->push_back(newVxTrack);
138 setOfVertices.push_back(new Trk::VxVertexOnJetAxis(std::move(temp_vector_tracksAtVertex)));
139 }
140 myJetCandidate->setVerticesOnJetAxis(setOfVertices);
141 return initializeJetClusters(myJetCandidate,primaryVertex,jetdirection,linearizationjetdirection);
142
143 }
#define ATH_MSG_VERBOSE(x)
VxJetCandidate * initializeJetClusters(VxJetCandidate *myJetCandidate, const RecVertex *primaryVertex, const Amg::Vector3D *jetdirection=0, const Amg::Vector3D *linearizationjetdirection=0) const
Internal method to initialized a VxJetCandidate.

◆ initializeJetCandidate() [2/3]

VxJetCandidate * Trk::JetFitterInitializationHelper::initializeJetCandidate ( const std::vector< const Trk::Track * > & vectorOfT,
const RecVertex * primaryVertex,
const Amg::Vector3D * jetdirection = 0,
const Amg::Vector3D * linearizationjetdirection = 0 ) const

Initialize the Jet Candidate using a vector of Tracks, the primary vertex of the event (origin of the flight axis along which the tracks will be constrained) and the jet direction.

Definition at line 164 of file JetFitterInitializationHelper.cxx.

167 {
168
169
170 //creates VxJetCandidate. Constructor takes care of adding VxTrackAtVertex
171 //and creating one VxVertexOnJetAxis for each added track
172
173 VxJetCandidate* myJetCandidate=new VxJetCandidate(vectorOfT);
174
175 return initializeJetClusters(myJetCandidate,primaryVertex,jetdirection,linearizationjetdirection);
176
177 }

◆ initializeJetCandidate() [3/3]

VxJetCandidate * Trk::JetFitterInitializationHelper::initializeJetCandidate ( const std::vector< const Trk::TrackParticleBase * > & vectorOfTP,
const RecVertex * primaryVertex,
const Amg::Vector3D * jetdirection = 0,
const Amg::Vector3D * linearizationjetdirection = 0 ) const

Initialize the Jet Candidate using a vector of TrackParticles, the primary vertex of the event (origin of the flight axis along which the tracks will be constrained) and the jet direction.

Definition at line 148 of file JetFitterInitializationHelper.cxx.

151 {
152
153
154 //creates VxJetCandidate. Constructor takes care of adding VxTrackAtVertex
155 //and creating one VxVertexOnJetAxis for each added track
156
157 VxJetCandidate* myJetCandidate=new VxJetCandidate(vectorOfTP);
158
159
160 return initializeJetClusters(myJetCandidate,primaryVertex,jetdirection,linearizationjetdirection);
161
162 }

◆ initializeJetClusters()

VxJetCandidate * Trk::JetFitterInitializationHelper::initializeJetClusters ( VxJetCandidate * myJetCandidate,
const RecVertex * primaryVertex,
const Amg::Vector3D * jetdirection = 0,
const Amg::Vector3D * linearizationjetdirection = 0 ) const
private

Internal method to initialized a VxJetCandidate.

Definition at line 179 of file JetFitterInitializationHelper.cxx.

182 {
183
184 //now create a new m_fittedPositions for the VxJetCandidate
185 //start from position...
186
187 if (primaryVertex==nullptr) {
188 std::cout << "ERROR. No valid primary vertex pointer provided to the JetFitterInitializationHelper." << std::endl;
189 throw std::runtime_error ("No valid primary vertex pointer provided to the JetFitterInitializationHelper.");
190 }
191 AmgVector(5) startPosition;
192 startPosition[Trk::jet_xv]=primaryVertex->position().x();
193 startPosition[Trk::jet_yv]=primaryVertex->position().y();
194 startPosition[Trk::jet_zv]=primaryVertex->position().z();
195
196 if (jetdirection!=nullptr) {
197 startPosition[Trk::jet_theta]=jetdirection->theta();
198 startPosition[Trk::jet_phi]=jetdirection->phi();
199 } else {
200 std::cout << "JetFitterInitializationHelper: Error! no starting jet direction provided. Using (0,0)" << std::endl;
201 startPosition[Trk::jet_theta]=0;
202 startPosition[Trk::jet_phi]=0;
203 }
204
205 //override default setting...
206 std::pair<double,double> phiAndThetaError(m_errphiJetAxis,m_erretaJetAxis);
207
208 /*
209 if (jetdirection!=0)
210 {
211
212 //override default setting...
213 phiAndThetaError=getPhiAndThetaError(*jetdirection);
214
215 std::cout << " Using phi error: " << phiAndThetaError.first << " and eta error: " << phiAndThetaError.second << " for pt: " << jetdirection->perp() <<
216 " and eta: " << jetdirection->pseudoRapidity() << std::endl;
217
218 }
219 */
220
221 AmgSymMatrix(3) primaryCovariance(primaryVertex->covariancePosition().block<3,3>(0,0));
222 AmgSymMatrix(5) startCovariance; startCovariance.setZero();
223 startCovariance.block<3,3>(0,0) = primaryCovariance;
224 startCovariance(Trk::jet_theta,Trk::jet_theta) =
225 std::pow(phiAndThetaError.second*sin(startPosition(Trk::jet_theta)),2);
226 startCovariance(Trk::jet_phi,Trk::jet_phi) = std::pow(phiAndThetaError.first,2);
227
228 RecVertexPositions startRecVertexPositions(startPosition,
229 startCovariance,
230 0.,0.);
231
232 //initialize the RecVertexPositions object of the VxJetCandidate
233 myJetCandidate->setRecVertexPositions(startRecVertexPositions);
234 myJetCandidate->setConstraintVertexPositions(startRecVertexPositions);
235
236 VertexPositions linVertexPositions;
237 if (linearizationjetdirection!=nullptr) {
238 Amg::VectorX linPosition=startPosition;
239 linPosition[Trk::jet_theta]=linearizationjetdirection->theta();
240 linPosition[Trk::jet_phi]=linearizationjetdirection->phi();
241 linVertexPositions=VertexPositions(linPosition);
242 } else {
243 linVertexPositions = std::move(startRecVertexPositions);
244 }
245
246 myJetCandidate->setLinearizationVertexPositions(linVertexPositions);
247 //initialize the linearizationPosition exactly to the same object or
248 //to something custom if requested by an additional argument
249
250 updateTrackNumbering(myJetCandidate);
251
252 const VxVertexOnJetAxis* primaryVertexJC(myJetCandidate->getPrimaryVertex());
253
254 if (primaryVertexJC==nullptr) {
255
256 // VxVertexOnJetAxis* newPrimaryVertex=new VxVertexOnJetAxis();
257 VxVertexOnJetAxis newPrimaryVertex;
258 //set numVertex of primaryVertex to -10
259 newPrimaryVertex.setNumVertex(-10);
260 // newPrimaryVertex->setLinearizationPosition(0.);//should be the same as default, but...
261 myJetCandidate->setPrimaryVertex(&newPrimaryVertex);
262
263 } else {
264
265 ATH_MSG_WARNING ("Primary Vertex was already initialized. Check...");
266
267 }
268 return myJetCandidate;
269 }
#define ATH_MSG_WARNING(x)
#define AmgSymMatrix(dim)
#define AmgVector(rows)
if(pathvar)
static void updateTrackNumbering(VxJetCandidate *)
Does the update of the ordering of the vertices along the jetaxis.
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
@ x
Definition ParamDefs.h:55
@ z
global position (cartesian)
Definition ParamDefs.h:57
@ y
Definition ParamDefs.h:56
const Amg::Vector3D & position() const
Method to retrieve the position of the Intersection.
@ jet_zv
position x,y,z of primary vertex

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & Trk::JetFitterInitializationHelper::interfaceID ( )
inlinestatic

Definition at line 48 of file JetFitterInitializationHelper.h.

48 {
50 }
static const InterfaceID IID_JetFitterInitializationHelper("Trk::JetFitterInitializationHelper", 1, 0)

◆ linearizeAllTracks()

void Trk::JetFitterInitializationHelper::linearizeAllTracks ( VxJetCandidate * myJetCandidate,
bool signfliptreatment = false,
double maxdistance = 1. ) const

Calls the linearization of all the tracks (adds the Linearized Track data member to every VxTrackAtVertex (VxTrackOnJetAxis) involved in the fit).

If the track was already initialized previously, then linearization is done only if the distance to the previous linearization point is bigger than what specified in mm ( default is 1 mm ).

Definition at line 337 of file JetFitterInitializationHelper.cxx.

339 {
340
341 const VertexPositions & myLinVertexPosition=myJetCandidate->getLinearizationVertexPositions();
342 const Amg::VectorX & myPosition=myLinVertexPosition.position();
343
344 const VxVertexOnJetAxis* myPrimary=myJetCandidate->getPrimaryVertex();
345 const std::vector<VxTrackAtVertex*> & primaryVectorTracks=myPrimary->getTracksAtVertex();
346
347 Amg::Vector3D primary3Pos = myPosition.segment(0,3);
348 const Amg::Vector3D& primaryVertexPos(primary3Pos);
349
350 const std::vector<VxTrackAtVertex*>::const_iterator primaryVectorTracksBegin=primaryVectorTracks.begin();
351 const std::vector<VxTrackAtVertex*>::const_iterator primaryVectorTracksEnd=primaryVectorTracks.end();
352
353 for (std::vector<VxTrackAtVertex*>::const_iterator primaryVectorIter=primaryVectorTracksBegin;
354 primaryVectorIter!=primaryVectorTracksEnd;++primaryVectorIter) {
355
356// std::cout << " New track to linearize at PV" << primaryVertexPos << std::endl;
357
358 const Trk::LinearizedTrack* linTrack=(*primaryVectorIter)->linState();
359
360 if (linTrack!=nullptr) {
361 // std::cout << "distance is: " << (linTrack->linearizationPoint()-primary3Pos).mag() << std::endl;
362 if ((linTrack->linearizationPoint()-primary3Pos).mag()>maxdistance) {
363 // std::cout << " redoing linearization" << std::endl;
364 m_linearizedFactory->linearize(**primaryVectorIter,primaryVertexPos);
365 }
366 } else {
367 // std::cout << " linearizing for the first time " << std::endl;
368 m_linearizedFactory->linearize(**primaryVectorIter,primaryVertexPos);
369 }
370
371
372 }
373
374 const std::vector<VxVertexOnJetAxis*> & associatedVertices=myJetCandidate->getVerticesOnJetAxis();
375
376 const std::vector<VxVertexOnJetAxis*>::const_iterator VtxBegin=associatedVertices.begin();
377 const std::vector<VxVertexOnJetAxis*>::const_iterator VtxEnd=associatedVertices.end();
378
379 for (std::vector<VxVertexOnJetAxis*>::const_iterator VtxIter=VtxBegin;VtxIter!=VtxEnd;++VtxIter) {
380
381 int numVertex=(*VtxIter)->getNumVertex();
382 Amg::Vector3D secondaryVertexPos(getSingleVtxPositionWithSignFlip(myPosition,numVertex,signFlipTreatment));
383
384// std::cout << " Considering linearization at n. vertex " << numVertex << " pos " << secondaryVertexPos << std::endl;
385
386 const std::vector<VxTrackAtVertex*> & tracksAtVertex=(*VtxIter)->getTracksAtVertex();
387
388 const std::vector<VxTrackAtVertex*>::const_iterator TracksBegin=tracksAtVertex.begin();
389 const std::vector<VxTrackAtVertex*>::const_iterator TracksEnd=tracksAtVertex.end();
390
391 for (std::vector<VxTrackAtVertex*>::const_iterator TrackVectorIter=TracksBegin;
392 TrackVectorIter!=TracksEnd;++TrackVectorIter) {
393
394 const Trk::LinearizedTrack* linTrack=(*TrackVectorIter)->linState();
395
396 if (linTrack!=nullptr) {
397 // std::cout << "distance not primary is: " << (linTrack->linearizationPoint()-secondaryVertexPos.position()).mag() << std::endl;
398 if ((linTrack->linearizationPoint()-secondaryVertexPos).mag()>maxdistance) {
399 // std::cout << " redoing linearization" << std::endl;
400 m_linearizedFactory->linearize(**TrackVectorIter,secondaryVertexPos);
401 }
402 } else {
403 // std::cout << " linearizing for the first time " << std::endl;
404 m_linearizedFactory->linearize(**TrackVectorIter,secondaryVertexPos);
405 }
406
407
408
409 }
410
411 }
412
413 }//end linearizeAllTracks
const Amg::Vector3D & linearizationPoint() const
An access to an actual linearization point.
Eigen::Matrix< double, 3, 1 > Vector3D

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, and AthCheckedComponent<::AthAlgTool >.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateTrackNumbering()

void Trk::JetFitterInitializationHelper::updateTrackNumbering ( VxJetCandidate * myJetCandidate)
static

Does the update of the ordering of the vertices along the jetaxis.

This is needed after you make a change to the number of clusters (initially single tracks) of the VxJetCandidate, because you need to have for each VxVertexOnJetAxis a number stored which tells you where the corresponding position along the jet axis is stored in the RecVertexPositions (position + covariance matrix), which is then used to read/store the fit result.

The method initializeJetClusters already calls this update during its initialization of the VxJetCandidate.

Definition at line 272 of file JetFitterInitializationHelper.cxx.

272 {
273
274 const std::vector<VxVertexOnJetAxis*> & associatedVertices=myJetCandidate->getVerticesOnJetAxis();
275
276 const std::vector<VxVertexOnJetAxis*>::const_iterator VtxBegin=associatedVertices.begin();
277 const std::vector<VxVertexOnJetAxis*>::const_iterator VtxEnd=associatedVertices.end();
278
279 int numTrack(0);//start from 0 in counting the vertex "clusters"
280 //Horrible but a map is not suited here
281
282 if (!associatedVertices.empty()) {//Was that your intention? to be checked... 15.03.2007
283 for (std::vector<VxVertexOnJetAxis*>::const_iterator VtxIter=VtxBegin;VtxIter!=VtxEnd;++VtxIter) {
284 VxVertexOnJetAxis* myVertex=(*VtxIter);
285 if (myVertex!=nullptr) {
286 myVertex->setNumVertex(numTrack);
287 numTrack+=1;
288 } else {
289 std::cout << "Warning in JetFitterInitializationHelper.Inconsistency found. Pointer to VxVertexOnJetAxis should be different from zero. Skipping track..." << std::endl;
290 throw std::runtime_error ("Warning in JetFitterInitializationHelper.Inconsistency found. Pointer to VxVertexOnJetAxis should be different from zero. Skipping track...");
291 }
292 }
293
294 int sizeOfRecVertex=myJetCandidate->getRecVertexPositions().position().rows();
295
296 //if the size of the RecVertexPositions is not big enough, enlarge it...
297 if (numRow(numTrack)>sizeOfRecVertex) {
298
299 //Added 2. October 2014 !! (BUG...)
300 myJetCandidate->setRecVertexPositions(myJetCandidate->getConstraintVertexPositions());
301
302 Amg::VectorX myPosition = myJetCandidate->getRecVertexPositions().position();
303 Amg::MatrixX myCovariance = myJetCandidate->getRecVertexPositions().covariancePosition();
304 Amg::VectorX newPosition(numRow(numTrack)); newPosition.setZero();
305 newPosition.segment(0,myPosition.rows()) = myPosition;
306 Amg::MatrixX newCovariance(numRow(numTrack),numRow(numTrack));
307 newCovariance.setZero();
308 newCovariance.block(0,0,myCovariance.rows(),myCovariance.cols()) = myCovariance;
309 for (int i=sizeOfRecVertex;i<numRow(numTrack);++i) {
310 newCovariance(i,i)=500.*500.;
311 }
312
313 RecVertexPositions newRecVertexPositions(newPosition,
314 newCovariance,
315 myJetCandidate->getRecVertexPositions().fitQuality().chiSquared(),
316 myJetCandidate->getRecVertexPositions().fitQuality().numberDoF());
317
318
319 Amg::VectorX myPositionLinearization = myJetCandidate->getLinearizationVertexPositions().position();
320 Amg::VectorX newPositionLinearization(numRow(numTrack));
321 newPositionLinearization.setZero();
322 newPositionLinearization.segment(0,myPositionLinearization.rows()) = myPositionLinearization;
323
324 myJetCandidate->setRecVertexPositions(newRecVertexPositions);//needed here?
325 myJetCandidate->setConstraintVertexPositions(newRecVertexPositions);
326 myJetCandidate->setLinearizationVertexPositions(newPositionLinearization);
327
328 } else if (numRow(numTrack)<sizeOfRecVertex) {
329 std::cout << "Strange: size of RecVertexPosition's position in JetFitterInitializationHelper is bigger than actual numTracks plus 5. CHECK..." << std::endl;
330 throw std::runtime_error ("Strange: size of RecVertexPosition's position in JetFitterInitializationHelper is bigger than actual numTracks plus 5. CHECK...");
331 }
332
333 }
334 //succesfully initialized ordering (+ enlarging of RecVertexPositions if needed)
335 }
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_erretaJetAxis

float Trk::JetFitterInitializationHelper::m_erretaJetAxis
private

Error on eta on the flight direction you want to initialize the fit with (set erretaJetAxis by JobOptions, default is 0.065).

This should be substituted with a parameterization of the calorimeter resolution, which should depend on phi and eta.

Definition at line 158 of file JetFitterInitializationHelper.h.

◆ m_errphiJetAxis

float Trk::JetFitterInitializationHelper::m_errphiJetAxis
private

Error on phi on the flight direction you want to initialize the fit with (set errphiJetAxis by JobOptions, default is 0.07).

This should be substituted with a parameterization of the calorimeter resolution, which should depend on phi and eta.

Definition at line 148 of file JetFitterInitializationHelper.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_linearizedFactory

ToolHandle<IVertexLinearizedTrackFactory> Trk::JetFitterInitializationHelper::m_linearizedFactory
private

Definition at line 138 of file JetFitterInitializationHelper.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: