|
ATLAS Offline Software
|
#include <RefitTracksAndVertex.h>
|
| RefitTracksAndVertex (const std::string &name, ISvcLocator *pSvcLocator) |
| The RefitTracksAndVertex is an implementation to add the so-called TRT momentum constraint on a track. More...
|
|
| ~RefitTracksAndVertex () |
|
StatusCode | initialize () |
| initialize method of this algorithm. More...
|
|
StatusCode | execute () |
| execute method of this algorithm that is called for each event
More...
|
|
StatusCode | finalize () |
| finalize method of this algorithm. More...
|
|
MsgStream & | dump (MsgStream &outst) const |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. 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 | 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 |
|
Definition at line 31 of file RefitTracksAndVertex.h.
◆ StoreGateSvc_t
◆ RefitTracksAndVertex()
RefitTracksAndVertex::RefitTracksAndVertex |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
The RefitTracksAndVertex is an implementation to add the so-called TRT momentum constraint on a track.
It was developed in the context of alignment, and its main idea is that if the TRT is free from "weak modes", its curvature measurement can be added as a PseudoMeasurement (PM) to a Si-only track. This extra information, taken into account while refitting the Si-only part of the track or read in by the alignment algorithms directly, can serve to eliminate the alignment weak modes from the Si tracker of ATLAS. More details can be found at: https://twiki.cern.ch/twiki/bin/view/Atlas/TRTMomConstraint
Definition at line 27 of file RefitTracksAndVertex.cxx.
◆ ~RefitTracksAndVertex()
RefitTracksAndVertex::~RefitTracksAndVertex |
( |
| ) |
|
◆ accept()
Verifies if the given track passes the track selection criteria specified via the jobOptions.
◆ addPM()
adds a PseudoMeasurement to a MeasurementSet
Definition at line 237 of file RefitTracksAndVertex.cxx.
239 sortedMS.push_back( pm ) ;
240 for(
int i=0, i_max=
ms.size() ;
i!=i_max ; ++
i ) {
241 sortedMS.push_back(
ms[
i] ) ;
◆ createPMfromSi()
creates a PseudoMeasurement with (z0, theta) from extended track perigee parameters
Definition at line 213 of file RefitTracksAndVertex.cxx.
216 std::vector<Trk::DefinedParameter> defPar ;
217 defPar.push_back(
z0 ) ;
218 defPar.push_back(
theta ) ;
219 if( !mp->covariance() )
return nullptr;
223 covFromSi( 0, 0 ) = (*mp->covariance())(
Trk::
z0,
Trk::
z0 ) ;
225 covFromSi( 1, 0 ) = (*mp->covariance())(
Trk::
z0,
Trk::
theta ) ;
226 covFromSi( 0, 1 ) = (*mp->covariance())(
Trk::
z0,
Trk::
theta ) ;
◆ 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()
◆ dump()
MsgStream & RefitTracksAndVertex::dump |
( |
MsgStream & |
outst | ) |
const |
Definition at line 345 of file RefitTracksAndVertex.cxx.
347 outst <<
"|-------------------------------------------------------------------";
348 outst <<
"-----------------------------|" << std::endl ;
349 outst <<
"| processed : "
353 outst <<
"| accepted by track presel. : "
357 outst <<
"| accepted by track presel. + PM : "
361 outst <<
"| ------------------------------------------------------------------";
362 outst <<
"---------------------------- |" << std::endl ;
363 outst <<
"| reject by # PIX hits : "
367 outst <<
"| reject by # SCT hits : "
371 outst <<
"| reject by # TRT hits : "
375 outst <<
"| ------------------------------------------------------------------";
376 outst <<
"---------------------------- |" << std::endl ;
377 outst <<
"| reject by exist. PM(TRT) : "
381 outst <<
"|-------------------------------------------------------------------";
382 outst <<
"-----------------------------|" << std::endl ;
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode RefitTracksAndVertex::execute |
( |
| ) |
|
execute method of this algorithm that is called for each event
Definition at line 123 of file RefitTracksAndVertex.cxx.
135 return StatusCode::SUCCESS;
144 theVertexContainer->setStore( theVertexAuxContainer );
157 std::vector< const Trk::TrackParameters* > trackParametersToFit;
162 return StatusCode::SUCCESS;
167 auto track = trackParticle->track();
175 if(newTrack->perigeeParameters())
176 trackParametersToFit.push_back( newTrack->perigeeParameters() );
179 if(
track->perigeeParameters())
180 trackParametersToFit.push_back(
track->perigeeParameters() );
190 if(trackParametersToFit.size() > 1){
209 return StatusCode::SUCCESS;
◆ 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
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode RefitTracksAndVertex::finalize |
( |
| ) |
|
finalize method of this algorithm.
Prints out a summary of all events
Definition at line 118 of file RefitTracksAndVertex.cxx.
120 return StatusCode::SUCCESS;
◆ fitSCTOnlyTrack()
Strips of all TRT hits from the track and replaces them with a TRT momentum constraint from a the TRT segment belonging to the (extended) track (returns NULL in case of failure)
Definition at line 246 of file RefitTracksAndVertex.cxx.
253 ATH_MSG_WARNING(
"RefitTracksAndVertex() : No Perigee parameter on track!");
267 for ( ;
it!=itEnd; ++
it){
273 if (rio !=
nullptr) {
276 setSCT.push_back ( *
it ) ;
278 setTRT.push_back ( *
it ) ;
280 setPix.push_back ( *
it ) ;
289 ATH_MSG_DEBUG(
"RefitTracksAndVertex() : Found " << setSCT.size() <<
" SCT measurm's!" ) ;
290 ATH_MSG_DEBUG(
"RefitTracksAndVertex() : Found " << setPix.size() <<
" Pix measurm's!" ) ;
291 ATH_MSG_DEBUG(
"RefitTracksAndVertex() : Found " << setTRT.size() <<
" TRT measurm's!") ;
303 ATH_MSG_ERROR(
"RefitTracksAndVertex() : PseudoMeasurementOnTrack creation failed! " );
306 ATH_MSG_DEBUG(
"RefitTracksAndVertex() : pmFromSi " << *pmFromSi) ;
311 for(
int i=0, i_max=setTRT.size() ;
i!=i_max ; ++
i ) {
312 setSCT.push_back( setTRT[
i] ) ;
315 ATH_MSG_VERBOSE (
"RefitTracksAndVertex() : Si+PM MeasurementSet : " );
316 for(
int i=0, i_max=setSCT.size() ;
i!=i_max ; ++
i ) {
332 ATH_MSG_DEBUG(
"RefitTracksAndVertex() : Fit of SCT part of the track failed! " ) ;
◆ initialize()
StatusCode RefitTracksAndVertex::initialize |
( |
| ) |
|
initialize method of this algorithm.
Definition at line 70 of file RefitTracksAndVertex.cxx.
82 return StatusCode::FAILURE;
106 "Track selection will be applied:"
115 return StatusCode::SUCCESS;
◆ 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.
◆ 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()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_addPM
bool RefitTracksAndVertex::m_addPM |
|
private |
◆ m_applyTrkSel
bool RefitTracksAndVertex::m_applyTrkSel |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_idHelper
◆ m_nRejectPIX
size_t RefitTracksAndVertex::m_nRejectPIX |
|
private |
Counter for number of tracks failing the min number of PIX hits req.
Definition at line 82 of file RefitTracksAndVertex.h.
◆ m_nRejectPM
size_t RefitTracksAndVertex::m_nRejectPM |
|
private |
Counter for number of tracks failing the addition of a pseudo-measurement (PM)
Definition at line 85 of file RefitTracksAndVertex.h.
◆ m_nRejectSCT
size_t RefitTracksAndVertex::m_nRejectSCT |
|
private |
◆ m_nRejectTRT
size_t RefitTracksAndVertex::m_nRejectTRT |
|
private |
◆ m_nTracksAccepted
size_t RefitTracksAndVertex::m_nTracksAccepted |
|
private |
Counter for number of tracks passing the preselection and with PM.
Definition at line 81 of file RefitTracksAndVertex.h.
◆ m_nTracksPresel
size_t RefitTracksAndVertex::m_nTracksPresel |
|
private |
◆ m_nTracksProcessed
size_t RefitTracksAndVertex::m_nTracksProcessed |
|
private |
◆ m_outputVertexContainerName
std::string RefitTracksAndVertex::m_outputVertexContainerName |
|
private |
◆ m_refitTracks
bool RefitTracksAndVertex::m_refitTracks |
|
private |
◆ m_selEtaMax
double RefitTracksAndVertex::m_selEtaMax |
|
private |
◆ m_selEtaMin
double RefitTracksAndVertex::m_selEtaMin |
|
private |
◆ m_selNHitPIXMin
int RefitTracksAndVertex::m_selNHitPIXMin |
|
private |
◆ m_selNHitSCTMin
int RefitTracksAndVertex::m_selNHitSCTMin |
|
private |
◆ m_selPtMin
double RefitTracksAndVertex::m_selPtMin |
|
private |
◆ m_trackFitter
◆ m_trackListOutput
std::string RefitTracksAndVertex::m_trackListOutput |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vertexFitter
◆ m_vertexListInput
std::string RefitTracksAndVertex::m_vertexListInput |
|
private |
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
bool is_pixel(Identifier id) const
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
Temporary container used until we have I/O for AuxStoreInternal.
const AtlasDetectorID * m_idHelper
Detector ID helper.
bool is_sct(Identifier id) const
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
ToolHandle< Trk::IVertexFitter > m_vertexFitter
The TrackFitter to refit the tracks (segment, momentum constraint)
ToolHandle< Trk::ITrackFitter > m_trackFitter
The TrackFitter to refit the tracks (segment, momentum constraint)
Scalar theta() const
theta method
const Trk::MeasurementSet addPM(Trk::MeasurementSet &ms, const Trk::PseudoMeasurementOnTrack *pm)
adds a PseudoMeasurement to a MeasurementSet
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
double m_selPtMin
minimal pT cut value for the TrackSelection
const Amg::Vector3D & position() const
Returns the 3-pos.
bool is_trt(Identifier id) const
#define ATH_MSG_VERBOSE(x)
bool const RAWDATA *ch2 const
std::string m_trackListOutput
Name of the TrackCollection (Output)
VertexContainer_v1 VertexContainer
Definition of the current "Vertex container version".
#define AmgSymMatrix(dim)
std::pair< double, ParamDefs > DefinedParameter
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
size_t m_nRejectPM
Counter for number of tracks failing the addition of a pseudo-measurement (PM)
Class to handle pseudo-measurements in fitters and on track objects.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
size_t m_nTracksPresel
Counter for number of tracks passing the preselection.
std::string m_outputVertexContainerName
Name of vertex container.
virtual StatusCode sysInitialize() override
Override sysInitialize.
double m_selEtaMin
minimal eta cut value for the TrackSelection
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
VertexAuxContainer_v1 VertexAuxContainer
Definition of the current jet auxiliary container.
int m_selNHitSCTMin
minimal number of SCT hits cut value for the TrackSelection
DataVector< Trk::Track > TrackCollection
This typedef represents a collection of Trk::Track objects.
size_t m_nRejectTRT
Counter for number of tracks failing the min number of TRT hits req.
const Trk::PseudoMeasurementOnTrack * createPMfromSi(const Trk::Perigee *mp)
creates a PseudoMeasurement with (z0, theta) from extended track perigee parameters
::StatusCode StatusCode
StatusCode definition for legacy code.
size_t m_nRejectSCT
Counter for number of tracks failing the min number of SCT hits req.
#define CHECK(...)
Evaluate an expression and check for errors.
const TrackParticle * trackParticle(size_t i) const
Get the pointer to a given track that was used in vertex reco.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
int m_selNHitPIXMin
minimal number of PIX hits cut value for the TrackSelection
virtual void renounce()=0
std::vector< const MeasurementBase * > MeasurementSet
vector of fittable measurements
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
const Perigee * perigeeParameters() const
return Perigee.
Ensure that the ATLAS eigen extensions are properly loaded.
bool m_applyTrkSel
apply a selection on tracks or not
value_type push_back(value_type pElem)
Add an element to the end of the collection.
std::string m_vertexListInput
Name of the TrackCollection (input)
Eigen::Matrix< double, 3, 1 > Vector3D
DataObjIDColl m_extendedExtraObjects
Class describing a Vertex.
size_t m_nTracksProcessed
Counter for number of tracks processed.
#define ATH_MSG_WARNING(x)
bool m_addPM
apply a pseudo measurement based on the original track (theta,z0)
Identifier identify() const
return the identifier -extends MeasurementBase
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Trk::Track * fitSCTOnlyTrack(const Trk::Track *track)
Strips of all TRT hits from the track and replaces them with a TRT momentum constraint from a the TRT...
@ PseudoMeasurementOnTrack
AthAlgorithm()
Default constructor:
size_t m_nTracksAccepted
Counter for number of tracks passing the preselection and with PM.
bool m_refitTracks
refitTracks
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
size_t m_nRejectPIX
Counter for number of tracks failing the min number of PIX hits req.
double m_selEtaMax
maximal eta cut value for the TrackSelection