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

#include <SimpleTRT_SeededSpacePointFinder_ATL.h>

Inheritance diagram for InDet::SimpleTRT_SeededSpacePointFinder_ATL:
Collaboration diagram for InDet::SimpleTRT_SeededSpacePointFinder_ATL:

Public Types

typedef std::list< std::pair< int, int > > modulLookupTable

Public Member Functions

 SimpleTRT_SeededSpacePointFinder_ATL (const std::string &, const std::string &, const IInterface *)
virtual ~SimpleTRT_SeededSpacePointFinder_ATL ()
virtual StatusCode initialize () override
virtual StatusCode finalize () override
virtual std::unique_ptr< InDet::ITRT_SeededSpacePointFinder::IEventDatanewEvent () const override
 obsolete, do not do anything.
virtual std::unique_ptr< InDet::ITRT_SeededSpacePointFinder::IEventDatanewRegion (const std::vector< IdentifierHash > &, const std::vector< IdentifierHash > &) const override
const SiSpacePointsSeednext (InDet::ITRT_SeededSpacePointFinder::IEventData &event_data) const override
std::list< std::pair< const Trk::SpacePoint *, const Trk::SpacePoint * > > find2Sp (const EventContext &ctx, const Trk::TrackParameters &, InDet::ITRT_SeededSpacePointFinder::IEventData &event_data) const override
 main method, calls the private methods and returns a pointer to the list of SpacePointpairs.
MsgStream & dump (MsgStream &out) const override
std::ostream & dump (std::ostream &out) const override
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

void getSpacePointsInROI (const EventContext &ctx, std::set< IdentifierHash > &setOfSCT_Hashes, int modulTRT, std::multimap< int, const Trk::SpacePoint * > &relevantSpacePoints) const
 retrieves SP Collections of modules in the ROI and sorts them by SCT layer
void getHashesInROI (const EventContext &ctx, const Trk::TrackParameters &directionTRT, std::set< IdentifierHash > &setOfSCT_Hashes) const
 obtains the hashes of modules in the ROI
void combineSpacePoints (const std::multimap< int, const Trk::SpacePoint * > &relevantSpacePoints, const Trk::TrackParameters &directionTRT, int modulTRT, std::list< std::pair< const Trk::SpacePoint *, const Trk::SpacePoint * > > &listOfSpacePointPairsBuffer) const
 builds pairs of SP according to the kook-up table
bool pairIsOk (const Trk::SpacePoint *sp1, const Trk::SpacePoint *sp2, const Trk::TrackParameters &directionTRT) const
 applies rough cuts on the quality of a SP pair
void setupLookUpTable ()
 the name says it
void printLookupTable () const
int TRT_Module (const Trk::TrackParameters &directionTRT) const
 returns the number of the TRT wheel or barrel where the TP belongs to
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Static Private Member Functions

static void getSearchRange (double &deltaPhi, double &deltaEta)
 List with SP pairs as seed for the Si part of the back-track.

Private Attributes

BooleanProperty m_useROI {this, "RestrictROI", true}
 Controls, if SP have to be checked with the AssociationTool of the forward tracking and to avoid double use of measurements.
IntegerProperty m_maxHoles {this, "MaxHoles", 1}
 controls how many not considered SCT layers are allowed between two SP in order to form a seed pair
DoubleProperty m_perigeeCut {this, "PerigeeCut", 200.}
 rough cuts on the quality of the suggested SP pair
DoubleProperty m_directionPhiCut {this, "DirectionPhiCut", 0.05}
SG::ReadHandleKey< SpacePointContainerm_spacepointsSCTname {this,"SpacePointsSCTName","SCT_SpacePoints","RHK to retrieve SCT SpacePointContainer"}
SG::ReadHandleKey< SpacePointOverlapCollectionm_spacepointsOverlapname {this,"SpacePointsSCTName","OverlapSpacePoints","RHK to retrieve OverlapCollection"}
SG::ReadHandleKey< Trk::PRDtoTrackMapm_prdToTrackMap {this,"PRDtoTrackMap",""}
modulLookupTable m_modulLookupTable [2 *SIMPLE_TRT_INDEX_OFFSET+1]
 Lookup table that contains the SCT Layers to be considered to provide SP for the pairing in dependence on the TRT part the track parameter is on.
std::set< int > m_modulLookupTableIndex [2 *SIMPLE_TRT_INDEX_OFFSET+1]
ToolHandle< IRegSelToolm_pRegionSelector { this, "RegSelTool_SCT", "RegSelTool/RegSelTool_SCT" }
 Region Selector.
const SCT_IDm_sctId = nullptr
 ID SCT helper.
const TRT_IDm_trtId = nullptr
 ID TRT helper.
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

Definition at line 38 of file SimpleTRT_SeededSpacePointFinder_ATL.h.

Member Typedef Documentation

◆ modulLookupTable

typedef std::list<std::pair< int,int > > InDet::SimpleTRT_SeededSpacePointFinder_ATL::modulLookupTable

Definition at line 47 of file SimpleTRT_SeededSpacePointFinder_ATL.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ SimpleTRT_SeededSpacePointFinder_ATL()

InDet::SimpleTRT_SeededSpacePointFinder_ATL::SimpleTRT_SeededSpacePointFinder_ATL ( const std::string & t,
const std::string & n,
const IInterface * p )

Definition at line 31 of file SimpleTRT_SeededSpacePointFinder_ATL.cxx.

33 : AthAlgTool(t,n,p)
34{
35 declareInterface<ITRT_SeededSpacePointFinder>(this);
36}
AthAlgTool()
Default constructor:

◆ ~SimpleTRT_SeededSpacePointFinder_ATL()

InDet::SimpleTRT_SeededSpacePointFinder_ATL::~SimpleTRT_SeededSpacePointFinder_ATL ( )
virtualdefault

Member Function Documentation

◆ combineSpacePoints()

void InDet::SimpleTRT_SeededSpacePointFinder_ATL::combineSpacePoints ( const std::multimap< int, const Trk::SpacePoint * > & relevantSpacePoints,
const Trk::TrackParameters & directionTRT,
int modulTRT,
std::list< std::pair< const Trk::SpacePoint *, const Trk::SpacePoint * > > & listOfSpacePointPairsBuffer ) const
private

builds pairs of SP according to the kook-up table

This method combines SpacePoints contained in the first argument to pairs which are then stored in the internal list of SpacePoint pairs.

Only SpacePoints which are on two different SCT layers or wheels specified as pair in the look-up table are combined. The pairing is only accepted, if if satisfies quality cuts specified in the method pairIsOk.

The second argument specifies the TRT track parameter which is used for quality cuts on the SpacePoint pairs. The third argument specifies the part of the TRT the track parameter comes from. This number is used to inquire the relevant pairings of SCT layers from the look-up table.

Definition at line 417 of file SimpleTRT_SeededSpacePointFinder_ATL.cxx.

420{
432
433 if ( modulNumber+SIMPLE_TRT_INDEX_OFFSET < 29 && -1 < modulNumber+SIMPLE_TRT_INDEX_OFFSET)
434 {
435 modulLookupTable::const_iterator itTable = m_modulLookupTable[modulNumber+SIMPLE_TRT_INDEX_OFFSET].begin();
436 modulLookupTable::const_iterator endTable = m_modulLookupTable[modulNumber+SIMPLE_TRT_INDEX_OFFSET].end();
437 for ( ; itTable != endTable ; ++itTable)
438 {
439 msg(MSG::VERBOSE) << " Combining Space Poinst from modules " << itTable->first << " and " << itTable->second << endmsg;
440 // SPs from SCT layer 1
441 std::pair< std::multimap<int,const Trk::SpacePoint*>::const_iterator,
442 std::multimap<int,const Trk::SpacePoint*>::const_iterator >
443 range1 = relevantSpacePoints.equal_range(itTable->first);
444 // if (range1.second != relevantSpacePoints.end() ) ++(range1.second); // transforming the 2nd pointer to an end of range
445
446 //SPs from SCT layer 2
447 std::pair< std::multimap<int,const Trk::SpacePoint*>::const_iterator,
448 std::multimap<int,const Trk::SpacePoint*>::const_iterator >
449 range2 = relevantSpacePoints.equal_range(itTable->second);
450 // if (range2.second != relevantSpacePoints.end() ) ++(range2.second); // transforming the 2nd pointer to an end of range
451
452 // add the SP pairs
453 for ( std::multimap<int,const Trk::SpacePoint*>::const_iterator it1 = range1.first;
454 it1 != range1.second ; ++it1 )
455 for ( std::multimap<int,const Trk::SpacePoint*>::const_iterator it2 = range2.first;
456 it2 != range2.second ; ++it2 )
457 if ( pairIsOk(it1->second,it2->second,directionTRT) )
458 listOfSpacePointPairsBuffer.emplace_back(it2->second,it1->second);
459
460 }
461 }
462 else
463 msg(MSG::WARNING) << "TRT module not in look-up table --> no SP pairs formed" << endmsg;
464
465}
#define endmsg
MsgStream & msg() const
bool pairIsOk(const Trk::SpacePoint *sp1, const Trk::SpacePoint *sp2, const Trk::TrackParameters &directionTRT) const
applies rough cuts on the quality of a SP pair
modulLookupTable m_modulLookupTable[2 *SIMPLE_TRT_INDEX_OFFSET+1]
Lookup table that contains the SCT Layers to be considered to provide SP for the pairing in dependenc...

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

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

Definition at line 95 of file AthCommonDataStore.h.

◆ dump() [1/2]

MsgStream & InDet::SimpleTRT_SeededSpacePointFinder_ATL::dump ( MsgStream & out) const
overridevirtual

Implements InDet::ITRT_SeededSpacePointFinder.

Definition at line 758 of file SimpleTRT_SeededSpacePointFinder_ATL.cxx.

759{
760 out << "to be implemented soon..." << std::endl;
761
762 return out;
763}

◆ dump() [2/2]

std::ostream & InDet::SimpleTRT_SeededSpacePointFinder_ATL::dump ( std::ostream & out) const
overridevirtual

Implements InDet::ITRT_SeededSpacePointFinder.

Definition at line 766 of file SimpleTRT_SeededSpacePointFinder_ATL.cxx.

767{
768 out << "to be implemented soon..." << std::endl;
769 return out;
770}

◆ evtStore()

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

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

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ finalize()

StatusCode InDet::SimpleTRT_SeededSpacePointFinder_ATL::finalize ( )
overridevirtual

Implements InDet::ITRT_SeededSpacePointFinder.

Definition at line 91 of file SimpleTRT_SeededSpacePointFinder_ATL.cxx.

92{
93 StatusCode sc = AthAlgTool::finalize();
94 return sc;
95}
static Double_t sc
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ find2Sp()

std::list< std::pair< const Trk::SpacePoint *, const Trk::SpacePoint * > > InDet::SimpleTRT_SeededSpacePointFinder_ATL::find2Sp ( const EventContext & ctx,
const Trk::TrackParameters & directionTRT,
InDet::ITRT_SeededSpacePointFinder::IEventData & event_data ) const
overridevirtual

main method, calls the private methods and returns a pointer to the list of SpacePointpairs.

The list itself is a private member of this class

The main method. This method is called from outside to form pairs of SCT SpacePoints which could seed Si tracks linked to the TRT TrackParameter given as input. iModus is a dummy variable to satisfy the interface.

This method calls several private methods to perform specific tasks. These are:

getHashesInROI : If the restriction of the Region Of Intereset is used, this method returns a set of IdHashes of SCT modules within the ROI

getSpacePointsInROI : This Method retrieves the SpacePointCollections from StoreGate and fills a map with the SpacePoints. The map key is a number which identifies the layer or disc the SpacePoint is on.

combineSpacePoints : The retrieved and sorted SpacePoints are combined to pairs. Pairs are built only of SpacePoints which are on the layer or disc pairs specified in the internal look-up table.

The method returns a pointer to an internal list of SpacePoint pairs, the list may very well be empty nevertheless.

Implements InDet::ITRT_SeededSpacePointFinder.

Definition at line 109 of file SimpleTRT_SeededSpacePointFinder_ATL.cxx.

112{
131
132
133 msg(MSG::VERBOSE) << "Enter getListOfSpacePointPairs, TrackParameter given is: " << endmsg;
134 msg(MSG::VERBOSE) << directionTRT << endmsg;
135
136 // clear output buffer
137
138 std::list<std::pair<const Trk::SpacePoint*, const Trk::SpacePoint*> > listOfSpacePointPairsBuffer;
139
140 // IdHash in ROI
141 std::set<IdentifierHash> setOfSCT_Hashes;
142
143 if (m_useROI)
144 {
145 // fill IdHashes in ROI
146 getHashesInROI(ctx,directionTRT,setOfSCT_Hashes);
147 msg(MSG::VERBOSE) << "Retrieved " << setOfSCT_Hashes.size() << " potentially interesting detector elements." << endmsg;
148 }
149
150 if ( !m_useROI || !setOfSCT_Hashes.empty())
151 {
152 // map of < SCT layer number, SP* >
153 std::multimap<int,const Trk::SpacePoint*> relevantSpacePoints;
154
155 // fill the map of relevant SP as defined by hashes from ROI
156 int modulTRT = TRT_Module(directionTRT);
157 getSpacePointsInROI(ctx, setOfSCT_Hashes, modulTRT, relevantSpacePoints);
158
159 msg(MSG::VERBOSE) << "Retrieved " << relevantSpacePoints.size() << " potentially interesting SpacePoints" << endmsg;
160
161 // build pairs of the relevant SP according to the look-up table
162 combineSpacePoints(relevantSpacePoints, directionTRT, modulTRT, listOfSpacePointPairsBuffer);
163
164 /* output for debug purposes, deactivated now. Once development is finished, it will be removed.
165 */
166 Amg::Vector3D r0 = directionTRT.position();
167 const Amg::Vector3D& v0(directionTRT.momentum());
168 msg(MSG::VERBOSE) << "------------------------------------------------------------------------------------------" << endmsg;
169 msg(MSG::VERBOSE) << "Final SpacePoint pairs: " << listOfSpacePointPairsBuffer.size() << endmsg;
170 msg(MSG::VERBOSE) << " Position of initial vector: ( " << r0.x() << ", " << r0.y() << ", "<< r0.z() << " ) " << endmsg;
171 msg(MSG::VERBOSE) << " Direction of initial vector: ( " << v0.unit().x() << ", " << v0.unit().y() << ", "<< v0.unit().z() << " ) , phi = "
172 << v0.phi() << " theta = " << v0.theta() << " eta = "<< v0.eta() << endmsg;
173 msg(MSG::VERBOSE) << "------------------------------------------------------------------------------------------" << endmsg;
174 msg(MSG::VERBOSE) << " Direction of space Point vectors: "<< endmsg;
175 msg(MSG::VERBOSE) << ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . " << endmsg;
176 for (auto & it : listOfSpacePointPairsBuffer)
177 {
178 Amg::Vector3D s1 = it.first->globalPosition();
179 Amg::Vector3D s2 = it.second->globalPosition();
180 Amg::Vector3D s1s2 = s2-s1; // vector from s1 to s2
181 msg(MSG::VERBOSE) << " Positions: ( " << s1.x() << " , "<< s1.y() << " , "<< s1.z() << " ) " << endmsg;
182 msg(MSG::VERBOSE) << " ( " << s2.x() << " , "<< s2.y() << " , "<< s2.z() << " ) " << endmsg;
183 msg(MSG::VERBOSE) << " direction: ( "
184 << s1s2.unit().x() << ", " << s1s2.unit().y() << ", " << s1s2.unit().z() <<" ) , phi = "
185 << s1s2.phi() << " theta = " << s1s2.theta() << " eta = "<< s1s2.eta() << endmsg;
186 msg(MSG::VERBOSE) << ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . " << endmsg;
187 }
188 msg(MSG::VERBOSE) << "------------------------------------------------------------------------------------------" << endmsg;
189 }
190
191 return listOfSpacePointPairsBuffer;
192}
void combineSpacePoints(const std::multimap< int, const Trk::SpacePoint * > &relevantSpacePoints, const Trk::TrackParameters &directionTRT, int modulTRT, std::list< std::pair< const Trk::SpacePoint *, const Trk::SpacePoint * > > &listOfSpacePointPairsBuffer) const
builds pairs of SP according to the kook-up table
void getSpacePointsInROI(const EventContext &ctx, std::set< IdentifierHash > &setOfSCT_Hashes, int modulTRT, std::multimap< int, const Trk::SpacePoint * > &relevantSpacePoints) const
retrieves SP Collections of modules in the ROI and sorts them by SCT layer
BooleanProperty m_useROI
Controls, if SP have to be checked with the AssociationTool of the forward tracking and to avoid doub...
void getHashesInROI(const EventContext &ctx, const Trk::TrackParameters &directionTRT, std::set< IdentifierHash > &setOfSCT_Hashes) const
obtains the hashes of modules in the ROI
int TRT_Module(const Trk::TrackParameters &directionTRT) const
returns the number of the TRT wheel or barrel where the TP belongs to
const Amg::Vector3D & momentum() const
Access method for the momentum.
const Amg::Vector3D & position() const
Access method for the position.
Eigen::Matrix< double, 3, 1 > Vector3D
const double r0
electron radius{cm}

◆ getHashesInROI()

void InDet::SimpleTRT_SeededSpacePointFinder_ATL::getHashesInROI ( const EventContext & ctx,
const Trk::TrackParameters & directionTRT,
std::set< IdentifierHash > & setOfSCT_Hashes ) const
private

obtains the hashes of modules in the ROI

This Method finds the IdHashes of SCT modules inside a Region Of Interest around the TRT track parameter. First the allowed tolerance in phi and eta is inquired, then a vector with the relevant hashes is retrieved from the RegionSelectorService. In order to be able to search conveniently for hashes later on, they are then copied into a STL set, which is then returned via call by reference.

Definition at line 196 of file SimpleTRT_SeededSpacePointFinder_ATL.cxx.

197{
202
203
204 //double eta = directionTRT.eta();
205 //double phi = directionTRT.position().phi();
206 double phi = directionTRT.parameters()[Trk::phi];
207 double eta = directionTRT.position().eta();
208 double deltaPhi = 0.;
209 double deltaEta = 0.;
210
211 // define tolerance for ROI
212 //getSearchRange(directionTRT, deltaPhi, deltaEta);
213 getSearchRange(deltaPhi, deltaEta);
214
215 // retrieve SCT hashes in Region of interest
216 std::vector<IdentifierHash> listOfSCT_Hashes;
217
219 RoiDescriptor roi( eta-deltaEta, eta+deltaEta, phi-deltaPhi, phi+deltaPhi);
220
221 m_pRegionSelector->lookup(ctx)->HashIDList( roi, listOfSCT_Hashes );
222
223 // copy Hashes into Set to be able to search them
224 for (auto listOfSCT_Hashe : listOfSCT_Hashes)
225 setOfSCT_Hashes.insert(listOfSCT_Hashe);
226}
Scalar eta() const
pseudorapidity method
Scalar deltaPhi(const MatrixBase< Derived > &vec) const
Scalar phi() const
phi method
ToolHandle< IRegSelTool > m_pRegionSelector
Region Selector.
static void getSearchRange(double &deltaPhi, double &deltaEta)
List with SP pairs as seed for the Si part of the back-track.
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
Definition P4Helpers.h:66
@ phi
Definition ParamDefs.h:75

◆ getSearchRange()

void InDet::SimpleTRT_SeededSpacePointFinder_ATL::getSearchRange ( double & deltaPhi,
double & deltaEta )
staticprivate

List with SP pairs as seed for the Si part of the back-track.

It is cleared and filled in every call of find2Sp, the pointer to it is returned. determines the width of the considered ROI around the TP. deltaPhi and deltaEta are return values

This method defines the tolerance for the ROI around the TRT track parameter. At the moment it is set constant, but it should be considered to define it in dependence on the track parameter. In order to suppress warnings for unused variables, the method signature including the track parameter as an argument is replaced for the time being by a signature without the track parameter.

Definition at line 403 of file SimpleTRT_SeededSpacePointFinder_ATL.cxx.

404{
409
410 // first guess: the ROI tolerance is constant
411 deltaPhi = 0.05;
412 deltaEta = .2;
413}

◆ getSpacePointsInROI()

void InDet::SimpleTRT_SeededSpacePointFinder_ATL::getSpacePointsInROI ( const EventContext & ctx,
std::set< IdentifierHash > & setOfSCT_Hashes,
int modulTRT,
std::multimap< int, const Trk::SpacePoint * > & relevantSpacePoints ) const
private

retrieves SP Collections of modules in the ROI and sorts them by SCT layer

This method retrieves the SpacePoints in a given region of interest. The region of interest is defined by the hashes in the first argument of the method.

The second argument specifies the part of the TRT in which the TRT track parameter is situated. This number is used to inquire the index of the look-up table, which layers of the SCT are relevant for the pair building process. Only SpacePointCollections from relevant layers or discs are looped over in order to save time.

If the restriction of the ROI is used, it is inquired for every SpacePointCollection, if the corresponding SCT module is listed in the set of IdHashes which defines the ROI. In this case, only Collections which satisfy this are looped over.

Relevant SpacePoints are then stored in a map. Key of the map is a number which identifies the SCT layer the SpacePoints are on.

In a last step, the SpacePointOverlapCollection is retrieved and looped over. SpacePoints in the ROI (if use is specified) are added to the list of SpacePoints

If the AssociationTool is used, only SpacePoints are stored, which do not contain a PRD that is not yet registered in the AssociationTool, i.e. which is not already used by the inside-out tracking.

Definition at line 230 of file SimpleTRT_SeededSpacePointFinder_ATL.cxx.

234{
250
251
252 const std::set<IdentifierHash>::const_iterator endSCT_Hashes = setOfSCT_Hashes.end();
253
254 SG::ReadHandle<Trk::PRDtoTrackMap> prd_to_track_map;
255 const Trk::PRDtoTrackMap *prd_to_track_map_cptr = nullptr;
256 if (!m_prdToTrackMap.key().empty()) {
257 prd_to_track_map=SG::ReadHandle<Trk::PRDtoTrackMap>(m_prdToTrackMap, ctx);
258 if (!prd_to_track_map.isValid()) {
259 ATH_MSG_ERROR("Failed to read PRD to track association map: " << m_prdToTrackMap.key());
260 }
261 prd_to_track_map_cptr = prd_to_track_map.cptr();
262 }
263
264 // retrieve SP Container
265 SG::ReadHandle<SpacePointContainer> spacepointsSCT(m_spacepointsSCTname, ctx);
266 if(spacepointsSCT.isValid())
267 {
268 // loop over SP collections in SP container
269 SpacePointContainer::const_iterator itCont = spacepointsSCT->begin();
270 SpacePointContainer::const_iterator endCont = spacepointsSCT->end ();
271 for(; itCont != endCont; ++itCont)
272 {
273 bool acceptCollection = true;
274
275 if (m_useROI)
276 {
277 // Check if IdHash of the Collection is in the list of ROI hashes
278 IdentifierHash idHash = (*itCont)->identifyHash();
279 acceptCollection = ( idHash.is_valid() && setOfSCT_Hashes.find( idHash ) != endSCT_Hashes );
280 }
281
282 int SCT_LayerNumber = -99;
283 if (acceptCollection)
284 {
285 // check if the module is on a relevant layer
286 Identifier id = (*itCont)->identify();
287 int detRegionIndex = m_sctId->barrel_ec(id) ;
288 if ( detRegionIndex == -2 || detRegionIndex == 0 || detRegionIndex == 2 )
289 {
290 // conversion factors for layer numbering
291 int detLayerOffset = 1;
292 int detLayerSign = 1;
293 if (detRegionIndex == 0) detLayerOffset = 10;
294 if (detRegionIndex == -2) detLayerSign = -1;
295
296 // retrieve layer number from IdHelper
297 int detLayerIndex = m_sctId->layer_disk(id);
298 SCT_LayerNumber = detLayerSign*(detLayerIndex+detLayerOffset);
299 }
300 else
301 {
302 msg(MSG::VERBOSE) << "detRegionIndex " << detRegionIndex << " recieved. " << endmsg;
303 acceptCollection = false;
304 }
305 }
306
307 if (acceptCollection)
308 {
309 if (modulTRT > -14 && modulTRT < 15 )
310 {
311 std::set<int>::const_iterator pos = m_modulLookupTableIndex[modulTRT+SIMPLE_TRT_INDEX_OFFSET].find(SCT_LayerNumber);
312 if ( pos == m_modulLookupTableIndex[modulTRT+SIMPLE_TRT_INDEX_OFFSET].end() ) acceptCollection = false;
313 }
314 else
315 {
316 msg(MSG::WARNING) << "Received TRTmodul number " << modulTRT << endmsg;
317 acceptCollection = false;
318 }
319 }
320
321 if (acceptCollection)
322 {
323 // Loop over SP Collection and add SP if they are not yet used (or if this does not matter).
324 SpacePointCollection::const_iterator itColl = (*itCont)->begin();
325 SpacePointCollection::const_iterator endColl = (*itCont)->end ();
326 for(; itColl != endColl; ++itColl)
327 if ( !prd_to_track_map_cptr
328 || !( prd_to_track_map_cptr->isUsed(*((*itColl)->clusterList().first))
329 || prd_to_track_map_cptr->isUsed(*((*itColl)->clusterList().second)) ) )
330 {
331 relevantSpacePoints.insert(std::make_pair( SCT_LayerNumber ,*itColl));
332 msg(MSG::VERBOSE) << "Added SpacePoint for layer " << SCT_LayerNumber << " at ( "
333 << (*itColl)->globalPosition().x() << " , "
334 << (*itColl)->globalPosition().y() << " , "
335 << (*itColl)->globalPosition().z() << " ) " << endmsg;
336 }
337 }
338 }
339 }
340
341 // retrieve the overlap collection
342 SG::ReadHandle<SpacePointOverlapCollection> spacepointsOverlap(m_spacepointsOverlapname, ctx);
343 if(spacepointsOverlap.isValid())
344 {
345
346 // Loop over Overlap SP
347 SpacePointOverlapCollection::const_iterator itColl = spacepointsOverlap->begin();
348 SpacePointOverlapCollection::const_iterator endColl = spacepointsOverlap->end ();
349 for (; itColl != endColl; ++itColl)
350 {
351 // check if SP is in ROI
352 std::pair<IdentifierHash, IdentifierHash> idHashPair = (*itColl)->elementIdList();
353 if ( !m_useROI
354 || (idHashPair.first.is_valid() && setOfSCT_Hashes.find( idHashPair.first ) != endSCT_Hashes)
355 || (idHashPair.second.is_valid() && setOfSCT_Hashes.find( idHashPair.second ) != endSCT_Hashes) )
356 {
357
358 // find out if one of the Clusters has already been used, if relevant
359 if(prd_to_track_map_cptr)
360 {
361 bool u1=false;
362 bool u2=false;
363 const Trk::PrepRawData* p1=(*itColl)->clusterList().first;
364 u1=prd_to_track_map->isUsed(*p1);
365 const Trk::PrepRawData* p2=(*itColl)->clusterList().second;
366 u2=prd_to_track_map->isUsed(*p2);
367 if(u1 || u2) continue;
368 }
369
370 // retrieve identifier and fill SP in SP buffer.
371 Identifier id = (*itColl)->associatedSurface().associatedDetectorElementIdentifier();
372 if ( id.is_valid() )
373 {
374 int detRegionIndex = m_sctId->barrel_ec(id) ;
375 if ( detRegionIndex == -2 || detRegionIndex == 0 || detRegionIndex == 2 )
376 {
377 int detLayerOffset = 1;
378 int detLayerSign = 1;
379 if (detRegionIndex == 0) detLayerOffset = 10;
380 if (detRegionIndex == -2) detLayerSign = -1;
381 int detLayerIndex = m_sctId->layer_disk(id);
382
383 relevantSpacePoints.insert(std::make_pair(detLayerSign*(detLayerIndex+detLayerOffset),*itColl));
384 msg(MSG::VERBOSE) << "Added OverlapSpacePoint for layer " << detLayerSign*(detLayerIndex+detLayerOffset) << " at ( "
385 << (*itColl)->globalPosition().x() << " , "
386 << (*itColl)->globalPosition().y() << " , "
387 << (*itColl)->globalPosition().z() << " ) " << endmsg;
388 }
389 else
390 msg(MSG::VERBOSE) << "detRegionIndex " << detRegionIndex << " recieved. " << endmsg;
391 }
392 else
393 msg(MSG::DEBUG) << "Invalid Id from OverlapCollection recieved. " << endmsg;
394 }
395 }
396 }
397}
#define ATH_MSG_ERROR(x)
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
bool is_valid() const
Check if id is in a valid state.
std::set< int > m_modulLookupTableIndex[2 *SIMPLE_TRT_INDEX_OFFSET+1]
SG::ReadHandleKey< SpacePointContainer > m_spacepointsSCTname
SG::ReadHandleKey< SpacePointOverlapCollection > m_spacepointsOverlapname
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
bool isUsed(const PrepRawData &prd) const
does this PRD belong to at least one track?

◆ initialize()

StatusCode InDet::SimpleTRT_SeededSpacePointFinder_ATL::initialize ( )
overridevirtual

Implements InDet::ITRT_SeededSpacePointFinder.

Definition at line 49 of file SimpleTRT_SeededSpacePointFinder_ATL.cxx.

50{
51
52 // msg().setLevel(outputLevel());
53
54 // PRD-to-track association (optional)
55 ATH_CHECK( m_prdToTrackMap.initialize( !m_prdToTrackMap.key().empty()));
56
57 // get region selector
58 StatusCode sc = m_pRegionSelector.retrieve();
59 if( sc.isFailure() )
60 {
61 msg(MSG::FATAL) << "Failed to retrieve RegionSelector Service";
62 return sc;
63 }
64
65 sc = detStore()->retrieve(m_sctId, "SCT_ID");
66 if (sc.isFailure())
67 {
68 msg(MSG::ERROR) << "Could not get SCT_ID helper !" << endmsg;
69 return StatusCode::FAILURE;
70 }
71
72 sc = detStore()->retrieve(m_trtId, "TRT_ID");
73 if (sc.isFailure())
74 {
75 msg(MSG::ERROR) << "Could not get TRT_ID helper !" << endmsg;
76 return StatusCode::FAILURE;
77 }
78
80
81 ATH_CHECK(m_spacepointsSCTname.initialize());
83
84 return sc;
85}
#define ATH_CHECK
Evaluate an expression and check for errors.
const ServiceHandle< StoreGateSvc > & detStore() const

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & InDet::ITRT_SeededSpacePointFinder::interfaceID ( )
inlinestaticinherited

Definition at line 108 of file ITRT_SeededSpacePointFinder.h.

109 {
111 }
static const InterfaceID IID_ITRT_SeededSpacePointFinder("InDet::ITRT_SeededSpacePointFinder", 1, 0)

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ newEvent()

std::unique_ptr< InDet::ITRT_SeededSpacePointFinder::IEventData > InDet::SimpleTRT_SeededSpacePointFinder_ATL::newEvent ( ) const
inlineoverridevirtual

obsolete, do not do anything.

Implements InDet::ITRT_SeededSpacePointFinder.

Definition at line 178 of file SimpleTRT_SeededSpacePointFinder_ATL.h.

178 {
179 return std::unique_ptr<InDet::ITRT_SeededSpacePointFinder::IEventData>();
180 }

◆ newRegion()

std::unique_ptr< InDet::ITRT_SeededSpacePointFinder::IEventData > InDet::SimpleTRT_SeededSpacePointFinder_ATL::newRegion ( const std::vector< IdentifierHash > & ,
const std::vector< IdentifierHash > &  ) const
overridevirtual

Implements InDet::ITRT_SeededSpacePointFinder.

Definition at line 102 of file SimpleTRT_SeededSpacePointFinder_ATL.cxx.

104{
105 return {};
106}

◆ next()

const SiSpacePointsSeed * InDet::SimpleTRT_SeededSpacePointFinder_ATL::next ( InDet::ITRT_SeededSpacePointFinder::IEventData & event_data) const
inlineoverridevirtual

Implements InDet::ITRT_SeededSpacePointFinder.

Definition at line 172 of file SimpleTRT_SeededSpacePointFinder_ATL.h.

173 {
174 return nullptr;
175 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ pairIsOk()

bool InDet::SimpleTRT_SeededSpacePointFinder_ATL::pairIsOk ( const Trk::SpacePoint * sp1,
const Trk::SpacePoint * sp2,
const Trk::TrackParameters & directionTRT ) const
private

applies rough cuts on the quality of a SP pair

This method applies quality cuts on a given pairing of SpacePoints. The quality cuts at the moment are:

  • the closest approach of the line connecting the two SpacePoints to the beam axis in (x,y) has to be smaller than a given limit.
  • the direction in phi of the line connecting the two SpacePoints must not deviate from the phi direction of the TRT track parameter by more than a given tolerance.

If the cuts are satisfied, true is returned, false otherwise.

Definition at line 468 of file SimpleTRT_SeededSpacePointFinder_ATL.cxx.

469{
477
478
481 //Amg::Vector3D r0 = directionTRT.position();
482 const Amg::Vector3D& v0(directionTRT.momentum());
483 Amg::Vector3D s1s2 = s2-s1; // vector from s1 to s2
484
485 msg(MSG::VERBOSE) << "Checking Space Point Pair at ( "<< s1.x() << ", " << s1.y() << ", " << s1.z()
486 << " ) and ( "<< s2.x() << ", " << s2.y() << ", " << s2.z() << " )" << endmsg;
487
488 // Cut on closest approach to z-axis
489 double t = ( s1.x()-s2.x() )*( s1.x()-s2.x() ) + ( s1.y()-s2.y() )*( s1.y()-s2.y() ) ;
490 if (t)
491 {
492 t = ( s1.x()*(s2.x()-s1.x()) + s1.y()*(s2.y()-s1.y()) ) / t;
493 Amg::Vector3D perigee = s1 + t*(s1-s2);
494 msg(MSG::VERBOSE) << " closest approach to beam-pipe at ( "<< perigee.x() << ", " << perigee.y() << ", " << perigee.z() << " ) transversal: " << perigee.perp()<<endmsg;
495 if (perigee.perp() > m_perigeeCut ) return false;
496 }
497 msg(MSG::VERBOSE) << " Passed cut on r-phi impact parameter" <<endmsg;
498
499
500 // Cut on angle between s1-s2 and parameter direction
501 double diffPhi= std::abs(s1s2.phi()-v0.phi());
502
503 if (diffPhi > CLHEP::pi ) diffPhi = 2.*CLHEP::pi - diffPhi;
504 if (diffPhi > CLHEP::pi/2. ) diffPhi = CLHEP::pi - diffPhi;
505 msg(MSG::VERBOSE) << "Phi directions differ by "<< diffPhi << endmsg;
506 if ( diffPhi > m_directionPhiCut ) return false;
507
508 msg(MSG::VERBOSE) << " Passed cut on direction phi deviation" <<endmsg;
509
510 return true;
511}
DoubleProperty m_perigeeCut
rough cuts on the quality of the suggested SP pair
virtual const Amg::Vector3D & globalPosition() const override final
Interface method to get the global Position.

◆ printLookupTable()

void InDet::SimpleTRT_SeededSpacePointFinder_ATL::printLookupTable ( ) const
private

This method provides a printout of the look-up table for debugging purposes. It is called in the setup.

Definition at line 775 of file SimpleTRT_SeededSpacePointFinder_ATL.cxx.

776{
778
779
780 msg(MSG::VERBOSE) << "=====================================================================================================================" << endmsg;
781 msg(MSG::VERBOSE) << " Module Lookup table: " << endmsg;
782 msg(MSG::VERBOSE) << "---------------------------------------------------------------------------------------------------------------------" << endmsg;
783 for (int i = -14; i<15 ; ++i)
784 {
785 msg(MSG::VERBOSE) << "Module "<< i << " : " << endmsg;
786 std::list<std::pair<int,int> >::const_iterator itList = m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].begin();
787 std::list<std::pair<int,int> >::const_iterator endList = m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].end();
788 for ( ; itList != endList ; ++itList )
789 msg(MSG::VERBOSE) << " (" << itList->first << ", " << itList->second << ") " ;
790 msg(MSG::VERBOSE) << " " << endmsg;
791 std::set<int>::const_iterator itIndex = m_modulLookupTableIndex[i+SIMPLE_TRT_INDEX_OFFSET].begin();
792 std::set<int>::const_iterator endIndex = m_modulLookupTableIndex[i+SIMPLE_TRT_INDEX_OFFSET].end();
793 msg(MSG::VERBOSE) << "Needs Layers: { " ;
794 for ( ; itIndex != endIndex ; ++ itIndex )
795 msg(MSG::VERBOSE) << *itIndex << ", " ;
796 msg(MSG::VERBOSE) << " } " << endmsg;
797 msg(MSG::VERBOSE) << "...................................................................................................................." << endmsg;
798
799 }
800 msg(MSG::VERBOSE) << "=====================================================================================================================" << endmsg;
801
802}

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setupLookUpTable()

void InDet::SimpleTRT_SeededSpacePointFinder_ATL::setupLookUpTable ( )
private

the name says it

This method sets up the look-up table. This table is an array of lists of integer pairs. The index of the array corresponds to a number which identifies the part of the TRT the TRT track parameter comes from, the two integer numbers in the pairs identify the SCT layers or wheels from which SpacePoints have to be paired if the TRT track parameter comes from the corresponding TRT part.

The numbering scheme for the TRT detectors: 0 -> barrel straws 1 - 14 -> forward wheels, counted from inside out -1 - -14 -> backward wheels, -1 the innermost

The numbering scheme for the SCT detector (first number ATLAS, second number within this Tool):

        ____backw_________________________     __barrel__    ________forw_____________

Index = 8 7 6 5 4 3 2 1 0 3 (13) 0 1 2 3 4 5 6 7 8 -9 -8 -7 -6 -5 -4 -3 -2 -1 2 (12) 1 2 3 4 5 6 7 8 9 1 (11) 0 (10)

The numbering scheme used here deviates from the numbering used in the ATLAS Detector description for two reasons:

  • In order to be fast, the identification has to be done by one id number only. ATLAS id is based on two information: the barrel-endcap flag and the modul number. As the modul numbers alone are ambiguous (forward, backward, barrel may feature the same module numbers), an unambiguous id number is derived from both informations.

As anyway a specific numbering scheme has to be employed here, it is designed to be anti-symmetric with respect to forward and backward direction. This allows a convenient automatic set-up of the backward part of the look-up table, once the forward part is defined and thus reduces the likelihood of mistakes. In order to compensate for negative module numbers, an offset is added when they are used as index to the look-up table, because C++ does not allow negative indices (as FORTRAN would do ... :-) )

Depending on the number of allowed holes, i.e. basically the number of SCT layers or wheels omitted between the SpacePoints of a pair, additional pairings of SCT layers are added to the look-up table.

Definition at line 513 of file SimpleTRT_SeededSpacePointFinder_ATL.cxx.

514{
549
550 m_modulLookupTable[0+SIMPLE_TRT_INDEX_OFFSET].emplace_back(12,13);
551 if (m_maxHoles > 0 )
552 {
553 m_modulLookupTable[0+SIMPLE_TRT_INDEX_OFFSET].emplace_back(11,12);
554 m_modulLookupTable[0+SIMPLE_TRT_INDEX_OFFSET].emplace_back(11,13);
555 m_modulLookupTable[0+SIMPLE_TRT_INDEX_OFFSET].emplace_back(10,12);
556 }
557 if (m_maxHoles > 1 )
558 {
559 m_modulLookupTable[0+SIMPLE_TRT_INDEX_OFFSET].emplace_back(10,13);
560 m_modulLookupTable[0+SIMPLE_TRT_INDEX_OFFSET].emplace_back(10,11);
561 }
562
563 m_modulLookupTable[1+SIMPLE_TRT_INDEX_OFFSET].emplace_back(12,13);
564 m_modulLookupTable[1+SIMPLE_TRT_INDEX_OFFSET].emplace_back(11,12);
565 m_modulLookupTable[1+SIMPLE_TRT_INDEX_OFFSET].emplace_back(10,11);
566 m_modulLookupTable[1+SIMPLE_TRT_INDEX_OFFSET].emplace_back(13,1);
567 m_modulLookupTable[1+SIMPLE_TRT_INDEX_OFFSET].emplace_back(12,1);
568 m_modulLookupTable[1+SIMPLE_TRT_INDEX_OFFSET].emplace_back(11,1);
569 m_modulLookupTable[1+SIMPLE_TRT_INDEX_OFFSET].emplace_back(10,1);
570 m_modulLookupTable[1+SIMPLE_TRT_INDEX_OFFSET].emplace_back(1,2);
571 if (m_maxHoles > 0 )
572 {
573 m_modulLookupTable[1+SIMPLE_TRT_INDEX_OFFSET].emplace_back(11,13);
574 m_modulLookupTable[1+SIMPLE_TRT_INDEX_OFFSET].emplace_back(10,12);
575 m_modulLookupTable[1+SIMPLE_TRT_INDEX_OFFSET].emplace_back(13,2);
576 m_modulLookupTable[1+SIMPLE_TRT_INDEX_OFFSET].emplace_back(12,2);
577 m_modulLookupTable[1+SIMPLE_TRT_INDEX_OFFSET].emplace_back(11,2);
578 m_modulLookupTable[1+SIMPLE_TRT_INDEX_OFFSET].emplace_back(10,2);
579 }
580 if (m_maxHoles > 1 )
581 {
582 m_modulLookupTable[1+SIMPLE_TRT_INDEX_OFFSET].emplace_back(10,13);
583 }
584
585 // TRT wheels 2 and 3
586 for (int i = 2; i<4 ; ++ i)
587 {
588 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(12,13);
589 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(13,1);
590 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(12,1);
591 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(11,1);
592 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(10,1);
595 if (m_maxHoles > 0 )
596 {
597 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(11,12);
598 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(13,2);
599 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(12,2);
600 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(11,2);
601 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(10,2);
603 }
604 if (m_maxHoles > 1 )
605 {
606 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(10,11);
607 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(10,12);
608 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(13,3);
609 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(12,3);
610 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(11,3);
611 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(10,3);
612 }
613 }
614
615 // TRT wheels 4 - 6
616 for (int i = 4 ; i < 7 ; ++i )
617 {
618 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(12,13);
619 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(13,1);
620 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(12,1);
621 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(11,1);
622 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(10,1);
627 if (m_maxHoles > 0 )
628 {
629 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(11,13);
630 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(11,12);
631 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(13,2);
632 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(12,2);
633 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(11,2);
634 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(10,2);
638 }
639 if (m_maxHoles > 1 )
640 {
641 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(13,3);
642 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(12,3);
643 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(11,3);
644 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(10,3);
647 }
648 }
649
650
651 // TRT wheels 7 - 9
652 for ( int i = 7 ; i < 10 ; ++i)
653 {
657 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(5,6);
658 if (m_maxHoles > 0 )
659 {
665 }
666 if (m_maxHoles > 1 )
667 {
668 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(13,3);
669 m_modulLookupTable[i+SIMPLE_TRT_INDEX_OFFSET].emplace_back(12,3);
673 }
674 }
675
676
677 // TRT wheels 10 - 12
678 for (int i = 10 ; i < 13 ; ++i )
679 {
683 if (m_maxHoles > 0 )
684 {
689 }
690 if (m_maxHoles > 1 )
691 {
697 }
698 }
699
700
701 // TRT - wheels 13 and 14
702 for (int i = 13 ; i < 15 ; ++i )
703 {
707 if (m_maxHoles > 0 )
708 {
713 }
714 if (m_maxHoles > 0 )
715 {
721 }
722 }
723
724
725 // mirror the endcap information
726 for ( int iTable = 1 ; iTable < 15 ; ++iTable )
727 {
728 std::list<std::pair<int,int> >::const_iterator itList = m_modulLookupTable[iTable+SIMPLE_TRT_INDEX_OFFSET].begin();
729 std::list<std::pair<int,int> >::const_iterator endList = m_modulLookupTable[iTable+SIMPLE_TRT_INDEX_OFFSET].end();
730 for ( ; itList != endList ; ++itList )
731 {
732 int i = itList->first;
733 int j = itList->second;
734 if (i<10) i*=-1; // don't change the sign of the barrel modules...
735 if (j<10) j*=-1;
737 }
738 }
739
740 // fill the short index for the lookup table
741 for ( int iTable = -14 ; iTable < 15 ; ++iTable )
742 {
743 std::list<std::pair<int,int> >::const_iterator itList = m_modulLookupTable[iTable+SIMPLE_TRT_INDEX_OFFSET].begin();
744 std::list<std::pair<int,int> >::const_iterator endList = m_modulLookupTable[iTable+SIMPLE_TRT_INDEX_OFFSET].end();
745 for ( ; itList != endList ; ++itList )
746 {
749 }
750 }
751
753
754}
IntegerProperty m_maxHoles
controls how many not considered SCT layers are allowed between two SP in order to form a seed pair

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ TRT_Module()

int InDet::SimpleTRT_SeededSpacePointFinder_ATL::TRT_Module ( const Trk::TrackParameters & directionTRT) const
private

returns the number of the TRT wheel or barrel where the TP belongs to

This method returns the id number of the TRT part, the given trackparameter comes from following the numbering scheme applied in this Tool (see documentation to setupLookupTable).

Definition at line 806 of file SimpleTRT_SeededSpacePointFinder_ATL.cxx.

807{
811
812 // find out from which SCT part the segment is built
813 Identifier id ;
814
816
817 if (!id.is_valid())
818 {
819 msg(MSG::WARNING) << " Id not valid "<<endmsg;
820 return -999;
821 }
822 int modulNumber;
823 int detRegionIndex = m_trtId->barrel_ec(id) ;
824 if ( detRegionIndex == -1 || detRegionIndex == 1 )
825 modulNumber = 0; // central TRT
826 else if ( detRegionIndex == -2 || detRegionIndex == 2 )
827 {
828 modulNumber = m_trtId->layer_or_wheel(id) + 1 ; // forward/bachward wheels
829 modulNumber *= (detRegionIndex/2) ; // add sign to distinguish forward and backward
830 }
831 else
832 {
833 msg(MSG::WARNING) << "TRT barrel-endcap id not in {-2;-1;1;2}" << endmsg;
834 return -999;
835 }
836
837 return modulNumber;
838
839}
virtual const Surface & associatedSurface() const override=0
Access to the Surface associated to the Parameters.
Identifier associatedDetectorElementIdentifier() const
return Identifier of the associated Detector Element

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_directionPhiCut

DoubleProperty InDet::SimpleTRT_SeededSpacePointFinder_ATL::m_directionPhiCut {this, "DirectionPhiCut", 0.05}
private

Definition at line 101 of file SimpleTRT_SeededSpacePointFinder_ATL.h.

101{this, "DirectionPhiCut", 0.05};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_maxHoles

IntegerProperty InDet::SimpleTRT_SeededSpacePointFinder_ATL::m_maxHoles {this, "MaxHoles", 1}
private

controls how many not considered SCT layers are allowed between two SP in order to form a seed pair

Definition at line 97 of file SimpleTRT_SeededSpacePointFinder_ATL.h.

97{this, "MaxHoles", 1};

◆ m_modulLookupTable

modulLookupTable InDet::SimpleTRT_SeededSpacePointFinder_ATL::m_modulLookupTable[2 *SIMPLE_TRT_INDEX_OFFSET+1]
private

Lookup table that contains the SCT Layers to be considered to provide SP for the pairing in dependence on the TRT part the track parameter is on.

Definition at line 116 of file SimpleTRT_SeededSpacePointFinder_ATL.h.

◆ m_modulLookupTableIndex

std::set<int> InDet::SimpleTRT_SeededSpacePointFinder_ATL::m_modulLookupTableIndex[2 *SIMPLE_TRT_INDEX_OFFSET+1]
private

Definition at line 117 of file SimpleTRT_SeededSpacePointFinder_ATL.h.

◆ m_perigeeCut

DoubleProperty InDet::SimpleTRT_SeededSpacePointFinder_ATL::m_perigeeCut {this, "PerigeeCut", 200.}
private

rough cuts on the quality of the suggested SP pair

Definition at line 100 of file SimpleTRT_SeededSpacePointFinder_ATL.h.

100{this, "PerigeeCut", 200.};

◆ m_prdToTrackMap

SG::ReadHandleKey<Trk::PRDtoTrackMap> InDet::SimpleTRT_SeededSpacePointFinder_ATL::m_prdToTrackMap {this,"PRDtoTrackMap",""}
private

Definition at line 111 of file SimpleTRT_SeededSpacePointFinder_ATL.h.

112{this,"PRDtoTrackMap",""};

◆ m_pRegionSelector

ToolHandle<IRegSelTool> InDet::SimpleTRT_SeededSpacePointFinder_ATL::m_pRegionSelector { this, "RegSelTool_SCT", "RegSelTool/RegSelTool_SCT" }
private

Region Selector.

Definition at line 121 of file SimpleTRT_SeededSpacePointFinder_ATL.h.

121{ this, "RegSelTool_SCT", "RegSelTool/RegSelTool_SCT" };

◆ m_sctId

const SCT_ID* InDet::SimpleTRT_SeededSpacePointFinder_ATL::m_sctId = nullptr
private

ID SCT helper.

Definition at line 124 of file SimpleTRT_SeededSpacePointFinder_ATL.h.

◆ m_spacepointsOverlapname

SG::ReadHandleKey<SpacePointOverlapCollection> InDet::SimpleTRT_SeededSpacePointFinder_ATL::m_spacepointsOverlapname {this,"SpacePointsSCTName","OverlapSpacePoints","RHK to retrieve OverlapCollection"}
private

Definition at line 110 of file SimpleTRT_SeededSpacePointFinder_ATL.h.

110{this,"SpacePointsSCTName","OverlapSpacePoints","RHK to retrieve OverlapCollection"} ;

◆ m_spacepointsSCTname

SG::ReadHandleKey<SpacePointContainer> InDet::SimpleTRT_SeededSpacePointFinder_ATL::m_spacepointsSCTname {this,"SpacePointsSCTName","SCT_SpacePoints","RHK to retrieve SCT SpacePointContainer"}
private

Definition at line 109 of file SimpleTRT_SeededSpacePointFinder_ATL.h.

109{this,"SpacePointsSCTName","SCT_SpacePoints","RHK to retrieve SCT SpacePointContainer"} ;

◆ m_trtId

const TRT_ID* InDet::SimpleTRT_SeededSpacePointFinder_ATL::m_trtId = nullptr
private

ID TRT helper.

Definition at line 127 of file SimpleTRT_SeededSpacePointFinder_ATL.h.

◆ m_useROI

BooleanProperty InDet::SimpleTRT_SeededSpacePointFinder_ATL::m_useROI {this, "RestrictROI", true}
private

Controls, if SP have to be checked with the AssociationTool of the forward tracking and to avoid double use of measurements.

It is set true, if an AssociationTool is specified in the setup controls if the ROI is restricted around the TRT trackparameters

Definition at line 90 of file SimpleTRT_SeededSpacePointFinder_ATL.h.

90{this, "RestrictROI", true};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


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