Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
10 #include "GaudiKernel/TypeNameString.h"
11 #include "GaudiKernel/SystemOfUnits.h"
18 #include "Identifier/Identifier.h"
30 , m_vertexListInput(
"PrimaryVertices")
31 , m_trackListOutput(
"SiTracksWithRefitTracksAndVertex")
32 , m_outputVertexContainerName(
"RefittedPrimaryVertex")
33 , m_trackFitter(
"Trk::GlobalChi2Fitter/InDetTrackFitter")
34 , m_vertexFitter(
"Trk::FullVertexFitter")
35 , m_applyTrkSel(false)
43 , m_nTracksProcessed(0)
45 , m_nTracksAccepted(0)
82 return StatusCode::FAILURE;
106 "Track selection will be applied:"
115 return StatusCode::SUCCESS;
120 return StatusCode::SUCCESS;
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;
216 std::vector<Trk::DefinedParameter> defPar ;
217 defPar.push_back(
z0 ) ;
218 defPar.push_back(
theta ) ;
219 if( !mp->covariance() )
return nullptr;
239 sortedMS.push_back( pm ) ;
240 for(
int i=0, i_max=
ms.size() ;
i!=i_max ; ++
i ) {
241 sortedMS.push_back(
ms[
i] ) ;
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! " ) ;
342 return alg.dump( outst ) ;
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 ;
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
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)
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.
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.
virtual const S & associatedSurface() const override final
Access to the Surface method.
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.
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
std::string m_outputVertexContainerName
Name of vertex container.
double m_selEtaMin
minimal eta cut value for the TrackSelection
RefitTracksAndVertex(const std::string &name, ISvcLocator *pSvcLocator)
The RefitTracksAndVertex is an implementation to add the so-called TRT momentum constraint on a track...
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.
MsgStream & dump(MsgStream &outst) const
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.
int m_selNHitPIXMin
minimal number of PIX hits cut value for the TrackSelection
std::vector< const MeasurementBase * > MeasurementSet
vector of fittable measurements
const Perigee * perigeeParameters() const
return Perigee.
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
StatusCode initialize()
initialize method of this algorithm.
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
StatusCode finalize()
finalize method of this algorithm.
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
size_t m_nTracksAccepted
Counter for number of tracks passing the preselection and with PM.
StatusCode execute()
execute method of this algorithm that is called for each event
bool m_refitTracks
refitTracks
size_type size() const noexcept
Returns the number of elements in the collection.
size_t m_nRejectPIX
Counter for number of tracks failing the min number of PIX hits req.
MsgStream & operator<<(MsgStream &outst, const RefitTracksAndVertex &alg)
double m_selEtaMax
maximal eta cut value for the TrackSelection