ATLAS Offline Software
Loading...
Searching...
No Matches
InDet::TRT_SeededTrackFinder Class Reference

InDet::TRT_SeededTrackFinde is an algorithm which produces tracks moving outside-in in the Inner Detector. More...

#include <TRT_SeededTrackFinder.h>

Inheritance diagram for InDet::TRT_SeededTrackFinder:
Collaboration diagram for InDet::TRT_SeededTrackFinder:

Classes

struct  Stat_t
 Global Counters for final algorithm statistics. More...

Public Member Functions

 TRT_SeededTrackFinder (const std::string &name, ISvcLocator *pSvcLocator)
 Standard Algorithm methods.
virtual ~TRT_SeededTrackFinder ()
StatusCode initialize () override
StatusCode execute (const EventContext &ctx) const override
StatusCode finalize () override
MsgStream & dump (MsgStream &out) const
 Print internal tool parameters and status.
std::ostream & dump (std::ostream &out) const
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
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 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

Protected Member Functions

Trk::TrackmergeSegments (const Trk::Track &, const Trk::TrackSegment &) const
 Protected methods.
Trk::TrackmergeExtension (const Trk::Track &, std::vector< const Trk::MeasurementBase * > &) const
 Merge a TRT track extension and a Si track component into one global ID track.
Trk::TracksegToTrack (const EventContext &, const Trk::TrackSegment &) const
 Transform a TRT track segment into a track.
void Analyze (TrackCollection *) const
 Do some statistics analysis at the end of each event.
MsgStream & dumptools (MsgStream &out) const
MsgStream & dumpevent (MsgStream &out, const InDet::TRT_SeededTrackFinder::Stat_t &stat) const
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.

Protected Attributes

BooleanProperty m_doRefit {this, "FinalRefit", false, "Do a final careful refit of tracks"}
BooleanProperty m_doExtension {this, "TrtExtension", false, "Find the TRT extension of the track"}
BooleanProperty m_rejectShortExten {this, "RejectShortExtension", false, "Reject short extensions"}
BooleanProperty m_doStat {this, "FinalStatistics", false, "Statistics of final tracks"}
BooleanProperty m_saveTRT {this, "OutputSegments", true, "Save stand-alone TRT segments"}
IntegerProperty m_MaxSegNum
UnsignedIntegerProperty m_minTRTonSegment {this, "MinTRTonSegment", 10, "Minimum Number of TRT Hits on segment"}
UnsignedIntegerProperty m_minTRTonly {this, "MinTRTonly", 15, "Minimum number of TRT hits on TRT only"}
ToolHandle< ITRT_SeededTrackFinderm_trackmaker
ToolHandle< Trk::ITrackFitterm_fitterTool
ToolHandle< ITRT_TrackExtensionToolm_trtExtension
SG::ReadHandleKey< Trk::SegmentCollectionm_SegmentsKey {this, "InputSegmentsLocation", "TRTSegments", "TRT segments to use"}
SG::WriteHandleKey< TrackCollectionm_outTracksKey
SG::ReadHandleKey< Trk::PRDtoTrackMapm_prdToTrackMap {this, "PRDtoTrackMap", "" }
ToolHandle< Trk::IExtendedTrackSummaryToolm_trackSummaryTool {this, "TrackSummaryTool", "InDetTrackSummaryToolNoHoleSearch"}
ToolHandle< Trk::IExtrapolatorm_extrapolator {this, "Extrapolator", ""}
SG::ReadCondHandleKey< InDet::BeamSpotDatam_beamSpotKey {this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"}
BooleanProperty m_SiExtensionCuts {this, "SiExtensionCuts", false, "enable cuts after Si segment finding"}
DoubleProperty m_minPt {this, "minPt", 500., "minimal Pt cut"}
DoubleProperty m_maxEta {this, "maxEta", 2.7, "maximal Eta cut"}
DoubleProperty m_maxRPhiImp {this, "maxRPhiImp", 10., "maximal RPhi impact parameter cut"}
DoubleProperty m_maxZImp {this, "maxZImp", 250., "maximal z impact parameter cut"}
BooleanProperty m_caloSeededRoI {this, "CaloSeededRoI", false}
SG::ReadHandleKey< ROIPhiRZContainerm_caloClusterROIKey
ToolHandle< IRegSelToolm_regionSelector
FloatProperty m_deltaEta {this, "dEtaCaloRoI", 0.1, "delta Eta used for RoI creation"}
FloatProperty m_deltaPhi {this, "dPhiCaloRoI", 0.25, "delta Phi used for RoI creation"}
FloatProperty m_deltaZ {this, "dZCaloRoI", 300., "delta Z used for RoI creation"}
std::mutex m_statMutex ATLAS_THREAD_SAFE
Stat_t m_totalStat ATLAS_THREAD_SAFE

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
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

InDet::TRT_SeededTrackFinde is an algorithm which produces tracks moving outside-in in the Inner Detector.

Definition at line 54 of file TRT_SeededTrackFinder.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TRT_SeededTrackFinder()

InDet::TRT_SeededTrackFinder::TRT_SeededTrackFinder ( const std::string & name,
ISvcLocator * pSvcLocator )

Standard Algorithm methods.

Definition at line 38 of file TRT_SeededTrackFinder.cxx.

40 : AthReentrantAlgorithm(name, pSvcLocator)
41{ }

◆ ~TRT_SeededTrackFinder()

virtual InDet::TRT_SeededTrackFinder::~TRT_SeededTrackFinder ( )
inlinevirtual

Definition at line 67 of file TRT_SeededTrackFinder.h.

67{}

Member Function Documentation

◆ Analyze()

void InDet::TRT_SeededTrackFinder::Analyze ( TrackCollection * tC) const
protected

Do some statistics analysis at the end of each event.

Loop over tracks in track collection

Concentrate on the Si component of the track

Definition at line 673 of file TRT_SeededTrackFinder.cxx.

673 {
674 if(msgLvl(MSG::DEBUG)) {
675 ATH_MSG_DEBUG( "Analyzing tracks..." );
676 ATH_MSG_DEBUG( "Number of back tracks " << (tC->size()) );
677 int nsct1{}, nsct2{}, nsct3{}, nsct4{}; //SCT layer counters
678 int nsctTot1{}, nsctTot2{}, nsctTot3{}, nsctTot4{}; //SCT layer counters
679 int npix1{}, npix2{}, npix3{}; //Pixel layer counters
680 int npixTot1{}, npixTot2{}, npixTot3{}; //Pixel layer counters
684 for (; r != re ; ++r){
685 nsct1=nsct2=nsct3=nsct4=0; npix1=npix2=npix3=0;
686 const Trk::TrackStates* newtsos = (*r)->trackStateOnSurfaces();
687 if(!newtsos) continue;
688 Trk::TrackStates::const_iterator itp, itpe=newtsos->end();
689 for(itp=newtsos->begin(); itp!=itpe; ++itp){
691 const InDet::SiClusterOnTrack* clus = dynamic_cast<const InDet::SiClusterOnTrack*>((*itp)->measurementOnTrack());
692 if(clus && ((*itp)->type(Trk::TrackStateOnSurface::Measurement))){ //Count the number of hits used in the track
693 double rc = clus->globalPosition().perp();
694 if((40.<=rc)&&(rc<80.)){npix1++;} //1st pixel layer
695 if((80.<=rc)&&(rc<100.)){npix2++;} //2nd pixel layer
696 if((100.<=rc)&&(rc<150.)){npix3++;} //3rd pixel layer
697 if((280.<=rc)&&(rc<340.)){nsct1++;} //1st SCT layer
698 if((340.<=rc)&&(rc<390.)){nsct2++;} //2nd SCT layer
699 if((390.<=rc)&&(rc<460.)){nsct3++;} //3rd SCT layer
700 if((460.<=rc)&&(rc<550.)){nsct4++;} //4th SCT layer
701 }
702 }
703 nsctTot1+=nsct1; nsctTot2+=nsct2; nsctTot3+=nsct3; nsctTot4+=nsct4;
704 npixTot1+=npix1; npixTot2+=npix2; npixTot3+=npix3;
705 }
706 ATH_MSG_DEBUG("Total hits on 1st SCT: "<<nsctTot1<<" 2nd SCT: "<<nsctTot2<<" 3rd SCT: "<<nsctTot3<<" 4th SCT: "<<nsctTot4);
707 ATH_MSG_DEBUG("Total hits on 1st Pixel: "<<npixTot1<<" 2nd Pixel: "<<npixTot2<<" 3rd Pixel: "<<npixTot3);
708 }
709}
const std::regex re(r_e)
#define ATH_MSG_DEBUG(x)
static Double_t rc
bool msgLvl(const MSG::Level lvl) const
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
virtual const Amg::Vector3D & globalPosition() const override
returns global position (gathered through Surface constraint)
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
int r
Definition globals.cxx:22
DataVector< const Trk::TrackStateOnSurface > TrackStates

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

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

Definition at line 95 of file AthCommonDataStore.h.

◆ dump() [1/2]

MsgStream & InDet::TRT_SeededTrackFinder::dump ( MsgStream & out) const

Print internal tool parameters and status.

◆ dump() [2/2]

std::ostream & InDet::TRT_SeededTrackFinder::dump ( std::ostream & out) const

◆ dumpevent()

MsgStream & InDet::TRT_SeededTrackFinder::dumpevent ( MsgStream & out,
const InDet::TRT_SeededTrackFinder::Stat_t & stat ) const
protected

Definition at line 463 of file TRT_SeededTrackFinder.cxx.

464{
465 out<<"|-------------------------------------------------------------------"<<std::endl;
466 out<<"| Investigated :"<<std::endl
467 <<"| "<<std::setw(7)<<stat.m_counter[Stat_t::kNTrtSeg] <<" TRT Segments on input"<<std::endl
468 <<"| "<<std::setw(7)<<stat.m_counter[Stat_t::kNTrtFailSel] <<" TRT Segments fail selection on input"<<std::endl
469 <<"| "<<std::setw(7)<<stat.m_counter[Stat_t::Stat_t::kNTrtSegGood] <<" TRT Segments after selection"<<std::endl;
470 if (stat.m_counter[Stat_t::kNTrtLimit]>0) {
471 out<<"|-------------------------------------------------------------------"<<std::endl;
472 out<<"| "<<std::setw(7)<<stat.m_counter[Stat_t::kNTrtLimit] <<" TRT segments lost because of processing limit"<<std::endl;
473 }
474 out<<"|-------------------------------------------------------------------"<<std::endl;
475 out<<"| "<<std::setw(7)<<stat.m_counter[Stat_t::kNTrtNoSiExt] <<" TRT segments without Si extension"<<std::endl;
476 if (m_SiExtensionCuts) {
477 out<<"| "<<std::setw(7)<<stat.m_counter[Stat_t::kNExtCut] <<" number of Si extension failing cuts"<<std::endl;
478 }
479 if (stat.m_counter[Stat_t::Stat_t::kNBckTrkTrt]>0) {
480 out<<"| "<<std::setw(7)<<stat.m_counter[Stat_t::Stat_t::kNBckTrkTrt] <<" number ot TRT only tracks created"<<std::endl;
481 }
482 if (m_doExtension) {
483 out<<"|-------------------------------------------------------------------"<<std::endl;
484 out<<"| "<<std::setw(7)<<stat.m_counter[Stat_t::Stat_t::kNTrtExtCalls]<<" number of times TRT extension is called"<<std::endl
485 <<"| "<<std::setw(7)<<stat.m_counter[Stat_t::kNTrtExt] <<" number of good TRT extension"<<std::endl;
486 if (m_rejectShortExten) {
487 out<<"| "<<std::setw(7)<<stat.m_counter[Stat_t::Stat_t::kNTrtExtBad]<<" number of bad TRT extension"<<std::endl;
488 }
489 out<<"| "<<std::setw(7)<<stat.m_counter[Stat_t::Stat_t::kNTrtExtFail]<<" number of failed TRT extension and fallback"<<std::endl;
490 }
491 out<<"|-------------------------------------------------------------------"<<std::endl;
492 out<<"| "<<std::setw(7)<<stat.m_counter[Stat_t::Stat_t::kNBckTrkSi] <<" TRT+Si tracks created of output"<<std::endl;
493 if (stat.m_counter[Stat_t::kNBckTrkSi] != stat.m_counter[Stat_t::kNBckTrk]) {
494 out<<"| "<<std::setw(7)<<stat.m_counter[Stat_t::kNBckTrk] <<" total number of tracks on output"<<std::endl;
495 }
496 out<<"|-------------------------------------------------------------------";
497 return out;
498}
@ kNTrtFailSel
Number of TRT segments to be investigated per event.
@ kNTrtNoSiExt
Number of TRT segments lost in busy events.
@ kNBckTrk
Number of back tracks found with Si extension per event.
@ kNTrtLimit
Number of TRT segments that will be investigated per event.
@ kNBckTrkSi
Number of failed TRT extensions.
@ kNExtCut
Number of TRT segments not extended in Si.
@ kNTrtExt
Number of times the TRT extension is called.

◆ dumptools()

MsgStream & InDet::TRT_SeededTrackFinder::dumptools ( MsgStream & out) const
protected

Definition at line 432 of file TRT_SeededTrackFinder.cxx.

433{
434 int n = 65-m_trackmaker.type().size();
435 std::string s1; for(int i=0; i<n; ++i) s1.append(" "); s1.append("|");
436 n = 65-m_fitterTool.type().size();
437 std::string s2; for(int i=0; i<n; ++i) s2.append(" "); s2.append("|");
438 n = 65-m_trtExtension.type().size();
439 std::string s3; for(int i=0; i<n; ++i) s3.append(" "); s3.append("|");
440 n = 65-m_SegmentsKey.key().size();
441 std::string s4; for(int i=0; i<n; ++i) s4.append(" "); s4.append("|");
442 n = 65-m_outTracksKey.key().size();
443 std::string s5; for(int i=0; i<n; ++i) s5.append(" "); s5.append("|");
444
445 out<<"|----------------------------------------------------------------------"
446 <<"-------------------|"
447 <<std::endl;
448 out<<"| Tool for TRT seeded track finding | "<<m_trackmaker.type() <<s1<<std::endl;
449 out<<"| Tool for final track refitting | "<<m_fitterTool.type() <<s2<<std::endl;
450 out<<"| Tool for TRT trac extension | "<<m_trtExtension.type() <<s3<<std::endl;
451 out<<"| Location of input tracks | "<<m_SegmentsKey.key() <<s4<<std::endl;
452 out<<"| Location of output tracks | "<<m_outTracksKey.key() <<s5<<std::endl;
453 out<<"|----------------------------------------------------------------------"
454 <<"-------------------|"
455 <<std::endl;
456 return out;
457}
ToolHandle< ITRT_SeededTrackFinder > m_trackmaker
ToolHandle< ITRT_TrackExtensionTool > m_trtExtension
ToolHandle< Trk::ITrackFitter > m_fitterTool
SG::WriteHandleKey< TrackCollection > m_outTracksKey
SG::ReadHandleKey< Trk::SegmentCollection > m_SegmentsKey

◆ evtStore()

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

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

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode InDet::TRT_SeededTrackFinder::execute ( const EventContext & ctx) const
override

Transform the original TRT segment into a track

Definition at line 118 of file TRT_SeededTrackFinder.cxx.

118 {
119 //Counters. See the include file for definitions
120 Stat_t ev_stat;
121 // counter
122 int nTrtSegCur = 0;
123 SG::ReadHandle<Trk::SegmentCollection> segments(m_SegmentsKey,ctx);
124 if(!segments.isValid()){
125 ATH_MSG_FATAL ("No segment with name " << segments.name() << " found in StoreGate!");
126 return StatusCode::FAILURE;
127 } else {
128 ATH_MSG_DEBUG ("Found segments collection " << segments.name() << " in StoreGate!");
129 }
130 // number of segments + statistics
131 ev_stat.m_counter[Stat_t::kNTrtSeg] = int(segments->size());
132 ATH_MSG_DEBUG ("TRT track container size " << ev_stat.m_counter[Stat_t::kNTrtSeg]);
133 if(ev_stat.m_counter[Stat_t::kNTrtSeg]>m_MaxSegNum) {
134 ATH_MSG_DEBUG ("TRT track container size huge; will process event partially if number of max segments reached !!!");
135 }
136 // Event dependent data of SiCombinatorialTrackFinder_xk
137 //Total stack use for this function is 828640 bytes.
138 //coverity[STACK_USE]
139 InDet::ExtendedSiCombinatorialTrackFinderData_xk combinatorialData(m_prdToTrackMap);
140 std::unique_ptr<InDet::ITRT_SeededTrackFinder::IEventData> event_data_p;
141 if(m_caloSeededRoI ) {
142 SG::ReadHandle<ROIPhiRZContainer> calo_rois(m_caloClusterROIKey, ctx);
143 std::unique_ptr<RoiDescriptor> roiComp = std::make_unique<RoiDescriptor>(true);
144 if (calo_rois.isValid()) {
145 RoiDescriptor * roi =nullptr;
146 SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey, ctx };
147 double beamZ = beamSpotHandle->beamVtx().position().z();
148 roiComp->clear();
149 roiComp->setComposite();
150 for (const ROIPhiRZ &the_roi : *calo_rois) {
151 double eta = the_roi.eta();
152 double phi = the_roi.phi();
153 double roiPhiMin = phi -m_deltaPhi;
154 double roiPhiMax = phi +m_deltaPhi;
155 double roiEtaMin = eta -m_deltaEta;
156 double roiEtaMax = eta +m_deltaEta;
157 double roiZMin = beamZ -m_deltaZ;
158 double roiZMax = beamZ +m_deltaZ;
159 roi = new RoiDescriptor( eta, roiEtaMin, roiEtaMax,phi, roiPhiMin ,roiPhiMax, beamZ, roiZMin,roiZMax);
160 roiComp->push_back(roi);
161 }
162
163 }
164 std::vector<IdentifierHash> listOfSCTIds;
165 std::vector<IdentifierHash> listOfPixIds;
166
167 m_regionSelector->lookup(ctx)->HashIDList( *roiComp, listOfSCTIds );
168
169 event_data_p = m_trackmaker->newRegion(ctx, combinatorialData, listOfPixIds, listOfSCTIds);
170 } else {
171 event_data_p = m_trackmaker->newEvent(ctx, combinatorialData);
172 }
173
174 std::unique_ptr<InDet::ITRT_TrackExtensionTool::IEventData> ext_event_data_p( m_trtExtension->newEvent(ctx) );
175 std::unique_ptr<TrackCollection> outTracks = std::make_unique<TrackCollection>();
176 std::vector<Trk::Track*> tempTracks; //Temporary track collection
177 tempTracks.reserve(128);
178 // loop over event
179 ATH_MSG_DEBUG ("Begin looping over all TRT segments in the event");
180 Trk::SegmentCollection::const_iterator iseg = segments->begin();
181 Trk::SegmentCollection::const_iterator isegEnd = segments->end();
183 for(; iseg != isegEnd; ++ iseg) {
184 // Get the track segment
185 const Trk::TrackSegment *trackTRT = dynamic_cast<const Trk::TrackSegment*>(*iseg);
186 if(!trackTRT){
187 ATH_MSG_ERROR ("No pointer to segment !");
188 continue;
189 } else {
190 // the segment finder is applying a TRT(eta) cut and a pt preselection, so we don't do that here
191 //Ask for at least 10 TRT hits in order to process
193 ATH_MSG_DEBUG ("TRT segment fails nTRT hit cut, reject.");
194 // statistics
195 ev_stat.m_counter[Stat_t::kNTrtFailSel]++;
196 } else {
197 // do we continue to process ?
198 nTrtSegCur++;
199 if(nTrtSegCur>=m_MaxSegNum) {
200 ATH_MSG_DEBUG ("====> Reached maximal number of segments in event, stop !!!");
201 // statistics
202 ev_stat.m_counter[Stat_t::kNTrtLimit]++;
203 break;
204 }
205 // Get the number of the TRT track segment ROTs
206 ATH_MSG_DEBUG ("=> New segment to process, number Of TRT ROTs : " << (trackTRT->numberOfMeasurementBases()));
207 // statistics
208 ev_stat.m_counter[Stat_t::Stat_t::kNTrtSegGood]++;
209 // ok, call track maker and get list of possible track candidates
210 std::list<Trk::Track*> trackSi = m_trackmaker->getTrack(ctx, *event_data_p, *trackTRT); //Get the possible Si extensions
211 if (trackSi.empty()) {
212 ATH_MSG_DEBUG ("No Si track candidates associated to the TRT track ");
213 // statistics
214 ev_stat.m_counter[Stat_t::kNTrtNoSiExt]++;
215 // obsolete backup of TRT only
218 Trk::Track* trtSeg = nullptr;trtSeg = segToTrack(ctx, *trackTRT);
219 if(!trtSeg) {
220 ATH_MSG_DEBUG ("Failed to make a track out of the TRT segment!");
221 continue;
222 }
223 // statistics
224 ev_stat.m_counter[Stat_t::kNBckTrk]++; ev_stat.m_counter[Stat_t::Stat_t::kNBckTrkTrt]++;
225 // add track to output list
226 outTracks->push_back(trtSeg);
227 }
228 continue;
229 } else {
230 // Found useful extensions
231 ATH_MSG_DEBUG ("Found " << (trackSi.size()) << " Si tracks associated to the TRT track ");
232 // Merge the resolved Si extensions with the original TRT track segment
233 std::list<Trk::Track*>::const_iterator itt = trackSi.begin();
234 std::list<Trk::Track*>::const_iterator ittEnd = trackSi.end();
235 for (; itt != ittEnd ; ++itt){
236 tempTracks.push_back(*itt);
237 // get list of TSOS
238 const Trk::TrackStates* temptsos = (*itt)->trackStateOnSurfaces();
239 if (!temptsos) {
240 ATH_MSG_DEBUG ("Silicon extension empty ???");
241 continue;
242 }
243 // Add the track to the list of tracks in the event
244 ATH_MSG_DEBUG ("Silicon extension found has length of : " << temptsos->size());
245 // do we do a preselection ?
246 if (m_SiExtensionCuts) {
247 // get parameters without errors
248 auto input = (*itt)->trackParameters()->front()->uniqueClone();
249 // cuts on parameters
250 if (std::abs(input->pT()) < m_minPt) {
251 ATH_MSG_DEBUG ("Track pt < "<<m_minPt<<", reject it");
252 // statistics
253 ev_stat.m_counter[Stat_t::kNExtCut]++;
254 continue;
255 }
256 if (std::abs(input->eta()) > m_maxEta) {
257 ATH_MSG_DEBUG ("Track eta > "<<m_maxEta<<", reject it");
258 // statistics
259 ev_stat.m_counter[Stat_t::kNExtCut]++;
260 continue;
261 }
262 // --- beam spot position
263 Amg::Vector3D beamSpotPosition(0,0,0);
265 SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle { m_beamSpotKey, ctx };
266 beamSpotPosition = beamSpotHandle->beamVtx().position();
267 }
268 // --- create surface
269 Trk::PerigeeSurface perigeeSurface(beamSpotPosition);
270
271 // uses perigee on track or extrapolates, no material in any case, we cut on impacts
272 std::unique_ptr<const Trk::TrackParameters> parm =
273 m_extrapolator->extrapolateDirectly(
274 ctx, *input, perigeeSurface);
275 std::unique_ptr<const Trk::Perigee> extrapolatedPerigee = nullptr;
276 if (parm && parm->associatedSurface().type() == Trk::SurfaceType::Perigee) {
277 extrapolatedPerigee.reset(static_cast<const Trk::Perigee*>(parm.release()));
278 }
279 if (!extrapolatedPerigee) {
280 ATH_MSG_WARNING("Extrapolation of perigee failed, this should never happen" );
281 // statistics
282 ev_stat.m_counter[Stat_t::kNExtCut]++;
283 continue;
284 }
285
286 ATH_MSG_VERBOSE ("extrapolated perigee: "<<*extrapolatedPerigee);
287 if (std::abs(extrapolatedPerigee->parameters()[Trk::d0]) > m_maxRPhiImp) {
288 ATH_MSG_DEBUG ("Track Rphi impact > "<<m_maxRPhiImp<<", reject it");
289 // statistics
290 ev_stat.m_counter[Stat_t::kNExtCut]++;
291 continue;
292 }
293 if (std::abs(extrapolatedPerigee->parameters()[Trk::z0]) > m_maxZImp) {
294 ATH_MSG_DEBUG ("Track Z impact > "<<m_maxZImp<<", reject it");
295 // statistics
296 ev_stat.m_counter[Stat_t::kNExtCut]++;
297 continue;
298 }
299 }
300
301 // do re run a Track extension into TRT ?
302 Trk::Track* globalTrackNew = nullptr;
303 // do we have 4 and extension is enabled ?
304 if(int(temptsos->size())>=4 && m_doExtension){
305 // Add the track to the list of tracks in the event
306 ATH_MSG_DEBUG ("Try to improve TRT calling extension tool.");
307 // statistics
308 ev_stat.m_counter[Stat_t::Stat_t::kNTrtExtCalls]++;
309 // call extension tool
310 std::vector<const Trk::MeasurementBase*>& tn =
311 m_trtExtension->extendTrack(ctx, *(*itt), *ext_event_data_p, map);
312 if (tn.empty()) {
313 // Fallback if extension failed
314 ATH_MSG_DEBUG ("No new segment found, use input segment as fallback.");
315 // statistics
316 ev_stat.m_counter[Stat_t::Stat_t::kNTrtExtFail]++;
317 // merge Si with input track segments
318 globalTrackNew = mergeSegments(**itt,*trackTRT);
319 } else if (!m_rejectShortExten ||
320 tn.size() >= trackTRT->numberOfMeasurementBases()) {
321 // Use the extension to instead of the segment
322 ATH_MSG_DEBUG ("Successful extension, number of TRT hits : " << tn.size() << " was : " << (trackTRT->numberOfMeasurementBases()));
323 // merge the extension with the Si track
324 globalTrackNew = mergeExtension(**itt,tn);
325 // Add the track to the list of tracks in the event
326 ATH_MSG_DEBUG ("Merged extension with Si segment");
327 // statistics
328 ev_stat.m_counter[Stat_t::kNTrtExt]++;
329 // clean up
330 std::vector<const Trk::MeasurementBase*>::const_iterator iv, ive=tn.end();
331 for(iv=tn.begin(); iv!=ive; ++iv) delete (*iv);
332 } else {
333 // Extension is shorter, let's fall back onto the original
334 ATH_MSG_DEBUG ("Extension too short, number of TRT hits : " << tn.size() << " was : " << (trackTRT->numberOfMeasurementBases()) << ". Use Segement !");
335 // merge segments
336 globalTrackNew = mergeSegments(**itt,*trackTRT);
337 // Add the track to the list of tracks in the event
338 ATH_MSG_DEBUG ("Merged TRT segment with Si segment");
339 // statistics
340 ev_stat.m_counter[Stat_t::Stat_t::kNTrtExtBad]++;
341 // clean up
342 std::vector<const Trk::MeasurementBase*>::const_iterator iv, ive=tn.end();
343 for(iv=tn.begin(); iv!=ive; ++iv) delete (*iv);
344 }
345 } else {
346 // no extension tool, jsut add the two
347 ATH_MSG_DEBUG ("Do not try to extend Si track, merging it with input TRT.");
348 // merge segments
349 globalTrackNew = mergeSegments(**itt,*trackTRT);
350 }
351 // do we have an track candidate ?
352 if(!globalTrackNew){
353 ATH_MSG_DEBUG ("Failed to merge TRT+Si track segment !");
354 if(m_saveTRT && trackTRT->numberOfMeasurementBases() > m_minTRTonly) {
355 Trk::Track* trtSeg = nullptr;trtSeg = segToTrack(ctx, *trackTRT);
356 if(!trtSeg){
357 ATH_MSG_DEBUG ("Failed to make a track out of the TRT segment!");
358 continue;
359 }
360 ATH_MSG_DEBUG ("Add TRT only to output list");
361 // statistis
362 ev_stat.m_counter[Stat_t::kNBckTrk]++; ev_stat.m_counter[Stat_t::Stat_t::kNBckTrkTrt]++;
363 // add it to output list
364 if (m_trackSummaryTool.isEnabled()) {
365 m_trackSummaryTool->computeAndReplaceTrackSummary(ctx, *trtSeg,
366 false /* DO NOT suppress hole search*/);
367 }
368 outTracks->push_back(trtSeg);
369 }
370 } else {
371 ATH_MSG_DEBUG ("Save merged TRT+Si track segment!");
372 // statistics
373 ev_stat.m_counter[Stat_t::kNBckTrk]++; ev_stat.m_counter[Stat_t::Stat_t::kNBckTrkSi]++;
374 // add it to output list
375 if (m_trackSummaryTool.isEnabled()) {
376 m_trackSummaryTool->computeAndReplaceTrackSummary(ctx, *globalTrackNew,
377 false /* DO NOT suppress hole search*/);
378 }
379 outTracks->push_back(globalTrackNew);
380 }
381 }
382 }
383 }
384 }
385 }
386 // further debugging of results
387 if(m_doStat){
388 Analyze(outTracks.get());
389 }
390 if (SG::WriteHandle<TrackCollection>(m_outTracksKey,ctx).record(std::move(outTracks)).isFailure()){
391 ATH_MSG_ERROR("Failed to record " << m_outTracksKey.key());
392 return StatusCode::FAILURE;
393 }
394 // Update the total counters
395 {
396 std::lock_guard<std::mutex> lock(m_statMutex);
397 m_totalStat += ev_stat;
398 }
399
400 for (auto *p : tempTracks){
401 delete p;
402 }
403 m_trackmaker->endEvent(*event_data_p);
404
405 //Print common event information
406 if(msgLvl(MSG::DEBUG)){
407 dumpevent(msg(MSG::DEBUG), ev_stat);
408 }
409
410 return StatusCode::SUCCESS;
411}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_MSG_ERROR(x)
#define ATH_MSG_FATAL(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
virtual void lock()=0
Interface to allow an object to lock itself when made const in SG.
Trk::Track * segToTrack(const EventContext &, const Trk::TrackSegment &) const
Transform a TRT track segment into a track.
ToolHandle< Trk::IExtendedTrackSummaryTool > m_trackSummaryTool
Trk::Track * mergeSegments(const Trk::Track &, const Trk::TrackSegment &) const
Protected methods.
SG::ReadHandleKey< Trk::PRDtoTrackMap > m_prdToTrackMap
SG::ReadHandleKey< ROIPhiRZContainer > m_caloClusterROIKey
Trk::Track * mergeExtension(const Trk::Track &, std::vector< const Trk::MeasurementBase * > &) const
Merge a TRT track extension and a Si track component into one global ID track.
ToolHandle< Trk::IExtrapolator > m_extrapolator
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
UnsignedIntegerProperty m_minTRTonSegment
UnsignedIntegerProperty m_minTRTonly
void Analyze(TrackCollection *) const
Do some statistics analysis at the end of each event.
ToolHandle< IRegSelTool > m_regionSelector
MsgStream & dumpevent(MsgStream &out, const InDet::TRT_SeededTrackFinder::Stat_t &stat) const
unsigned int numberOfMeasurementBases() const
Return the number of contained Trk::MeasurementBase (s).
Eigen::Matrix< double, 3, 1 > Vector3D
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
@ d0
Definition ParamDefs.h:63
@ z0
Definition ParamDefs.h:64
Global Counters for final algorithm statistics.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ finalize()

StatusCode InDet::TRT_SeededTrackFinder::finalize ( )
override

Definition at line 417 of file TRT_SeededTrackFinder.cxx.

418{
419 if(msgLvl(MSG::INFO)){
420 msg(MSG::INFO) << "\n";
421 dumpevent(msg(MSG::INFO), m_totalStat);
422 msg(MSG::INFO) << endmsg;
423 }
424 return StatusCode::SUCCESS;
425}
#define endmsg

◆ initialize()

StatusCode InDet::TRT_SeededTrackFinder::initialize ( )
override

TRT segments to use

Definition at line 47 of file TRT_SeededTrackFinder.cxx.

48{
49
50 //Get the TRT seeded track maker tool
51 //
52 ATH_CHECK(m_trackmaker.retrieve());
53
54 //Get the refitting tool
55 //
56 ATH_CHECK( m_fitterTool.retrieve( DisableTool{ !m_doRefit } ));
57 ATH_CHECK( m_extrapolator.retrieve( DisableTool{ !m_SiExtensionCuts } ));
59
60 // optional PRD to track association map
61 ATH_CHECK( m_prdToTrackMap.initialize( !m_prdToTrackMap.key().empty() ) );
62
63 ATH_CHECK( m_trackSummaryTool.retrieve( DisableTool{ m_trackSummaryTool.name().empty() } ) );
64
65 // Get tool for track extension to TRT
66 //
67 ATH_CHECK( m_trtExtension.retrieve( DisableTool{ !m_doExtension} ));
68
69
70 ATH_CHECK( m_SegmentsKey.initialize()) ;
71 ATH_CHECK( m_outTracksKey.initialize());
72
74
76 ATH_CHECK( m_regionSelector.retrieve());
77 } else {
78 m_regionSelector.disable();
79 }
80
81 // Get output print level
82 //
83 if(msgLvl(MSG::DEBUG)) {
84 dumptools(msg(MSG::DEBUG));
85 }
86 //Global counters. See the include file for definitions
87 m_totalStat = Stat_t();
88 return StatusCode::SUCCESS;
89}
#define ATH_CHECK
Evaluate an expression and check for errors.
MsgStream & dumptools(MsgStream &out) const

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ mergeExtension()

Trk::Track * InDet::TRT_SeededTrackFinder::mergeExtension ( const Trk::Track & tT,
std::vector< const Trk::MeasurementBase * > & tS ) const
protected

Merge a TRT track extension and a Si track component into one global ID track.

Construct the new track

Definition at line 623 of file TRT_SeededTrackFinder.cxx.

624 {
625 // TSOS from the track
626 const Trk::TrackStates* stsos = tT.trackStateOnSurfaces();
627 // fitQuality from track
628 auto fq = tT.fitQuality()->uniqueClone();
629 // output datavector of TSOS
630 auto ntsos = std::make_unique<Trk::TrackStates>();
631 // copy track Si states into track
633 for (p_stsos = stsos->begin(); p_stsos != stsos->end(); ++p_stsos) {
634 ntsos->push_back((*p_stsos)->clone());
635 }
636 // loop over TRT track extension
637 for (auto & it : tS) {
638 std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern;
640 const Trk::TrackStateOnSurface* seg_tsos = new Trk::TrackStateOnSurface(it->uniqueClone(), nullptr, nullptr, typePattern);
641 ntsos->push_back(seg_tsos);
642 }
644 Trk::TrackInfo info;
645 info.setPatternRecognitionInfo(Trk::TrackInfo::TRTSeededTrackFinder);
646 std::unique_ptr<Trk::Track> newTrack( std::make_unique<Trk::Track>(info, std::move(ntsos), std::move(fq)) );
647 //Careful refitting at the end
648 if (m_doRefit) {
649 newTrack = (m_fitterTool->fit(Gaudi::Hive::currentContext(),*newTrack, false, Trk::pion) ) ;
650 //coverity[REVERSE_INULL:FALSE]
651 if (!newTrack) {
652 ATH_MSG_DEBUG ("Refit of TRT+Si track segment failed!");
653 return nullptr;
654 }
655 //Protect for tracks that have no really defined locz and theta parameters
656 const Trk::Perigee* perTrack=newTrack->perigeeParameters();
657 if (perTrack) {
658 const AmgSymMatrix(5)* CM = perTrack->covariance();
659 if (!CM || std::sqrt((*CM)(1,1)) == 0. || std::sqrt((*CM)(3,3)) == 0.) {
660 return nullptr;
661 }
662 }
663 }
664
665 return newTrack.release();
666}
#define AmgSymMatrix(dim)
std::unique_ptr< FitQuality > uniqueClone() const
NVI uniqueClone.
@ TRTSeededTrackFinder
Tracks from TRT Seeded Track finder.
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
const FitQuality * fitQuality() const
return a pointer to the fit quality const-overload

◆ mergeSegments()

Trk::Track * InDet::TRT_SeededTrackFinder::mergeSegments ( const Trk::Track & tT,
const Trk::TrackSegment & tS ) const
protected

Protected methods.

Merge a TRT track segment and a Si track component into one global ID track

Construct the new track

Definition at line 505 of file TRT_SeededTrackFinder.cxx.

505 {
506 // TSOS from the track
507 const Trk::TrackStates* stsos = tT.trackStateOnSurfaces();
508 // fitQuality from track
509 auto fq = tT.fitQuality()->uniqueClone();
510 // output datavector of TSOS
511 auto ntsos = std::make_unique<Trk::TrackStates>();
512 int siHits = 0;
513 // copy track Si states into track
515 for (p_stsos=stsos->begin(); p_stsos != stsos->end(); ++p_stsos) {
516 ntsos->push_back( (*p_stsos)->clone() );
517 if ((*p_stsos)->type(Trk::TrackStateOnSurface::Measurement)) siHits++;
518 }
519 // loop over segment
520 for (int it = 0; it < int(tS.numberOfMeasurementBases()); it++) {
521 //test if it is a pseudo measurement
522 if ( dynamic_cast<const Trk::PseudoMeasurementOnTrack*>(tS.measurement(it)) ) {
523 if (siHits < 4) {
524 ATH_MSG_DEBUG ("Too few Si hits.Will keep pseudomeasurement...");
525 const Trk::TrackStateOnSurface* seg_tsos = new Trk::TrackStateOnSurface(tS.measurement(it)->uniqueClone(), nullptr);
526 ntsos->push_back(seg_tsos);
527 }
528 } else {
529 std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern;
531 const Trk::TrackStateOnSurface* seg_tsos = new Trk::TrackStateOnSurface(tS.measurement(it)->uniqueClone(), nullptr, nullptr, typePattern);
532 ntsos->push_back(seg_tsos);
533 }
534 }
535
537 Trk::TrackInfo info;
538 info.setPatternRecognitionInfo(Trk::TrackInfo::TRTSeededTrackFinder);
539 std::unique_ptr<Trk::Track> newTrack(std::make_unique<Trk::Track>(info, std::move(ntsos), std::move(fq)));
540
541 //Careful refitting at the end
542 if (m_doRefit) {
543 newTrack=m_fitterTool->fit(Gaudi::Hive::currentContext(),*newTrack, false, Trk::pion);
544 //coverity[REVERSE_INULL:FALSE]
545 if (!newTrack) {
546 ATH_MSG_DEBUG ("Refit of TRT+Si track segment failed!");
547 return nullptr;
548 }
549 const Trk::Perigee* perTrack=newTrack->perigeeParameters();
550 if (perTrack) {
551 const AmgSymMatrix(5)* CM = perTrack->covariance();
552 if (!CM || std::sqrt((*CM)(1,1)) == 0. || std::sqrt((*CM)(3,3)) == 0.) {
553 return nullptr;
554 }
555 }
556 }
557 return newTrack.release();
558}
std::unique_ptr< MeasurementBase > uniqueClone() const
NVI Clone giving up unique pointer.
const MeasurementBase * measurement(unsigned int) const
returns the Trk::MeasurementBase objects depending on the integer

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ segToTrack()

Trk::Track * InDet::TRT_SeededTrackFinder::segToTrack ( const EventContext & ctx,
const Trk::TrackSegment & tS ) const
protected

Transform a TRT track segment into a track.

Definition at line 564 of file TRT_SeededTrackFinder.cxx.

564 {
565 ATH_MSG_DEBUG ("Transforming the TRT segment into a track...");
566
567 //Get the track segment information and build the initial track parameters
568 const Trk::StraightLineSurface* surf = dynamic_cast<const Trk::StraightLineSurface*>(&(tS.associatedSurface()));
569 if (!surf) {
570 throw std::logic_error("Unhandled surface.");
571 }
572 const AmgVector(5)& p = tS.localParameters();
573 AmgSymMatrix(5) ep = AmgSymMatrix(5)(tS.localCovariance());
574 auto ntsos = std::make_unique<Trk::TrackStates>();
575 std::unique_ptr<Trk::TrackParameters> segPar =
576 surf->createUniqueParameters<5, Trk::Charged>(
577 p(0), p(1), p(2), p(3), p(4), std::move(ep));
578 if (segPar) {
579 ATH_MSG_DEBUG( "Initial TRT Segment Parameters for refitting " << (*segPar) );
580 } else {
581 ATH_MSG_DEBUG( "Could not get initial TRT segment parameters! " );
582 return nullptr;
583 }
584 for (int it = 0; it < int(tS.numberOfMeasurementBases()); it++) {
585 // on first measurement add parameters
586 const Trk::TrackStateOnSurface* seg_tsos = nullptr;
587 std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern;
589 if (it == 0){
590 seg_tsos = new Trk::TrackStateOnSurface(tS.measurement(it)->uniqueClone(), std::move(segPar), nullptr, typePattern);
591 } else {
592 seg_tsos = new Trk::TrackStateOnSurface(tS.measurement(it)->uniqueClone(), nullptr, nullptr, typePattern);
593 }
594 ntsos->push_back(seg_tsos);
595 }
596 Trk::TrackInfo info;
597 info.setPatternRecognitionInfo(Trk::TrackInfo::TRTSeededTrackFinder);
598 std::unique_ptr<Trk::Track> newTrack = std::make_unique<Trk::Track>(info, std::move(ntsos), nullptr);
599 // Careful refitting of the TRT stand alone track
600 if (m_doRefit) {
601 newTrack = m_fitterTool->fit(ctx,*newTrack, false, Trk::pion);
602 //coverity[REVERSE_INULL:FALSE]
603 if (!newTrack) {
604 ATH_MSG_DEBUG ("Refit of TRT track segment failed!");
605 return nullptr;
606 }
607 //Protect for tracks that have no really defined locz and theta parameters
608 const Trk::Perigee* perTrack=newTrack->perigeeParameters();
609 if (perTrack) {
610 const AmgSymMatrix(5)* CM = perTrack->covariance();
611 if (!CM || std::sqrt((*CM)(1,1)) == 0. || std::sqrt((*CM)(3,3)) == 0.) {
612 return nullptr;
613 }
614 }
615 }
616 return newTrack.release();
617}
#define AmgVector(rows)
if(pathvar)
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
const Surface & associatedSurface() const override final
returns the surface for the local to global transformation

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Reimplemented in AthFilterAlgorithm.

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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 }

Member Data Documentation

◆ ATLAS_THREAD_SAFE [1/2]

Stat_t m_totalStat InDet::TRT_SeededTrackFinder::ATLAS_THREAD_SAFE
mutableprotected

Definition at line 187 of file TRT_SeededTrackFinder.h.

◆ ATLAS_THREAD_SAFE [2/2]

std::mutex m_statMutex InDet::TRT_SeededTrackFinder::ATLAS_THREAD_SAFE
mutableprotected

Definition at line 186 of file TRT_SeededTrackFinder.h.

◆ m_beamSpotKey

SG::ReadCondHandleKey<InDet::BeamSpotData> InDet::TRT_SeededTrackFinder::m_beamSpotKey {this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"}
protected

Definition at line 124 of file TRT_SeededTrackFinder.h.

125{this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"};

◆ m_caloClusterROIKey

SG::ReadHandleKey<ROIPhiRZContainer> InDet::TRT_SeededTrackFinder::m_caloClusterROIKey
protected
Initial value:
{this, "EMROIPhiRZContainer", "",
"Name of the calo cluster ROIs in Phi,R,Z parameterization"}

Definition at line 137 of file TRT_SeededTrackFinder.h.

138 {this, "EMROIPhiRZContainer", "",
139 "Name of the calo cluster ROIs in Phi,R,Z parameterization"};

◆ m_caloSeededRoI

BooleanProperty InDet::TRT_SeededTrackFinder::m_caloSeededRoI {this, "CaloSeededRoI", false}
protected

Definition at line 136 of file TRT_SeededTrackFinder.h.

136{this, "CaloSeededRoI", false};

◆ m_deltaEta

FloatProperty InDet::TRT_SeededTrackFinder::m_deltaEta {this, "dEtaCaloRoI", 0.1, "delta Eta used for RoI creation"}
protected

Definition at line 145 of file TRT_SeededTrackFinder.h.

146{this, "dEtaCaloRoI", 0.1, "delta Eta used for RoI creation"};

◆ m_deltaPhi

FloatProperty InDet::TRT_SeededTrackFinder::m_deltaPhi {this, "dPhiCaloRoI", 0.25, "delta Phi used for RoI creation"}
protected

Definition at line 147 of file TRT_SeededTrackFinder.h.

148{this, "dPhiCaloRoI", 0.25, "delta Phi used for RoI creation"};

◆ m_deltaZ

FloatProperty InDet::TRT_SeededTrackFinder::m_deltaZ {this, "dZCaloRoI", 300., "delta Z used for RoI creation"}
protected

Definition at line 149 of file TRT_SeededTrackFinder.h.

150{this, "dZCaloRoI", 300., "delta Z used for RoI creation"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doExtension

BooleanProperty InDet::TRT_SeededTrackFinder::m_doExtension {this, "TrtExtension", false, "Find the TRT extension of the track"}
protected

Definition at line 86 of file TRT_SeededTrackFinder.h.

87{this, "TrtExtension", false, "Find the TRT extension of the track"};

◆ m_doRefit

BooleanProperty InDet::TRT_SeededTrackFinder::m_doRefit {this, "FinalRefit", false, "Do a final careful refit of tracks"}
protected

Definition at line 84 of file TRT_SeededTrackFinder.h.

85{this, "FinalRefit", false, "Do a final careful refit of tracks"};

◆ m_doStat

BooleanProperty InDet::TRT_SeededTrackFinder::m_doStat {this, "FinalStatistics", false, "Statistics of final tracks"}
protected

Definition at line 90 of file TRT_SeededTrackFinder.h.

91{this, "FinalStatistics", false, "Statistics of final tracks"};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_extrapolator

ToolHandle<Trk::IExtrapolator> InDet::TRT_SeededTrackFinder::m_extrapolator {this, "Extrapolator", ""}
protected

Definition at line 123 of file TRT_SeededTrackFinder.h.

123{this, "Extrapolator", ""};

◆ m_fitterTool

ToolHandle<Trk::ITrackFitter> InDet::TRT_SeededTrackFinder::m_fitterTool
protected
Initial value:
{this, "RefitterTool", "Trk::GlobalChi2Fitter/InDetTrackFitter",
"Track refit tool"}

Definition at line 105 of file TRT_SeededTrackFinder.h.

106 {this, "RefitterTool", "Trk::GlobalChi2Fitter/InDetTrackFitter",
107 "Track refit tool"};

◆ m_maxEta

DoubleProperty InDet::TRT_SeededTrackFinder::m_maxEta {this, "maxEta", 2.7, "maximal Eta cut"}
protected

Definition at line 130 of file TRT_SeededTrackFinder.h.

130{this, "maxEta", 2.7, "maximal Eta cut"};

◆ m_maxRPhiImp

DoubleProperty InDet::TRT_SeededTrackFinder::m_maxRPhiImp {this, "maxRPhiImp", 10., "maximal RPhi impact parameter cut"}
protected

Definition at line 131 of file TRT_SeededTrackFinder.h.

132{this, "maxRPhiImp", 10., "maximal RPhi impact parameter cut"};

◆ m_MaxSegNum

IntegerProperty InDet::TRT_SeededTrackFinder::m_MaxSegNum
protected
Initial value:
{this, "MaxNumberSegments", 5000,
"Maximum number of segments to be handled"}

Definition at line 94 of file TRT_SeededTrackFinder.h.

95 {this, "MaxNumberSegments", 5000,
96 "Maximum number of segments to be handled"};

◆ m_maxZImp

DoubleProperty InDet::TRT_SeededTrackFinder::m_maxZImp {this, "maxZImp", 250., "maximal z impact parameter cut"}
protected

Definition at line 133 of file TRT_SeededTrackFinder.h.

134{this, "maxZImp", 250., "maximal z impact parameter cut"};

◆ m_minPt

DoubleProperty InDet::TRT_SeededTrackFinder::m_minPt {this, "minPt", 500., "minimal Pt cut"}
protected

Definition at line 129 of file TRT_SeededTrackFinder.h.

129{this, "minPt", 500., "minimal Pt cut"};

◆ m_minTRTonly

UnsignedIntegerProperty InDet::TRT_SeededTrackFinder::m_minTRTonly {this, "MinTRTonly", 15, "Minimum number of TRT hits on TRT only"}
protected

Definition at line 99 of file TRT_SeededTrackFinder.h.

100{this, "MinTRTonly", 15, "Minimum number of TRT hits on TRT only"};

◆ m_minTRTonSegment

UnsignedIntegerProperty InDet::TRT_SeededTrackFinder::m_minTRTonSegment {this, "MinTRTonSegment", 10, "Minimum Number of TRT Hits on segment"}
protected

Definition at line 97 of file TRT_SeededTrackFinder.h.

98{this, "MinTRTonSegment", 10, "Minimum Number of TRT Hits on segment"};

◆ m_outTracksKey

SG::WriteHandleKey<TrackCollection> InDet::TRT_SeededTrackFinder::m_outTracksKey
protected
Initial value:
{this, "OutputTracksLocation", "TRTSeededTracks",
"Output track collection"}

Definition at line 114 of file TRT_SeededTrackFinder.h.

115 {this, "OutputTracksLocation", "TRTSeededTracks",
116 "Output track collection"};

◆ m_prdToTrackMap

SG::ReadHandleKey<Trk::PRDtoTrackMap> InDet::TRT_SeededTrackFinder::m_prdToTrackMap {this, "PRDtoTrackMap", "" }
protected

Definition at line 118 of file TRT_SeededTrackFinder.h.

119{this, "PRDtoTrackMap", "" };

◆ m_regionSelector

ToolHandle<IRegSelTool> InDet::TRT_SeededTrackFinder::m_regionSelector
protected
Initial value:
{this, "RegSelTool", "RegSelTool/RegSel_SCT",
"Region selector service instance"}

Definition at line 141 of file TRT_SeededTrackFinder.h.

142 {this, "RegSelTool", "RegSelTool/RegSel_SCT",
143 "Region selector service instance"};

◆ m_rejectShortExten

BooleanProperty InDet::TRT_SeededTrackFinder::m_rejectShortExten {this, "RejectShortExtension", false, "Reject short extensions"}
protected

Definition at line 88 of file TRT_SeededTrackFinder.h.

89{this, "RejectShortExtension", false, "Reject short extensions"};

◆ m_saveTRT

BooleanProperty InDet::TRT_SeededTrackFinder::m_saveTRT {this, "OutputSegments", true, "Save stand-alone TRT segments"}
protected

Definition at line 92 of file TRT_SeededTrackFinder.h.

93{this, "OutputSegments", true, "Save stand-alone TRT segments"};

◆ m_SegmentsKey

SG::ReadHandleKey<Trk::SegmentCollection> InDet::TRT_SeededTrackFinder::m_SegmentsKey {this, "InputSegmentsLocation", "TRTSegments", "TRT segments to use"}
protected

Definition at line 112 of file TRT_SeededTrackFinder.h.

113{this, "InputSegmentsLocation", "TRTSegments", "TRT segments to use"};

◆ m_SiExtensionCuts

BooleanProperty InDet::TRT_SeededTrackFinder::m_SiExtensionCuts {this, "SiExtensionCuts", false, "enable cuts after Si segment finding"}
protected

Definition at line 127 of file TRT_SeededTrackFinder.h.

128{this, "SiExtensionCuts", false, "enable cuts after Si segment finding"};

◆ m_trackmaker

ToolHandle<ITRT_SeededTrackFinder> InDet::TRT_SeededTrackFinder::m_trackmaker
protected
Initial value:
{this, "TrackTool", "InDet::TRT_SeededTrackFinderTool",
"Back tracking tool"}

Definition at line 102 of file TRT_SeededTrackFinder.h.

103 {this, "TrackTool", "InDet::TRT_SeededTrackFinderTool",
104 "Back tracking tool"};

◆ m_trackSummaryTool

ToolHandle<Trk::IExtendedTrackSummaryTool> InDet::TRT_SeededTrackFinder::m_trackSummaryTool {this, "TrackSummaryTool", "InDetTrackSummaryToolNoHoleSearch"}
protected

Definition at line 120 of file TRT_SeededTrackFinder.h.

121{this, "TrackSummaryTool", "InDetTrackSummaryToolNoHoleSearch"};

◆ m_trtExtension

ToolHandle<ITRT_TrackExtensionTool> InDet::TRT_SeededTrackFinder::m_trtExtension
protected
Initial value:
{this, "TrackExtensionTool", "InDet::TRT_TrackExtensionTool_xk",
"TRT track extension tool "}

Definition at line 108 of file TRT_SeededTrackFinder.h.

109 {this, "TrackExtensionTool", "InDet::TRT_TrackExtensionTool_xk",
110 "TRT track extension tool "};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


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