ATLAS Offline Software
Loading...
Searching...
No Matches
muComb Class Reference

Main LVL2 Algorithm. More...

#include <muComb.h>

Inheritance diagram for muComb:
Collaboration diagram for muComb:

Public Member Functions

 muComb (const std::string &, ISvcLocator *)
 Constructor.
virtual StatusCode initialize () override
 initialize.
virtual StatusCode execute (const EventContext &ctx) const override
 execute execute the combined muon FEX.
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
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.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

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

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

int drptMatch (double, double, double, double, double, double, int, double &, double &, double &, double &, double &) const
int drptMatch (const xAOD::L2StandAloneMuon *feature, double, double, double, int, double &, double &, double &, double &, double &) const
int mfMatch (const xAOD::L2StandAloneMuon *feature, double, double, double, double, double &, double &, double &, double &, double &, int &) const
int g4Match (const ExtrapolationResult &extr, double, double, double, double, double, double, double, double &, double &, double &, double &, double &, int &) const
ExtrapolationResult getExtrapolatedMuon (const EventContext &ctx, const xAOD::L2StandAloneMuon *feature) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::ReadHandleKey< xAOD::TrackParticleContainerm_TrackParticleContainerKey
SG::ReadHandleKey< xAOD::L2StandAloneMuonContainerm_muonCollKey
SG::WriteHandleKey< xAOD::L2CombinedMuonContainerm_outputCBmuonCollKey
ToolHandle< GenericMonitoringToolm_monTool {this,"MonTool","","Monitoring tool"}
ToolHandle< Trk::IExtrapolatorm_backExtrapolatorG4
 Handle to the G4 backExtrapolator tool.
SG::ReadCondHandleKey< AtlasFieldCacheCondObjm_fieldCacheCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"}
Gaudi::Property< bool > m_useBackExtrapolatorG4 {this, "UseBackExtrapolatorG4", true, "Use g4-based back-extraploator"}
 flag to switch between G4 and LUT based back-extrapolation
Gaudi::Property< bool > m_assumeToroidOff {this, "AssumeToroidOff", false, "Force assumption toroid off"}
 flag to assume B_Toroid=0 anyway
Gaudi::Property< bool > m_assumeSolenoidOff {this, "AssumeSolenoidOff", false, "Force assumption solenoid off"}
 flag to assume B_Solenoid=0 anyway
Gaudi::Property< int > m_AlgoStrategy {this, "MuCombStrategy", 0, "Algoritgm strategy [0=auto select best option,1=simple angular match]"}
 muComb matching strategy: 0: auto select best option 1: simplified R,(Pt) matching
Gaudi::Property< int > m_ChargeStrategy {this, "ChargeStrategy", 0, "Charge assignement strategy [0=muFast,1=ID,2=resolution based]"}
 muComb charge assignment strategy: 0: useMuFast 1: use ID 2: use resolution model
Gaudi::Property< std::string > m_ID_algo_to_use {this, "IDalgo", "InDetTrigTrackingxAODCnv_Muon_FTF","ID trk xAOD collection to use"}
 ID Track collection used for matching.
Gaudi::Property< double > m_PtMinTrk {this, "MinPtTRK", 1.*Gaudi::Units::GeV, "ID track minimum pT"}
 Min Pt to select the ID track for matching.
Gaudi::Property< double > m_EtaMaxTrk {this, "MaxAbsEtaTRK", 2.5, "ID tracks max |eta|"}
 Max abs(eta) to select the ID track for matching.
Gaudi::Property< int > m_NdofMin {this, "NdofMin", 9999, "matching parameter: min ndof"}
 Min Number of DOF to apply the chi2 cut on macthing based on LUT and G4 backextrapolators.
Gaudi::Property< bool > m_UseAbsPt {this, "UseAbsPt", false, "matching parameter: use absolute pT"}
 Use Absolute value of the Pt in chi2 calculation (i.e.
Gaudi::Property< double > m_WinEta {this, "WinEtaSigma", 4.0, "matching parameter: LUT-based"}
 Number of sigmas for the Eta matching window LUT backextrapolator (Barrel)
Gaudi::Property< double > m_WinPhi {this, "WinPhiSigma", 4.0, "matching parameter: LUT-based"}
 Number of sigmas for the Phi matching window LUT backextrapolator (Barrel)
Gaudi::Property< double > m_Chi2Max {this, "Chi2Max", 1.e33, "matching parameter: LUT-based"}
 Max Chi2 for the combined muon in LUT backextrapolator (Barrel)
Gaudi::Property< double > m_WinEta_EC {this, "WinEtaSigmaEndCaps", 4.0, "matching parameter: LUT-based"}
 Number of sigmas for the Eta matching window LUT backextrapolator (EndCaps)
Gaudi::Property< double > m_WinPhi_EC {this, "WinPhiSigmaEndCaps", 10., "matching parameter: LUT-based"}
 Number of sigmas for the Phi matching window LUT backextrapolator (EndCaps)
Gaudi::Property< double > m_Chi2Max_EC {this, "Chi2MaxEndCaps", 1.e33, "matching parameter: LUT-based"}
 Max Chi2 for the combined muon in LUT backextrapolator (EndCaps)
Gaudi::Property< double > m_WinEta_TS {this, "WinEtaSigmaTS", 5.0, "matching parameter: LUT-based"}
 Number of sigmas for the Eta matching window LUT backextrapolator (Trigger Stations)
Gaudi::Property< double > m_WinPhi_TS {this, "WinPhiSigmaTS", 5.0, "matching parameter: LUT-based"}
 Number of sigmas for the Phi matching window LUT backextrapolator (Trigger Stations)
Gaudi::Property< double > m_Chi2Max_TS {this, "Chi2MaxTS", 1.e33, "matching parameter: LUT-based"}
 Max Chi2 for the combined muon in LUT backextrapolator (Trigger Stations)
Gaudi::Property< double > m_WinEta_FE {this, "WinEtaSigmaFE", 10.0, "matching parameter: LUT-based"}
 Number of sigmas for the Eta matching window LUT backextrapolator (MS Feet region)
Gaudi::Property< double > m_WinPhi_FE {this, "WinPhiSigmaFE", 10.0, "matching parameter: LUT-based"}
 Number of sigmas for the Phi matching window LUT backextrapolator (MS Feet region)
Gaudi::Property< double > m_Chi2Max_FE {this, "Chi2MaxFE", 1.e33, "matching parameter: LUT-based"}
 Max Chi2 for the combined muon in LUT backextrapolator (MS Feet region)
Gaudi::Property< double > m_WeightEta {this, "WeightEta", 2.0, "matching parameter: LUT-based"}
 Scale factor for the Eta matching window in LUT backextrapolator.
Gaudi::Property< double > m_WeightPhi {this, "WeightPhi", 2.0, "matching parameter: LUT-based"}
 Scale factor for the Phi matching window in LUT backextrapolator.
Gaudi::Property< double > m_WinEta_g4 {this, "WinEtaSigma_g4", 7.0, "matching parameter: G4-based"}
 Number of sigmas for the Eta matching window LUT backextrapolator (Barrel)
Gaudi::Property< double > m_WinPhi_g4 {this, "WinPhiSigma_g4", 7.0, "matching parameter: G4-based"}
 Number of sigmas for the Phi matching window LUT backextrapolator (Barrel)
Gaudi::Property< double > m_Chi2Max_g4 {this, "Chi2Max_g4", 1.e33, "matching parameter: G4-based"}
 Max Chi2 for the combined muon in LUT backextrapolator (Barrel)
Gaudi::Property< double > m_WinEta_EC_g4 {this, "WinEtaSigmaEndCaps_g4",7.0, "matching parameter: G4-based"}
 Number of sigmas for the Eta matching window LUT backextrapolator (EndCaps)
Gaudi::Property< double > m_WinPhi_EC_g4 {this, "WinPhiSigmaEndCaps_g4",7.0, "matching parameter: G4-based"}
 Number of sigmas for the Phi matching window LUT backextrapolator (EndCaps)
Gaudi::Property< double > m_Chi2Max_EC_g4 {this, "Chi2MaxEndCaps_g4", 1.e33, "matching parameter: G4-based"}
 Max Chi2 for the combined muon in LUT backextrapolator (EndCaps)
Gaudi::Property< double > m_WeightEta_g4 {this, "WeightEta_g4", 2.0, "matching parameter: G4-based"}
 Scale factor for the Eta matching window in LUT backextrapolator.
Gaudi::Property< double > m_WeightPhi_g4 {this, "WeightPhi_g4", 2.0, "matching parameter: G4-based"}
 Scale factor for the Phi matching window in LUT backextrapolator.
Gaudi::Property< double > m_Chi2Weight_g4 {this, "Chi2Weight_g4", 2.0, "matching parameter: G4-based"}
 Scale factor for the Chi2 1/pt resolutions (MS and ID) (Barrel)
Gaudi::Property< double > m_winPt {this, "WinPt", -1.0*Gaudi::Units::GeV, "matching parameter (simplifed): pT windows in geV (disabled if < 0)"}
 max deltaPt for simpified matching
Gaudi::Property< double > m_winDR {this, "WinDelta", 0.2, "matching parameter (simplifed): strategy dependent"}
 max deltaR for simplified matching
Gaudi::Property< std::vector< double > > m_IDSCANRes_barrel {this, "IDSCANBarrelRes", {0.017, 0.000000418}, "ID parametrized rsolution for matching (barrel)"}
Gaudi::Property< std::vector< double > > m_IDSCANRes_endcap1 {this, "IDSCANEndcap1Res",{0.025, 0.0000002}, "ID parametrized rsolution for matching (ec1)"}
Gaudi::Property< std::vector< double > > m_IDSCANRes_endcap2 {this, "IDSCANEndcap2Res",{0.030, 0.0000002}, "ID parametrized rsolution for matching (ec2)"}
Gaudi::Property< std::vector< double > > m_IDSCANRes_endcap3 {this, "IDSCANEndcap3Res",{0.036, 0.0000004}, "ID parametrized rsolution for matching (ec3)"}
Gaudi::Property< std::vector< double > > m_IDSCANRes_endcap4 {this, "IDSCANEndcap4Res",{0.046, 0.0000002}, "ID parametrized rsolution for matching (ec4)"}
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Main LVL2 Algorithm.

Sided by a xAOD::L2StandaloneMuon, match the muon spectrometer track with an ID track, and produces a xAOD::L2CombinedMuon.

Definition at line 53 of file muComb.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ muComb()

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

Constructor.

Definition at line 28 of file muComb.cxx.

28 :
29 AthReentrantAlgorithm(name, pSvcLocator)
30{
31}

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

◆ declareGaudiProperty()

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

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

Definition at line 156 of file AthCommonDataStore.h.

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

◆ declareProperty()

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

Definition at line 145 of file AthCommonDataStore.h.

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

◆ detStore()

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

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

Definition at line 95 of file AthCommonDataStore.h.

◆ drptMatch() [1/2]

int muComb::drptMatch ( const xAOD::L2StandAloneMuon * feature,
double id_pt,
double id_eta,
double id_phi,
int algo,
double & combPtInv,
double & combPtRes,
double & deta,
double & dphi,
double & dr ) const
private

Definition at line 63 of file muComb.cxx.

65{
66 double pt = feature->pt() * Gaudi::Units::GeV;
67 double phi = feature->phiMS();
68 double eta = feature->etaMS();
69 return muComb::drptMatch(pt, eta, phi, id_pt, id_eta, id_phi, algo, combPtInv, combPtRes, deta, dphi, dr);
70}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
int drptMatch(double, double, double, double, double, double, int, double &, double &, double &, double &, double &) const
Definition muComb.cxx:72
float etaMS() const
Get the eta at muon spectrometer.
float phiMS() const
Get the phi at muon spectrometer.
virtual double pt() const
The transverse momentum ( ) of the particle.

◆ drptMatch() [2/2]

int muComb::drptMatch ( double pt,
double eta,
double phi,
double id_pt,
double id_eta,
double id_phi,
int algo,
double & combPtInv,
double & combPtRes,
double & deta,
double & dphi,
double & dr ) const
private

Definition at line 72 of file muComb.cxx.

74{
75
76 // algo: 1 --> R (+ pt), combined pt
77 // algo: 2 --> R match, Id pt
78 // algo: 3 --> R match, MS pt
79 // algo: 4 --> R match, infinite pt
80 if (algo < 1 || algo > 4) {
81 ATH_MSG_DEBUG(" muComb::drptMatch wrong algo parameter, it is: " << algo
82 << " while must be in the range [1,4], match failed!!!" );
83 return 1;
84 }
85
86 double winDR = m_winDR;
87 double winPt = m_winPt;
88
89 combPtRes = 0.0;
90 if (algo == 1) combPtInv = ((1. / pt) + (1. / id_pt)) * 0.5;
91 if (algo == 2) combPtInv = 1. / id_pt;
92 if (algo == 3) combPtInv = 1. / pt;
93 if (algo == 4) combPtInv = 1.e-33;
94
95 double tmp_deta = std::max(eta, id_eta) - std::min(eta, id_eta);
96 double tmp_dphi = std::max(phi, id_phi) - std::min(phi, id_phi);
97 if (tmp_dphi >= M_PI) tmp_dphi = 2 * M_PI - tmp_dphi;
98 double tmp_dr = std::sqrt(tmp_deta * tmp_deta + tmp_dphi * tmp_dphi);
99
100 dphi = tmp_dphi;
101 deta = tmp_deta;
102 dr = tmp_dr;
103
104 bool passDR = true;
105 bool passPt = true;
106
107 if (tmp_dr > winDR) passDR = false;
108
109 ATH_MSG_DEBUG(" REGTEST Angular MU-ID match / dR / threshold / result:"
110 << " / " << tmp_dr
111 << " / " << winDR
112 << " / " << (passDR ? "true" : "false"));
113
114 if (algo == 1 && winPt > 0) {
115 double tmp_dpt = std::fabs(std::fabs(pt) - std::fabs(id_pt)) / Gaudi::Units::GeV; //don't use charge info
116 if (tmp_dpt > winPt) passPt = false;
117 ATH_MSG_DEBUG( " REGTEST MU-ID match / dpt (GeV) / threshold (GeV) / result:"
118 << " / " << tmp_dpt
119 << " / " << winPt
120 << " / " << (passPt ? "true" : "false"));
121 }
122
123 if (passDR && passPt) return 0;
124 else return 1;
125}
#define M_PI
#define ATH_MSG_DEBUG(x)
Gaudi::Property< double > m_winPt
max deltaPt for simpified matching
Definition muComb.h:205
Gaudi::Property< double > m_winDR
max deltaR for simplified matching
Definition muComb.h:207

◆ evtStore()

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

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

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode muComb::execute ( const EventContext & ctx) const
overridevirtual

execute execute the combined muon FEX.

Execute() method.

Returns
bool

Definition at line 456 of file muComb.cxx.

457{
458 using namespace xAOD;
459
460 // Monitoring variables
461 //Timer
462 auto timer = Monitored::Timer("TIME_execute");
463 //Input
464 auto ptMS = Monitored::Scalar("PtMS", -9999.);
465 auto etaMS = Monitored::Scalar("EtaMS", -9999.);
466 auto phiMS = Monitored::Scalar("PhiMS", -9999.);
467 auto zetaMS = Monitored::Scalar("ZetaMS", -9999.);
468 //ID
469 auto ptID = Monitored::Scalar("PtID", -9999.);
470 auto etaID = Monitored::Scalar("EtaID", -9999.);
471 auto phiID = Monitored::Scalar("PhiID", -9999.);
472 auto zetaID = Monitored::Scalar("ZetaID", -9999.);
473 //Combined
474 auto ptMC = Monitored::Scalar("PtMC", -9999.);
475 auto dEta = Monitored::Scalar("DEta", -9999.);
476 auto dPhi = Monitored::Scalar("DPhi", -9999.);
477 auto dZeta = Monitored::Scalar("DZeta", -9999.);
478 auto dR = Monitored::Scalar("DeltaR", -9999.);
479 //Failed
480 auto ptFL = Monitored::Scalar("PtFL", -9999.);
481 auto etaFL = Monitored::Scalar("EtaFL", -9999.);
482 auto phiFL = Monitored::Scalar("PhiFL", -9999.);
483 //Info
484 auto efficiency = Monitored::Scalar<int>("Efficiency", -1);
485 auto StrategyMC = Monitored::Scalar<int>("StrategyMC", -1);
486 auto ErrorFlagMC = Monitored::Scalar<int>("ErrorFlagMC", 0);
487 auto MatchFlagMC = Monitored::Scalar<int>("MatchFlagMC", 0);
488
489
490 auto mon = Monitored::Group(m_monTool, timer, ptMS, etaMS, phiMS, zetaMS,
491 ptID, etaID, phiID, zetaID,
492 ptMC, dEta, dPhi, dZeta, dR,
493 ptFL, etaFL, phiFL,
494 efficiency, StrategyMC, ErrorFlagMC, MatchFlagMC);
495
496
497 StrategyMC = m_AlgoStrategy;
498
499 //Magnetic field status
500 bool toroidOn = !m_assumeToroidOff;
502
503 SG::ReadCondHandle<AtlasFieldCacheCondObj> readHandle{m_fieldCacheCondObjInputKey, ctx};
504 const AtlasFieldCacheCondObj* fieldCondObj{*readHandle};
505 if (fieldCondObj == nullptr) {
506 ATH_MSG_ERROR("execute: Failed to retrieve AtlasFieldCacheCondObj with key " << m_fieldCacheCondObjInputKey.key());
507 return StatusCode::FAILURE;
508 }
509 MagField::AtlasFieldCache fieldCache;
510 fieldCondObj->getInitializedCache (fieldCache);
511
512 toroidOn = fieldCache.toroidOn() && !m_assumeToroidOff;
513 solenoidOn = fieldCache.solenoidOn() && !m_assumeSolenoidOff;
514 ATH_MSG_DEBUG( "=========== Magnetic Field Status ========== " );
515 ATH_MSG_DEBUG( " Assuming Toroid OFF is: " << (m_assumeToroidOff ? "TRUE" : "FALSE") );
516 ATH_MSG_DEBUG( " Assuming Solenoid OFF is: " << (m_assumeSolenoidOff ? "TRUE" : "FALSE") );
517 ATH_MSG_DEBUG( " ---> Solenoid : " << ((solenoidOn) ? "ON" : "OFF") );
518 ATH_MSG_DEBUG( " ---> Toroid : " << ((toroidOn) ? "ON" : "OFF") );
519
520 // Algorithm strategy
521 // select best matchinig strategy
522 int usealgo = 0; //extrapolated muon - ID match (default)
523 if (solenoidOn) {
524 if (toroidOn) {
525 if (m_AlgoStrategy == 0) usealgo = 0; //extrapolated muon - ID match
526 else usealgo = 1; //simple R-match w/o extrapolation (pt from combined MS-ID)
527 } else {
528 usealgo = 2; //simple R-match w/o extrapolation (pt from ID)
529 }
530 } else {
531 if (toroidOn) usealgo = 3; //simple R-match w/o extrapolation (pt from MS)
532 else usealgo = 4; //simple R-match w/o extrapolation (pt inf)
533 }
534
535 ATH_MSG_DEBUG( "MuCombStrategy: " << usealgo );
536
537 ATH_MSG_DEBUG( "=========== Matching windows g4 ========== " );
538 ATH_MSG_DEBUG( " WinEtaSigma g4: " << m_WinEta_g4 );
539 ATH_MSG_DEBUG( " WinPhiSigma g4: " << m_WinPhi_g4 );
540 ATH_MSG_DEBUG( " WinEtaSigma g4 EC: " << m_WinEta_EC_g4 );
541 ATH_MSG_DEBUG( " WinPhiSigma g4 EC: " << m_WinPhi_EC_g4 );
542 ATH_MSG_DEBUG( " WeightEta g4: " << m_WeightEta_g4 );
543 ATH_MSG_DEBUG( " WeightPhi g4: " << m_WeightPhi_g4 );
544 ATH_MSG_DEBUG( " Chi2Weight g4: " << m_Chi2Weight_g4 );
545 ATH_MSG_DEBUG( " " );
546
547 // Create Combined muon collection and record it with WriteHandle
548 auto muonCBColl = SG::makeHandle (m_outputCBmuonCollKey, ctx);
549 ATH_CHECK( muonCBColl.record (std::make_unique<xAOD::L2CombinedMuonContainer>(),
550 std::make_unique<xAOD::L2CombinedMuonAuxContainer>()) );
551
552 // Get input for seeding
553 auto muonColl = SG::makeHandle(m_muonCollKey, ctx); //SA muons
554
555 // useL1 commented code to be removed once full muon chain with MT tested (SG)
556 //Bool_t useL1 = false;
557 if (muonColl->size() == 0) {
558 //ATH_MSG_DEBUG(" L2 SA Muon collection size = 0");
559 //if (usealgo == 2) {
560 // ATH_MSG_DEBUG(" L2StandAloneMuonContainer not found -> use L1 ROI " );
561 // useL1 = true;
562 //} else {
563 ATH_MSG_DEBUG(" L2StandAloneMuonContainer empty -> stop processing RoI, no match" );
564 return StatusCode::SUCCESS;
565 //}
566 }
567
568 // useL1 commented code to be removed once full muon chain with MT tested (SG)
569 //xAOD::L2StandAloneMuonContainer* muonColl = const_cast<xAOD::L2StandAloneMuonContainer*>(const_muonColl);
570
571 // retrieve L2StandAloneMuon (loop for L2 multi-track SA)
572 for(uint i_muonSA = 0; i_muonSA < muonColl->size(); i_muonSA++){
573
574 const xAOD::L2StandAloneMuon* muonSA = muonColl->at(i_muonSA);
575
577 muonCB->makePrivateStore();
578 muonCB->setPt(0.0);
579 muonCB->setStrategy(usealgo);
580
581 // Save SA muon EL into CB muon
582 ElementLink<xAOD::L2StandAloneMuonContainer> muonSAEL(*muonColl, i_muonSA);
583 muonCB->setMuSATrackLink(muonSAEL);
584
585 // check muonSA pt != 0
586 if (muonSA->pt() == 0.) {
587 ErrorFlagMC = 1;
588 if (usealgo == 2 || usealgo == 4) {
589 ATH_MSG_DEBUG(" L2StandAloneMuon pt = 0 --> using angular match" );
590 //if (usealgo == 2) useL1 = true;
591 } else {
592 ATH_MSG_DEBUG(" L2StandAloneMuon pt = 0 --> stop processing RoI, no match" );
593 muonCB->setErrorFlag(ErrorFlagMC);
594 muonCBColl->push_back(muonCB);
595 return StatusCode::SUCCESS;
596 }
597 }
598
599 // useL1 commented code to be removed once full muon chain with MT tested (SG)
600 //double ptL1 = -999.;
601 //double etaL1 = -999.;
602 //double phiL1 = -999.;
603 double pt = -999.;
604 double eta = -999.;
605 double phi = -999.;
606 double eta_ms = -999.;
607 double phi_ms = -999.;
608 double zeta_ms = -999.;
609 // useL1 commented code to be removed once full muon chain with MT tested (SG)
610 //if (useL1) {
611 // auto muonROIColl = SG::makeHandle(m_muonROICollKey, ctx); // L1 muon ROI
612 // if (muonROIColl->size() == 0) {
613 // ATH_MSG_DEBUG(" L1 Muon RoI collection size = 0");
614 // ATH_MSG_DEBUG(" L2StandAloneMuon pt == 0. && no L1 && torid=OFF --> no match" );
615 // ErrorFlagMC = 1;
616 // muonCB->setErrorFlag(ErrorFlagMC);
617 // return StatusCode::SUCCESS;
618 // } else {
619 // const TrigRoiDescriptor* muonROI = *(muonROIColl->begin());
620 // ptL1 = (muonRoI)->getThresholdValue();
621 // etaL1 = (muonRoI)->eta();
622 // phiL1 = (muonRoI)->phi();
623 // ATH_MSG_DEBUG( " Input L1 muon pt (GeV) = " << (muonROI)->getThresholdValue()
624 // << " / eta = " << (muonROI)->eta()
625 // << " / phi = " << (muonROI)->phi()
626 // << " / roiID = " << (muonROI)->roiId() );
627 // }
628 //} else {
629
630 pt = muonSA->pt();
631 eta = muonSA->eta();
632 phi = muonSA->phi();
633 eta_ms = muonSA->etaMS();
634 phi_ms = muonSA->phiMS();
635 zeta_ms = muonSA->zMS();
636
637 ATH_MSG_DEBUG(" Input L2StandaloneMuon pt (GeV) = " << pt
638 << " / eta = " << eta
639 << " / phi = " << phi
640 << " / etaMS = " << eta_ms
641 << " / phiMS = " << phi_ms
642 << " / zMS = " << zeta_ms);
643 //}
644
645 // ID tracks Decoding
646
647 // how to retrieve a specific colection name?
648 SG::ReadHandle<xAOD::TrackParticleContainer> idTrackParticles(m_TrackParticleContainerKey, ctx); //L2 ID trks
649 if (!idTrackParticles.isValid()){
650 ATH_MSG_DEBUG(" Failed to get xAOD::TrackParticleContainer --> no match" );
651 ErrorFlagMC = 2;
652 muonCB->setErrorFlag(ErrorFlagMC);
653 muonCBColl->push_back(muonCB);
654 return StatusCode::SUCCESS;
655 }
656 if (idTrackParticles->size() < 1){
657 ATH_MSG_DEBUG(" xAOD::TrackParticleContainer has 0 tracks --> no match" );
658 ErrorFlagMC = 2;
659 muonCB->setErrorFlag(ErrorFlagMC);
660 muonCBColl->push_back(muonCB);
661 return StatusCode::SUCCESS;
662 }
663
664 ATH_MSG_DEBUG( " Found xAOD::TrackParticleContainer with size: " << idTrackParticles->size() );
665
666 // matching
667 double ptinv_comb = 0.;
668 double ptres_comb = 0.001;
669 double chi2_comb = 1.0e33;
670 int ndof_comb = -1;
671 double best_dr = 1.0e33;
672 double best_deta = 1.0e33;
673 double best_dphi = 1.0e33;
674 bool has_match = false;
675 int imatch = -1;
676 int matched_trk_idx = -1;
677 int matched_trk_idx_tmp = -1;
678
679
680 // retrieve extrapolated muon if G4 extrapolation was
681 // requested; in this way we don't compute it Ntrk times
682 // but only once per SA muon
683 ExtrapolationResult extr{};
684 if (usealgo <= 0 && m_useBackExtrapolatorG4) {//Std match
685 extr = getExtrapolatedMuon(ctx, muonSA);
686 }
687
688 for(const auto trkit:(*idTrackParticles)) {
689
690 matched_trk_idx_tmp++;
691 double ptinv_tmp = 0.;
692 double ptres_tmp = 0.001;
693 double deta_tmp = 0.;
694 double dphi_tmp = 0.;
695 double dr_tmp = 0.;
696 double chi2_tmp = 0.;
697 int ndof_tmp = 0;
698 bool has_match_tmp = false;
699 int imatch_tmp = -1;
700
701 //Select tracks
702 double phi_id = (trkit)->phi();
703 double eta_id = (trkit)->eta();
704 double qoverp_id = (trkit)->qOverP();
705 double q_id = ((trkit)->qOverP() > 0 ? 1.0 : -1.0);
706 double pt_id = (trkit)->pt() * q_id;
707
708 double e_qoverp_id = std::sqrt((trkit)->definingParametersCovMatrix()(Trk::qOverP,Trk::qOverP));
709 double e_phi_id = std::sqrt((trkit)->definingParametersCovMatrix()(Trk::phi0,Trk::phi0));
710 double e_theta_id = std::sqrt((trkit)->definingParametersCovMatrix()(Trk::theta,Trk::theta));
711 double tanthetaov2 = std::fabs(std::exp(-eta));
712 double e_eta_id = std::fabs(0.5 * (1./tanthetaov2 + tanthetaov2) * e_theta_id);
713
714 double e_qoverpt_id = e_qoverp_id;
715 double theta_id = (trkit)->theta();
716 if (std::sin(theta_id) != 0) e_qoverpt_id /= std::fabs(std::sin(theta_id)); //approximate
717
718 ATH_MSG_DEBUG( " Found track: "
719 << " with pt (GeV) = " << pt_id / Gaudi::Units::GeV
720 << ", q = " << q_id
721 << ", eta = " << eta_id
722 << ", phi = " << phi_id
723 << ", th = " << theta_id
724 << ", ephi = " << e_phi_id
725 << ", eth = " << e_theta_id
726 << ", eeta = " << e_eta_id
727 << ", ip = " << qoverp_id
728 << ", eip = " << e_qoverp_id
729 << ", eipt = " << e_qoverpt_id );
730
731 if (usealgo != 3) {
732 if ((std::fabs(pt_id) / Gaudi::Units::GeV) < m_PtMinTrk) continue;
733 }
734 if (std::fabs(eta_id) > m_EtaMaxTrk) continue;
735
736 ATH_MSG_DEBUG(" Track selected " );
737
738 if (usealgo > 0) {//DeltaR match
739 // commented code (useL1) to be removed once full muon chain with MT tested
740 //if (useL1) {
741 // imatch_tmp = drptMatch(ptL1, etaL1, phiL1, pt_id, eta_id, phi_id, usealgo, ptinv_tmp, ptres_tmp, deta_tmp, dphi_tmp, chi2_tmp);
742 //} else {
743 imatch_tmp = drptMatch(muonSA, pt_id, eta_id, phi_id, usealgo, ptinv_tmp, ptres_tmp, deta_tmp, dphi_tmp, chi2_tmp);
744 //}
745 if (imatch_tmp == 0) has_match_tmp = true;
746 } else { //Std match
748 imatch_tmp = mfMatch(muonSA, eta_id, phi_id, pt_id, q_id, ptinv_tmp, ptres_tmp, deta_tmp, dphi_tmp, chi2_tmp, ndof_tmp);
749 if (imatch_tmp == 0) has_match_tmp = true;
750 } else { //G4 match
751 imatch_tmp = g4Match(extr, eta_id, phi_id, pt_id, q_id, e_eta_id, e_phi_id, e_qoverpt_id, ptinv_tmp, ptres_tmp, deta_tmp, dphi_tmp, chi2_tmp, ndof_tmp);
752 if (imatch_tmp == 0) has_match_tmp = true;
753 }
754 }
755
756 imatch = imatch_tmp;
757 if (!has_match_tmp) continue;
758
759 // select nearest track
760 dr_tmp = std::sqrt(deta_tmp * deta_tmp + dphi_tmp * dphi_tmp);
761
762 if (chi2_tmp <= chi2_comb) {//Select nearest track
763 has_match = true;
764 chi2_comb = chi2_tmp;
765 ndof_comb = ndof_tmp;
766 ptinv_comb = ptinv_tmp;
767 ptres_comb = ptres_tmp;
768 best_deta = deta_tmp;
769 best_dphi = dphi_tmp;
770 best_dr = dr_tmp;
771 imatch = imatch_tmp;
772 matched_trk_idx = matched_trk_idx_tmp;
773 }
774
775 }//Tracks loop
776
777 //Set monitored quantities (monitor only pt>6 GeV/c && standard matching)
778 if (usealgo == 0 && std::fabs(pt) >= 6.) {
779 ptMS = pt;
780 etaMS = eta;
781 phiMS = phi;
782 zetaMS = zeta_ms;
783 ptFL = pt;
784 etaFL = eta;
785 phiFL = phi;
786 if (ptMS > 100.) ptMS = 101.5;
787 if (ptMS < -100.) ptMS = -101.5;
788 if (ptFL > 100.) ptFL = 101.5;
789 if (ptFL < -100.) ptFL = -101.5;
790 }
791
792 if (!has_match) {
793 ErrorFlagMC = 3;
794 MatchFlagMC = imatch;
795 if (usealgo == 0 && std::fabs(pt) >= 6.) efficiency = 0; //monitor only efficiency for mu6 && standard matching
796 ATH_MSG_DEBUG( " No matched ID tracks --> no match" );
797 muonCB->setErrorFlag(ErrorFlagMC);
798 muonCB->setMatchFlag(MatchFlagMC);
799 muonCBColl->push_back(muonCB);
800 return StatusCode::SUCCESS;
801 }
802
803 //Save EL to ID trk into CB muon
804 ElementLink<xAOD::TrackParticleContainer> idtrkEL(*idTrackParticles, matched_trk_idx);
805 muonCB->setIdTrackLink(idtrkEL);
806
807 double pt_id = muonCB->idTrack()->pt();
808 double q_id = ((muonCB->idTrack()->qOverP()) > 0 ? 1.0 : -1.0);
809 double phi_id = muonCB->idTrack()->phi();
810 double eta_id = muonCB->idTrack()->eta();
811 //const Trk::Perigee& idtrk_perigee = muonCB->idTrack()->perigeeParameters();
812 double zPos_id = muonCB->idTrack()->z0(); //idtrk_perigee.parameters()[Trk::z0];
813
814 ATH_MSG_DEBUG(" SA muon macthed to ID track ..." );
815
816 //Update monitored vars
817 MatchFlagMC = imatch;
818 ptFL = -9999.;
819 etaFL = -9999.;
820 phiFL = -9999.;
821 if (usealgo == 0 && std::fabs(pt) >= 6.) {
822 efficiency = 1;
823 ptID = pt_id / Gaudi::Units::GeV; //in GeV/c
824 etaID = eta_id;
825 phiID = phi_id;
826 zetaID = zPos_id;
827 ptMC = 1. / (ptinv_comb * Gaudi::Units::GeV); //in GeV/c
828 dZeta = zeta_ms - zPos_id;
829 dPhi = best_dphi;
830 dEta = best_deta;
831 dR = best_dr;
832
833 if (ptMC > 100.) ptMC = 101.5;
834 if (ptMC < -100.) ptMC = -101.5;
835 if (ptID > 100.) ptID = 101.5;
836 if (ptID < -100.) ptID = -101.5;
837 }
838
839 double prt_pt = pt;
840 // commented code (useL1) to be removed once full muon chain with MT tested
841 //if (useL1) prt_pt = ptL1;
842 ATH_MSG_DEBUG( " REGTEST Combination chosen: "
843 << " usealgo / IdPt (GeV) / muonPt (GeV) / CombPt (GeV) / chi2 / ndof: " << " / " << usealgo << " / " << pt_id*q_id / Gaudi::Units::GeV << " / " << prt_pt << " / " << 1. / ptinv_comb / Gaudi::Units::GeV << " / " << chi2_comb << " / " << ndof_comb );
844
845 muonCB->setPt(std::fabs(1. / ptinv_comb));
846 muonCB->setEta(eta_id);
847 muonCB->setPhi(phi_id);
848
849 float mcq = -1.0;
850 if (ptinv_comb > 0) mcq = 1.0;
851
852 muonCB->setCharge(mcq);
853
854 float mcresu = std::fabs(ptres_comb / (ptinv_comb * ptinv_comb));
855 ATH_MSG_DEBUG( " SigmaPt (GeV) is: " << mcresu / Gaudi::Units::GeV );
856 muonCB->setSigmaPt(mcresu);
857
858 muonCB->setErrorFlag(ErrorFlagMC);
859 muonCB->setMatchFlag(MatchFlagMC);
860
861 muonCBColl->push_back(muonCB);
862 }
863 return StatusCode::SUCCESS;
864}
Scalar theta() const
theta method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
unsigned int uint
void getInitializedCache(MagField::AtlasFieldCache &cache) const
get B field cache for evaluation as a function of 2-d or 3-d position.
bool solenoidOn() const
status of the magnets
void makePrivateStore()
Create a new (empty) private store for this object.
Gaudi::Property< double > m_Chi2Weight_g4
Scale factor for the Chi2 1/pt resolutions (MS and ID) (Barrel)
Definition muComb.h:201
Gaudi::Property< double > m_WinEta_g4
Number of sigmas for the Eta matching window LUT backextrapolator (Barrel)
Definition muComb.h:185
Gaudi::Property< double > m_WeightPhi_g4
Scale factor for the Phi matching window in LUT backextrapolator.
Definition muComb.h:199
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_TrackParticleContainerKey
Definition muComb.h:67
Gaudi::Property< bool > m_assumeSolenoidOff
flag to assume B_Solenoid=0 anyway
Definition muComb.h:122
int mfMatch(const xAOD::L2StandAloneMuon *feature, double, double, double, double, double &, double &, double &, double &, double &, int &) const
Definition muComb.cxx:330
Gaudi::Property< double > m_WeightEta_g4
Scale factor for the Eta matching window in LUT backextrapolator.
Definition muComb.h:197
SG::WriteHandleKey< xAOD::L2CombinedMuonContainer > m_outputCBmuonCollKey
Definition muComb.h:78
int g4Match(const ExtrapolationResult &extr, double, double, double, double, double, double, double, double &, double &, double &, double &, double &, int &) const
Definition muComb.cxx:231
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheCondObjInputKey
Definition muComb.h:91
Gaudi::Property< double > m_PtMinTrk
Min Pt to select the ID track for matching.
Definition muComb.h:142
Gaudi::Property< double > m_WinPhi_g4
Number of sigmas for the Phi matching window LUT backextrapolator (Barrel)
Definition muComb.h:187
ExtrapolationResult getExtrapolatedMuon(const EventContext &ctx, const xAOD::L2StandAloneMuon *feature) const
Definition muComb.cxx:129
Gaudi::Property< double > m_EtaMaxTrk
Max abs(eta) to select the ID track for matching.
Definition muComb.h:144
Gaudi::Property< bool > m_useBackExtrapolatorG4
flag to switch between G4 and LUT based back-extrapolation
Definition muComb.h:117
Gaudi::Property< double > m_WinPhi_EC_g4
Number of sigmas for the Phi matching window LUT backextrapolator (EndCaps)
Definition muComb.h:193
Gaudi::Property< int > m_AlgoStrategy
muComb matching strategy: 0: auto select best option 1: simplified R,(Pt) matching
Definition muComb.h:129
ToolHandle< GenericMonitoringTool > m_monTool
Definition muComb.h:83
Gaudi::Property< bool > m_assumeToroidOff
flag to assume B_Toroid=0 anyway
Definition muComb.h:120
Gaudi::Property< double > m_WinEta_EC_g4
Number of sigmas for the Eta matching window LUT backextrapolator (EndCaps)
Definition muComb.h:191
SG::ReadHandleKey< xAOD::L2StandAloneMuonContainer > m_muonCollKey
Definition muComb.h:72
void setPt(float pt)
Set the transverse momentum ( ) of the muon.
void setSigmaPt(float value)
set sigma combined Pt
void setStrategy(int value)
set algorithm strategy flag
void setErrorFlag(int value)
set algorithm error flag
void setMatchFlag(int value)
set algorithm match flag
void setIdTrackLink(const ElementLink< xAOD::TrackParticleContainer > &link)
set ID track used to make the CB muon
void setMuSATrackLink(const ElementLink< xAOD::L2StandAloneMuonContainer > &link)
set SA muon used to make the CB muon
void setPhi(float phi)
Set the azimuthal angle ( ) of the muon.
void setEta(float eta)
Set the pseudorapidity ( ) of the muon.
void setCharge(float value)
set seeding muon charge
const xAOD::TrackParticle * idTrack() const
Get the ID track as a bare pointer.
virtual double phi() const
The azimuthal angle ( ) of the particle.
float zMS() const
Get the Z at muon spectrometer.
virtual double eta() const
The pseudorapidity ( ) of the particle.
float z0() const
Returns the parameter.
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
virtual double pt() const override final
The transverse momentum ( ) of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
void efficiency(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")
@ qOverP
perigee
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
bool dPhi(const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
bool dEta(const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
@ phi0
Definition ParamDefs.h:65
@ theta
Definition ParamDefs.h:66
@ qOverP
perigee
Definition ParamDefs.h:67
timer(name, disabled=False)
xAOD::ParametersCovMatrix_t definingParametersCovMatrix(std::span< const float > covMatrixDiag, std::span< const float > covMatrixOffDiag, bool &valid)
setSAddress etaMS
L2CombinedMuon_v1 L2CombinedMuon
Define the latest version of the muon CB class.
L2StandAloneMuon_v2 L2StandAloneMuon
Define the latest version of the muon SA class.

◆ extraDeps_update_handler()

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

Add StoreName to extra input/output deps as needed.

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

◆ extraOutputDeps()

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

Return the list of extra output dependencies.

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

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ filterPassed()

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

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ g4Match()

int muComb::g4Match ( const ExtrapolationResult & extr,
double id_eta,
double id_phi,
double id_pt,
double id_charge,
double id_eeta,
double id_ephi,
double id_eipt,
double & combPtInv,
double & combPtRes,
double & deta,
double & dphi,
double & chi2,
int & ndof ) const
private

Definition at line 231 of file muComb.cxx.

234{
235 ATH_MSG_DEBUG("in g4Match");
236 if (extr.status != 0) return extr.status; // propagates the badness of the extrapolated muon, if appropriate
237
238 chi2 = 1.0e30;
239 ndof = 0;
240
241 //ID parameters
244 double id_ptinv = 1.0e33;
245 if (id_pt != 0) {
246 id_ptinv = 1. / id_pt;
247 } else {
248 return 3; //no match if ID track Pt zero
249 }
250
251 double id_eptinv = id_eipt; //now taken from Track itself ...
252
253
254 //Combined muon parameters
255 combPtInv = muCombUtil::getCombinedAverage(extr.ptinv, extr.eptinv, id_ptinv, id_eptinv);
256 combPtRes = muCombUtil::getCombinedAverageSigma(extr.eptinv, id_eptinv);
257 double q_tmp = extr.charge;
258 if (m_ChargeStrategy == 1) q_tmp = id_charge;
259 else if (m_ChargeStrategy == 2) {
260 if (1. / combPtInv > 50000.) q_tmp = extr.charge;
261 else q_tmp = id_charge;
262 }
263 combPtInv *= q_tmp;
264
265 //Masaki/Kunihiro treatment of TGC/RPC readout problems
266 ATH_MSG_DEBUG( " Enlarge phi matching error in case TGC/RPC readout failed. : " << extr.isRpcFailure << " / " << extr.isTgcFailure);
267
268 double ephi_to_use = extr.ephi;
269 if (extr.isTgcFailure || extr.isRpcFailure) ephi_to_use *= 2.0;
270
271 //Match
272 deta = muCombUtil::getDeltaEta(extr.eta, id_eta);
273 dphi = muCombUtil::getDeltaPhi(extr.phi, id_phi);
274 int ndof_OLD = 0;
275 double chi2_OLD = muCombUtil::getChi2(ndof_OLD, combPtInv,
276 extr.eta, extr.eeta, extr.phi, ephi_to_use, extr.ptinv, extr.eptinv,
277 id_eta, 0.0, id_phi, 0.0, id_ptinv, id_eptinv, true);
278 chi2 = muCombUtil::getStdChi2(ndof, extr.eta, extr.eeta, extr.phi, ephi_to_use, extr.ptinv, extr.eptinv,
279 id_eta, id_eeta, id_phi, id_ephi, id_ptinv, id_eptinv, m_UseAbsPt);
280
281
282 ATH_MSG_DEBUG(" REGTEST Resolution / OLDIdRes / IdRes / muFastRes / combRes:"
283 << " / " << std::setw(11) << id_eptinv_OLD / Gaudi::Units::GeV
284 << " / " << std::setw(11) << id_eptinv / Gaudi::Units::GeV
285 << " / " << std::setw(11) << extr.eptinv / Gaudi::Units::GeV
286 << " / " << std::setw(11) << combPtRes / Gaudi::Units::GeV );
287
288 ATH_MSG_DEBUG(" REGTEST Momentum / IdPt / muFastPt / CombPt :"
289 << " / " << std::setw(11) << 1. / id_ptinv / Gaudi::Units::GeV
290 << " / " << std::setw(11) << 1. / extr.ptinv / Gaudi::Units::GeV
291 << " / " << std::setw(11) << 1. / combPtInv / Gaudi::Units::GeV );
292
293 ATH_MSG_DEBUG(" REGTEST Chi2 / ndof // Chi2OLD / ndofOLD :"
294 << " / " << std::setw(11) << chi2
295 << " / " << std::setw(11) << ndof
296 << " // " << std::setw(11) << chi2_OLD
297 << " / " << std::setw(11) << ndof_OLD );
298
299 //Cuts
300 double winEtaSigma = m_WinEta_g4;
301 double winPhiSigma = m_WinPhi_g4;
302 double maxChi2 = m_Chi2Max_g4;
303 if (!extr.isBarrel) {//EC
304 winEtaSigma = m_WinEta_EC_g4;
305 winPhiSigma = m_WinPhi_EC_g4;
306 maxChi2 = m_Chi2Max_EC_g4;
307 }
308
309 ATH_MSG_DEBUG(" REGTEST DeltaEta / DeltaPhi / WinEta / WinPhi:"
310 << " / " << std::setw(11) << std::fabs(deta)
311 << " / " << std::setw(11) << std::fabs(dphi)
312 << " / " << std::setw(11) << m_WeightEta_g4*winEtaSigma*std::sqrt(extr.eeta * extr.eeta)
313 << " / " << std::setw(11) << m_WeightPhi_g4*winPhiSigma*std::sqrt(ephi_to_use * ephi_to_use) );
314
315 if (std::fabs(deta) > m_WeightEta_g4 * winEtaSigma * std::sqrt(extr.eeta * extr.eeta)) {
316 return 4;
317 }
318 if (std::fabs(dphi) > m_WeightPhi_g4 * winPhiSigma * std::sqrt(ephi_to_use * ephi_to_use)) {
319 return 5;
320 }
321 if (ndof >= m_NdofMin) {
322 if (chi2 > maxChi2) return 6;
323 }
324
325 return 0; //match OK
326}
Gaudi::Property< double > m_Chi2Max_g4
Max Chi2 for the combined muon in LUT backextrapolator (Barrel)
Definition muComb.h:189
Gaudi::Property< int > m_NdofMin
Min Number of DOF to apply the chi2 cut on macthing based on LUT and G4 backextrapolators.
Definition muComb.h:149
Gaudi::Property< bool > m_UseAbsPt
Use Absolute value of the Pt in chi2 calculation (i.e.
Definition muComb.h:151
Gaudi::Property< double > m_Chi2Max_EC_g4
Max Chi2 for the combined muon in LUT backextrapolator (EndCaps)
Definition muComb.h:195
Gaudi::Property< std::vector< double > > m_IDSCANRes_endcap2
Definition muComb.h:212
Gaudi::Property< std::vector< double > > m_IDSCANRes_endcap3
Definition muComb.h:213
Gaudi::Property< std::vector< double > > m_IDSCANRes_barrel
Definition muComb.h:210
Gaudi::Property< std::vector< double > > m_IDSCANRes_endcap1
Definition muComb.h:211
Gaudi::Property< int > m_ChargeStrategy
muComb charge assignment strategy: 0: useMuFast 1: use ID 2: use resolution model
Definition muComb.h:136
Gaudi::Property< std::vector< double > > m_IDSCANRes_endcap4
Definition muComb.h:214
double chi2(TH1 *h0, TH1 *h1)
float ndof(const U &p)
double getIDSCANRes(std::vector< double > barrelvec, std::vector< double > ec1vec, std::vector< double > ec2vec, std::vector< double > ec3vec, std::vector< double > ec4vec, double pt_id, double eta_id)
Get parametrized IDSCAN 1/pt resolution.
double getChi2(int &ndof, double ipt, double eta1, double seta1, double phi1, double sphi1, double ipt1, double sipt1, double eta2, double seta2, double phi2, double sphi2, double ipt2, double sipt2, bool useAbsPt)
Get OLD style (i.e. muFast time) Chi2.
double getCombinedAverage(double p1, double sp1, double p2, double sp2)
Get weighted mean.
double getStdChi2(int &ndof, double eta1, double seta1, double phi1, double sphi1, double qOvpt1, double sqOvpt1, double eta2, double seta2, double phi2, double sphi2, double qOvpt2, double sqOvpt2, bool useAbsPt)
Get Std Chi2.
double getCombinedAverageSigma(double sp1, double sp2)
Get sigma of weighted mean.
double getDeltaEta(double eta1, double eta2)
Get DeltaEta.
double getDeltaPhi(double phi1, double phi2)
Get DeltaPhi.

◆ getExtrapolatedMuon()

ExtrapolationResult muComb::getExtrapolatedMuon ( const EventContext & ctx,
const xAOD::L2StandAloneMuon * feature ) const
private

Definition at line 129 of file muComb.cxx.

130{
131 ATH_MSG_DEBUG("in getExtrapolatedMuon");
132 ExtrapolationResult result{};
133
134 //muFast parameters (in MeV!)
135 double phi = feature->phiMS();
136 //double eta = feature->etaMS();
137 double theta = 2.*std::atan(std::exp(-feature->etaMS()));
138 double p = 0.0;
139 if (std::sin(theta) != 0) {
140 p = (feature->pt() * Gaudi::Units::GeV) / std::sin(theta);
141 } else {
142 result.status = 2; //No match if muon angle is zero
143 return result;
144 }
145 result.charge = 1.0;
146 double q_over_p = 0.;
147 if (p != 0.) {
148 q_over_p = 1. / p;
149 result.charge = p / std::fabs(p);
150 } else {
151 result.status = 1; //No match if muon Pt is zero
152 return result;
153 }
154 double pt = feature->pt() * Gaudi::Units::GeV;
155 //double ptinv = 1/pt;
156 double eptinv = feature->deltaPt() * Gaudi::Units::GeV / pt / pt;
157
158 result.isBarrel = ((feature->sAddress() != -1) ? true : false);
159 double etaShift = (result.isBarrel ? 0 : result.charge * 0.01);
160 bool doFix = kFALSE;
161
162 //Superpoints
165 //int outer = (feature->sAddress() == -1) ? xAOD::L2MuonParameters::Chamber::EndcapOuter : xAOD::L2MuonParameters::Chamber::BarrelOuter;
166
167 double sp1_z = feature->superPointZ(inner);
168 double sp1_R = feature->superPointR(inner);
169 double sp2_z = feature->superPointZ(middle);
170 double sp2_R = feature->superPointR(middle);
171
172 if ((std::fabs(sp1_R) < 1000.)) {
173 sp1_z *= 10.;
174 sp1_R *= 10.;
175 }
176 if ((std::fabs(sp2_R) < 1300.)) {
177 sp2_z *= 10.;
178 }
179
180 double R = sp1_R;
181 double z = sp1_z;
182
183 if (R == 0. && z == 0.) { //treat patological endcap cases
184 doFix = kTRUE;
185 if (std::fabs(sp2_R) > 1300.) {
186 z = sp2_z;
187 if (z == 0.) z = 7600.;
188 R = z * std::tan(theta);
189 theta = 2.*std::atan(std::exp(-(feature->etaMS() - etaShift)));
190 }
191 }
192
193 double x = R * std::cos(phi);
194 double y = R * std::sin(phi);
195
197 Trk::PerigeeSurface beamSurface;
198 Trk::PerigeeSurface pgsf(vertex);
199 Trk::Perigee perigeeMS(0., 0., phi, theta, q_over_p, pgsf);
200
201 std::unique_ptr<const Trk::TrackParameters> muonPerigee
202 (m_backExtrapolatorG4->extrapolate(ctx,perigeeMS, beamSurface, Trk::oppositeMomentum, true, Trk::muon));
203
204 //Protection against failing extrapolation
205 if (!muonPerigee) { //G4 probably failed, getting LUT extrapolated values
206 result.eta = feature->eta();
207 result.phi = feature->phi();
208 } else {
209 double extr_theta = muonPerigee -> parameters()[Trk::theta];
210 result.phi = muonPerigee -> parameters()[Trk::phi0];
211 result.eta = -std::log(std::tan(extr_theta / 2.));
212 if (doFix) result.eta = -std::log(std::tan(theta / 2.));
213 }
214
215 result.eeta = muCombUtil::getG4ExtEtaRes(feature->pt(), feature->etaMS());
216 result.ephi = muCombUtil::getG4ExtPhiRes(feature->pt(), feature->etaMS());
217 result.ptinv = 1.0e33;
218 if (pt != 0) result.ptinv = 1. / pt;
219 result.eptinv = eptinv;
220
221 result.isRpcFailure = feature->isRpcFailure();
222 result.isTgcFailure = feature->isTgcFailure();
223
224 result.status = 0; // can go ahead in matching logic
225
226 return result;
227}
#define y
#define x
#define z
ToolHandle< Trk::IExtrapolator > m_backExtrapolatorG4
Handle to the G4 backExtrapolator tool.
Definition muComb.h:86
int sAddress() const
Get the station address of the muon.
float deltaPt() const
Get error of pT.
int isRpcFailure() const
Get flag to see if RPC is properly read.
int isTgcFailure() const
Get flag to see if TGC is properly read.
float superPointR(int chamber) const
Get the measured radious of the muon in one particular super point.
float superPointZ(int chamber) const
Get the measured Z position of the muon in one particular super point.
Eigen::Matrix< double, 3, 1 > Vector3D
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
@ oppositeMomentum
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
double getG4ExtEtaRes(double pt, double eta)
Get parametrized Geant4 Eta resolution (extrapolated)
double getG4ExtPhiRes(double pt, double eta)
Get parametrized Geant4 Phi resolution (extrapolated)
@ BarrelInner
Inner station in the barrel spectrometer.
@ BarrelMiddle
Middle station in the barrel spectrometer.
@ EndcapMiddle
Middle station in the endcap spectrometer.
@ EndcapInner
Inner station in the endcap spectrometer.

◆ initialize()

StatusCode muComb::initialize ( )
overridevirtual

initialize.

Called by the Steering.

Definition at line 33 of file muComb.cxx.

34{
35 ATH_MSG_DEBUG("Initialization:");
36
37 //Filed service
39
40 if (!m_monTool.empty()) {
41 ATH_MSG_DEBUG("Retrieving monTool");
42 CHECK(m_monTool.retrieve());
43 } else {
44 ATH_MSG_INFO("No monTool configured => NO MONITORING");
45 }
46
47 // BackExtrapolator services
48 if ( m_backExtrapolatorG4.retrieve().isFailure() ) {
49 ATH_MSG_ERROR("Unable to locate G4 BackExtrapolator tool ");
50 return StatusCode::FAILURE;
51 }
52
53 ATH_CHECK( m_muonCollKey.initialize() );
54 //ATH_CHECK( m_muonROICollKey.initialize() );
56 ATH_CHECK( m_outputCBmuonCollKey.initialize() );
57
58 return StatusCode::SUCCESS;
59}
#define ATH_MSG_INFO(x)
#define CHECK(...)
Evaluate an expression and check for errors.

◆ inputHandles()

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

Return this algorithm's input handles.

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

◆ isClonable()

◆ mfMatch()

int muComb::mfMatch ( const xAOD::L2StandAloneMuon * feature,
double id_eta,
double id_phi,
double id_pt,
double id_charge,
double & combPtInv,
double & combPtRes,
double & deta,
double & dphi,
double & chi2,
int & ndof ) const
private

Definition at line 330 of file muComb.cxx.

333{
334
335 chi2 = 1.0e30;
336 ndof = 0;
337 //muFast parameters
338
339 double pt = feature->pt() * Gaudi::Units::GeV;
340 if (pt == 0.) {
341 return 1; //No match if muFast Pt is zero
342 }
343
344 bool isTS = ((feature->rMS() <= 10.) ? true : false);
345 bool isBarrel = ((feature->sAddress() != -1) ? true : false);
346
347 double charge = pt / std::fabs(pt);
348 double ptinv = 1. / pt;
349 double eptinv = feature->deltaPt() * Gaudi::Units::GeV / pt / pt;
350
351 //ID parameters
354 double id_ptinv = 1.0e33;
355 //double id_ept = 1.0e33;
356 if (id_pt != 0) {
357 id_ptinv = 1. / id_pt;
358 //id_ept = id_eptinv * id_pt * id_pt;
359 } else {
360 return 3; //no match if ID track Pt zero
361 }
362
363 //Combined muon parameters
364 combPtInv = muCombUtil::getCombinedAverage(ptinv, eptinv, id_ptinv, id_eptinv);
365 combPtRes = muCombUtil::getCombinedAverageSigma(eptinv, id_eptinv);
366 double q_tmp = charge;
367 if (m_ChargeStrategy == 1) q_tmp = id_charge;
368 else if (m_ChargeStrategy == 2) {
369 if (1. / combPtInv > 50000.) q_tmp = charge;
370 else q_tmp = id_charge;
371 }
372 combPtInv *= q_tmp;
373
374 // Extrapolated (LUT) quantities (now stored in the xAOD::L2StandAloneMuon container)
375 double extr_eta = feature->eta();
376 double extr_eeta = feature->deltaEta();
377 double extr_phi = feature->phi();
378 double extr_ephi = feature->deltaPhi();
379 double extr_ptinv = ptinv;
380 double extr_eptinv = eptinv;
381
382 //Masaki/Kunihiro treatment of TGC/RPC readout problems
383 ATH_MSG_DEBUG(" Enlarge phi matching error in case TGC/RPC readout failed. : " << feature->isRpcFailure() << " / " << feature->isTgcFailure() );
384
385 if (feature->isTgcFailure() || feature->isRpcFailure()) extr_ephi *= 2.0;
386
387 //Match
388 deta = muCombUtil::getDeltaEta(extr_eta, id_eta);
389 dphi = muCombUtil::getDeltaPhi(extr_phi, id_phi);
390 chi2 = muCombUtil::getChi2(ndof, combPtInv, extr_eta, extr_eeta, extr_phi, extr_ephi, extr_ptinv, extr_eptinv,
391 id_eta, 0.0, id_phi, 0.0, id_ptinv, id_eptinv, m_UseAbsPt);
392
393
394 ATH_MSG_DEBUG(" REGTEST Resolution / IdRes / muFastRes / combRes:"
395 << " / " << std::setw(11) << id_eptinv / Gaudi::Units::GeV
396 << " / " << std::setw(11) << extr_eptinv / Gaudi::Units::GeV
397 << " / " << std::setw(11) << combPtRes / Gaudi::Units::GeV );
398
399 ATH_MSG_DEBUG(" REGTEST Momentum / IdPt / muFastPt / CombPt :"
400 << " / " << std::setw(11) << 1. / id_ptinv / Gaudi::Units::GeV
401 << " / " << std::setw(11) << 1. / ptinv / Gaudi::Units::GeV
402 << " / " << std::setw(11) << 1. / combPtInv / Gaudi::Units::GeV );
403
404 ATH_MSG_DEBUG(" REGTEST Chi2 / ndof :"
405 << " / " << std::setw(11) << chi2
406 << " / " << std::setw(11) << ndof );
407
408 //Cuts
409 double winEtaSigma = m_WinEta;
410 double winPhiSigma = m_WinPhi;
411 double maxChi2 = m_Chi2Max;
412 if (isTS) { //Trigger Station (barrel/EC)
413 winEtaSigma = m_WinEta_TS;
414 winPhiSigma = m_WinPhi_TS;
415 maxChi2 = m_Chi2Max_TS;
416 } else { //if endcaps and not TS
417 if (!isBarrel) {
418 winEtaSigma = m_WinEta_EC;
419 winPhiSigma = m_WinPhi_EC;
420 maxChi2 = m_Chi2Max_EC;
421 }
422 }
423 bool isFT = false;
424 if (isBarrel)
425 if ((id_phi >= -2.60 && id_phi <= -2.10) || (id_phi >= -1.10 && id_phi <= -0.50)) isFT = true;
426 if (isFT) { //if MS-feet region
427 winEtaSigma = m_WinEta_FE;
428 winPhiSigma = m_WinPhi_FE;
429 maxChi2 = m_Chi2Max_FE;
430 }
431
432 ATH_MSG_DEBUG(" REGTEST DeltaEta / DeltaPhi / WinEta / WinPhi:"
433 << " / " << std::setw(11) << std::fabs(deta)
434 << " / " << std::setw(11) << std::fabs(dphi)
435 << " / " << std::setw(11) << m_WeightEta*winEtaSigma*std::sqrt(extr_eeta * extr_eeta)
436 << " / " << std::setw(11) << m_WeightPhi*winPhiSigma*std::sqrt(extr_ephi * extr_ephi) );
437
438 if (std::fabs(deta) > m_WeightEta * winEtaSigma * std::sqrt(extr_eeta * extr_eeta)) {
439 return 4;
440 }
441 if (std::fabs(dphi) > m_WeightPhi * winPhiSigma * std::sqrt(extr_ephi * extr_ephi)) {
442 return 5;
443 }
444 if (ndof >= m_NdofMin) {
445 if (chi2 > maxChi2) return 6;
446 }
447
448 return 0; //match OK
449}
double charge(const T &p)
Definition AtlasPID.h:997
Gaudi::Property< double > m_Chi2Max
Max Chi2 for the combined muon in LUT backextrapolator (Barrel)
Definition muComb.h:159
Gaudi::Property< double > m_WinEta
Number of sigmas for the Eta matching window LUT backextrapolator (Barrel)
Definition muComb.h:155
Gaudi::Property< double > m_WinPhi_TS
Number of sigmas for the Phi matching window LUT backextrapolator (Trigger Stations)
Definition muComb.h:169
Gaudi::Property< double > m_WinPhi_EC
Number of sigmas for the Phi matching window LUT backextrapolator (EndCaps)
Definition muComb.h:163
Gaudi::Property< double > m_WinEta_FE
Number of sigmas for the Eta matching window LUT backextrapolator (MS Feet region)
Definition muComb.h:173
Gaudi::Property< double > m_WinEta_TS
Number of sigmas for the Eta matching window LUT backextrapolator (Trigger Stations)
Definition muComb.h:167
Gaudi::Property< double > m_WinEta_EC
Number of sigmas for the Eta matching window LUT backextrapolator (EndCaps)
Definition muComb.h:161
Gaudi::Property< double > m_Chi2Max_TS
Max Chi2 for the combined muon in LUT backextrapolator (Trigger Stations)
Definition muComb.h:171
Gaudi::Property< double > m_WinPhi_FE
Number of sigmas for the Phi matching window LUT backextrapolator (MS Feet region)
Definition muComb.h:175
Gaudi::Property< double > m_Chi2Max_EC
Max Chi2 for the combined muon in LUT backextrapolator (EndCaps)
Definition muComb.h:165
Gaudi::Property< double > m_Chi2Max_FE
Max Chi2 for the combined muon in LUT backextrapolator (MS Feet region)
Definition muComb.h:177
Gaudi::Property< double > m_WeightEta
Scale factor for the Eta matching window in LUT backextrapolator.
Definition muComb.h:179
Gaudi::Property< double > m_WeightPhi
Scale factor for the Phi matching window in LUT backextrapolator.
Definition muComb.h:181
Gaudi::Property< double > m_WinPhi
Number of sigmas for the Phi matching window LUT backextrapolator (Barrel)
Definition muComb.h:157
float deltaPhi() const
Get error of phi.
float rMS() const
Get the R at muon spectrometer.
float deltaEta() const
Get error of eta.

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

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

Definition at line 30 of file AthCommonMsg.h.

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

◆ outputHandles()

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

Return this algorithm's output handles.

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

◆ renounce()

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

Definition at line 380 of file AthCommonDataStore.h.

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

◆ renounceArray()

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

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

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

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

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

Execute an algorithm.

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

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

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

Override sysInitialize.

Override sysInitialize from the base class.

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

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

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

Reimplemented in HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
#define ATH_MSG_WARNING(x)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

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

◆ updateVHKA()

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

Definition at line 308 of file AthCommonDataStore.h.

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

Member Data Documentation

◆ m_AlgoStrategy

Gaudi::Property<int> muComb::m_AlgoStrategy {this, "MuCombStrategy", 0, "Algoritgm strategy [0=auto select best option,1=simple angular match]"}
private

muComb matching strategy: 0: auto select best option 1: simplified R,(Pt) matching

Definition at line 129 of file muComb.h.

129{this, "MuCombStrategy", 0, "Algoritgm strategy [0=auto select best option,1=simple angular match]"};

◆ m_assumeSolenoidOff

Gaudi::Property<bool> muComb::m_assumeSolenoidOff {this, "AssumeSolenoidOff", false, "Force assumption solenoid off"}
private

flag to assume B_Solenoid=0 anyway

Definition at line 122 of file muComb.h.

122{this, "AssumeSolenoidOff", false, "Force assumption solenoid off"};

◆ m_assumeToroidOff

Gaudi::Property<bool> muComb::m_assumeToroidOff {this, "AssumeToroidOff", false, "Force assumption toroid off"}
private

flag to assume B_Toroid=0 anyway

Definition at line 120 of file muComb.h.

120{this, "AssumeToroidOff", false, "Force assumption toroid off"};

◆ m_backExtrapolatorG4

ToolHandle<Trk::IExtrapolator> muComb::m_backExtrapolatorG4
private
Initial value:
{this,
"AtlasExtrapolator",
"Trk::Extrapolator/AtlasExtrapolator",
"Tool to backextrapolate muon from MS to IP (G4 based)"}

Handle to the G4 backExtrapolator tool.

Definition at line 86 of file muComb.h.

86 {this,
87 "AtlasExtrapolator",
88 "Trk::Extrapolator/AtlasExtrapolator",
89 "Tool to backextrapolate muon from MS to IP (G4 based)"};

◆ m_ChargeStrategy

Gaudi::Property<int> muComb::m_ChargeStrategy {this, "ChargeStrategy", 0, "Charge assignement strategy [0=muFast,1=ID,2=resolution based]"}
private

muComb charge assignment strategy: 0: useMuFast 1: use ID 2: use resolution model

Definition at line 136 of file muComb.h.

136{this, "ChargeStrategy", 0, "Charge assignement strategy [0=muFast,1=ID,2=resolution based]"};

◆ m_Chi2Max

Gaudi::Property<double> muComb::m_Chi2Max {this, "Chi2Max", 1.e33, "matching parameter: LUT-based"}
private

Max Chi2 for the combined muon in LUT backextrapolator (Barrel)

Definition at line 159 of file muComb.h.

159{this, "Chi2Max", 1.e33, "matching parameter: LUT-based"};

◆ m_Chi2Max_EC

Gaudi::Property<double> muComb::m_Chi2Max_EC {this, "Chi2MaxEndCaps", 1.e33, "matching parameter: LUT-based"}
private

Max Chi2 for the combined muon in LUT backextrapolator (EndCaps)

Definition at line 165 of file muComb.h.

165{this, "Chi2MaxEndCaps", 1.e33, "matching parameter: LUT-based"};

◆ m_Chi2Max_EC_g4

Gaudi::Property<double> muComb::m_Chi2Max_EC_g4 {this, "Chi2MaxEndCaps_g4", 1.e33, "matching parameter: G4-based"}
private

Max Chi2 for the combined muon in LUT backextrapolator (EndCaps)

Definition at line 195 of file muComb.h.

195{this, "Chi2MaxEndCaps_g4", 1.e33, "matching parameter: G4-based"};

◆ m_Chi2Max_FE

Gaudi::Property<double> muComb::m_Chi2Max_FE {this, "Chi2MaxFE", 1.e33, "matching parameter: LUT-based"}
private

Max Chi2 for the combined muon in LUT backextrapolator (MS Feet region)

Definition at line 177 of file muComb.h.

177{this, "Chi2MaxFE", 1.e33, "matching parameter: LUT-based"};

◆ m_Chi2Max_g4

Gaudi::Property<double> muComb::m_Chi2Max_g4 {this, "Chi2Max_g4", 1.e33, "matching parameter: G4-based"}
private

Max Chi2 for the combined muon in LUT backextrapolator (Barrel)

Definition at line 189 of file muComb.h.

189{this, "Chi2Max_g4", 1.e33, "matching parameter: G4-based"};

◆ m_Chi2Max_TS

Gaudi::Property<double> muComb::m_Chi2Max_TS {this, "Chi2MaxTS", 1.e33, "matching parameter: LUT-based"}
private

Max Chi2 for the combined muon in LUT backextrapolator (Trigger Stations)

Definition at line 171 of file muComb.h.

171{this, "Chi2MaxTS", 1.e33, "matching parameter: LUT-based"};

◆ m_Chi2Weight_g4

Gaudi::Property<double> muComb::m_Chi2Weight_g4 {this, "Chi2Weight_g4", 2.0, "matching parameter: G4-based"}
private

Scale factor for the Chi2 1/pt resolutions (MS and ID) (Barrel)

Definition at line 201 of file muComb.h.

201{this, "Chi2Weight_g4", 2.0, "matching parameter: G4-based"};

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_EtaMaxTrk

Gaudi::Property<double> muComb::m_EtaMaxTrk {this, "MaxAbsEtaTRK", 2.5, "ID tracks max |eta|"}
private

Max abs(eta) to select the ID track for matching.

Definition at line 144 of file muComb.h.

144{this, "MaxAbsEtaTRK", 2.5, "ID tracks max |eta|"};

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

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

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_fieldCacheCondObjInputKey

SG::ReadCondHandleKey<AtlasFieldCacheCondObj> muComb::m_fieldCacheCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"}
private

Definition at line 91 of file muComb.h.

91{this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};

◆ m_ID_algo_to_use

Gaudi::Property<std::string> muComb::m_ID_algo_to_use {this, "IDalgo", "InDetTrigTrackingxAODCnv_Muon_FTF","ID trk xAOD collection to use"}
private

ID Track collection used for matching.

Definition at line 139 of file muComb.h.

139{this, "IDalgo", "InDetTrigTrackingxAODCnv_Muon_FTF","ID trk xAOD collection to use"};

◆ m_IDSCANRes_barrel

Gaudi::Property<std::vector<double> > muComb::m_IDSCANRes_barrel {this, "IDSCANBarrelRes", {0.017, 0.000000418}, "ID parametrized rsolution for matching (barrel)"}
private

Definition at line 210 of file muComb.h.

210{this, "IDSCANBarrelRes", {0.017, 0.000000418}, "ID parametrized rsolution for matching (barrel)"};

◆ m_IDSCANRes_endcap1

Gaudi::Property<std::vector<double> > muComb::m_IDSCANRes_endcap1 {this, "IDSCANEndcap1Res",{0.025, 0.0000002}, "ID parametrized rsolution for matching (ec1)"}
private

Definition at line 211 of file muComb.h.

211{this, "IDSCANEndcap1Res",{0.025, 0.0000002}, "ID parametrized rsolution for matching (ec1)"};

◆ m_IDSCANRes_endcap2

Gaudi::Property<std::vector<double> > muComb::m_IDSCANRes_endcap2 {this, "IDSCANEndcap2Res",{0.030, 0.0000002}, "ID parametrized rsolution for matching (ec2)"}
private

Definition at line 212 of file muComb.h.

212{this, "IDSCANEndcap2Res",{0.030, 0.0000002}, "ID parametrized rsolution for matching (ec2)"};

◆ m_IDSCANRes_endcap3

Gaudi::Property<std::vector<double> > muComb::m_IDSCANRes_endcap3 {this, "IDSCANEndcap3Res",{0.036, 0.0000004}, "ID parametrized rsolution for matching (ec3)"}
private

Definition at line 213 of file muComb.h.

213{this, "IDSCANEndcap3Res",{0.036, 0.0000004}, "ID parametrized rsolution for matching (ec3)"};

◆ m_IDSCANRes_endcap4

Gaudi::Property<std::vector<double> > muComb::m_IDSCANRes_endcap4 {this, "IDSCANEndcap4Res",{0.046, 0.0000002}, "ID parametrized rsolution for matching (ec4)"}
private

Definition at line 214 of file muComb.h.

214{this, "IDSCANEndcap4Res",{0.046, 0.0000002}, "ID parametrized rsolution for matching (ec4)"};

◆ m_monTool

ToolHandle<GenericMonitoringTool> muComb::m_monTool {this,"MonTool","","Monitoring tool"}
private

Definition at line 83 of file muComb.h.

83{this,"MonTool","","Monitoring tool"};

◆ m_muonCollKey

SG::ReadHandleKey<xAOD::L2StandAloneMuonContainer> muComb::m_muonCollKey
private
Initial value:
{ this,
"L2StandAloneMuonContainerName",
"xAOD::L2StandAloneMuonContainer",
"input L2StandAloneMuon Container name"}

Definition at line 72 of file muComb.h.

72 { this,
73 "L2StandAloneMuonContainerName", // property name
74 "xAOD::L2StandAloneMuonContainer", // default value of StoreGate key
75 "input L2StandAloneMuon Container name"};

◆ m_NdofMin

Gaudi::Property<int> muComb::m_NdofMin {this, "NdofMin", 9999, "matching parameter: min ndof"}
private

Min Number of DOF to apply the chi2 cut on macthing based on LUT and G4 backextrapolators.

Definition at line 149 of file muComb.h.

149{this, "NdofMin", 9999, "matching parameter: min ndof"};

◆ m_outputCBmuonCollKey

SG::WriteHandleKey<xAOD::L2CombinedMuonContainer> muComb::m_outputCBmuonCollKey
private
Initial value:
{ this,
"L2CombinedMuonContainerName",
"MuonL2CBInfo",
"output CB Muon container name"}

Definition at line 78 of file muComb.h.

78 { this,
79 "L2CombinedMuonContainerName", // property name
80 "MuonL2CBInfo", // default value of StoreGate key
81 "output CB Muon container name"};

◆ m_PtMinTrk

Gaudi::Property<double> muComb::m_PtMinTrk {this, "MinPtTRK", 1.*Gaudi::Units::GeV, "ID track minimum pT"}
private

Min Pt to select the ID track for matching.

Definition at line 142 of file muComb.h.

142{this, "MinPtTRK", 1.*Gaudi::Units::GeV, "ID track minimum pT"}; //GeV/c

◆ m_TrackParticleContainerKey

SG::ReadHandleKey<xAOD::TrackParticleContainer> muComb::m_TrackParticleContainerKey
private
Initial value:
{ this,
"TrackParticlesContainerName",
"InDetTrigTrackingxAODCnv_Muon_FTF",
"input TrackParticle container name"}

Definition at line 67 of file muComb.h.

67 { this,
68 "TrackParticlesContainerName", // property name
69 "InDetTrigTrackingxAODCnv_Muon_FTF", // default value of StoreGate key
70 "input TrackParticle container name"};

◆ m_UseAbsPt

Gaudi::Property<bool> muComb::m_UseAbsPt {this, "UseAbsPt", false, "matching parameter: use absolute pT"}
private

Use Absolute value of the Pt in chi2 calculation (i.e.

not use muon charge)

Definition at line 151 of file muComb.h.

151{this, "UseAbsPt", false, "matching parameter: use absolute pT"};

◆ m_useBackExtrapolatorG4

Gaudi::Property<bool> muComb::m_useBackExtrapolatorG4 {this, "UseBackExtrapolatorG4", true, "Use g4-based back-extraploator"}
private

flag to switch between G4 and LUT based back-extrapolation

Definition at line 117 of file muComb.h.

117{this, "UseBackExtrapolatorG4", true, "Use g4-based back-extraploator"};

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_WeightEta

Gaudi::Property<double> muComb::m_WeightEta {this, "WeightEta", 2.0, "matching parameter: LUT-based"}
private

Scale factor for the Eta matching window in LUT backextrapolator.

Definition at line 179 of file muComb.h.

179{this, "WeightEta", 2.0, "matching parameter: LUT-based"};

◆ m_WeightEta_g4

Gaudi::Property<double> muComb::m_WeightEta_g4 {this, "WeightEta_g4", 2.0, "matching parameter: G4-based"}
private

Scale factor for the Eta matching window in LUT backextrapolator.

Definition at line 197 of file muComb.h.

197{this, "WeightEta_g4", 2.0, "matching parameter: G4-based"};

◆ m_WeightPhi

Gaudi::Property<double> muComb::m_WeightPhi {this, "WeightPhi", 2.0, "matching parameter: LUT-based"}
private

Scale factor for the Phi matching window in LUT backextrapolator.

Definition at line 181 of file muComb.h.

181{this, "WeightPhi", 2.0, "matching parameter: LUT-based"};

◆ m_WeightPhi_g4

Gaudi::Property<double> muComb::m_WeightPhi_g4 {this, "WeightPhi_g4", 2.0, "matching parameter: G4-based"}
private

Scale factor for the Phi matching window in LUT backextrapolator.

Definition at line 199 of file muComb.h.

199{this, "WeightPhi_g4", 2.0, "matching parameter: G4-based"};

◆ m_winDR

Gaudi::Property<double> muComb::m_winDR {this, "WinDelta", 0.2, "matching parameter (simplifed): strategy dependent"}
private

max deltaR for simplified matching

Definition at line 207 of file muComb.h.

207{this, "WinDelta", 0.2, "matching parameter (simplifed): strategy dependent"};

◆ m_WinEta

Gaudi::Property<double> muComb::m_WinEta {this, "WinEtaSigma", 4.0, "matching parameter: LUT-based"}
private

Number of sigmas for the Eta matching window LUT backextrapolator (Barrel)

Definition at line 155 of file muComb.h.

155{this, "WinEtaSigma", 4.0, "matching parameter: LUT-based"};

◆ m_WinEta_EC

Gaudi::Property<double> muComb::m_WinEta_EC {this, "WinEtaSigmaEndCaps", 4.0, "matching parameter: LUT-based"}
private

Number of sigmas for the Eta matching window LUT backextrapolator (EndCaps)

Definition at line 161 of file muComb.h.

161{this, "WinEtaSigmaEndCaps", 4.0, "matching parameter: LUT-based"};

◆ m_WinEta_EC_g4

Gaudi::Property<double> muComb::m_WinEta_EC_g4 {this, "WinEtaSigmaEndCaps_g4",7.0, "matching parameter: G4-based"}
private

Number of sigmas for the Eta matching window LUT backextrapolator (EndCaps)

Definition at line 191 of file muComb.h.

191{this, "WinEtaSigmaEndCaps_g4",7.0, "matching parameter: G4-based"};

◆ m_WinEta_FE

Gaudi::Property<double> muComb::m_WinEta_FE {this, "WinEtaSigmaFE", 10.0, "matching parameter: LUT-based"}
private

Number of sigmas for the Eta matching window LUT backextrapolator (MS Feet region)

Definition at line 173 of file muComb.h.

173{this, "WinEtaSigmaFE", 10.0, "matching parameter: LUT-based"};

◆ m_WinEta_g4

Gaudi::Property<double> muComb::m_WinEta_g4 {this, "WinEtaSigma_g4", 7.0, "matching parameter: G4-based"}
private

Number of sigmas for the Eta matching window LUT backextrapolator (Barrel)

Definition at line 185 of file muComb.h.

185{this, "WinEtaSigma_g4", 7.0, "matching parameter: G4-based"};

◆ m_WinEta_TS

Gaudi::Property<double> muComb::m_WinEta_TS {this, "WinEtaSigmaTS", 5.0, "matching parameter: LUT-based"}
private

Number of sigmas for the Eta matching window LUT backextrapolator (Trigger Stations)

Definition at line 167 of file muComb.h.

167{this, "WinEtaSigmaTS", 5.0, "matching parameter: LUT-based"};

◆ m_WinPhi

Gaudi::Property<double> muComb::m_WinPhi {this, "WinPhiSigma", 4.0, "matching parameter: LUT-based"}
private

Number of sigmas for the Phi matching window LUT backextrapolator (Barrel)

Definition at line 157 of file muComb.h.

157{this, "WinPhiSigma", 4.0, "matching parameter: LUT-based"};

◆ m_WinPhi_EC

Gaudi::Property<double> muComb::m_WinPhi_EC {this, "WinPhiSigmaEndCaps", 10., "matching parameter: LUT-based"}
private

Number of sigmas for the Phi matching window LUT backextrapolator (EndCaps)

Definition at line 163 of file muComb.h.

163{this, "WinPhiSigmaEndCaps", 10., "matching parameter: LUT-based"};

◆ m_WinPhi_EC_g4

Gaudi::Property<double> muComb::m_WinPhi_EC_g4 {this, "WinPhiSigmaEndCaps_g4",7.0, "matching parameter: G4-based"}
private

Number of sigmas for the Phi matching window LUT backextrapolator (EndCaps)

Definition at line 193 of file muComb.h.

193{this, "WinPhiSigmaEndCaps_g4",7.0, "matching parameter: G4-based"};

◆ m_WinPhi_FE

Gaudi::Property<double> muComb::m_WinPhi_FE {this, "WinPhiSigmaFE", 10.0, "matching parameter: LUT-based"}
private

Number of sigmas for the Phi matching window LUT backextrapolator (MS Feet region)

Definition at line 175 of file muComb.h.

175{this, "WinPhiSigmaFE", 10.0, "matching parameter: LUT-based"};

◆ m_WinPhi_g4

Gaudi::Property<double> muComb::m_WinPhi_g4 {this, "WinPhiSigma_g4", 7.0, "matching parameter: G4-based"}
private

Number of sigmas for the Phi matching window LUT backextrapolator (Barrel)

Definition at line 187 of file muComb.h.

187{this, "WinPhiSigma_g4", 7.0, "matching parameter: G4-based"};

◆ m_WinPhi_TS

Gaudi::Property<double> muComb::m_WinPhi_TS {this, "WinPhiSigmaTS", 5.0, "matching parameter: LUT-based"}
private

Number of sigmas for the Phi matching window LUT backextrapolator (Trigger Stations)

Definition at line 169 of file muComb.h.

169{this, "WinPhiSigmaTS", 5.0, "matching parameter: LUT-based"};

◆ m_winPt

Gaudi::Property<double> muComb::m_winPt {this, "WinPt", -1.0*Gaudi::Units::GeV, "matching parameter (simplifed): pT windows in geV (disabled if < 0)"}
private

max deltaPt for simpified matching

Definition at line 205 of file muComb.h.

205{this, "WinPt", -1.0*Gaudi::Units::GeV, "matching parameter (simplifed): pT windows in geV (disabled if < 0)"};

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