 |
ATLAS Offline Software
|
#include <TrigFastTrackFinder.h>
|
| TrigFastTrackFinder (const std::string &name, ISvcLocator *pSvcLocator) |
|
virtual | ~TrigFastTrackFinder () |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | finalize () override |
|
virtual StatusCode | start () override |
|
virtual StatusCode | execute (const EventContext &ctx) const override |
|
StatusCode | findTracks (InDet::SiTrackMakerEventData_xk &event_data, const TrigRoiDescriptor &roi, const TrackCollection *inputTracks, TrackCollection &outputTracks, const EventContext &ctx) const |
|
double | trackQuality (const Trk::Track *Tr) const |
|
void | filterSharedTracks (std::vector< std::tuple< bool, double, Trk::Track * >> &QT) const |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual bool | isClonable () const override |
| Specify if the algorithm is clonable. More...
|
|
virtual unsigned int | cardinality () const override |
| Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
|
|
virtual StatusCode | sysExecute (const EventContext &ctx) override |
| Execute an algorithm. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
virtual bool | filterPassed (const EventContext &ctx) const |
|
virtual void | setFilterPassed (bool state, const EventContext &ctx) const |
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
void | fillMon (const TrackCollection &tracks, const TrigVertexCollection &vertices, const TrigRoiDescriptor &roi, const EventContext &ctx) const |
|
void | runResidualMonitoring (const Trk::Track &track, const EventContext &) const |
|
void | makeSeedsOnGPU (const TrigCombinatorialSettings &, const IRoiDescriptor *, const std::vector< TrigSiSpacePointBase > &, std::vector< TrigInDetTriplet > &) const |
|
StatusCode | createEmptyUTTEDMs (const EventContext &) const |
|
int | getSPLayer (int, float) const |
|
StatusCode | calcdEdx (const EventContext &, const TrackCollection &) const |
|
StatusCode | finddEdxTrk (const EventContext &, const TrackCollection &) const |
|
float | dEdx (const Trk::Track *, int &, int &, std::vector< float > &, std::vector< float > &, std::vector< float > &, std::vector< float > &, std::vector< int > &, std::vector< int > &, std::vector< int > &) const |
|
int | recoAndFillDisTrkCand (const std::string &, TrackCollection *, std::vector< Trk::Track * > &, xAOD::TrigCompositeContainer *, const std::vector< double > &, const std::vector< double > &, const std::vector< double > &, bool, const EventContext &) const |
|
void | print_disTrk (const Trk::Track *t) const |
|
std::unique_ptr< Trk::Track > | disTrk_refit (Trk::Track *t, const EventContext &ctx) const |
|
std::array< OneLayerInfo_t, N_BARREL_LAYERS > | getTrkBarrelLayerInfo (Trk::Track *aTrack) const |
|
bool | isCleaningPassDisTrack (const TrigInDetTriplet &, Trk::Track *, bool) const |
|
double | disTrackQuality (const Trk::Track *) const |
|
void | recoVertexForDisTrack (const EventContext &, TrackCollection &, std::vector< double > &, std::vector< double > &, std::vector< double > &) const |
|
bool | isPreselPassDisTrackBeforeRefit (Trk::Track *, double, double) const |
|
bool | isPreselPassDisTrackAfterRefit (Trk::Track *, Trk::Track *, double, double) const |
|
bool | isGoodForDisTrackVertex (Trk::Track *, const EventContext &) const |
|
std::unique_ptr< const Trk::TrackParameters > | extrapolateDisTrackToBS (Trk::Track *, const std::vector< double > &, const std::vector< double > &, const std::vector< double > &, const EventContext &) const |
|
void | filterSharedDisTracks (std::vector< std::tuple< bool, double, Trk::Track * >> &) const |
|
void | fillDisTrkCand (xAOD::TrigComposite *, const std::string &, Trk::Track *, const std::unique_ptr< const Trk::TrackParameters > &) const |
|
void | fillDisTrkCand (xAOD::TrigComposite *, const std::string &, Trk::Track *, const std::unique_ptr< const Trk::TrackParameters > &, bool, std::vector< Trk::Track * > &) const |
|
TrigFastTrackFinder::DisTrkCategory | getDisTrkCategory (Trk::Track *trk) const |
|
StatusCode | findDisTracks (const EventContext &, TrackCollection &, std::vector< std::tuple< bool, double, Trk::Track * >> &, std::vector< std::tuple< bool, double, Trk::Track * >> &, TrackCollection &, const std::vector< double > &, const std::vector< double > &, const std::vector< double > &) const |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
|
ToolHandle< ITrigL2LayerNumberTool > | m_numberingTool {this, "LayerNumberTool", "TrigL2LayerNumberTool"} |
|
ToolHandle< ITrigSpacePointConversionTool > | m_spacePointTool {this, "SpacePointProviderTool", "TrigSpacePointConversionTool"} |
|
ToolHandle< InDet::ISiTrackMaker > | m_trackMaker |
|
ToolHandle< ITrigInDetTrackFitter > | m_trigInDetTrackFitter |
|
ToolHandle< ITrigZFinder > | m_trigZFinder |
|
ToolHandle< Trk::ITrackSummaryTool > | m_trackSummaryTool |
|
ToolHandle< GenericMonitoringTool > | m_monTool { this, "MonTool", "", "Monitoring tool" } |
|
ToolHandle< Trk::IExtrapolator > | m_extrapolator { this, "Extrapolator", "Trk::Extrapolator/AtlasExtrapolator" } |
|
ToolHandle< Trk::ITrackFitter > | m_disTrkFitter |
|
ToolHandle< ITrigInDetAccelerationTool > | m_accelTool {this, "TrigAccelerationTool", ""} |
|
ServiceHandle< ITrigInDetAccelerationSvc > | m_accelSvc {this, "TrigAccelerationSvc", ""} |
|
SG::ReadHandleKey< TrigRoiDescriptorCollection > | m_roiCollectionKey |
|
SG::ReadHandleKey< TrackCollection > | m_inputTracksKey |
|
SG::WriteHandleKey< TrackCollection > | m_outputTracksKey |
|
SG::ReadHandleKey< Trk::PRDtoTrackMap > | m_prdToTrackMap {this,"PRDtoTrackMap",""} |
|
SG::WriteHandleKey< xAOD::TrigCompositeContainer > | m_dEdxTrkKey {this, "dEdxTrk", "", ""} |
|
SG::WriteHandleKey< xAOD::TrigCompositeContainer > | m_dEdxHitKey {this, "dEdxHit", "", ""} |
|
SG::WriteHandleKey< xAOD::TrigCompositeContainer > | m_disTrkCandKey {this, "DisTrkCand","", ""} |
|
bool | m_useBeamSpot |
|
bool | m_vertexSeededMode |
|
bool | m_doZFinder |
|
bool | m_doZFinderOnly |
|
bool | m_storeZFinderVertices |
|
bool | m_doFastZVseeding |
|
bool | m_doResMonitoring |
|
TrigCombinatorialSettings | m_tcs |
|
int | m_minHits |
|
int | m_nfreeCut |
|
float | m_tripletMinPtFrac |
|
float | m_pTmin |
|
float | m_initialD0Max |
|
float | m_Z0Max |
|
bool | m_checkSeedRedundancy |
|
SG::ReadCondHandleKey< InDet::BeamSpotData > | m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" } |
|
std::atomic< unsigned int > | m_countTotalRoI |
|
std::atomic< unsigned int > | m_countRoIwithEnoughHits |
|
std::atomic< unsigned int > | m_countRoIwithTracks |
|
const PixelID * | m_pixelId |
|
const SCT_ID * | m_sctId |
|
const AtlasDetectorID * | m_idHelper |
|
Trk::ParticleHypothesis | m_particleHypothesis |
|
bool | m_useNewLayerNumberScheme |
|
bool | m_useGPU |
|
bool | m_LRTmode |
|
float | m_LRTD0Min |
|
float | m_LRTHardMinPt |
|
std::string | m_trigseedML_LUT |
|
std::string | m_connectionFile |
|
bool | m_dodEdxTrk |
|
bool | m_doDisappearingTrk |
|
bool | m_ITkMode |
|
bool | m_standaloneMode |
|
ToolHandle< ITrigInDetTrackSeedingTool > | m_seedingTool {this, "TrackSeedingTool", ""} |
|
Gaudi::Property< bool > | m_useEtaBinning {this, "UseEtaBinning", true, "Split layers into eta bins"} |
|
Gaudi::Property< bool > | m_doCloneRemoval {this, "doCloneRemoval", true, "Remove tracks sharing too many hits"} |
|
Gaudi::Property< bool > | m_doTrackRefit {this, "doTrackRefit", true, "Refit tracks after the combinatorial track following"} |
|
Gaudi::Property< bool > | m_useTracklets {this, "UseTracklets", false, "Use tracklet seeds from ITk track seeding"} |
|
DataObjIDColl | m_extendedExtraObjects |
| Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
|
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
Definition at line 96 of file TrigFastTrackFinder.h.
◆ StoreGateSvc_t
◆ DisTrkCategory
◆ TrigFastTrackFinder()
TrigFastTrackFinder::TrigFastTrackFinder |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
Initial cut
SeedMaker
Doublet finding properties.
Triplet finding properties.
settings for the ML-enhanced track seeding
Definition at line 54 of file TrigFastTrackFinder.cxx.
57 m_trackMaker(
"InDet::SiTrackMaker_xk/InDetTrigSiTrackMaker"),
94 declareProperty(
"zVertexResolution",
m_tcs.
m_zvError = 10.0,
" Half-width (mm) in z of z region used to filter seeds when doFastZVertexSeeding enabled" );
95 declareProperty(
"zVertexResolutionEndcap",
m_tcs.
m_zvErrorEndcap = -1,
" Half-width (mm) in z of region used to filter seeds when doFastZVertexSeeding enabled, for endcap pixels; set to zVertexResolution value later if left negative" );
145 "TrackCollection name");
149 "TrackCollection name");
◆ ~TrigFastTrackFinder()
TrigFastTrackFinder::~TrigFastTrackFinder |
( |
| ) |
|
|
virtual |
◆ calcdEdx()
◆ cardinality()
Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
Override this to return 0 for reentrant algorithms.
Override this to return 0 for reentrant algorithms.
Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.
◆ createEmptyUTTEDMs()
StatusCode TrigFastTrackFinder::createEmptyUTTEDMs |
( |
const EventContext & |
ctx | ) |
const |
|
private |
Definition at line 1518 of file TrigFastTrackFinder.cxx.
1522 ATH_CHECK( dEdxTrkHandle.record(std::make_unique<xAOD::TrigCompositeContainer>(), std::make_unique<xAOD::TrigCompositeAuxContainer>()) );
1525 ATH_CHECK( dEdxHitHandle.record(std::make_unique<xAOD::TrigCompositeContainer>(), std::make_unique<xAOD::TrigCompositeAuxContainer>()) );
1529 ATH_CHECK( disTrkCandHandle.record(std::make_unique<xAOD::TrigCompositeContainer>(), std::make_unique<xAOD::TrigCompositeAuxContainer>()) );
1531 return StatusCode::SUCCESS;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ dEdx()
float TrigFastTrackFinder::dEdx |
( |
const Trk::Track * |
track, |
|
|
int & |
pixelhits, |
|
|
int & |
n_usedhits, |
|
|
std::vector< float > & |
v_pixhit_dedx, |
|
|
std::vector< float > & |
v_pixhit_tot, |
|
|
std::vector< float > & |
v_pixhit_trkchi2, |
|
|
std::vector< float > & |
v_pixhit_trkndof, |
|
|
std::vector< int > & |
v_pixhit_iblovfl, |
|
|
std::vector< int > & |
v_pixhit_loc, |
|
|
std::vector< int > & |
v_pixhit_layer |
|
) |
| const |
|
private |
Definition at line 1744 of file TrigFastTrackFinder.cxx.
1749 const float Pixel_sensorthickness=.025;
1750 const float IBL_3D_sensorthickness=.023;
1751 const float IBL_PLANAR_sensorthickness=.020;
1753 const float energyPair = 3.68e-6;
1754 const float sidensity = 2.329;
1756 float conversion_factor=energyPair/sidensity;
1763 v_pixhit_dedx.clear();
1764 v_pixhit_tot.clear();
1765 v_pixhit_trkchi2.clear();
1766 v_pixhit_trkndof.clear();
1767 v_pixhit_iblovfl.clear();
1768 v_pixhit_loc.clear();
1769 v_pixhit_layer.clear();
1771 const int PIXLOC_IBL_PL = 0;
1772 const int PIXLOC_IBL_3D = 1;
1773 const int PIXLOC_PIX_LY = 2;
1774 const int PIXLOC_PIX_EC = 3;
1775 const int PIXLOC_IBL_UNKNOWN = 4;
1776 const int PIXLOC_PIX_UNKNOWN = 5;
1778 std::multimap<float,int> dEdxMap;
1779 float dEdxValue = 0;
1783 if (recoTrackStates) {
1791 for ( ; tsosIter != tsosIterEnd; ++tsosIter) {
1796 if ( measurement ==
nullptr ) {
1801 if(
tp ==
nullptr ) {
1806 if ( pixclus ==
nullptr ) {
1811 if( prd ==
nullptr ) {
1816 float dotProd =
tp->momentum().dot(
tp->associatedSurface().normal());
1817 float cosalpha = std::abs(dotProd/
tp->momentum().mag());
1818 ATH_MSG_VERBOSE(
"dotProd / cosalpha = " << dotProd <<
" / " << cosalpha);
1819 if (std::abs(cosalpha)<.16)
continue;
1821 const std::vector<int>& v_tots = prd->
totList();
1846 const float overflowIBLToT = 16;
1847 for (
int pixToT : v_tots) {
1848 if (pixToT >= overflowIBLToT) {
1855 if(((eta_module>=-10 && eta_module<=-7)||(eta_module>=6 && eta_module<=9)) && (std::abs(locy)<10. && (locx>-8.33 && locx <8.3)) ){
1856 thickness = IBL_3D_sensorthickness;
1857 loc = PIXLOC_IBL_3D;
1859 else if((eta_module>=-6 && eta_module<=5) && (std::abs(locy)<20. &&( locx >-8.33 && locx <8.3 )) ){
1860 thickness = IBL_PLANAR_sensorthickness;
1861 loc = PIXLOC_IBL_PL;
1865 loc = PIXLOC_IBL_UNKNOWN;
1868 else if(
bec==0 && std::abs(locy)<30. && (( locx > -8.20 && locx < -0.60 ) || ( locx > 0.50 && locx < 8.10 ) ) ){
1869 thickness = Pixel_sensorthickness;
1870 loc = PIXLOC_PIX_LY;
1872 else if(std::abs(
bec) == 2 && std::abs(locy)<30. && ( ( locx > -8.15 && locx < -0.55 ) || ( locx > 0.55 && locx < 8.15 ) ) ) {
1873 thickness = Pixel_sensorthickness;
1874 loc = PIXLOC_PIX_EC;
1878 loc = PIXLOC_IBL_UNKNOWN;
1882 if( loc != PIXLOC_IBL_UNKNOWN && loc != PIXLOC_PIX_UNKNOWN ) {
1883 dEdxValue =
charge*conversion_factor/thickness;
1884 dEdxMap.insert(std::pair<float,int>(dEdxValue, iblOverflow));
1888 v_pixhit_dedx.push_back(dEdxValue); v_pixhit_tot.push_back(tot);
1889 v_pixhit_trkchi2.push_back(
chi2); v_pixhit_trkndof.push_back(
ndof);
1890 v_pixhit_iblovfl.push_back(iblOverflow); v_pixhit_loc.push_back(loc); v_pixhit_layer.push_back(
layer);
1897 float averagedEdx=0.;
1902 for (std::pair<float,int> itdEdx : dEdxMap) {
1904 if(itdEdx.second==0){
1906 averagedEdx += itdEdx.first;
1909 if(itdEdx.second > 0){
1914 if (((
int)pixelhits >= 5) and ((
int)n_usedhits >= (
int)pixelhits-2)) {
1920 if((
int)IBLOverflow>0 and ((
int)pixelhits==3) and (
int)n_usedhits==1) {
1924 if((
int)IBLOverflow>0 and ((
int)pixelhits==4) and (
int)n_usedhits==2) {
1929 if (((
int)pixelhits > 1) and ((
int)n_usedhits >=(
int)pixelhits-1)) {
1934 if((
int)IBLOverflow>0 and (
int)pixelhits==1){
1936 averagedEdx=itdEdx.first;
1941 if (n_usedhits > 0 or (n_usedhits==0 and(
int)IBLOverflow>0 and (
int)pixelhits==1)) {
1942 if(n_usedhits > 0) averagedEdx = averagedEdx / n_usedhits;
1944 ATH_MSG_DEBUG(
"=====> averaged dEdx = " << averagedEdx <<
" =====>");;
1945 ATH_MSG_DEBUG(
" +++ Used hits: " << n_usedhits <<
", IBL overflows: " << IBLOverflow );;
1946 ATH_MSG_DEBUG(
" +++ Original number of measurements = " << pixelhits <<
" (map size = " << dEdxMap.size() <<
") ");
◆ detStore()
◆ disTrackQuality()
Definition at line 2093 of file TrigFastTrackFinder.cxx.
2099 double quality_pixel = 0. ;
2100 double quality_sct = 0. ;
2102 const double W = 17.;
2117 if( pixclus !=0 ) quality_pixel +=
q;
2118 else quality_sct +=
q;
2123 double quality = quality_pixel;
◆ disTrk_refit()
Definition at line 2792 of file TrigFastTrackFinder.cxx.
2794 std::unique_ptr<Trk::Track> newtrack =
nullptr;
2796 if(
t ==
nullptr )
return newtrack;
2803 if( origPerigee ==
nullptr )
return newtrack;
2807 std::vector<const Trk::MeasurementBase*>
vec;
2808 int n_measurements = 0;
2809 int n_measurements_refit = 0;
2811 if (recoTrackStates) {
2814 for ( ; tsosIter != tsosIterEnd; ++tsosIter) {
2821 if ( !pixclus && sctclus ) to_add =
false;
2823 vec.push_back(measurement);
2824 n_measurements_refit++;
2829 ATH_MSG_VERBOSE(
"... Nr of measurments / refit = " << n_measurements <<
" / " << n_measurements_refit);
2834 if( newtrack!=0 && newtrack.get() ) {
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode TrigFastTrackFinder::execute |
( |
const EventContext & |
ctx | ) |
const |
|
overridevirtual |
internalRoI.manageConstituents(false);//Don't try to delete RoIs at the end
updating this class member counter is not going to be thread safe ...
Definition at line 385 of file TrigFastTrackFinder.cxx.
389 outputTracks = std::make_unique<TrackCollection>();
414 if ( roiCollection->size()>1 )
ATH_MSG_WARNING(
"More than one Roi in the collection: " <<
m_roiCollectionKey <<
", this is not supported - use a composite Roi: Using the first Roi ONLY" );
416 if ( roiCollection->size()==0) {
418 return StatusCode::FAILURE;
431 return StatusCode::SUCCESS;
◆ extractClusterIds()
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ extraOutputDeps()
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.
◆ extrapolateDisTrackToBS()
Definition at line 2514 of file TrigFastTrackFinder.cxx.
2520 float trk_z0 =
t->perigeeParameters()->parameters()[
Trk::z0];
2521 float z0_min = 9999;
2522 for(
unsigned int i_vtx=0; i_vtx<v_zvtx.size(); i_vtx++) {
2523 float z = v_zvtx[i_vtx];
2524 if( std::abs(trk_z0-
z) < z0_min ) {
2525 z0_min = std::abs(trk_z0-
z);
2527 vtx_x = v_xvtx[i_vtx];
2528 vtx_y = v_yvtx[i_vtx];
2534 std::unique_ptr<const Trk::TrackParameters>
tmp =
2535 m_extrapolator->extrapolateDirectly(ctx, (*(
t->perigeeParameters())), persf);
◆ fillDisTrkCand() [1/2]
◆ fillDisTrkCand() [2/2]
Definition at line 2575 of file TrigFastTrackFinder.cxx.
2584 int n_hits_innermost=-1;
int n_hits_next_to_innermost=-1;
int n_hits_inner=-1;
int n_hits_pix=-1;
int n_hits_sct=-1;
2585 if( trk !=
nullptr ) {
2601 n_hits_inner = n_hits_innermost + n_hits_next_to_innermost;
2617 float theta_wrtVtx=0;
float eta_wrtVtx=0;
float pt_wrtVtx=0;
float d0_wrtVtx=0;
float z0_wrtVtx=0;
float phi_wrtVtx=0;
2618 if( vertexPerigee !=
nullptr ) {
2619 theta_wrtVtx = vertexPerigee->parameters()[
Trk::theta];
2621 float qOverP_wrtVtx = std::abs(vertexPerigee->parameters()[
Trk::qOverP]);
2622 if ( qOverP_wrtVtx < 1
e-12 ) qOverP_wrtVtx = 1
e-12;
2623 pt_wrtVtx =
std::sin(theta_wrtVtx)/qOverP_wrtVtx;
2624 d0_wrtVtx = vertexPerigee->parameters()[
Trk::d0];
2625 z0_wrtVtx = vertexPerigee->parameters()[
Trk::z0];
2626 phi_wrtVtx = vertexPerigee->parameters()[
Trk::phi];
2628 comp->setDetail<
float>(
prefix+
"_pt_wrtVtx", pt_wrtVtx);
2629 comp->setDetail<
float>(
prefix+
"_eta_wrtVtx", eta_wrtVtx);
2630 comp->setDetail<
float>(
prefix+
"_phi_wrtVtx", phi_wrtVtx);
2631 comp->setDetail<
float>(
prefix+
"_d0_wrtVtx", d0_wrtVtx);
2632 comp->setDetail<
float>(
prefix+
"_z0_wrtVtx", z0_wrtVtx);
2635 std::array<OneLayerInfo_t, N_BARREL_LAYERS> barrelInfo{};
2637 comp->setDetail<
float>(
prefix+
"_chi2sum_br_ibl", barrelInfo[0].chiSq);
2638 comp->setDetail<
float>(
prefix+
"_chi2sum_br_pix1", barrelInfo[1].chiSq);
2639 comp->setDetail<
float>(
prefix+
"_chi2sum_br_pix2", barrelInfo[2].chiSq);
2640 comp->setDetail<
float>(
prefix+
"_chi2sum_br_pix3", barrelInfo[3].chiSq);
2641 comp->setDetail<
float>(
prefix+
"_chi2sum_br_sct1", barrelInfo[4].chiSq);
2642 comp->setDetail<
float>(
prefix+
"_chi2sum_br_sct2", barrelInfo[5].chiSq);
2643 comp->setDetail<
float>(
prefix+
"_chi2sum_br_sct3", barrelInfo[6].chiSq);
2644 comp->setDetail<
float>(
prefix+
"_chi2sum_br_sct4", barrelInfo[7].chiSq);
2645 comp->setDetail<
float>(
prefix+
"_ndofsum_br_ibl", barrelInfo[0].nDof);
2646 comp->setDetail<
float>(
prefix+
"_ndofsum_br_pix1", barrelInfo[1].nDof);
2647 comp->setDetail<
float>(
prefix+
"_ndofsum_br_pix2", barrelInfo[2].nDof);
2648 comp->setDetail<
float>(
prefix+
"_ndofsum_br_pix3", barrelInfo[3].nDof);
2649 comp->setDetail<
float>(
prefix+
"_ndofsum_br_sct1", barrelInfo[4].nDof);
2650 comp->setDetail<
float>(
prefix+
"_ndofsum_br_sct2", barrelInfo[5].nDof);
2651 comp->setDetail<
float>(
prefix+
"_ndofsum_br_sct3", barrelInfo[6].nDof);
2652 comp->setDetail<
float>(
prefix+
"_ndofsum_br_sct4", barrelInfo[7].nDof);
2656 const float ISOL_CALC_Z0_DIFF_CUT = 2.5;
2657 const float ISOL_CALC_DR_CUT_TO_AVOID_ZERO = 0.015;
2658 float iso1_dr01=0;
float iso1_dr02=0;
2659 float iso2_dr01=0;
float iso2_dr02=0;
2660 float iso3_dr01=0;
float iso3_dr02=0;
2661 for(
auto t=tracksForIso.begin();
t!=tracksForIso.end();
t++) {
2662 float z0_t = (*t)->perigeeParameters()->parameters()[
Trk::z0];
2663 if( std::abs(z0_t -
z0) <= ISOL_CALC_Z0_DIFF_CUT ) {
2664 float theta_t = (*t)->perigeeParameters()->parameters()[
Trk::theta];
2665 float qOverP_t= std::abs((*t)->perigeeParameters()->parameters()[
Trk::qOverP]);
2666 if ( qOverP_t < 1
e-12 ) qOverP_t = 1
e-12;
2667 float pt_t =
std::sin(theta_t)/qOverP_t;
2668 float phi_t = (*t)->perigeeParameters()->parameters()[
Trk::phi];
2670 float deta = eta_t -
eta;
2671 float dphi = std::abs(phi_t -
phi);
2673 float dr = std::sqrt(deta*deta + dphi*dphi);
2674 if(
dr > ISOL_CALC_DR_CUT_TO_AVOID_ZERO && dr<0.1 && pt_t > 1.0*
Gaudi::Units::GeV ) iso1_dr01 += pt_t;
2675 if(
dr > ISOL_CALC_DR_CUT_TO_AVOID_ZERO && dr<0.2 && pt_t > 1.0*
Gaudi::Units::GeV ) iso1_dr02 += pt_t;
2677 if(
dr > ISOL_CALC_DR_CUT_TO_AVOID_ZERO && dr<0.1 && pt_t > 2.0*
Gaudi::Units::GeV ) iso2_dr01 += pt_t;
2678 if(
dr > ISOL_CALC_DR_CUT_TO_AVOID_ZERO && dr<0.2 && pt_t > 2.0*
Gaudi::Units::GeV ) iso2_dr02 += pt_t;
2680 if(
dr > ISOL_CALC_DR_CUT_TO_AVOID_ZERO && dr<0.1 && pt_t > 3.0*
Gaudi::Units::GeV ) iso3_dr01 += pt_t;
2681 if(
dr > ISOL_CALC_DR_CUT_TO_AVOID_ZERO && dr<0.2 && pt_t > 3.0*
Gaudi::Units::GeV ) iso3_dr02 += pt_t;
2684 comp->setDetail<
float>(
prefix+
"_iso1_dr01", iso1_dr01);
2685 comp->setDetail<
float>(
prefix+
"_iso1_dr02", iso1_dr02);
2686 comp->setDetail<
float>(
prefix+
"_iso2_dr01", iso2_dr01);
2687 comp->setDetail<
float>(
prefix+
"_iso2_dr02", iso2_dr02);
2688 comp->setDetail<
float>(
prefix+
"_iso3_dr01", iso3_dr01);
2689 comp->setDetail<
float>(
prefix+
"_iso3_dr02", iso3_dr02);
◆ fillMon()
Definition at line 1112 of file TrigFastTrackFinder.cxx.
1126 auto monRoI =
Monitored::Group(
m_monTool, mnt_roi_eta, mnt_roi_phi, mnt_roi_etaWidth, mnt_roi_phiWidth, mnt_roi_z, mnt_roi_zWidth);
1129 for(
unsigned int i=0;
i<roi.
size();
i++) {
1132 mnt_roi_eta = subroi->
eta();
1133 mnt_roi_phi = subroi->
phi();
1136 mnt_roi_z = subroi->
zed();
1143 mnt_roi_eta = roi.
eta();
1144 mnt_roi_phi = roi.
phi();
1147 mnt_roi_z = roi.
zed();
1151 std::vector<float> mnt_trk_pt;
1152 std::vector<float> mnt_trk_a0;
1153 std::vector<float> mnt_trk_z0;
1154 std::vector<float> mnt_trk_phi0;
1155 std::vector<float> mnt_trk_eta;
1156 std::vector<float> mnt_trk_chi2dof;
1157 std::vector<float> mnt_trk_nSiHits;
1158 std::vector<float> mnt_trk_nPIXHits;
1159 std::vector<float> mnt_trk_nSCTHits;
1160 std::vector<float> mnt_trk_a0beam;
1161 std::vector<float> mnt_trk_z0beam;
1162 std::vector<float> mnt_trk_dPhi0;
1163 std::vector<float> mnt_trk_dEta;
1179 mon_nSiHits, mon_nPIXHits, mon_nSCTHits, mon_a0beam, mon_z0beam, mon_dPhi0, mon_dEta);
1181 std::vector<float> mnt_roi_zVertices;
1185 mon_roi_nZvertices = vertices.
size();
1186 for (
const auto vertex : vertices) {
1187 mnt_roi_zVertices.push_back(
vertex->z());
1190 for (
auto track : tracks) {
1192 if(trackPars==
nullptr) {
1196 if(trackPars->covariance()==
nullptr) {
1200 float a0 = trackPars->parameters()[
Trk::d0];
1201 float z0 = trackPars->parameters()[
Trk::z0];
1205 mnt_trk_a0.push_back(
a0);
1206 mnt_trk_z0.push_back(
z0);
1207 mnt_trk_phi0.push_back(
phi0);
1210 mnt_trk_eta.push_back(
eta);
1211 for(
unsigned int i=0;
i<roi.
size();
i++) {
1213 mnt_trk_dEta.push_back(
eta - (roi.
at(
i))->eta());
1232 mnt_trk_pt.push_back(
pT);
1233 mnt_trk_chi2dof.push_back(
chi2);
1237 for(
auto tSOS =
track->trackStateOnSurfaces()->begin();
1238 tSOS!=
track->trackStateOnSurfaces()->end(); ++tSOS) {
1247 mnt_trk_nPIXHits.push_back(nPix);
1248 mnt_trk_nSCTHits.push_back(nSct/2);
1249 mnt_trk_nSiHits.push_back(nPix + nSct/2);
1251 ATH_MSG_DEBUG(
"REGTEST / track npix/nsct/phi0/pt/eta/d0/z0/chi2: " <<
1261 bool goodTrack = std::fabs(
pT)>1000. && (nPix + nSct/2) > 3 && nSct > 0;
◆ filterPassed()
◆ filterSharedDisTracks()
void TrigFastTrackFinder::filterSharedDisTracks |
( |
std::vector< std::tuple< bool, double, Trk::Track * >> & |
QT | ) |
const |
|
private |
Definition at line 2325 of file TrigFastTrackFinder.cxx.
2327 const int N_FREE_PIX_HITS_CUT = 2;
2329 std::set<const Trk::PrepRawData*>
clusters;
2334 [](
const std::tuple<bool, double, Trk::Track*>& lhs,
const std::tuple<bool, double, Trk::Track*>& rhs) {
2335 return std::get<1>(lhs) < std::get<1>(rhs); } );
2337 for (
auto&
q : QT) {
2339 m = std::get<2>(
q)->measurementsOnTrack()->begin(),
2340 me = std::get<2>(
q)->measurementsOnTrack()->end ();
2343 for(;
m!=me; ++
m ) {
2353 if((nf >= N_FREE_PIX_HITS_CUT) || (nf ==
nc) ) {
2357 std::get<0>(
q) =
false;
◆ filterSharedTracks()
void TrigFastTrackFinder::filterSharedTracks |
( |
std::vector< std::tuple< bool, double, Trk::Track * >> & |
QT | ) |
const |
Definition at line 1012 of file TrigFastTrackFinder.cxx.
1014 std::set<const Trk::PrepRawData*>
clusters;
1019 [](
const std::tuple<bool, double, Trk::Track*>& lhs,
const std::tuple<bool, double, Trk::Track*>& rhs) {
1020 return std::get<1>(lhs) < std::get<1>(rhs); } );
1022 for (
auto&
q : QT) {
1024 m = std::get<2>(
q)->measurementsOnTrack()->begin(),
1025 me = std::get<2>(
q)->measurementsOnTrack()->end ();
1028 for(;
m!=me; ++
m ) {
1040 std::get<0>(
q) =
false;
◆ finalize()
StatusCode TrigFastTrackFinder::finalize |
( |
| ) |
|
|
overridevirtual |
Definition at line 1047 of file TrigFastTrackFinder.cxx.
1050 ATH_MSG_INFO(
"=========================================================");
1051 ATH_MSG_INFO(
"TrigFastTrackFinder::finalize() - TrigFastTrackFinder Statistics: ");
1055 ATH_MSG_INFO(
"=========================================================");
1057 return StatusCode::SUCCESS;
◆ finddEdxTrk()
Definition at line 1655 of file TrigFastTrackFinder.cxx.
1658 ATH_CHECK( dEdxTrkHandle.record(std::make_unique<xAOD::TrigCompositeContainer>(), std::make_unique<xAOD::TrigCompositeAuxContainer>()) );
1659 auto dEdxTrkContainer = dEdxTrkHandle.ptr();
1660 dEdxTrkContainer->reserve(outputTracks.
size());
1663 ATH_CHECK( dEdxHitHandle.record(std::make_unique<xAOD::TrigCompositeContainer>(), std::make_unique<xAOD::TrigCompositeAuxContainer>()) );
1664 auto dEdxHitContainer = dEdxHitHandle.ptr();
1666 std::vector<float> mnt_dedx;
1667 std::vector<int> mnt_dedx_nusedhits;
1677 static constexpr
float TRKCUT_PTGEV_LOOSE = 3.0;
1678 static constexpr
float TRKCUT_PTGEV_TIGHT = 10.0;
1679 static constexpr
float TRKCUT_DEDX_LOOSE = 1.25;
1680 static constexpr
float TRKCUT_DEDX_TIGHT = 1.55;
1682 for (
const auto track: outputTracks) {
1684 float shift_x = 0;
float shift_y = 0;
1695 if (not igt) {
continue;}
1698 int pixelhits=0;
int n_usedhits=0;
1699 std::vector<float> v_pixhit_dedx; std::vector<float> v_pixhit_tot; std::vector<float> v_pixhit_trkchi2; std::vector<float> v_pixhit_trkndof;
1700 std::vector<int> v_pixhit_iblovfl; std::vector<int> v_pixhit_loc; std::vector<int> v_pixhit_layer;
1701 float dedx =
dEdx(
track,pixelhits,n_usedhits,v_pixhit_dedx,v_pixhit_tot,v_pixhit_trkchi2,v_pixhit_trkndof,
1702 v_pixhit_iblovfl,v_pixhit_loc,v_pixhit_layer);
1705 mnt_dedx.push_back(dedx);
1706 mnt_dedx_nusedhits.push_back(n_usedhits);
1708 bool hpt = (theTrackInfo.
ptGeV >= TRKCUT_PTGEV_TIGHT && dedx >= TRKCUT_DEDX_LOOSE);
1709 bool lpt = (theTrackInfo.
ptGeV >= TRKCUT_PTGEV_LOOSE && dedx >= TRKCUT_DEDX_TIGHT);
1710 if( ! hpt && ! lpt )
continue;
1713 dEdxTrkContainer->push_back(dEdxTrk);
1714 dEdxTrk->
setDetail<
int> (
"dEdxTrk_id", i_track);
1716 dEdxTrk->
setDetail<
float>(
"dEdxTrk_eta", theTrackInfo.
eta);
1717 dEdxTrk->
setDetail<
float>(
"dEdxTrk_phi", theTrackInfo.
phi0);
1719 dEdxTrk->
setDetail<
float>(
"dEdxTrk_dedx", dedx);
1720 dEdxTrk->
setDetail<
int> (
"dEdxTrk_dedx_n_usedhits", n_usedhits);
1726 for(
unsigned int i=0;
i<v_pixhit_dedx.size();
i++) {
1728 dEdxHitContainer->push_back(dEdxHit);
1729 dEdxHit->
setDetail<
int> (
"dEdxHit_trkid", i_track);
1730 dEdxHit->
setDetail<
float>(
"dEdxHit_dedx", v_pixhit_dedx[
i]);
1731 dEdxHit->
setDetail<
float>(
"dEdxHit_tot", v_pixhit_tot[
i]);
1732 dEdxHit->
setDetail<
float>(
"dEdxHit_trkchi2", v_pixhit_trkchi2[
i]);
1733 dEdxHit->
setDetail<
float>(
"dEdxHit_trkndof", v_pixhit_trkndof[
i]);
1734 dEdxHit->
setDetail<
int> (
"dEdxHit_iblovfl", v_pixhit_iblovfl[
i]);
1735 dEdxHit->
setDetail<
int> (
"dEdxHit_loc", v_pixhit_loc[
i]);
1736 dEdxHit->
setDetail<
int> (
"dEdxHit_layer", v_pixhit_layer[
i]);
1739 return StatusCode::SUCCESS;
◆ findDisTracks()
StatusCode TrigFastTrackFinder::findDisTracks |
( |
const EventContext & |
ctx, |
|
|
TrackCollection & |
tracks, |
|
|
std::vector< std::tuple< bool, double, Trk::Track * >> & |
qualityDisFailTrks, |
|
|
std::vector< std::tuple< bool, double, Trk::Track * >> & |
qualityDisCombTrks, |
|
|
TrackCollection & |
fittedDisCombTrks, |
|
|
const std::vector< double > & |
v_xvtx, |
|
|
const std::vector< double > & |
v_yvtx, |
|
|
const std::vector< double > & |
v_zvtx |
|
) |
| const |
|
private |
Definition at line 2362 of file TrigFastTrackFinder.cxx.
2372 ATH_CHECK( disTrkCandHandle.record(std::make_unique<xAOD::TrigCompositeContainer>(), std::make_unique<xAOD::TrigCompositeAuxContainer>()) );
2373 auto disTrkCandContainer = disTrkCandHandle.ptr();
2382 auto monDisTrk =
Monitored::Group(
m_monTool, mnt_disFailTrk_n, mnt_disFailTrk_nclone, mnt_disFailTrk_ncand, mnt_disCombTrk_n, mnt_disCombTrk_nclone, mnt_disCombTrk_ncand);
2385 std::vector<Trk::Track*> tracksForIso;
2386 for (
auto t=tracks.
begin();
t!=tracks.
end(); ++
t) {
2391 const std::string
prefix =
"disTrkCand";
2395 initialDisFailTrks.
reserve(qualityDisFailTrks.size());
2396 std::vector<int> resultCodes;
2397 for(
const auto&
q : qualityDisFailTrks) {
2398 if (std::get<0>(
q)==
true) {
2402 delete std::get<2>(
q);
2405 ATH_MSG_VERBOSE(
"===> nr of disFailTrk=" << qualityDisFailTrks.size() <<
" -> clone removal=" << initialDisFailTrks.
size());
2409 int n_disFailTrkCands =
recoAndFillDisTrkCand(
prefix, &fittedDisFailTrks, tracksForIso, disTrkCandContainer, v_xvtx, v_yvtx, v_zvtx,
true, ctx);
2412 mnt_disFailTrk_n = qualityDisFailTrks.size();
2413 mnt_disFailTrk_nclone = initialDisFailTrks.
size();
2414 mnt_disFailTrk_ncand = n_disFailTrkCands;
2417 ATH_MSG_VERBOSE(
"===> nr of disCombTrk=" << qualityDisCombTrks.size() <<
" -> clone removal=" << fittedDisCombTrks.
size());
2418 int n_disCombTrkCands =
recoAndFillDisTrkCand(
prefix, &fittedDisCombTrks, tracksForIso, disTrkCandContainer, v_xvtx, v_yvtx, v_zvtx,
false, ctx);
2421 mnt_disCombTrk_n = qualityDisCombTrks.size();
2422 mnt_disCombTrk_nclone = fittedDisCombTrks.
size();
2423 mnt_disCombTrk_ncand = n_disCombTrkCands;
2425 return StatusCode::SUCCESS;
◆ findTracks()
this uses move semantics so doesn't do a deep copy, so ...
create a new internal superRoi - should really record this
write vertex collection ... TODO: add vertices collection handling here, should not be 0 at this point unless fastZVseeding is enabled
Definition at line 436 of file TrigFastTrackFinder.cxx.
444 std::vector<int> vec_seedSize;
460 auto monTime =
Monitored::Group(
m_monTool, mnt_roi_nTracks, mnt_roi_nSPs, mnt_timer_Total, mnt_timer_SpacePointConversion,
461 mnt_timer_PatternReco, mnt_timer_TripletMaking, mnt_timer_CombTracking, mnt_timer_TrackFitter,
462 mnt_timer_dEdxTrk, mnt_timer_disTrkZVertex, mnt_timer_disTrk);
467 mnt_timer_Total.start();
468 mnt_timer_SpacePointConversion.start();
471 mnt_roi_lastStageExecuted = 1;
473 std::vector<TrigSiSpacePointBase> convertedSpacePoints;
475 convertedSpacePoints.reserve(5000);
477 std::map<Identifier, std::vector<long int> > siClusterMap;
485 long int trackIndex=0;
490 ATH_CHECK(
m_spacePointTool->getSpacePoints(roi, convertedSpacePoints, mnt_roi_nSPsPIX, mnt_roi_nSPsSCT, ctx, &siClusterMap));
498 mnt_timer_SpacePointConversion.stop();
499 mnt_roi_nSPs = mnt_roi_nSPsPIX + mnt_roi_nSPsSCT;
504 ATH_MSG_DEBUG(
"REGTEST / Found " << mnt_roi_nSPs <<
" space points.");
505 ATH_MSG_DEBUG(
"REGTEST / Found " << mnt_roi_nSPsPIX <<
" Pixel space points.");
506 ATH_MSG_DEBUG(
"REGTEST / Found " << mnt_roi_nSPsSCT <<
" SCT space points.");
507 ATH_MSG_DEBUG(
"REGTEST / converted space points size = " << convertedSpacePoints.size());
511 ATH_MSG_DEBUG(
"No tracks found - too few hits in ROI to run " << mnt_roi_nSPs);
513 return StatusCode::SUCCESS;
517 mnt_roi_lastStageExecuted = 2;
520 std::unique_ptr<TrigRoiDescriptor> tmpRoi = std::make_unique<TrigRoiDescriptor>(roi);
522 auto vertices = std::make_unique<TrigVertexCollection>();
523 std::vector<float> vZv;
528 mnt_timer_ZFinder.start();
531 tmpRoi = std::make_unique<TrigRoiDescriptor>(
true);
534 vertices = std::make_unique<TrigVertexCollection>(*
m_trigZFinder->findZ( convertedSpacePoints, roi));
540 vZv.reserve(vertices->size());
541 for (
const auto vertex : *vertices) {
544 float zMinus =
z - 7.0;
545 float zPlus =
z + 7.0;
555 mnt_timer_ZFinder.stop();
563 return StatusCode::SUCCESS;
568 mnt_roi_lastStageExecuted = 3;
570 mnt_timer_PatternReco.start();
572 mnt_timer_TripletMaking.start();
574 std::vector<TrigInDetTriplet> triplets;
576 std::vector<TrigInDetTracklet> new_tracklets;
586 mnt_roi_nSPs = mnt_roi_nSPsPIX + mnt_roi_nSPsSCT;
589 ATH_MSG_DEBUG(
"REGTEST / Found " << mnt_roi_nSPs <<
" space points.");
590 ATH_MSG_DEBUG(
"REGTEST / Found " << mnt_roi_nSPsPIX <<
" Pixel space points.");
591 ATH_MSG_DEBUG(
"REGTEST / Found " << mnt_roi_nSPsSCT <<
" SCT space points.");
595 ATH_MSG_DEBUG(
"No tracks found - too few hits in ROI to run " << mnt_roi_nSPs);
597 return StatusCode::SUCCESS;
603 seedGen.loadSpacePoints(convertedSpacePoints);
606 seedGen.createSeeds(tmpRoi.get(), vZv);
609 seedGen.createSeeds(tmpRoi.get());
612 seedGen.getSeeds(triplets);
623 unsigned int nTrackSeeds =
m_useTracklets ? new_tracklets.size() : triplets.size();
627 mnt_timer_TripletMaking.stop();
628 mnt_roi_lastStageExecuted = 4;
630 mnt_timer_CombTracking.start();
634 std::vector<std::tuple<bool, double,Trk::Track*>> qualityTracks;
635 qualityTracks.reserve(nTrackSeeds);
640 long int trackIndex=0;
646 if(
m_doDisappearingTrk ) trackEventData.combinatorialData().setFlagToReturnFailedTrack(
true);
648 std::vector<Trk::Track*> disFailTrks;
649 std::vector<Trk::Track*> disCombTrks;
650 std::vector<std::tuple<bool, double, Trk::Track*>> qualityDisFailTrks;
651 std::vector<std::tuple<bool, double, Trk::Track*>> qualityDisCombTrks;
652 int disTrk_n_disCombTrks=0;
653 int disTrk_n_disCombTrks_cleaning=0;
654 int disTrk_n_disFailTrks=0;
655 int disTrk_n_disFailTrks_cleaning=0;
659 for(
unsigned int seedIdx=0;seedIdx!=nTrackSeeds;seedIdx++) {
661 std::vector<const Trk::SpacePoint*> spVec;
664 spVec = new_tracklets[seedIdx].seed();
673 spVec = {osp1, osp2, osp3};
676 vec_seedSize.push_back(spVec.size());
680 std::vector<Identifier> clusterIds;
690 std::list<Trk::Track*> tracks;
691 std::list<Trk::Track*> tracksFail;
692 std::list<Trk::Track*> tracksAll =
m_trackMaker->getTracks(ctx, trackEventData, spVec);
693 auto resultCode = trackEventData.combinatorialData().resultCode();
698 tracksFail = tracksAll;
702 ATH_MSG_VERBOSE(
"size of tracks=" << tracks.size() <<
", tracksFail=" << tracksFail.size() <<
": resultCode=" << resultCode);
704 for(std::list<Trk::Track*>::const_iterator
t=tracks.begin();
t!=tracks.end(); ++
t) {
705 if( ! (*
t) )
continue;
707 disTrk_n_disCombTrks++;
710 disTrk_n_disCombTrks_cleaning++;
711 disCombTrks.push_back((*
t));
712 qualityDisCombTrks.emplace_back(std::make_tuple(
true, -
disTrackQuality((*
t)), (*
t)));
715 for(std::list<Trk::Track*>::const_iterator
t=tracksFail.begin();
t!=tracksFail.end(); ++
t) {
716 if( ! (*
t) )
continue;
718 disTrk_n_disFailTrks++;
721 disTrk_n_disFailTrks_cleaning++;
722 disFailTrks.push_back((*
t));
723 qualityDisFailTrks.emplace_back(std::make_tuple(
true, -
disTrackQuality((*
t)), (*
t)));
731 for(std::list<Trk::Track*>::const_iterator
t=tracks.begin();
t!=tracks.end(); ++
t) {
733 float d0 = (*t)->perigeeParameters()==0 ? 10000.0 : (*t)->perigeeParameters()->parameters()[
Trk::d0];
736 qualityTracks.push_back(std::make_tuple(
false,0,(*
t)));
744 qualityTracks.push_back(std::make_tuple(
true, -
trackQuality((*
t)), (*
t)));
747 qualityTracks.push_back(std::make_tuple(
true, 0, (*
t)));
755 ATH_MSG_DEBUG(
"===> nr of disFailTrks=" << disTrk_n_disFailTrks <<
" -> cleaning pass=" << disTrk_n_disFailTrks_cleaning);
756 ATH_MSG_DEBUG(
"===> nr of disCombTrks=" << disTrk_n_disCombTrks <<
" -> cleaning pass=" << disTrk_n_disCombTrks_cleaning);
773 initialTracks.
reserve(qualityTracks.size());
779 std::vector<unsigned int> indexDisCombTrk;
780 for(
const auto&
q : qualityTracks) {
781 bool needed_for_disCombTrk =
false;
784 for(
const auto& qdis : qualityDisCombTrks ) {
785 if( std::get<2>(qdis) == trk_q ) {
786 needed_for_disCombTrk = std::get<0>(qdis);
790 if( needed_for_disCombTrk)
ATH_MSG_VERBOSE(
"idx=" <<
idx <<
" ===> neded for disCombTrk");
792 if (std::get<0>(
q)==
true) {
798 delete std::get<2>(
q);
801 if( needed_for_disCombTrk ) {
806 delete std::get<2>(
q);
812 qualityTracks.clear();
817 mnt_timer_CombTracking.stop();
818 mnt_timer_PatternReco.stop();
820 mnt_roi_lastStageExecuted = 5;
822 mnt_timer_TrackFitter.start();
830 outputTracks = std::move(initialTracks);
839 mnt_timer_dEdxTrk.start();
847 if( outputTracks.
empty() ) {
852 bool do_recoverDisCombTrk =
true;
854 ATH_MSG_DEBUG(
"part of initialTracks fails in fitting. do not try to recover DisCombTracks");
855 do_recoverDisCombTrk =
false;
859 fittedExtraDisCombTracks.
reserve(extraDisCombTracks.
size());
863 if( extraDisCombTracks.
size() > 0 ) {
866 for (
auto fittedTrack = fittedExtraDisCombTracks.
begin(); fittedTrack!=fittedExtraDisCombTracks.
end(); ++fittedTrack) {
869 fittedDisCombTrks.push_back(*fittedTrack);
876 for (
auto fittedTrack = outputTracks.
begin(); fittedTrack!=outputTracks.
end(); ) {
877 if ((*fittedTrack)->perigeeParameters()) {
878 float d0 = (*fittedTrack)->perigeeParameters()->parameters()[
Trk::d0];
879 float z0 = (*fittedTrack)->perigeeParameters()->parameters()[
Trk::z0];
882 ATH_MSG_DEBUG(
"REGTEST / Reject track after fit with d0 = " <<
d0 <<
" z0= " <<
z0
889 fittedTrack = outputTracks.
erase(fittedTrack);
898 fittedTrack = outputTracks.
erase(fittedTrack);
907 if(std::abs((*fittedTrack)->perigeeParameters()->parameters()[
Trk::qOverP]) >= 1
e-9){
908 trkPt =
std::sin((*fittedTrack)->perigeeParameters()->parameters()[
Trk::theta])/std::abs((*fittedTrack)->perigeeParameters()->parameters()[
Trk::qOverP]);
912 fittedTrack = outputTracks.
erase(fittedTrack);
922 mnt_timer_TrackFitter.stop();
929 for (
auto fittedTrack = outputTracks.
begin();fittedTrack!=outputTracks.
end();++fittedTrack) {
939 if(
std::find(indexDisCombTrk.begin(),indexDisCombTrk.end(),
idx)!=indexDisCombTrk.end() ) {
941 fittedDisCombTrks.push_back(*fittedTrack);
949 if( outputTracks.
empty() ) {
952 mnt_roi_lastStageExecuted = 6;
954 mnt_roi_nTracks = outputTracks.
size();
957 std::vector<double> disTrk_v_xVtx;
958 std::vector<double> disTrk_v_yVtx;
959 std::vector<double> disTrk_v_zVtx;
961 mnt_timer_disTrkZVertex.start();
963 mnt_timer_disTrkZVertex.stop();
968 mnt_timer_disTrk.start();
969 ATH_CHECK(
findDisTracks(ctx,outputTracks,qualityDisFailTrks,qualityDisCombTrks,fittedDisCombTrks,disTrk_v_xVtx,disTrk_v_yVtx,disTrk_v_zVtx) );
970 mnt_timer_disTrk.stop();
976 if( !outputTracks.
empty() )
980 fillMon(outputTracks, *vertices, roi, ctx);
982 mnt_roi_lastStageExecuted = 7;
984 mnt_timer_Total.stop();
986 return StatusCode::SUCCESS;
◆ getDisTrkCategory()
Definition at line 2542 of file TrigFastTrackFinder.cxx.
2546 int n_good_brlayers_pix = 0;
2548 for(
unsigned int ily=0; ily<8; ily++) {
2549 if( ily<=3 &&
result[ily].
nGood >= 1 ) n_good_brlayers_pix++;
2551 n_hits_sct +=
result[ily].nHits;
2558 if( n_good_brlayers_pix == 4 ) {
2559 if( n_hits_sct==0 ) { cat=DisTrkCategory::Pix4l_Sct0; }
2560 else { cat=DisTrkCategory::Pix4l_Sct1p; }
2562 else if( n_good_brlayers_pix == 3 ) {
2563 if( n_hits_sct==0 ) { cat=DisTrkCategory::Pix3l_Sct0; }
2564 else { cat=DisTrkCategory::Pix3l_Sct1p; }
◆ getSPLayer()
int TrigFastTrackFinder::getSPLayer |
( |
int |
layer, |
|
|
float |
eta |
|
) |
| const |
|
private |
Definition at line 1535 of file TrigFastTrackFinder.cxx.
1537 float abseta = std::fabs(
eta);
1548 const float PixBR6limit = 1.29612;
1549 const float PixBR5limit = 1.45204;
1550 const float PixBR4limit = 1.64909;
1551 const float PixBR3limit = 1.90036;
1552 const float PixBR2limit = 2.2146;
1558 if( abseta > PixBR2limit )
return 2;
1566 if( abseta > PixBR2limit )
return 2;
1581 if( abseta < PixBR6limit )
return 7;
1582 else if( abseta < PixBR5limit )
return 6;
1590 if( abseta < PixBR5limit )
return 7;
1591 else if( abseta < PixBR4limit )
return 6;
1599 if( abseta < PixBR4limit )
return 7;
1607 if( abseta < PixBR4limit )
return 6;
1608 else if( abseta < PixBR3limit )
return 6;
1616 if( abseta < PixBR3limit )
return 7;
1624 if( abseta < PixBR3limit )
return 6;
1632 if( abseta < PixBR3limit )
return 7;
1640 if( abseta < PixBR3limit )
return 7;
◆ getTrkBarrelLayerInfo()
Definition at line 2036 of file TrigFastTrackFinder.cxx.
2038 static constexpr
double CHI2_GOOD_CUT = 3.0;
2040 std::array<TrigFastTrackFinder::OneLayerInfo_t, TrigFastTrackFinder::N_BARREL_LAYERS>
result{};
2044 if (recoTrackStates) {
2047 for ( ; tsosIter != tsosIterEnd; ++tsosIter) {
2055 bool chi2_good = (
x2 <= CHI2_GOOD_CUT);
2058 if (pixclus!=
nullptr) {
2073 if (sctclus!=
nullptr) {
◆ initialize()
StatusCode TrigFastTrackFinder::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 184 of file TrigFastTrackFinder.cxx.
251 ATH_MSG_INFO(
" FTF configures in Large Radius Tracking Mode");
261 float lut_range[4] = {0.0,3.0,0.0,9.0};
265 if (lut_fileName.empty()) {
266 ATH_MSG_ERROR(
"Cannot find TrigSeedML LUT file " << lut_fileName);
267 return StatusCode::FAILURE;
271 std::ifstream ifs(lut_fileName.c_str());
274 ifs >>
row >> col0 >> col1;
276 for(
int c=col0;
c<=col1;
c++) L.setBin(
row,
c);
358 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ isCleaningPassDisTrack()
Definition at line 1955 of file TrigFastTrackFinder.cxx.
1957 const float PT_CUT = 3.0;
1959 const double FAIL_CHI2_OV_NDOF_CUT = 20.0;
1961 const int COMB_N_HITS_IBL_OR_BL_CUT = 1;
1962 const int COMB_N_HITS_PIX_BR_CUT = 3;
1963 const double COMB_CHI2_OV_NDOF_PIX_BR_CUT = 3.0;
1964 const int COMB_N_GOOD_HITS_SCT_BR_CUT = 2;
1965 const int COMB_N_GOOD_DOUBLEHITS_SCT_BR_CUT = 0;
1968 if( trk==
nullptr )
return false;
1970 if( trk->
fitQuality()==
nullptr )
return false;
1973 if( !
seed.s1().isPixel() || !
seed.s2().isPixel() || !
seed.s3().isPixel() )
return false;
1974 float s1_z =
seed.s1().z();
1975 float s2_z =
seed.s2().z();
1976 float s3_z =
seed.s3().z();
1977 const float PIXEL_BARREL_Z = 410.0;
1978 if( std::abs(s1_z) > PIXEL_BARREL_Z || std::abs(s2_z) > PIXEL_BARREL_Z || std::abs(s3_z) > PIXEL_BARREL_Z )
return false;
1979 ATH_MSG_VERBOSE(
"FTF::isCleaningPassDisTrack> ... barrel cut passed");
1986 if(
pt/1000.0 < PT_CUT )
return false;
1993 if( std::abs(
ndof) < 1
e-12 )
return false;
1994 if(
chi2/
ndof > FAIL_CHI2_OV_NDOF_CUT )
return false;
1995 ATH_MSG_VERBOSE(
"FTF::isCleaningPassDisTrack> ... (failTrk) Chi2 cut passed");
2001 int n_hits_iblbl = barrelInfo[0].nHits + barrelInfo[1].nHits;
2002 if( n_hits_iblbl < COMB_N_HITS_IBL_OR_BL_CUT )
return false;
2005 int n_hits_pixbr = 0;
2006 double chi2_pixbr = 0;
2008 for(
unsigned int ily=0; ily<=3; ily++) {
2009 n_hits_pixbr += barrelInfo[ily].nHits;
2010 chi2_pixbr += barrelInfo[ily].chiSq;
2011 ndof_pixbr += barrelInfo[ily].nDof;
2013 if( n_hits_pixbr < COMB_N_HITS_PIX_BR_CUT )
return false;
2014 if( ndof_pixbr < 1 )
return false;
2015 double chi2_ov_ndof_pixbr = chi2_pixbr / ndof_pixbr;
2016 if( chi2_ov_ndof_pixbr > COMB_CHI2_OV_NDOF_PIX_BR_CUT )
return false;
2017 ATH_MSG_VERBOSE(
"FTF::isCleaningPassDisTrack> ... (combTrk) Pix cut passed");
2020 int n_hits_sctbr_good = 0;
2021 int n_doublehits_sctbr_good = 0;
2022 for(
unsigned int ily=4; ily<=7; ily++) {
2023 n_hits_sctbr_good += barrelInfo[ily].nGood;
2024 if( barrelInfo[ily].
nGood >= 2 ) n_doublehits_sctbr_good++;
2026 if( n_hits_sctbr_good > COMB_N_GOOD_HITS_SCT_BR_CUT )
return false;
2027 if( n_doublehits_sctbr_good > COMB_N_GOOD_DOUBLEHITS_SCT_BR_CUT )
return false;
2028 ATH_MSG_VERBOSE(
"FTF::isCleaningPassDisTrack> ... (combTrk) SCT cut passed");
◆ isClonable()
◆ isGoodForDisTrackVertex()
bool TrigFastTrackFinder::isGoodForDisTrackVertex |
( |
Trk::Track * |
t, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
private |
Definition at line 2275 of file TrigFastTrackFinder.cxx.
2277 const double TRKCUT_CHI2_OV_NDOF = 3.0;
2278 const double TRKCUT_PT = 1.0;
2279 const double TRKCUT_D0 = 2.0;
2280 const int TRKCUT_N_HITS_INNER = 1;
2281 const int TRKCUT_N_HITS_PIX = 3;
2282 const int TRKCUT_N_HITS = 7;
2285 if ( !
t->perigeeParameters() )
return false;
2286 if ( !
t->fitQuality() )
return false;
2287 if (
t->trackSummary()==0 ) {
2289 if (
t->trackSummary()==0 )
return false;
2293 double chi2 =
t->fitQuality()->chiSquared();
2294 double ndof =
t->fitQuality()->doubleNumberDoF();
2295 if( std::abs(
ndof) < 1
e-2 )
return false;
2297 if( chi2_ov_ndof > TRKCUT_CHI2_OV_NDOF )
return false;
2305 if(
pt < TRKCUT_PT )
return false;
2308 double d0 =
t->perigeeParameters()->parameters()[
Trk::d0];
2309 if( std::abs(
d0) > TRKCUT_D0 )
return false;
2314 int n_hits_inner = n_hits_innermost + n_hits_next_to_innermost;
2317 if( n_hits_inner < TRKCUT_N_HITS_INNER )
return false;
2318 if( n_hits_pix < TRKCUT_N_HITS_PIX )
return false;
2319 if( (n_hits_pix+n_hits_sct) < TRKCUT_N_HITS )
return false;
◆ isPreselPassDisTrackAfterRefit()
bool TrigFastTrackFinder::isPreselPassDisTrackAfterRefit |
( |
Trk::Track * |
trk, |
|
|
Trk::Track * |
refitTrk, |
|
|
double |
refit_d0_wrtVtx, |
|
|
double |
refit_z0_wrtVtx |
|
) |
| const |
|
private |
Definition at line 2428 of file TrigFastTrackFinder.cxx.
2430 const float PRESEL_PT_GEV = 5.0;
2431 const float PRESEL_REFIT_PT_GEV_P3S1 = 10.0;
2432 const double PRESEL_D0_WRTVTX = 5.0;
2433 const double PRESEL_Z0_WRTVTX = 50.0;
2436 if( trk ==
nullptr )
return false;
2439 if( cat==DisTrkCategory::Pix4l_Sct1p || cat==DisTrkCategory::Pix3l_Sct1p ) {
if( refitTrk ==
nullptr )
return false; }
2442 if( std::abs(refit_d0_wrtVtx) > PRESEL_D0_WRTVTX )
return false;
2445 if( std::abs(refit_z0_wrtVtx) > PRESEL_Z0_WRTVTX )
return false;
2448 std::vector<float> v_ptGeV;
2449 std::vector<Trk::Track*> v_trk;
2450 v_trk.push_back(trk);
2451 if( refitTrk !=
nullptr ) v_trk.push_back(refitTrk);
2452 for(
auto t : v_trk) {
2457 v_ptGeV.push_back(ptGeV);
2459 bool isLowPt =
true;
2460 for(
auto pt : v_ptGeV) {
2461 if(
pt > PRESEL_PT_GEV ) { isLowPt =
false;
break; }
2463 if( isLowPt )
return false;
2466 if( cat==DisTrkCategory::Pix3l_Sct1p ) {
2467 float refitPt = v_ptGeV[1];
2468 if( refitPt < PRESEL_REFIT_PT_GEV_P3S1 )
return false;
◆ isPreselPassDisTrackBeforeRefit()
bool TrigFastTrackFinder::isPreselPassDisTrackBeforeRefit |
( |
Trk::Track * |
trk, |
|
|
double |
d0_wrtVtx, |
|
|
double |
z0_wrtVtx |
|
) |
| const |
|
private |
Definition at line 2475 of file TrigFastTrackFinder.cxx.
2477 const double PRESEL_D0_WRTVTX = 5.0;
2478 const double PRESEL_Z0_WRTVTX = 50.0;
2479 const int PRESEL_N_GOOD_BR_LAYERS_PIX = 3;
2480 const double PRESEL_CHI2_OV_NDOF_PIX_BR_CUT = 5.0;
2483 if( trk ==
nullptr )
return false;
2490 double chi2_pixbr = 0.0;
2492 int n_good_brlayers_pix = 0;
2493 for(
unsigned int ily=0; ily<=3; ily++) {
2494 if( barrelLayerInfo[ily].
nGood >= 1 ) n_good_brlayers_pix++;
2495 chi2_pixbr += barrelLayerInfo[ily].chiSq;
2496 ndof_pixbr += barrelLayerInfo[ily].nDof;
2498 if( n_good_brlayers_pix < PRESEL_N_GOOD_BR_LAYERS_PIX )
return false;
2500 if( ndof_pixbr < 1 )
return false;
2501 double chi2_ov_ndof_pixbr = chi2_pixbr / ndof_pixbr;
2502 if( chi2_ov_ndof_pixbr > PRESEL_CHI2_OV_NDOF_PIX_BR_CUT )
return false;
2505 if( std::abs(d0_wrtVtx) > PRESEL_D0_WRTVTX )
return false;
2508 if( std::abs(z0_wrtVtx) > PRESEL_Z0_WRTVTX )
return false;
◆ makeSeedsOnGPU()
Definition at line 1487 of file TrigFastTrackFinder.cxx.
1494 size_t actualSize =
m_accelTool->exportSeedMakingJob(tcs, roi, vsp, *dataBuffer);
1496 ATH_MSG_DEBUG(
"SeedMakingJob is ready, data size for transfer = " <<actualSize);
1498 std::shared_ptr<TrigAccel::OffloadBuffer> pBuff = std::make_shared<TrigAccel::OffloadBuffer>(dataBuffer);
1507 std::shared_ptr<TrigAccel::OffloadBuffer> pOB = pJob->
getOutput();
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ print_disTrk()
◆ recoAndFillDisTrkCand()
Definition at line 2693 of file TrigFastTrackFinder.cxx.
2704 int n_stored_tracks = 0;
2706 for (
auto trk = tracks->
begin(); trk!=tracks->
end(); ++trk) {
2710 if( ptrk ==
nullptr )
continue;
2714 std::unique_ptr<const Trk::TrackParameters> vertexPerigee =
extrapolateDisTrackToBS(ptrk,v_xvtx,v_yvtx,v_zvtx, ctx);
2717 double d0_wrtVtx = 0;
2718 double z0_wrtVtx = 0;
2719 if( vertexPerigee !=
nullptr ) {
2720 d0_wrtVtx = vertexPerigee->parameters()[
Trk::d0];
2721 z0_wrtVtx = vertexPerigee->parameters()[
Trk::z0];
2732 std::unique_ptr<Trk::Track> refit_trk =
disTrk_refit(ptrk, ctx);
2736 double refit_d0 = 0;
2737 double refit_z0 = 0;
2738 double refit_d0_wrtVtx = 0;
2739 double refit_z0_wrtVtx = 0;
2740 std::unique_ptr<const Trk::TrackParameters> refitVertexPerigee =
nullptr;
2741 if( refit_trk !=
nullptr ) {
2743 if( refitVertexPerigee ==
nullptr ) {
2749 refit_d0_wrtVtx = refitVertexPerigee->parameters()[
Trk::d0];
2750 refit_z0_wrtVtx = refitVertexPerigee->parameters()[
Trk::z0];
2751 ATH_MSG_VERBOSE(
"refit trk d0 : " << refit_d0 <<
" -> extrapolate -> " << refit_d0_wrtVtx);
2752 ATH_MSG_VERBOSE(
"refit trk z0 : " << refit_z0 <<
" -> extrapolate -> " << refit_z0_wrtVtx);
2763 comp->makePrivateStore();
2767 int is_fail = isFail ? 1 : 0;
2775 prefix = base_prefix +
"_refit";
2776 if( refit_trk !=
nullptr ) {
2789 return n_stored_tracks;
◆ recoVertexForDisTrack()
void TrigFastTrackFinder::recoVertexForDisTrack |
( |
const EventContext & |
ctx, |
|
|
TrackCollection & |
tracks, |
|
|
std::vector< double > & |
v_xvtx, |
|
|
std::vector< double > & |
v_yvtx, |
|
|
std::vector< double > & |
v_zvtx |
|
) |
| const |
|
private |
Definition at line 2130 of file TrigFastTrackFinder.cxx.
2139 double xVTX =
vertex.x();
2140 double yVTX =
vertex.y();
2141 double tiltXZ = beamSpotHandle->beamTilt(0);
2142 double tiltYZ = beamSpotHandle->beamTilt(1);
2145 const double CLUSTCUT_DIST_SIGMA = 5.0;
2146 const double CLUSTCUT_DIST = 2.5;
2147 const double CLUSTCUT_SEED_PT = 3.0;
2149 const int VTXCUT_N_TRACKS = 3;
2150 const int VTXCUT_ALGO = 1;
2152 std::vector<std::tuple<int,double,double,Trk::Track*>> QT;
2153 QT.reserve(tracks.
size());
2155 for (
auto t=tracks.
begin();
t!=tracks.
end(); ++
t) {
2163 QT.emplace_back(std::make_tuple(-1,
pt,
pt,(*
t)));
2168 [](
const std::tuple<int,double,double,Trk::Track*>& lhs,
const std::tuple<int,double,double,Trk::Track*>& rhs) {
2169 return std::get<1>(lhs) > std::get<1>(rhs); } );
2172 std::vector<int> cluster_ntrk;
2173 std::vector<double> cluster_ptsum;
2174 std::vector<double> cluster_z;
2175 std::vector<double> cluster_wsum;
2176 std::vector<double> cluster_zerr;
2177 std::vector<double> cluster_w2sum;
2179 for(
unsigned int i=0;
i<QT.size(); ++
i) {
2181 double z =
t->perigeeParameters()->parameters()[
Trk::z0];
2182 double zerr = sqrt((*(
t->perigeeParameters()->covariance()))(
Trk::z0,
Trk::z0));
2183 double w = std::get<2>(QT[
i]);
2184 double pt = std::get<1>(QT[
i]);
2186 cluster_ntrk.push_back(1); cluster_ptsum.push_back(
pt);
2187 cluster_z.push_back(
w*
z); cluster_wsum.push_back(
w);
2188 cluster_zerr.push_back(
w*zerr*
w*zerr); cluster_w2sum.push_back(
w*
w);
2192 const int IDX_INITIAL = 100;
2193 double dist_min = 100.0;
2195 for(
unsigned j=0; j<cluster_z.size(); ++j) {
2196 double dist = std::abs(
z - cluster_z[j]/cluster_wsum[j]);
2197 if( dist < dist_min ) {
2202 int match_idx = IDX_INITIAL;
2203 if(
idx_min != IDX_INITIAL ) {
2204 double c_zerr_min = std::sqrt(cluster_zerr[
idx_min]/cluster_w2sum[
idx_min]);
2205 double err = std::sqrt(zerr*zerr+c_zerr_min*c_zerr_min);
2206 if( std::abs(
err) < 1
e-12 )
err = 1
e-12;
2207 double dist = dist_min /
err;
2208 if( dist < CLUSTCUT_DIST_SIGMA && dist_min < CLUSTCUT_DIST ) { match_idx =
idx_min; }
2211 if( match_idx == IDX_INITIAL ) {
2212 if(
pt > CLUSTCUT_SEED_PT && dist_min > CLUSTCUT_DIST ) {
2213 cluster_ntrk.push_back(1); cluster_ptsum.push_back(
pt);
2214 cluster_z.push_back(
w*
z); cluster_wsum.push_back(
w);
2215 cluster_zerr.push_back(
w*zerr*
w*zerr); cluster_w2sum.push_back(
w*
w);
2219 int new_n = cluster_ntrk[match_idx] + 1;
2220 double new_ptsum = cluster_ptsum[match_idx] +
pt;
2221 double new_z = cluster_z[match_idx] +
w*
z;
2222 double new_wsum = cluster_wsum[match_idx] +
w;
2223 double new_zerr = cluster_zerr[match_idx] +
w*zerr*
w*zerr;
2224 double new_w2sum = cluster_w2sum[match_idx] +
w*
w;
2225 cluster_ntrk[match_idx] = new_n;
2226 cluster_ptsum[match_idx] = new_ptsum;
2227 cluster_z[match_idx] = new_z;
2228 cluster_wsum[match_idx] = new_wsum;
2229 cluster_zerr[match_idx] = new_zerr;
2230 cluster_w2sum[match_idx] = new_w2sum;
2235 std::vector<std::tuple<double,double,double,int>> zVtx;
2236 zVtx.reserve(tracks.
size());
2237 for(
unsigned int i=0;
i<cluster_z.size();
i++) {
2238 if( cluster_ntrk[
i] < VTXCUT_N_TRACKS )
continue;
2239 double z = cluster_z[
i] / cluster_wsum[
i];
2240 double zerr = std::sqrt(cluster_zerr[
i] / cluster_w2sum[
i]);
2241 zVtx.push_back(std::make_tuple(cluster_ptsum[
i],
z,zerr,cluster_ntrk[
i]));
2244 if( VTXCUT_ALGO == 1 ) {
2246 [](
const std::tuple<double,double,double,int>& lhs,
const std::tuple<double,double,double,int>& rhs) {
2247 return std::get<0>(lhs) > std::get<0>(rhs); } );
2249 ATH_MSG_VERBOSE(
"disTrkZVtertex> ===== looping zVtx size: " << zVtx.size());
2250 for(
unsigned int i=0;
i<zVtx.size();
i++) {
2251 double z = std::get<1>(zVtx[
i]);
2252 double zerr = std::get<2>(zVtx[
i]);
2253 double pt = std::get<0>(zVtx[
i]);
2254 int n = std::get<3>(zVtx[
i]);
2255 v_zvtx.push_back(
z);
2256 v_xvtx.push_back(xVTX - tiltXZ*
z);
2257 v_yvtx.push_back(yVTX - tiltYZ*
z);
2258 ATH_MSG_VERBOSE(
"disTrkZVtertex> Vertex cand i=" <<
i <<
": z = " <<
z <<
" +- " << zerr <<
", sum n / pt = " <<
n <<
" / " <<
pt);
2267 mnt_disTrk_nVtx = v_zvtx.size();
2268 if(v_zvtx.size()>0) {
2269 mnt_disTrk_xVtx = v_xvtx[0];
2270 mnt_disTrk_yVtx = v_yvtx[0];
2271 mnt_disTrk_zVtx = v_zvtx[0];
◆ renounce()
◆ renounceArray()
◆ runResidualMonitoring()
void TrigFastTrackFinder::runResidualMonitoring |
( |
const Trk::Track & |
track, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
private |
Definition at line 1268 of file TrigFastTrackFinder.cxx.
1270 std::vector<float> mnt_layer_IBL;
1271 std::vector<float> mnt_layer_PixB;
1272 std::vector<float> mnt_layer_PixE;
1273 std::vector<float> mnt_layer_SCTB;
1274 std::vector<float> mnt_layer_SCTE;
1275 std::vector<float> mnt_hit_IBLPhiResidual;
1276 std::vector<float> mnt_hit_IBLEtaResidual;
1277 std::vector<float> mnt_hit_IBLPhiPull;
1278 std::vector<float> mnt_hit_IBLEtaPull;
1279 std::vector<float> mnt_hit_PIXBarrelPhiResidual;
1280 std::vector<float> mnt_hit_PIXBarrelEtaResidual;
1281 std::vector<float> mnt_hit_PIXBarrelPhiPull;
1282 std::vector<float> mnt_hit_PIXBarrelEtaPull;
1283 std::vector<float> mnt_hit_SCTBarrelResidual;
1284 std::vector<float> mnt_hit_SCTBarrelPull;
1285 std::vector<float> mnt_hit_PIXEndcapPhiResidual;
1286 std::vector<float> mnt_hit_PIXEndcapEtaResidual;
1287 std::vector<float> mnt_hit_PIXEndcapPhiPull;
1288 std::vector<float> mnt_hit_PIXEndcapEtaPull;
1289 std::vector<float> mnt_hit_SCTEndcapResidual;
1290 std::vector<float> mnt_hit_SCTEndcapPull;
1291 std::vector<float> mnt_hit_PIXBarrelL1PhiResidual;
1292 std::vector<float> mnt_hit_PIXBarrelL1EtaResidual;
1293 std::vector<float> mnt_hit_PIXBarrelL2PhiResidual;
1294 std::vector<float> mnt_hit_PIXBarrelL2EtaResidual;
1295 std::vector<float> mnt_hit_PIXBarrelL3PhiResidual;
1296 std::vector<float> mnt_hit_PIXBarrelL3EtaResidual;
1297 std::vector<float> mnt_hit_PIXEndcapL1PhiResidual;
1298 std::vector<float> mnt_hit_PIXEndcapL1EtaResidual;
1299 std::vector<float> mnt_hit_PIXEndcapL2PhiResidual;
1300 std::vector<float> mnt_hit_PIXEndcapL2EtaResidual;
1301 std::vector<float> mnt_hit_PIXEndcapL3PhiResidual;
1302 std::vector<float> mnt_hit_PIXEndcapL3EtaResidual;
1303 std::vector<float> mnt_hit_SCTBarrelL1PhiResidual;
1304 std::vector<float> mnt_hit_SCTBarrelL2PhiResidual;
1305 std::vector<float> mnt_hit_SCTBarrelL3PhiResidual;
1306 std::vector<float> mnt_hit_SCTBarrelL4PhiResidual;
1307 std::vector<float> mnt_hit_SCTEndcapL1PhiResidual;
1308 std::vector<float> mnt_hit_SCTEndcapL2PhiResidual;
1309 std::vector<float> mnt_hit_SCTEndcapL3PhiResidual;
1310 std::vector<float> mnt_hit_SCTEndcapL4PhiResidual;
1311 std::vector<float> mnt_hit_SCTEndcapL5PhiResidual;
1312 std::vector<float> mnt_hit_SCTEndcapL6PhiResidual;
1313 std::vector<float> mnt_hit_SCTEndcapL7PhiResidual;
1314 std::vector<float> mnt_hit_SCTEndcapL8PhiResidual;
1315 std::vector<float> mnt_hit_SCTEndcapL9PhiResidual;
1325 auto mon_hit_PIXBarrelPhiResidual =
Monitored::Collection(
"hit_PIXBarrelPhiResidual",mnt_hit_PIXBarrelPhiResidual);
1326 auto mon_hit_PIXBarrelEtaResidual =
Monitored::Collection(
"hit_PIXBarrelEtaResidual",mnt_hit_PIXBarrelEtaResidual);
1327 auto mon_hit_PIXBarrelPhiPull =
Monitored::Collection(
"hit_PIXBarrelPhiPull",mnt_hit_PIXBarrelPhiPull);
1328 auto mon_hit_PIXBarrelEtaPull =
Monitored::Collection(
"hit_PIXBarrelEtaPull",mnt_hit_PIXBarrelEtaPull);
1329 auto mon_hit_SCTBarrelResidual =
Monitored::Collection(
"hit_SCTBarrelResidual",mnt_hit_SCTBarrelResidual);
1331 auto mon_hit_PIXEndcapPhiResidual =
Monitored::Collection(
"hit_PIXEndcapPhiResidual",mnt_hit_PIXEndcapPhiResidual);
1332 auto mon_hit_PIXEndcapEtaResidual =
Monitored::Collection(
"hit_PIXEndcapEtaResidual",mnt_hit_PIXEndcapEtaResidual);
1333 auto mon_hit_PIXEndcapPhiPull =
Monitored::Collection(
"hit_PIXEndcapPhiPull",mnt_hit_PIXEndcapPhiPull);
1334 auto mon_hit_PIXEndcapEtaPull =
Monitored::Collection(
"hit_PIXEndcapEtaPull",mnt_hit_PIXEndcapEtaPull);
1335 auto mon_hit_SCTEndcapResidual =
Monitored::Collection(
"hit_SCTEndcapResidual",mnt_hit_SCTEndcapResidual);
1337 auto mon_hit_PIXBarrelL1PhiResidual =
Monitored::Collection(
"hit_PIXBarrelL1PhiResidual",mnt_hit_PIXBarrelL1PhiResidual);
1338 auto mon_hit_PIXBarrelL1EtaResidual =
Monitored::Collection(
"hit_PIXBarrelL1EtaResidual",mnt_hit_PIXBarrelL1EtaResidual);
1339 auto mon_hit_PIXBarrelL2PhiResidual =
Monitored::Collection(
"hit_PIXBarrelL2PhiResidual",mnt_hit_PIXBarrelL2PhiResidual);
1340 auto mon_hit_PIXBarrelL2EtaResidual =
Monitored::Collection(
"hit_PIXBarrelL2EtaResidual",mnt_hit_PIXBarrelL2EtaResidual);
1341 auto mon_hit_PIXBarrelL3PhiResidual =
Monitored::Collection(
"hit_PIXBarrelL3PhiResidual",mnt_hit_PIXBarrelL3PhiResidual);
1342 auto mon_hit_PIXBarrelL3EtaResidual =
Monitored::Collection(
"hit_PIXBarrelL3EtaResidual",mnt_hit_PIXBarrelL3EtaResidual);
1343 auto mon_hit_PIXEndcapL1PhiResidual =
Monitored::Collection(
"hit_PIXEndcapL1PhiResidual",mnt_hit_PIXEndcapL1PhiResidual);
1344 auto mon_hit_PIXEndcapL1EtaResidual =
Monitored::Collection(
"hit_PIXEndcapL1EtaResidual",mnt_hit_PIXEndcapL1EtaResidual);
1345 auto mon_hit_PIXEndcapL2PhiResidual =
Monitored::Collection(
"hit_PIXEndcapL2PhiResidual",mnt_hit_PIXEndcapL2PhiResidual);
1346 auto mon_hit_PIXEndcapL2EtaResidual =
Monitored::Collection(
"hit_PIXEndcapL2EtaResidual",mnt_hit_PIXEndcapL2EtaResidual);
1347 auto mon_hit_PIXEndcapL3PhiResidual =
Monitored::Collection(
"hit_PIXEndcapL3PhiResidual",mnt_hit_PIXEndcapL3PhiResidual);
1348 auto mon_hit_PIXEndcapL3EtaResidual =
Monitored::Collection(
"hit_PIXEndcapL3EtaResidual",mnt_hit_PIXEndcapL3EtaResidual);
1349 auto mon_hit_SCTBarrelL1PhiResidual =
Monitored::Collection(
"hit_SCTBarrelL1PhiResidual",mnt_hit_SCTBarrelL1PhiResidual);
1350 auto mon_hit_SCTBarrelL2PhiResidual =
Monitored::Collection(
"hit_SCTBarrelL2PhiResidual",mnt_hit_SCTBarrelL2PhiResidual);
1351 auto mon_hit_SCTBarrelL3PhiResidual =
Monitored::Collection(
"hit_SCTBarrelL3PhiResidual",mnt_hit_SCTBarrelL3PhiResidual);
1352 auto mon_hit_SCTBarrelL4PhiResidual =
Monitored::Collection(
"hit_SCTBarrelL4PhiResidual",mnt_hit_SCTBarrelL4PhiResidual);
1353 auto mon_hit_SCTEndcapL1PhiResidual =
Monitored::Collection(
"hit_SCTEndcapL1PhiResidual",mnt_hit_SCTEndcapL1PhiResidual);
1354 auto mon_hit_SCTEndcapL2PhiResidual =
Monitored::Collection(
"hit_SCTEndcapL2PhiResidual",mnt_hit_SCTEndcapL2PhiResidual);
1355 auto mon_hit_SCTEndcapL3PhiResidual =
Monitored::Collection(
"hit_SCTEndcapL3PhiResidual",mnt_hit_SCTEndcapL3PhiResidual);
1356 auto mon_hit_SCTEndcapL4PhiResidual =
Monitored::Collection(
"hit_SCTEndcapL4PhiResidual",mnt_hit_SCTEndcapL4PhiResidual);
1357 auto mon_hit_SCTEndcapL5PhiResidual =
Monitored::Collection(
"hit_SCTEndcapL5PhiResidual",mnt_hit_SCTEndcapL5PhiResidual);
1358 auto mon_hit_SCTEndcapL6PhiResidual =
Monitored::Collection(
"hit_SCTEndcapL6PhiResidual",mnt_hit_SCTEndcapL6PhiResidual);
1359 auto mon_hit_SCTEndcapL7PhiResidual =
Monitored::Collection(
"hit_SCTEndcapL7PhiResidual",mnt_hit_SCTEndcapL7PhiResidual);
1360 auto mon_hit_SCTEndcapL8PhiResidual =
Monitored::Collection(
"hit_SCTEndcapL8PhiResidual",mnt_hit_SCTEndcapL8PhiResidual);
1361 auto mon_hit_SCTEndcapL9PhiResidual =
Monitored::Collection(
"hit_SCTEndcapL9PhiResidual",mnt_hit_SCTEndcapL9PhiResidual);
1363 auto monRes =
Monitored::Group(
m_monTool, mon_layer_IBL, mon_layer_PixB, mon_layer_PixE, mon_layer_SCTB, mon_layer_SCTE, mon_hit_IBLPhiResidual, mon_hit_IBLEtaResidual, mon_hit_IBLPhiPull, mon_hit_IBLEtaPull, mon_hit_PIXBarrelPhiResidual, mon_hit_PIXBarrelEtaResidual, mon_hit_PIXBarrelPhiPull, mon_hit_PIXBarrelEtaPull, mon_hit_SCTBarrelResidual, mon_hit_SCTBarrelPull, mon_hit_PIXEndcapPhiResidual, mon_hit_PIXEndcapEtaResidual, mon_hit_PIXEndcapPhiPull, mon_hit_PIXEndcapEtaPull, mon_hit_SCTEndcapResidual, mon_hit_SCTEndcapPull, mon_hit_PIXBarrelL1PhiResidual, mon_hit_PIXBarrelL1EtaResidual, mon_hit_PIXBarrelL2PhiResidual, mon_hit_PIXBarrelL2EtaResidual, mon_hit_PIXBarrelL3PhiResidual, mon_hit_PIXBarrelL3EtaResidual, mon_hit_PIXEndcapL1PhiResidual, mon_hit_PIXEndcapL1EtaResidual, mon_hit_PIXEndcapL2PhiResidual, mon_hit_PIXEndcapL2EtaResidual, mon_hit_PIXEndcapL3PhiResidual, mon_hit_PIXEndcapL3EtaResidual, mon_hit_SCTBarrelL1PhiResidual, mon_hit_SCTBarrelL2PhiResidual, mon_hit_SCTBarrelL3PhiResidual, mon_hit_SCTBarrelL4PhiResidual, mon_hit_SCTEndcapL1PhiResidual, mon_hit_SCTEndcapL2PhiResidual, mon_hit_SCTEndcapL3PhiResidual, mon_hit_SCTEndcapL4PhiResidual, mon_hit_SCTEndcapL5PhiResidual, mon_hit_SCTEndcapL6PhiResidual, mon_hit_SCTEndcapL7PhiResidual, mon_hit_SCTEndcapL8PhiResidual, mon_hit_SCTEndcapL9PhiResidual);
1365 std::vector<TrigL2HitResidual> vResid;
1368 if(!scRes.isSuccess())
return;
1374 switch(
it->regionId()) {
1376 mnt_layer_PixB.push_back(pixlayer);
1377 mnt_hit_PIXBarrelPhiResidual.push_back(
it->phiResidual());
1378 mnt_hit_PIXBarrelPhiPull.push_back(
it->phiPull());
1379 mnt_hit_PIXBarrelEtaResidual.push_back(
it->etaResidual());
1380 mnt_hit_PIXBarrelEtaPull.push_back(
it->etaPull());
1381 if (pixlayer == 1) {
1382 mnt_hit_PIXBarrelL1PhiResidual.push_back(
it->phiResidual());
1383 mnt_hit_PIXBarrelL1EtaResidual.push_back(
it->etaResidual());
1385 if (pixlayer == 2) {
1386 mnt_hit_PIXBarrelL2PhiResidual.push_back(
it->phiResidual());
1387 mnt_hit_PIXBarrelL2EtaResidual.push_back(
it->etaResidual());
1389 if (pixlayer == 3) {
1390 mnt_hit_PIXBarrelL3PhiResidual.push_back(
it->phiResidual());
1391 mnt_hit_PIXBarrelL3EtaResidual.push_back(
it->etaResidual());
1396 mnt_layer_PixE.push_back(pixlayer);
1397 mnt_hit_PIXEndcapPhiResidual.push_back(
it->phiResidual());
1398 mnt_hit_PIXEndcapPhiPull.push_back(
it->phiPull());
1399 mnt_hit_PIXEndcapEtaResidual.push_back(
it->etaResidual());
1400 mnt_hit_PIXEndcapEtaPull.push_back(
it->etaPull());
1401 if (pixlayer == 0) {
1402 mnt_hit_PIXEndcapL1PhiResidual.push_back(
it->phiResidual());
1403 mnt_hit_PIXEndcapL1EtaResidual.push_back(
it->etaResidual());
1405 if (pixlayer == 1) {
1406 mnt_hit_PIXEndcapL2PhiResidual.push_back(
it->phiResidual());
1407 mnt_hit_PIXEndcapL2EtaResidual.push_back(
it->etaResidual());
1409 if (pixlayer == 2) {
1410 mnt_hit_PIXEndcapL3PhiResidual.push_back(
it->phiResidual());
1411 mnt_hit_PIXEndcapL3EtaResidual.push_back(
it->etaResidual());
1415 mnt_layer_SCTB.push_back(sctlayer);
1416 mnt_hit_SCTBarrelResidual.push_back(
it->phiResidual());
1417 mnt_hit_SCTBarrelPull.push_back(
it->phiPull());
1418 if (sctlayer == 0) {
1419 mnt_hit_SCTBarrelL1PhiResidual.push_back(
it->phiResidual());
1421 if (sctlayer == 1) {
1422 mnt_hit_SCTBarrelL2PhiResidual.push_back(
it->phiResidual());
1424 if (sctlayer == 2) {
1425 mnt_hit_SCTBarrelL3PhiResidual.push_back(
it->phiResidual());
1427 if (sctlayer == 3) {
1428 mnt_hit_SCTBarrelL4PhiResidual.push_back(
it->phiResidual());
1433 mnt_layer_SCTE.push_back(sctlayer);
1434 mnt_hit_SCTEndcapResidual.push_back(
it->phiResidual());
1435 mnt_hit_SCTEndcapPull.push_back(
it->phiPull());
1436 if (sctlayer == 0) {
1437 mnt_hit_SCTEndcapL1PhiResidual.push_back(
it->phiResidual());
1439 if (sctlayer == 1) {
1440 mnt_hit_SCTEndcapL2PhiResidual.push_back(
it->phiResidual());
1442 if (sctlayer == 2) {
1443 mnt_hit_SCTEndcapL3PhiResidual.push_back(
it->phiResidual());
1445 if (sctlayer == 3) {
1446 mnt_hit_SCTEndcapL4PhiResidual.push_back(
it->phiResidual());
1448 if (sctlayer == 4) {
1449 mnt_hit_SCTEndcapL5PhiResidual.push_back(
it->phiResidual());
1451 if (sctlayer == 5) {
1452 mnt_hit_SCTEndcapL6PhiResidual.push_back(
it->phiResidual());
1454 if (sctlayer == 6) {
1455 mnt_hit_SCTEndcapL7PhiResidual.push_back(
it->phiResidual());
1457 if (sctlayer == 7) {
1458 mnt_hit_SCTEndcapL8PhiResidual.push_back(
it->phiResidual());
1460 if (sctlayer == 8) {
1461 mnt_hit_SCTEndcapL9PhiResidual.push_back(
it->phiResidual());
1465 mnt_layer_IBL.push_back(pixlayer);
1467 mnt_hit_IBLPhiResidual.push_back(
it->phiResidual());
1468 mnt_hit_IBLPhiPull.push_back(
it->phiPull());
1469 mnt_hit_IBLEtaResidual.push_back(
it->etaResidual());
1470 mnt_hit_IBLEtaPull.push_back(
it->etaPull());
1474 mnt_hit_PIXBarrelPhiResidual.push_back(
it->phiResidual());
1475 mnt_hit_PIXBarrelPhiPull.push_back(
it->phiPull());
1476 mnt_hit_PIXBarrelEtaResidual.push_back(
it->etaResidual());
1477 mnt_hit_PIXBarrelEtaPull.push_back(
it->etaPull());
◆ setFilterPassed()
◆ start()
StatusCode TrigFastTrackFinder::start |
( |
| ) |
|
|
overridevirtual |
◆ sysExecute()
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.
Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.
◆ sysInitialize()
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 InputMakerBase, and HypoBase.
Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.
110 if (
sc.isFailure()) {
118 if ( cs.retrieve().isFailure() ) {
120 return StatusCode::SUCCESS;
122 if (cs->regHandle(
this,*
h).isFailure()) {
123 sc = StatusCode::FAILURE;
124 ATH_MSG_ERROR(
"unable to register WriteCondHandle " <<
h->fullKey()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ trackQuality()
◆ updateClusterMap()
void TrigFastTrackFinder::updateClusterMap |
( |
long int |
trackIdx, |
|
|
const Trk::Track * |
pTrack, |
|
|
std::map< Identifier, std::vector< long int > > & |
clusterMap |
|
) |
| const |
|
protected |
Definition at line 1060 of file TrigFastTrackFinder.cxx.
1066 if (siCLOT==
nullptr)
continue;
1068 if (siCL==
nullptr)
continue;
1073 if(pixCL==
nullptr)
continue;
1077 clusterMap[
id].push_back(trackIdx);
◆ updateVHKA()
◆ usedByAnyTrack()
bool TrigFastTrackFinder::usedByAnyTrack |
( |
const std::vector< Identifier > & |
vIds, |
|
|
std::map< Identifier, std::vector< long int > > & |
clusterMap |
|
) |
| const |
|
protected |
Definition at line 1089 of file TrigFastTrackFinder.cxx.
1091 std::vector<long int> xSection;
1093 std::map<Identifier, std::vector<long int> >
::iterator itm0 = clusterMap.find(*vIds.begin());
1094 if(itm0 == clusterMap.end())
return false;
1095 xSection.reserve((*itm0).second.size());
1096 std::copy((*itm0).second.begin(), (*itm0).second.end(), std::back_inserter(xSection));
1097 std::vector<Identifier>::const_iterator
it = vIds.begin();++
it;
1098 for(;
it!=vIds.end();++
it) {
1099 std::map<Identifier, std::vector<long int> >
::iterator itm1 = clusterMap.find(*
it);
1100 if(itm1 == clusterMap.end())
return false;
1101 std::vector<long int>
tmp;
1102 std::set_intersection(xSection.begin(), xSection.end(), (*itm1).second.begin(),(*itm1).second.end(), std::back_inserter(
tmp));
1103 if(
tmp.empty())
return false;
1106 xSection.reserve(
tmp.size());
1109 return !xSection.empty();
◆ m_accelSvc
◆ m_accelTool
◆ m_beamSpotKey
◆ m_checkSeedRedundancy
bool TrigFastTrackFinder::m_checkSeedRedundancy |
|
private |
◆ m_connectionFile
std::string TrigFastTrackFinder::m_connectionFile |
|
private |
◆ m_countRoIwithEnoughHits
std::atomic<unsigned int> TrigFastTrackFinder::m_countRoIwithEnoughHits |
|
mutableprivate |
◆ m_countRoIwithTracks
std::atomic<unsigned int> TrigFastTrackFinder::m_countRoIwithTracks |
|
mutableprivate |
◆ m_countTotalRoI
std::atomic<unsigned int> TrigFastTrackFinder::m_countTotalRoI |
|
mutableprivate |
◆ m_dEdxHitKey
◆ m_dEdxTrkKey
◆ m_detStore
◆ m_disTrkCandKey
◆ m_disTrkFitter
◆ m_doCloneRemoval
Gaudi::Property<bool> TrigFastTrackFinder::m_doCloneRemoval {this, "doCloneRemoval", true, "Remove tracks sharing too many hits"} |
|
private |
◆ m_dodEdxTrk
bool TrigFastTrackFinder::m_dodEdxTrk |
|
private |
◆ m_doDisappearingTrk
bool TrigFastTrackFinder::m_doDisappearingTrk |
|
private |
◆ m_doFastZVseeding
bool TrigFastTrackFinder::m_doFastZVseeding |
|
private |
◆ m_doResMonitoring
bool TrigFastTrackFinder::m_doResMonitoring |
|
private |
◆ m_doTrackRefit
Gaudi::Property<bool> TrigFastTrackFinder::m_doTrackRefit {this, "doTrackRefit", true, "Refit tracks after the combinatorial track following"} |
|
private |
◆ m_doZFinder
bool TrigFastTrackFinder::m_doZFinder |
|
private |
◆ m_doZFinderOnly
bool TrigFastTrackFinder::m_doZFinderOnly |
|
private |
◆ m_evtStore
◆ m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Empty if no symlinks were found.
Definition at line 114 of file AthCommonReentrantAlgorithm.h.
◆ m_extrapolator
◆ m_idHelper
◆ m_initialD0Max
float TrigFastTrackFinder::m_initialD0Max |
|
private |
◆ m_inputTracksKey
◆ m_ITkMode
bool TrigFastTrackFinder::m_ITkMode |
|
private |
◆ m_LRTD0Min
float TrigFastTrackFinder::m_LRTD0Min |
|
private |
◆ m_LRTHardMinPt
float TrigFastTrackFinder::m_LRTHardMinPt |
|
private |
◆ m_LRTmode
bool TrigFastTrackFinder::m_LRTmode |
|
private |
◆ m_minHits
int TrigFastTrackFinder::m_minHits |
|
private |
◆ m_monTool
◆ m_nfreeCut
int TrigFastTrackFinder::m_nfreeCut |
|
private |
◆ m_numberingTool
◆ m_outputTracksKey
◆ m_particleHypothesis
◆ m_pixelId
◆ m_prdToTrackMap
◆ m_pTmin
float TrigFastTrackFinder::m_pTmin |
|
private |
◆ m_roiCollectionKey
◆ m_sctId
◆ m_seedingTool
◆ m_spacePointTool
◆ m_standaloneMode
bool TrigFastTrackFinder::m_standaloneMode |
|
private |
◆ m_storeZFinderVertices
bool TrigFastTrackFinder::m_storeZFinderVertices |
|
private |
◆ m_tcs
◆ m_trackMaker
◆ m_trackSummaryTool
◆ m_trigInDetTrackFitter
◆ m_trigseedML_LUT
std::string TrigFastTrackFinder::m_trigseedML_LUT |
|
private |
◆ m_trigZFinder
◆ m_tripletMinPtFrac
float TrigFastTrackFinder::m_tripletMinPtFrac |
|
private |
◆ m_useBeamSpot
bool TrigFastTrackFinder::m_useBeamSpot |
|
private |
◆ m_useEtaBinning
Gaudi::Property<bool> TrigFastTrackFinder::m_useEtaBinning {this, "UseEtaBinning", true, "Split layers into eta bins"} |
|
private |
◆ m_useGPU
bool TrigFastTrackFinder::m_useGPU |
|
private |
◆ m_useNewLayerNumberScheme
bool TrigFastTrackFinder::m_useNewLayerNumberScheme |
|
private |
◆ m_useTracklets
Gaudi::Property<bool> TrigFastTrackFinder::m_useTracklets {this, "UseTracklets", false, "Use tracklet seeds from ITk track seeding"} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vertexSeededMode
bool TrigFastTrackFinder::m_vertexSeededMode |
|
private |
◆ m_vhka
◆ m_Z0Max
float TrigFastTrackFinder::m_Z0Max |
|
private |
◆ N_BARREL_LAYERS
constexpr size_t TrigFastTrackFinder::N_BARREL_LAYERS {8} |
|
staticconstexprprotected |
The documentation for this class was generated from the following files:
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
SG::WriteHandleKey< xAOD::TrigCompositeContainer > m_disTrkCandKey
const std::pair< const PrepRawData *, const PrepRawData * > & clusterList() const
return the pair of cluster pointers by reference
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
ToolHandle< ITrigSpacePointConversionTool > m_spacePointTool
virtual double phi() const =0
Methods to retrieve data members.
ToolHandle< GenericMonitoringTool > m_monTool
@ Perigee
This represents a perigee, and so will contain a Perigee object only.
struct TrigAccel::DataExportBuffer DATA_EXPORT_BUFFER
bool setDetail(const std::string &name, const TYPE &value)
Set an TYPE detail on the object.
Const iterator class for DataVector/DataList.
Group
Properties of a chain group.
const FitQuality * fitQuality() const
return a pointer to the fit quality const-overload
StatusCode findTracks(InDet::SiTrackMakerEventData_xk &event_data, const TrigRoiDescriptor &roi, const TrackCollection *inputTracks, TrackCollection &outputTracks, const EventContext &ctx) const
void filterSharedDisTracks(std::vector< std::tuple< bool, double, Trk::Track * >> &) const
Scalar phi() const
phi method
const AtlasDetectorID * m_idHelper
value_type emplace_back(value_type pElem)
Add an element to the end of the collection.
virtual double zedMinus() const override final
z at the most backward end of the RoI
std::string find(const std::string &s)
return a remapped string
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
bool isGoodTrackUTT(const Trk::Track *track, trackInfo &theTrackInfo, const float shift_x, const float shift_y, float trkcut_ptgev)
float m_tripletD0_PPS_Max
class TrigTrackSeedGenerator TRIG_TRACK_SEED_GENERATOR
TrigComposite_v1 TrigComposite
Declare the latest version of the class.
ToolHandle< ITrigInDetTrackFitter > m_trigInDetTrackFitter
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Scalar eta() const
pseudorapidity method
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
ServiceHandle< ITrigInDetAccelerationSvc > m_accelSvc
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
bool m_checkSeedRedundancy
virtual double etaMinus() const =0
SG::WriteHandleKey< TrackCollection > m_outputTracksKey
T wrapToPi(T phi)
Wrap angle in radians to [-pi, pi].
float dEdx(const Trk::Track *, int &, int &, std::vector< float > &, std::vector< float > &, std::vector< float > &, std::vector< float > &, std::vector< int > &, std::vector< int > &, std::vector< int > &) const
Scalar theta() const
theta method
Gaudi::Property< bool > m_doTrackRefit
void makeSeedsOnGPU(const TrigCombinatorialSettings &, const IRoiDescriptor *, const std::vector< TrigSiSpacePointBase > &, std::vector< TrigInDetTriplet > &) const
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)
virtual std::shared_ptr< OffloadBuffer > getOutput()=0
std::vector< TrigInDetSiLayer > m_layerGeometry
Gaudi::Property< bool > m_doCloneRemoval
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
virtual bool composite() const override final
SuperRoI compatability methods.
std::vector< SG::VarHandleKeyArray * > m_vhka
ToolHandle< Trk::ITrackFitter > m_disTrkFitter
virtual unsigned size() const override final
number of constituents
@ numberOfPixelHits
these are the pixel hits, including the b-layer [unit8_t].
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
ToolHandle< Trk::IExtrapolator > m_extrapolator
std::vector< size_t > vec
double doubleNumberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as double
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
void getBeamSpotShift(float &shift_x, float &shift_y, const InDet::BeamSpotData &beamSpotHandle)
virtual double etaPlus() const =0
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
SG::ReadHandleKey< TrackCollection > m_inputTracksKey
setScaleOne setStatusOne setSaturated int16_t
const std::vector< int > & totList() const
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
virtual void setOwner(IDataHandleHolder *o)=0
An algorithm that can be simultaneously executed in multiple threads.
void extractClusterIds(const Trk::SpacePoint *, std::vector< Identifier > &) const
typename vecDetail::vec_typedef< T, N >::type vec
Define a nice alias for the vectorized type.
virtual double eta() const =0
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
void updateClusterMap(long int, const Trk::Track *, std::map< Identifier, std::vector< long int > > &) const
SG::WriteHandleKey< xAOD::TrigCompositeContainer > m_dEdxTrkKey
TrigFastTrackFinder::DisTrkCategory getDisTrkCategory(Trk::Track *trk) const
void push_back(const IRoiDescriptor *roi)
add a RoiDescriptor
std::unique_ptr< Trk::Track > disTrk_refit(Trk::Track *t, const EventContext &ctx) const
void runResidualMonitoring(const Trk::Track &track, const EventContext &) const
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
virtual const IRoiDescriptor * at(int i) const override final
find an RoiDescriptor constituent
std::atomic< unsigned int > m_countRoIwithEnoughHits
::StatusCode StatusCode
StatusCode definition for legacy code.
Describes the API of the Region of Ineterest geometry.
StatusCode finddEdxTrk(const EventContext &, const TrackCollection &) const
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
TrigCombinatorialSettings m_tcs
bool usedByAnyTrack(const std::vector< Identifier > &, std::map< Identifier, std::vector< long int > > &) const
double chi2(TH1 *h0, TH1 *h1)
virtual double phiMinus() const =0
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
int numberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as integer
Class used to describe composite objects in the HLT.
double disTrackQuality(const Trk::Track *) const
StatusCode findDisTracks(const EventContext &, TrackCollection &, std::vector< std::tuple< bool, double, Trk::Track * >> &, std::vector< std::tuple< bool, double, Trk::Track * >> &, TrackCollection &, const std::vector< double > &, const std::vector< double > &, const std::vector< double > &) const
SG::ReadHandleKey< TrigRoiDescriptorCollection > m_roiCollectionKey
unsigned int m_maxTripletBufferLength
double trackQuality(const Trk::Track *Tr) const
virtual void renounce()=0
virtual double phiPlus() const =0
extreme phi values
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
std::string m_connectionFile
ToolHandle< Trk::ITrackSummaryTool > m_trackSummaryTool
Identifier identify() const
return the identifier
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
int layer_disk(const Identifier &id) const
const Perigee * perigeeParameters() const
return Perigee.
int eta_module(const Identifier &id) const
ToolHandle< ITrigInDetTrackSeedingTool > m_seedingTool
@ numberOfNextToInnermostPixelLayerHits
these are the hits in the 1st pixel barrel layer
ToolHandle< InDet::ISiTrackMaker > m_trackMaker
void print_disTrk(const Trk::Track *t) const
bool isPreselPassDisTrackBeforeRefit(Trk::Track *, double, double) const
ToolHandle< ITrigInDetAccelerationTool > m_accelTool
virtual double zed() const override final
SG::WriteHandleKey< xAOD::TrigCompositeContainer > m_dEdxHitKey
double charge(const T &p)
int layer_disk(const Identifier &id) const
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode initialize(bool used=true)
void fillMon(const TrackCollection &tracks, const TrigVertexCollection &vertices, const TrigRoiDescriptor &roi, const EventContext &ctx) const
Eigen::Matrix< double, 3, 1 > Vector3D
virtual const Trk::PrepRawData * prepRawData() const =0
returns the PrepRawData (also known as RIO) object to which this RIO_OnTrack is associated.
SG::ReadHandleKey< Trk::PRDtoTrackMap > m_prdToTrackMap
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
bool m_useNewLayerNumberScheme
bool isGoodForDisTrackVertex(Trk::Track *, const EventContext &) const
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const DataVector< const MeasurementBase > * measurementsOnTrack() const
return a pointer to a vector of MeasurementBase (NOT including any that come from outliers).
void fillDisTrkCand(xAOD::TrigComposite *, const std::string &, Trk::Track *, const std::unique_ptr< const Trk::TrackParameters > &) const
virtual double etaPlus() const override final
gets eta at zedPlus
std::vector< TrigSeedML_LUT > m_vLUT
virtual const PixelCluster * prepRawData() const override final
returns the PrepRawData - is a SiCluster in this scope
std::atomic< unsigned int > m_countTotalRoI
std::string m_trigseedML_LUT
virtual double zedPlus() const =0
the zed and eta values at the most forward and most rear ends of the RoI
@ FastTrackFinderSeed
for tracks seeded by the FastTrackFinder
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
#define ATH_MSG_WARNING(x)
virtual double phi() const override final
Methods to retrieve data members.
const Trk::TrackSummary * trackSummary() const
Returns a pointer to the const Trk::TrackSummary owned by this const track (could be nullptr)
float m_doublet_dR_Max_Confirm
StatusCode createEmptyUTTEDMs(const EventContext &) const
std::atomic< unsigned int > m_countRoIwithTracks
Identifier identify() const
return the identifier -extends MeasurementBase
float totalCharge() const
bool isPreselPassDisTrackAfterRefit(Trk::Track *, Trk::Track *, double, double) const
bool m_storeZFinderVertices
virtual roi_iterator begin() const override final
iterators
int recoAndFillDisTrkCand(const std::string &, TrackCollection *, std::vector< Trk::Track * > &, xAOD::TrigCompositeContainer *, const std::vector< double > &, const std::vector< double > &, const std::vector< double > &, bool, const EventContext &) const
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual double eta() const override final
virtual double zed() const =0
virtual double zedMinus() const =0
virtual StatusCode sysInitialize() override
Override sysInitialize.
void setComposite(bool b=true)
@ numberOfSCTHits
number of hits in SCT [unit8_t].
void filterSharedTracks(std::vector< std::tuple< bool, double, Trk::Track * >> &QT) const
const PixelID * m_pixelId
double chiSquared() const
returns the of the overall track fit
ToolHandle< ITrigZFinder > m_trigZFinder
Trk::ParticleHypothesis m_particleHypothesis
Athena::TPCnvVers::Current TrigRoiDescriptor
int numberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as integer
Gaudi::Property< bool > m_useTracklets
ToolHandle< ITrigL2LayerNumberTool > m_numberingTool
int get(const SummaryType &type) const
returns the summary information for the passed SummaryType.
Declare a monitored scalar variable.
virtual double phiPlus() const override final
gets phiPlus
std::array< OneLayerInfo_t, N_BARREL_LAYERS > getTrkBarrelLayerInfo(Trk::Track *aTrack) const
iterator erase(iterator position)
Remove element at a given position.
virtual double etaMinus() const override final
gets eta at zMinus
Set * set_intersection(Set *set1, Set *set2)
Perform an intersection of two sets.
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
bool isCleaningPassDisTrack(const TrigInDetTriplet &, Trk::Track *, bool) const
virtual double phiMinus() const override final
gets phiMinus
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
void recoVertexForDisTrack(const EventContext &, TrackCollection &, std::vector< double > &, std::vector< double > &, std::vector< double > &) const
double chiSquared() const
returns the of the overall track fit
bool empty() const noexcept
Returns true if the collection is empty.
std::unique_ptr< const Trk::TrackParameters > extrapolateDisTrackToBS(Trk::Track *, const std::vector< double > &, const std::vector< double > &, const std::vector< double > &, const EventContext &) const
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
double doubleNumberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as double
@ numberOfInnermostPixelLayerHits
these are the hits in the 0th pixel barrel layer
virtual double zedPlus() const override final
z at the most forward end of the RoI