Loading [MathJax]/jax/input/TeX/config.js
 |
ATLAS Offline Software
|
Februar 2007 (c) Atlas Detector Reconstruction Software.
More...
#include <JetFitterInitializationHelper.h>
|
virtual StatusCode | initialize () override |
|
| JetFitterInitializationHelper (const std::string &t, const std::string &n, const IInterface *p) |
| Constructor. More...
|
|
| ~JetFitterInitializationHelper () |
| Destructor. More...
|
|
VxJetCandidate * | 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. More...
|
|
VxJetCandidate * | 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. More...
|
|
VxJetCandidate * | 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. More...
|
|
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). More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
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.
◆ StoreGateSvc_t
◆ JetFitterInitializationHelper()
Trk::JetFitterInitializationHelper::JetFitterInitializationHelper |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~JetFitterInitializationHelper()
Trk::JetFitterInitializationHelper::~JetFitterInitializationHelper |
( |
| ) |
|
|
default |
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
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 |
◆ initializeJetCandidate() [1/3]
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 132 of file JetFitterInitializationHelper.cxx.
135 std::vector<Trk::VxTrackAtVertex*> temp_vector_tracksAtVertex;
137 temp_vector_tracksAtVertex.push_back(newVxTrack);
138 setOfTracks->push_back(newVxTrack);
141 myJetCandidate->setVerticesOnJetAxis(setOfVertices);
150 const RecVertex* primaryVertex,
158 VxJetCandidate* myJetCandidate=
new VxJetCandidate(vectorOfTP);
◆ initializeJetCandidate() [2/3]
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 181 of file JetFitterInitializationHelper.cxx.
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.");
193 startPosition[
Trk::
jet_xv]=primaryVertex->position().
x();
194 startPosition[
Trk::
jet_yv]=primaryVertex->position().
y();
◆ initializeJetCandidate() [3/3]
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 165 of file JetFitterInitializationHelper.cxx.
174 VxJetCandidate* myJetCandidate=
new VxJetCandidate(vectorOfT);
◆ initializeJetClusters()
Internal method to initialized a VxJetCandidate.
Definition at line 196 of file JetFitterInitializationHelper.cxx.
201 std::cout <<
"JetFitterInitializationHelper: Error! no starting jet direction provided. Using (0,0)" << std::endl;
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;
229 RecVertexPositions startRecVertexPositions(startPosition,
234 myJetCandidate->setRecVertexPositions(startRecVertexPositions);
235 myJetCandidate->setConstraintVertexPositions(startRecVertexPositions);
237 VertexPositions linVertexPositions;
238 if (linearizationjetdirection!=
nullptr) {
241 linPosition[
Trk::jet_phi]=linearizationjetdirection->phi();
242 linVertexPositions=VertexPositions(linPosition);
244 linVertexPositions=startRecVertexPositions;
247 myJetCandidate->setLinearizationVertexPositions(linVertexPositions);
253 const VxVertexOnJetAxis* primaryVertexJC(myJetCandidate->getPrimaryVertex());
255 if (primaryVertexJC==
nullptr) {
258 VxVertexOnJetAxis newPrimaryVertex;
260 newPrimaryVertex.setNumVertex(-10);
262 myJetCandidate->setPrimaryVertex(&newPrimaryVertex);
269 return myJetCandidate;
275 const std::vector<VxVertexOnJetAxis*> & associatedVertices=myJetCandidate->getVerticesOnJetAxis();
277 const std::vector<VxVertexOnJetAxis*>::const_iterator VtxBegin=associatedVertices.begin();
278 const std::vector<VxVertexOnJetAxis*>::const_iterator VtxEnd=associatedVertices.end();
283 if (!associatedVertices.empty()) {
284 for (std::vector<VxVertexOnJetAxis*>::const_iterator VtxIter=VtxBegin;VtxIter!=VtxEnd;++VtxIter) {
285 VxVertexOnJetAxis* myVertex=(*VtxIter);
286 if (myVertex!=
nullptr) {
◆ inputHandles()
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()
static const InterfaceID& Trk::JetFitterInitializationHelper::interfaceID |
( |
| ) |
|
|
inlinestatic |
◆ 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 354 of file JetFitterInitializationHelper.cxx.
361 if (linTrack!=
nullptr) {
375 const std::vector<VxVertexOnJetAxis*> & associatedVertices=myJetCandidate->getVerticesOnJetAxis();
377 const std::vector<VxVertexOnJetAxis*>::const_iterator VtxBegin=associatedVertices.begin();
378 const std::vector<VxVertexOnJetAxis*>::const_iterator VtxEnd=associatedVertices.end();
380 for (std::vector<VxVertexOnJetAxis*>::const_iterator VtxIter=VtxBegin;VtxIter!=VtxEnd;++VtxIter) {
382 int numVertex=(*VtxIter)->getNumVertex();
383 Amg::Vector3D secondaryVertexPos(getSingleVtxPositionWithSignFlip(myPosition,numVertex,signFlipTreatment));
387 const std::vector<VxTrackAtVertex*> & tracksAtVertex=(*VtxIter)->getTracksAtVertex();
389 const std::vector<VxTrackAtVertex*>::const_iterator TracksBegin=tracksAtVertex.begin();
390 const std::vector<VxTrackAtVertex*>::const_iterator TracksEnd=tracksAtVertex.end();
392 for (std::vector<VxTrackAtVertex*>::const_iterator TrackVectorIter=TracksBegin;
393 TrackVectorIter!=TracksEnd;++TrackVectorIter) {
397 if (linTrack!=
nullptr) {
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
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 289 of file JetFitterInitializationHelper.cxx.
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...");
295 int sizeOfRecVertex=myJetCandidate->getRecVertexPositions().position().rows();
298 if (numRow(numTrack)>sizeOfRecVertex) {
301 myJetCandidate->setRecVertexPositions(myJetCandidate->getConstraintVertexPositions());
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.;
314 RecVertexPositions newRecVertexPositions(newPosition,
316 myJetCandidate->getRecVertexPositions().fitQuality().chiSquared(),
317 myJetCandidate->getRecVertexPositions().fitQuality().numberDoF());
320 Amg::VectorX myPositionLinearization = myJetCandidate->getLinearizationVertexPositions().position();
321 Amg::VectorX newPositionLinearization(numRow(numTrack));
322 newPositionLinearization.setZero();
323 newPositionLinearization.segment(0,myPositionLinearization.rows()) = myPositionLinearization;
325 myJetCandidate->setRecVertexPositions(newRecVertexPositions);
326 myJetCandidate->setConstraintVertexPositions(newRecVertexPositions);
327 myJetCandidate->setLinearizationVertexPositions(newPositionLinearization);
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...");
339 bool signFlipTreatment,
340 double maxdistance)
const {
342 const VertexPositions & myLinVertexPosition=myJetCandidate->getLinearizationVertexPositions();
343 const Amg::VectorX & myPosition=myLinVertexPosition.position();
345 const VxVertexOnJetAxis* myPrimary=myJetCandidate->getPrimaryVertex();
346 const std::vector<VxTrackAtVertex*> & primaryVectorTracks=myPrimary->getTracksAtVertex();
351 const std::vector<VxTrackAtVertex*>::const_iterator primaryVectorTracksBegin=primaryVectorTracks.begin();
352 const std::vector<VxTrackAtVertex*>::const_iterator primaryVectorTracksEnd=primaryVectorTracks.end();
◆ updateVHKA()
◆ m_detStore
◆ 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
◆ m_linearizedFactory
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
The VxTrackAtVertex is a common class for all present TrkVertexFitters The VxTrackAtVertex is designe...
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
ToolHandle< IVertexLinearizedTrackFactory > m_linearizedFactory
std::vector< SG::VarHandleKeyArray * > m_vhka
VxVertexOnJetAxis inherits from Vertex.
#define ATH_MSG_VERBOSE(x)
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 VxTrackAtVe...
VxJetCandidate * initializeJetClusters(VxJetCandidate *myJetCandidate, const RecVertex *primaryVertex, const Amg::Vector3D *jetdirection=0, const Amg::Vector3D *linearizationjetdirection=0) const
Internal method to initialized a VxJetCandidate.
virtual void setOwner(IDataHandleHolder *o)=0
static void updateTrackNumbering(VxJetCandidate *)
Does the update of the ordering of the vertices along the jetaxis.
AmgSymMatrix(5) &GXFTrackState
float m_errphiJetAxis
Error on phi on the flight direction you want to initialize the fit with (set errphiJetAxis by JobOpt...
::StatusCode StatusCode
StatusCode definition for legacy code.
VxJetCandidate * 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...
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Ensure that the ATLAS eigen extensions are properly loaded.
Eigen::Matrix< double, 3, 1 > Vector3D
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
const Amg::Vector3D & linearizationPoint() const
An access to an actual linearization point.
constexpr int pow(int base, int exp) noexcept
float m_erretaJetAxis
Error on eta on the flight direction you want to initialize the fit with (set erretaJetAxis by JobOpt...
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>