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 76 of file JetFitterInitializationHelper.cxx.

76 :
77 AthAlgTool(t,n,p),
78 m_linearizedFactory("Trk::FullLinearizedTrackFactory", this),
79 m_errphiJetAxis(0.07),
80 m_erretaJetAxis(0.065)
81 {
82 declareProperty("errphiJetAxis",m_errphiJetAxis);
83 declareProperty("erretaJetAxis",m_erretaJetAxis);
84 declareProperty("LinearizedTrackFactory",m_linearizedFactory);
85 declareInterface< JetFitterInitializationHelper >(this) ;
86
87 }
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 96 of file JetFitterInitializationHelper.cxx.

96 {
97
99 if(sc.isFailure()) {
100 ATH_MSG_ERROR( " Unable to retrieve "<<m_linearizedFactory );
101 return StatusCode::FAILURE;
102 }
103
104
105 return StatusCode::SUCCESS;
106
107 }
#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 116 of file JetFitterInitializationHelper.cxx.

120 {
121
122 ATH_MSG_VERBOSE (" Entered initializeJetCandidate() ");
123
124 VxJetCandidate* myJetCandidate=new VxJetCandidate();
125
126 std::vector<Trk::VxVertexOnJetAxis*> setOfVertices=myJetCandidate->getVerticesOnJetAxis();
127 std::vector<Trk::VxTrackAtVertex*>* setOfTracks=myJetCandidate->vxTrackAtVertex();
128
129 std::vector<const Trk::ITrackLink*>::const_iterator vectorOfLinkBegin=vectorOfLink.begin();
130 std::vector<const Trk::ITrackLink*>::const_iterator vectorOfLinkEnd=vectorOfLink.end();
131
132 for (std::vector<const Trk::ITrackLink*>::const_iterator vectorOfLinkIter=vectorOfLinkBegin;
133 vectorOfLinkIter!=vectorOfLinkEnd;++vectorOfLinkIter)
134 {
135 std::vector<Trk::VxTrackAtVertex*> temp_vector_tracksAtVertex;
136 Trk::VxTrackAtVertex* newVxTrack=new Trk::VxTrackAtVertex((*vectorOfLinkIter)->clone());
137 temp_vector_tracksAtVertex.push_back(newVxTrack);
138 setOfTracks->push_back(newVxTrack);
139 setOfVertices.push_back(new Trk::VxVertexOnJetAxis(temp_vector_tracksAtVertex));
140 }
141 myJetCandidate->setVerticesOnJetAxis(setOfVertices);
142 return initializeJetClusters(myJetCandidate,primaryVertex,jetdirection,linearizationjetdirection);
143
144 }
#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 165 of file JetFitterInitializationHelper.cxx.

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

◆ 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 149 of file JetFitterInitializationHelper.cxx.

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

◆ 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 180 of file JetFitterInitializationHelper.cxx.

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

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

◆ 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 273 of file JetFitterInitializationHelper.cxx.

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