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

#include <L2MuonSAIOMon.h>

Inheritance diagram for L2MuonSAIOMon:
Collaboration diagram for L2MuonSAIOMon:

Public Types

enum class  Environment_t {
  user = 0 , online , tier0 , tier0Raw ,
  tier0ESD , AOD , altprod
}
 Specifies the processing environment. More...
enum class  DataType_t {
  userDefined = 0 , monteCarlo , collisions , cosmics ,
  heavyIonCollisions
}
 Specifies what type of input data is being monitored. More...

Public Member Functions

 L2MuonSAIOMon (const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize () override
 initialize
virtual StatusCode fillHistograms (const EventContext &ctx) const override
 Function that steers anlayses.
virtual StatusCode execute (const EventContext &ctx) const override
 Applies filters and trigger requirements.
void fill (const ToolHandle< GenericMonitoringTool > &groupHandle, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable > > &&variables) const
 Fills a vector of variables to a group by reference.
void fill (const ToolHandle< GenericMonitoringTool > &groupHandle, const std::vector< std::reference_wrapper< Monitored::IMonitoredVariable > > &variables) const
 Fills a vector of variables to a group by reference.
template<typename... T>
void fill (const ToolHandle< GenericMonitoringTool > &groupHandle, T &&... variables) const
 Fills a variadic list of variables to a group by reference.
void fill (const std::string &groupName, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable > > &&variables) const
 Fills a vector of variables to a group by name.
void fill (const std::string &groupName, const std::vector< std::reference_wrapper< Monitored::IMonitoredVariable > > &variables) const
 Fills a vector of variables to a group by name.
template<typename... T>
void fill (const std::string &groupName, T &&... variables) const
 Fills a variadic list of variables to a group by name.
Environment_t environment () const
 Accessor functions for the environment.
Environment_t envStringToEnum (const std::string &str) const
 Convert the environment string from the python configuration to an enum object.
DataType_t dataType () const
 Accessor functions for the data type.
DataType_t dataTypeStringToEnum (const std::string &str) const
 Convert the data type string from the python configuration to an enum object.
const ToolHandle< GenericMonitoringTool > & getGroup (const std::string &name) const
 Get a specific monitoring tool from the tool handle array.
const ToolHandle< Trig::TrigDecisionTool > & getTrigDecisionTool () const
 Get the trigger decision tool member.
bool trigChainsArePassed (const std::vector< std::string > &vTrigNames) const
 Check whether triggers are passed.
SG::ReadHandle< xAOD::EventInfoGetEventInfo (const EventContext &) const
 Return a ReadHandle for an EventInfo object (get run/event numbers, etc.).
virtual float lbAverageInteractionsPerCrossing (const EventContext &ctx) const
 Calculate the average mu, i.e.
virtual float lbInteractionsPerCrossing (const EventContext &ctx) const
 Calculate instantaneous number of interactions, i.e.
virtual float lbAverageLuminosity (const EventContext &ctx) const
 Calculate average luminosity (in ub-1 s-1 => 10^30 cm-2 s-1).
virtual float lbLuminosityPerBCID (const EventContext &ctx) const
 Calculate the instantaneous luminosity per bunch crossing.
virtual double lbDuration (const EventContext &ctx) const
 Calculate the duration of the luminosity block (in seconds).
virtual float lbAverageLivefraction (const EventContext &ctx) const
 Calculate the average luminosity livefraction.
virtual float livefractionPerBCID (const EventContext &ctx) const
 Calculate the live fraction per bunch crossing ID.
virtual double lbLumiWeight (const EventContext &ctx) const
 Calculate the average integrated luminosity multiplied by the live fraction.
virtual StatusCode parseList (const std::string &line, std::vector< std::string > &result) const
 Parse a string into a vector.
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

virtual StatusCode fillVariablesPerChain (const EventContext &ctx, const std::string &chain) const override
 Function that fills variables of trigger objects associated to specified trigger chains.
virtual StatusCode fillVariablesPerOfflineMuonPerChain (const EventContext &ctx, const xAOD::Muon *mu, const std::string &chain) const override
 Function that fills variables of trigger objects associated to specified trigger chains comparing offline muons.
virtual bool selectEvents () const
 Function that defines the event selection for anlayses User should reimlement in a subclass if needed.
virtual StatusCode selectMuons (const EventContext &ctx, SG::ReadHandle< xAOD::MuonContainer > &muons, std::vector< const xAOD::Muon * > &probes) const
 Function that defines the event selection for anlayses Users should reimlement in a subclass if needed.
virtual StatusCode fillVariables (const EventContext &ctx) const
 Function that fills variables by just retrieving containers of trigger objects.
virtual StatusCode fillVariablesPerOfflineMuon (const EventContext &ctx, const xAOD::Muon *mu) const
 Function that fills variables that are compared to offline muons but the trigger chains are not specified.
template<class T, class FUNCT>
StatusCode fillVariablesRatioPlots (const EventContext &ctx, const xAOD::Muon *mu, std::string &&trigstep, xAOD::Muon::TrackParticleType type, FUNCT matchFunc) const
 Function that fills variables of ratio plots.
template<class T>
StatusCode fillVariableEtaPhi (const EventContext &ctx, SG::ReadHandleKey< DataVector< T > > ReadHandleKey, std::string &&trigstep, std::tuple< bool, double, double >(*PosFunc)(const T *)=&TrigMuonMonitorAlgorithm::defaultPosFunc< T >) const
 Function that fills variables of etaphi2D plots.
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.

Static Protected Member Functions

template<class T>
static std::tuple< bool, double, double > defaultPosFunc (const T *trig)

Protected Attributes

ToolHandle< MuonMatchingToolm_matchTool {this, "MuonMatchingTool", "MuonMatchingTool", "Tool for matching offline and online objects"}
ToolHandle< CP::IMuonSelectionToolm_muonSelectionTool {this,"MuonSelectionTool","CP::MuonSelectionTool/MuonSelectionTool","MuonSelectionTool"}
SG::ReadHandleKey< xAOD::MuonContainerm_MuonContainerKey {this, "MuonContainerName", "Muons", "Offline muon container"}
Gaudi::Property< std::vector< std::string > > m_monitored_chains {this, "MonitoredChains", {}, "Trigger chains that are monitored"}
 List of trigger chains that are monitored in fillVariablesPerChain and fillVariablesPerOfflineMuonPerChain.
Gaudi::Property< int > m_muontype
 Requirement for the offline muon type considered in analyses.
Gaudi::Property< std::string > m_group {this, "Group", "", "Histogram group"}
 Name of monitored group.
const float m_ratio_measurement_threshold = 4
 Threshold for ratio measurement.
ToolHandleArray< GenericMonitoringToolm_tools {this,"GMTools",{}}
 Array of Generic Monitoring Tools.
PublicToolHandle< Trig::TrigDecisionToolm_trigDecTool
 Tool to tell whether a specific trigger is passed.
ToolHandleArray< IDQFilterToolm_DQFilterTools {this,"FilterTools",{}}
 Array of Data Quality filter tools.
SG::ReadCondHandleKey< LuminosityCondDatam_lumiDataKey {this,"LuminosityCondDataKey","LuminosityCondData","SG Key of LuminosityCondData object"}
SG::ReadCondHandleKey< LBDurationCondDatam_lbDurationDataKey {this,"LBDurationCondDataKey","LBDurationCondData","SG Key of LBDurationCondData object"}
SG::ReadCondHandleKey< TrigLiveFractionCondDatam_trigLiveFractionDataKey {this,"TrigLiveFractionCondDataKey","TrigLiveFractionCondData", "SG Key of TrigLiveFractionCondData object"}
AthMonitorAlgorithm::Environment_t m_environment
 Instance of the Environment_t enum.
AthMonitorAlgorithm::DataType_t m_dataType
 Instance of the DataType_t enum.
Gaudi::Property< std::string > m_environmentStr {this,"Environment","user"}
 Environment string pulled from the job option and converted to enum.
Gaudi::Property< std::string > m_dataTypeStr {this,"DataType","userDefined"}
 DataType string pulled from the job option and converted to enum.
Gaudi::Property< std::string > m_triggerChainString {this,"TriggerChain",""}
 Trigger chain string pulled from the job option and parsed into a vector.
std::vector< std::string > m_vTrigChainNames
 Vector of trigger chain names parsed from trigger chain string.
Gaudi::Property< std::string > m_fileKey {this,"FileKey",""}
 Internal Athena name for file.
Gaudi::Property< bool > m_useLumi {this,"EnableLumi",false}
 Allows use of various luminosity functions.
Gaudi::Property< float > m_defaultLBDuration {this,"DefaultLBDuration",60.}
 Default duration of one lumi block.
Gaudi::Property< int > m_detailLevel {this,"DetailLevel",0}
 Sets the level of detail used in the monitoring.
SG::ReadHandleKey< xAOD::EventInfom_EventInfoKey {this,"EventInfoKey","EventInfo"}
 Key for retrieving EventInfo from StoreGate.

Private Types

typedef std::vector< std::reference_wrapper< Monitored::IMonitoredVariable > > MonVarVec_t
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

StatusCode matchL2IO_wContainer (const EventContext &ctx, const std::string &chain, std::vector< const xAOD::L2CombinedMuon * > &Trig_L2IOobjects) const
StatusCode L2OverlapRemover (const std::vector< const xAOD::L2CombinedMuon * > &matchSA_L2IOobjects, std::vector< bool > &isoverlap, std::vector< bool > &passOR) const
bool isOverlap (const xAOD::L2CombinedMuon *matchSA_L2IOobject1, const xAOD::L2CombinedMuon *matchSA_L2IOobject2) const
StatusCode chooseBestMuon (const std::vector< const xAOD::L2CombinedMuon * > &matchSA_L2IOobjects, std::vector< bool > &passOR, std::vector< unsigned int > &mucombResult) const
StatusCode muCombHypo_TDTworkaround (const std::string &chain, const std::vector< const xAOD::L2CombinedMuon * > &Trig_L2IOobjects, std::vector< bool > &pass_muCombHypo) const
StatusCode isPassedmuCombHypo (const std::string &chain, const xAOD::L2CombinedMuon *Trig_L2IOobjects, bool &pass_muCombHypo) const
StatusCode decision_ptthreshold (const std::string &chain, std::vector< float > &my_EtaBins, std::vector< float > &my_muCombThres, bool &my_pikCuts, float &my_maxPtToApplyPik, float &my_chi2MaxID) const
const xAOD::L2CombinedMuonsearchL2InsideOut (const EventContext &ctx, const xAOD::Muon *mu, const std::string &trigger) const
const xAOD::MuonsearchTagOfflineMuon (const EventContext &ctx, const xAOD::Muon *probe) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Static Private Member Functions

static std::tuple< float, float, float > L2ORPosForMatchFunc (const xAOD::L2StandAloneMuon *trig)
static std::tuple< float, float, float > L2ORPosForMatchFunc (const xAOD::L2CombinedMuon *trig)

Private Attributes

Gaudi::Property< std::vector< float > > m_monitored_chains_plateau {this, "Plateaus", {}, "List of plateaus of measured trigger"}
std::map< std::string, double > m_plateaus {}
SG::ReadHandleKey< xAOD::L2CombinedMuonContainerm_L2MuonCBIOContainerKey {this, "L2CombinedMuonContainerName_IO", "HLT_MuonL2CBInfoIOmode", "L2MuonCBIO container"}
Gaudi::Property< std::vector< float > > m_etaBins {this, "EtaBins", {0, 0.9, 1.1, 1.9, 2.1, 9.9}, "eta bins of DR and mass thresholds"}
Gaudi::Property< std::vector< float > > m_dRCBThres {this, "DRThres", {0.002, 0.001, 0.002, 0.002, 0.002}, "DR threshold of L2CB"}
Gaudi::Property< std::vector< float > > m_dRbySAThres {this, "dRbySAThres", {0, 0, 0, 0, 0}, "mufast DR threshold of L2CB"}
Gaudi::Property< std::vector< float > > m_massCBThres {this, "MassThres", {0.004, 0.002, 0.006, 0.006, 0.006}, "mass threshold of L2CB"}
bool m_RequireDR = true
bool m_RequireDRbySA = false
bool m_RequireMass = true
bool m_RequireSameSign = true
std::string m_name
std::unordered_map< std::string, size_t > m_toolLookupMap
const ToolHandle< GenericMonitoringToolm_dummy
Gaudi::Property< bool > m_enforceExpressTriggers
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

Definition at line 15 of file L2MuonSAIOMon.h.

Member Typedef Documentation

◆ MonVarVec_t

typedef std::vector<std::reference_wrapper<Monitored::IMonitoredVariable> > AthMonitorAlgorithm::MonVarVec_t
privateinherited

Definition at line 370 of file AthMonitorAlgorithm.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ DataType_t

enum class AthMonitorAlgorithm::DataType_t
stronginherited

Specifies what type of input data is being monitored.

An enumeration of the different types of data the monitoring application may be running over. This can be used to select which histograms to produce, e.g. to prevent the production of colliding-beam histograms when running on cosmic-ray data. Strings of the same names may be given as jobOptions.

Enumerator
userDefined 
monteCarlo 
collisions 
cosmics 
heavyIonCollisions 

Definition at line 194 of file AthMonitorAlgorithm.h.

194 {
195 userDefined = 0,
196 monteCarlo,
197 collisions,
198 cosmics,
199 heavyIonCollisions,
200 };
AthConfigFlags cosmics(AthConfigFlags flags, str instanceName, str recoMode)

◆ Environment_t

enum class AthMonitorAlgorithm::Environment_t
stronginherited

Specifies the processing environment.

The running environment may be used to select which histograms are produced, and where they are located in the output. For example, the output paths of the histograms are different for the "user", "online" and the various offline flags. Strings of the same names may be given as jobOptions.

Enumerator
user 
online 
tier0 
tier0Raw 
tier0ESD 
AOD 
altprod 

Definition at line 175 of file AthMonitorAlgorithm.h.

175 {
176 user = 0,
177 online,
178 tier0,
179 tier0Raw,
180 tier0ESD,
181 AOD,
182 altprod,
183 };

Constructor & Destructor Documentation

◆ L2MuonSAIOMon()

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

Definition at line 11 of file L2MuonSAIOMon.cxx.

12 : TrigMuonMonitorAlgorithm(name, pSvcLocator)
13{}
TrigMuonMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)

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.

62{
63 return 0;
64}

◆ chooseBestMuon()

StatusCode L2MuonSAIOMon::chooseBestMuon ( const std::vector< const xAOD::L2CombinedMuon * > & matchSA_L2IOobjects,
std::vector< bool > & passOR,
std::vector< unsigned int > & mucombResult ) const
private

Definition at line 858 of file L2MuonSAIOMon.cxx.

858 {
859
860 const double ZERO_LIMIT = 1e-4;
861 unsigned int i,j,k;
862
863 ATH_MSG_DEBUG( "--- choose best among overlaps & disable EVs (muComb based) ---" );
864 for(i=0; i<matchSA_L2IOobjects.size(); i++) {
865 ATH_MSG_DEBUG( "++ i=" << i << ": result=" << mucombResult[i] );
866 if( mucombResult[i] != i ) {
867 ATH_MSG_DEBUG( " overlap to some one. skip." );
868 continue;
869 }
870 std::vector<unsigned int> others;
871 for(j=0; j<matchSA_L2IOobjects.size(); j++) {
872 if( mucombResult[j] == mucombResult[i] ) others.emplace_back(j);
873 }
874 if( others.size() == 1 ) {
875 ATH_MSG_DEBUG( " unique object. keep it active." );
876 continue;
877 }
878 else { // must choose one best
879 ATH_MSG_DEBUG( " overlapped objects among: " << others );
880 unsigned int bestMuon = 0;
881 float maxPtCombMf = 0.;
882 float mindRRoadRoI = 999.;
883 for(k=0; k<others.size(); k++) {
884 j=others[k];
885
886 float ptCombMf = std::abs(matchSA_L2IOobjects.at(j)->pt()/1e3);
887
888 const float roadPhiP = std::atan2(matchSA_L2IOobjects.at(j)->muSATrack()->dirPhiMS(),1.);
889 const float roadPhiM = std::atan2(-1*matchSA_L2IOobjects.at(j)->muSATrack()->dirPhiMS(),-1.);
890 const float roadPhi = (std::abs(xAOD::P4Helpers::deltaPhi(roadPhiP, matchSA_L2IOobjects.at(j)->muSATrack()->roiPhi()))
891 < std::abs(xAOD::P4Helpers::deltaPhi(roadPhiM, matchSA_L2IOobjects.at(j)->muSATrack()->roiPhi())))? roadPhiP : roadPhiM;
892 float roadAw = 0.;
893 if(std::abs(matchSA_L2IOobjects.at(j)->muSATrack()->roiEta()) < 1.05) { // barrel
894 if( std::abs(matchSA_L2IOobjects.at(j)->muSATrack()->roadAw(1,0)) > ZERO_LIMIT ) roadAw = matchSA_L2IOobjects.at(j)->muSATrack()->roadAw(1,0);
895 else if( std::abs(matchSA_L2IOobjects.at(j)->muSATrack()->roadAw(2,0)) > ZERO_LIMIT ) roadAw = matchSA_L2IOobjects.at(j)->muSATrack()->roadAw(2,0);
896 else if( std::abs(matchSA_L2IOobjects.at(j)->muSATrack()->roadAw(0,0)) > ZERO_LIMIT ) roadAw = matchSA_L2IOobjects.at(j)->muSATrack()->roadAw(0,0);
897 }
898 else { // endcap
899 if( std::abs(matchSA_L2IOobjects.at(j)->muSATrack()->roadAw(4,0)) > ZERO_LIMIT ) roadAw = matchSA_L2IOobjects.at(j)->muSATrack()->roadAw(4,0);
900 else if( std::abs(matchSA_L2IOobjects.at(j)->muSATrack()->roadAw(5,0)) > ZERO_LIMIT ) roadAw = matchSA_L2IOobjects.at(j)->muSATrack()->roadAw(5,0);
901 else if( std::abs(matchSA_L2IOobjects.at(j)->muSATrack()->roadAw(3,0)) > ZERO_LIMIT ) roadAw = matchSA_L2IOobjects.at(j)->muSATrack()->roadAw(3,0);
902 }
903 float roadEta = 999.;
904 if(std::abs(roadAw) > ZERO_LIMIT) roadEta = -std::log(std::tan(0.5*std::atan(std::abs(roadAw))));
905 if(roadAw < 0) roadEta *= -1.;
906 float detaRoadRoI = roadEta - matchSA_L2IOobjects.at(j)->muSATrack()->roiEta();
907 float dphiRoadRoI = xAOD::P4Helpers::deltaPhi(roadPhi, matchSA_L2IOobjects.at(j)->muSATrack()->roiPhi());
908 float dRRoadRoI = std::sqrt(detaRoadRoI*detaRoadRoI + dphiRoadRoI*dphiRoadRoI);
909 ATH_MSG_DEBUG(" j="<< j << " , ptCombMf=" << ptCombMf << ", dRRoadRoI=" << dRRoadRoI);
910
911
912 if( (ptCombMf > maxPtCombMf) ||
913 (std::abs(ptCombMf - maxPtCombMf) < ZERO_LIMIT &&
914 dRRoadRoI < mindRRoadRoI) ) {
915 maxPtCombMf = ptCombMf;
916 mindRRoadRoI = dRRoadRoI;
917 bestMuon = j;
918 }
919 }
920 ATH_MSG_DEBUG( " best is: bestMuon/maxPtCombMf=" << bestMuon << " / " << maxPtCombMf );
921
922 for(k=0; k<others.size(); k++) {
923 j=others[k];
924 if( j != bestMuon ) {
925 ATH_MSG_DEBUG( " EventView( j=" << j << " ) is not active" );
926
927 passOR.at(j) = false;
928 }
929 else{
930 ATH_MSG_DEBUG( " EventView( j=" << j << " ) is best one" );
931 }
932 }
933 }
934 }
935
936
937 return StatusCode::SUCCESS;
938}
#define ATH_MSG_DEBUG(x)
const float ZERO_LIMIT
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[

◆ dataType()

DataType_t AthMonitorAlgorithm::dataType ( ) const
inlineinherited

Accessor functions for the data type.

Returns
the current value of the class's DataType_t instance.

Definition at line 224 of file AthMonitorAlgorithm.h.

224{ return m_dataType; }
AthMonitorAlgorithm::DataType_t m_dataType
Instance of the DataType_t enum.

◆ dataTypeStringToEnum()

AthMonitorAlgorithm::DataType_t AthMonitorAlgorithm::dataTypeStringToEnum ( const std::string & str) const
inherited

Convert the data type string from the python configuration to an enum object.

Returns
a value in the DataType_t enumeration which matches the input string.

Definition at line 144 of file AthMonitorAlgorithm.cxx.

144 {
145 // convert the string to all lowercase
146 std::string lowerCaseStr = str;
147 std::transform(lowerCaseStr.begin(), lowerCaseStr.end(), lowerCaseStr.begin(), ::tolower);
148
149 // check if it matches one of the enum choices
150 if( lowerCaseStr == "userdefined" ) {
152 } else if( lowerCaseStr == "montecarlo" ) {
154 } else if( lowerCaseStr == "collisions" ) {
156 } else if( lowerCaseStr == "cosmics" ) {
157 return DataType_t::cosmics;
158 } else if( lowerCaseStr == "heavyioncollisions" ) {
160 } else { // otherwise, warn the user and return "userDefined"
161 ATH_MSG_WARNING("AthMonitorAlgorithm::dataTypeStringToEnum(): Unknown data type "
162 <<str<<", returning userDefined.");
164 }
165}
#define ATH_MSG_WARNING(x)
void tolower(std::string &s)

◆ decision_ptthreshold()

StatusCode L2MuonSAIOMon::decision_ptthreshold ( const std::string & chain,
std::vector< float > & my_EtaBins,
std::vector< float > & my_muCombThres,
bool & my_pikCuts,
float & my_maxPtToApplyPik,
float & my_chi2MaxID ) const
private

Definition at line 1003 of file L2MuonSAIOMon.cxx.

1004 {
1005
1006 my_maxPtToApplyPik = 25.;
1007 my_chi2MaxID = 3.5;
1008 ATH_MSG_DEBUG("this chain is" << chain);
1009 if(chain == "HLT_mu4_l2io_L1MU3V"){
1010 my_EtaBins = {0, 1.05, 1.5, 2.0, 9.9}; //4GeV_v15a
1011 my_muCombThres = {3.86, 3.77, 3.69, 3.70}; //4GeV_v15a
1012 my_pikCuts = false;
1013 }else if(chain == "HLT_mu24_ivarmedium_mu6_l2io_probe_L1MU14FCH"){
1014 my_EtaBins = {0, 1.05, 1.5, 2.0, 9.9}; //6GeV_v15a
1015 my_muCombThres = {5.87, 5.79, 5.70, 5.62}; //6GeV_v15a
1016 my_pikCuts = false;
1017 }else if(chain == "HLT_mu24_ivarmedium_mu6_l2io_probe_L1MU18VFCH"){
1018 my_EtaBins = {0, 1.05, 1.5, 2.0, 9.9}; //6GeV_v15a
1019 my_muCombThres = {5.87, 5.79, 5.70, 5.62}; //6GeV_v15a
1020 my_pikCuts = false;
1021 }else{
1022 ATH_MSG_ERROR("muCombHypo config is NOT defined in this package:chain = " << chain);
1023 }
1024 return StatusCode::SUCCESS;
1025}
#define ATH_MSG_ERROR(x)

◆ 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>

◆ defaultPosFunc()

template<class T>
std::tuple< bool, double, double > TrigMuonMonitorAlgorithm::defaultPosFunc ( const T * trig)
inlinestaticprotectedinherited

◆ 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.

◆ environment()

Environment_t AthMonitorAlgorithm::environment ( ) const
inlineinherited

Accessor functions for the environment.

Returns
the current value of the class's Environment_t instance.

Definition at line 208 of file AthMonitorAlgorithm.h.

208{ return m_environment; }
AthMonitorAlgorithm::Environment_t m_environment
Instance of the Environment_t enum.

◆ envStringToEnum()

AthMonitorAlgorithm::Environment_t AthMonitorAlgorithm::envStringToEnum ( const std::string & str) const
inherited

Convert the environment string from the python configuration to an enum object.

Returns
a value in the Environment_t enumeration which matches the input string.

Definition at line 116 of file AthMonitorAlgorithm.cxx.

116 {
117 // convert the string to all lowercase
118 std::string lowerCaseStr = str;
119 std::transform(lowerCaseStr.begin(), lowerCaseStr.end(), lowerCaseStr.begin(), ::tolower);
120
121 // check if it matches one of the enum choices
122 if( lowerCaseStr == "user" ) {
123 return Environment_t::user;
124 } else if( lowerCaseStr == "online" ) {
126 } else if( lowerCaseStr == "tier0" ) {
128 } else if( lowerCaseStr == "tier0raw" ) {
130 } else if( lowerCaseStr == "tier0esd" ) {
132 } else if( lowerCaseStr == "aod" ) {
133 return Environment_t::AOD;
134 } else if( lowerCaseStr == "altprod" ) {
136 } else { // otherwise, warn the user and return "user"
137 ATH_MSG_WARNING("AthMonitorAlgorithm::envStringToEnum(): Unknown environment "
138 <<str<<", returning user.");
139 return Environment_t::user;
140 }
141}

◆ 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 AthMonitorAlgorithm::execute ( const EventContext & ctx) const
overridevirtualinherited

Applies filters and trigger requirements.

Then, calls fillHistograms().

Parameters
ctxevent context for reentrant Athena call
Returns
StatusCode

Definition at line 77 of file AthMonitorAlgorithm.cxx.

77 {
78
79 // Checks that all of the DQ filters are passed. If any one of the filters
80 // fails, return SUCCESS code and do not fill the histograms with the event.
81 for ( const auto& filterItr : m_DQFilterTools ) {
82 if (!filterItr->accept(ctx)) {
83 ATH_MSG_DEBUG("Event rejected due to filter tool.");
84 return StatusCode::SUCCESS;
85 }
86 }
87
88 // Trigger: If there is a decision tool and the chains fail, skip the event.
90 ATH_MSG_DEBUG("Event rejected due to trigger filter.");
91 return StatusCode::SUCCESS;
92 }
93
94 ATH_MSG_DEBUG("Event accepted!");
95 return fillHistograms(ctx);
96}
virtual StatusCode fillHistograms(const EventContext &ctx) const =0
adds event to the monitoring histograms
bool trigChainsArePassed(const std::vector< std::string > &vTrigNames) const
Check whether triggers are passed.
std::vector< std::string > m_vTrigChainNames
Vector of trigger chain names parsed from trigger chain string.
PublicToolHandle< Trig::TrigDecisionTool > m_trigDecTool
Tool to tell whether a specific trigger is passed.
ToolHandleArray< IDQFilterTool > m_DQFilterTools
Array of Data Quality filter tools.

◆ 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.

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

◆ fillHistograms()

StatusCode TrigMuonMonitorAlgorithm::fillHistograms ( const EventContext & ctx) const
overridevirtualinherited

Function that steers anlayses.

It currently calles four types of analyses, fillVariables, fillVariablesPerOfflineMuon, fillVariablesPerChain and fillVariablesPerOfflineMuonPerChain that can be overridden in subclasses to do specific analyses.

See also
fillVariables, fillVariablesPerOfflineMuon, fillVariablesPerChain and fillVariablesPerOfflineMuonPerChain
Parameters
ctxEventContext provided by athenaMT

Implements AthMonitorAlgorithm.

Definition at line 22 of file TrigMuonMonitorAlgorithm.cxx.

22 {
23
24
25 bool passToMonitor = selectEvents();
26
27 if(passToMonitor){
28
31
33 for(const std::string& chain : m_monitored_chains){
34 ATH_CHECK( fillVariablesPerChain(ctx, chain) );
35 }
36
37
39 SG::ReadHandle<xAOD::MuonContainer> muons(m_MuonContainerKey, ctx);
40 if (! muons.isValid() ) {
41 ATH_MSG_ERROR("evtStore() does not contain muon Collection with name "<< m_MuonContainerKey);
42 return StatusCode::FAILURE;
43 }
44 std::vector<const xAOD::Muon*> probes;
45 ATH_CHECK(selectMuons(ctx, muons, probes));
46
47 for(const xAOD::Muon* mu : probes){
49
51 for(const std::string& chain : m_monitored_chains){
53 }
54 }
55
56 }
57
58
59
60 return StatusCode::SUCCESS;
61}
#define ATH_CHECK
Evaluate an expression and check for errors.
SG::ReadHandleKey< xAOD::MuonContainer > m_MuonContainerKey
virtual StatusCode fillVariablesPerOfflineMuonPerChain(const EventContext &ctx, const xAOD::Muon *mu, const std::string &chain) const
Function that fills variables of trigger objects associated to specified trigger chains comparing off...
Gaudi::Property< std::vector< std::string > > m_monitored_chains
List of trigger chains that are monitored in fillVariablesPerChain and fillVariablesPerOfflineMuonPer...
virtual StatusCode fillVariables(const EventContext &ctx) const
Function that fills variables by just retrieving containers of trigger objects.
virtual StatusCode fillVariablesPerOfflineMuon(const EventContext &ctx, const xAOD::Muon *mu) const
Function that fills variables that are compared to offline muons but the trigger chains are not speci...
virtual bool selectEvents() const
Function that defines the event selection for anlayses User should reimlement in a subclass if needed...
virtual StatusCode fillVariablesPerChain(const EventContext &ctx, const std::string &chain) const
Function that fills variables of trigger objects associated to specified trigger chains.
virtual StatusCode selectMuons(const EventContext &ctx, SG::ReadHandle< xAOD::MuonContainer > &muons, std::vector< const xAOD::Muon * > &probes) const
Function that defines the event selection for anlayses Users should reimlement in a subclass if neede...
Muon_v1 Muon
Reference the current persistent version:

◆ fillVariableEtaPhi()

template<class T>
StatusCode TrigMuonMonitorAlgorithm::fillVariableEtaPhi ( const EventContext & ctx,
SG::ReadHandleKey< DataVector< T > > ReadHandleKey,
std::string && trigstep,
std::tuple< bool, double, double >(* PosFunc )(const T *) = &TrigMuonMonitorAlgorithm::defaultPosFunc< T > ) const
protectedinherited

Function that fills variables of etaphi2D plots.

See also
TrigMuonMonitorAlgorithm.icc for the implementation
Parameters
ctxEventContext provided by athenaMT
ReadHandleKeySG::ReadHandleKey of online muon.
trigsteptrigger step
PosFuncFunction pointer that implements cuts for the online muon candidates.

◆ fillVariables()

StatusCode TrigMuonMonitorAlgorithm::fillVariables ( const EventContext & ctx) const
protectedvirtualinherited

Function that fills variables by just retrieving containers of trigger objects.

Users should reimlement in a subclass if needed.

See also
fillHistograms
Parameters
ctxEventContext provided by athenaMT

Reimplemented in EFMuonMon, L1MuonMon, L2muCombMon, L2MuonSAMon, and MuonTriggerCount.

Definition at line 81 of file TrigMuonMonitorAlgorithm.cxx.

81 {
82 return StatusCode::SUCCESS;
83}

◆ fillVariablesPerChain()

StatusCode L2MuonSAIOMon::fillVariablesPerChain ( const EventContext & ctx,
const std::string & chain ) const
overrideprotectedvirtual

Function that fills variables of trigger objects associated to specified trigger chains.

This is called in the for loop of trigger chains in fillHistograms. Users should reimlement in a subclass if needed.

See also
fillHistograms
Parameters
ctxEventContext provided by athenaMT
chainTrigger chain provided in @cfillHistograms

Reimplemented from TrigMuonMonitorAlgorithm.

Definition at line 34 of file L2MuonSAIOMon.cxx.

34 {
35
36 ATH_MSG_DEBUG ("Filling histograms for " << name() << "...");
37
38 if( chain.find("probe") != std::string::npos ) return StatusCode::SUCCESS; // don't use TagAndProbe chains
39
40
41 const float ZERO_LIMIT = 0.00001;
42
43
44 //TDT workaround
45 std::vector< const xAOD::L2CombinedMuon* > Trig_L2IOobjects;
46 //std::vector< bool > pass_muCombHypo;
47 ATH_CHECK( matchL2IO_wContainer(ctx, chain, Trig_L2IOobjects) );
48 //bool pass_muCombHypo_evt = muCombHypo_TDTworkaround(chain, Trig_L2IOobjects, pass_muCombHypo);
49 ATH_MSG_DEBUG(" Trig_L2IOobjects.size(): " << Trig_L2IOobjects.size() );
50
51 // check basic EDM variables using single muon chain
52 for(const auto& Trig_L2IOobject : Trig_L2IOobjects){
53 ATH_MSG_DEBUG(" Trig_L2IOobject->muSATrack()->roiWord()/Trig_L2IOobject->pt(): " << Trig_L2IOobject->muSATrack()->roiWord() << "/" << Trig_L2IOobject->pt() );
54 // basic EDM variables
55 bool mf_failure = false;
56 auto cbioPt = Monitored::Scalar<float>(chain+"_Pt",-999.);
57 auto cbioEta = Monitored::Scalar<float>(chain+"_Eta",-999.);
58 auto cbioPhi = Monitored::Scalar<float>(chain+"_Phi",-999.);
59 cbioPt = Trig_L2IOobject->pt()/1e3 * Trig_L2IOobject->charge(); // convert to GeV
60 cbioEta = Trig_L2IOobject->eta();
61 cbioPhi = Trig_L2IOobject->phi();
62 ATH_MSG_DEBUG("cbioPt = " << cbioPt << ", cbioEta =" << cbioEta << ", cbioPhi = " << cbioPhi);
63 if(std::abs(cbioPt) < ZERO_LIMIT || std::abs(Trig_L2IOobject->muSATrack()->pt()) < ZERO_LIMIT) mf_failure = true;
64
65 if( mf_failure ) continue;
66
67 // region variables
68 auto isBarrel = Monitored::Scalar<bool>(chain+"_isBarrel",false);
69 auto isEndcap = Monitored::Scalar<bool>(chain+"_isEndcap",false);
70
71 // define regions
72 int saddr = Trig_L2IOobject->muSATrack()->sAddress();
73 if(saddr == -1) isEndcap = true;
74 else isBarrel = true;;
75
76
77 fill(m_group+"_"+chain, cbioPt, isBarrel, isEndcap);
78 fill(m_group+"_"+chain, cbioEta);
79 fill(m_group+"_"+chain, cbioPhi, isBarrel, isEndcap);
80
81 }
82
83 return StatusCode::SUCCESS;
84}
StatusCode matchL2IO_wContainer(const EventContext &ctx, const std::string &chain, std::vector< const xAOD::L2CombinedMuon * > &Trig_L2IOobjects) const
Gaudi::Property< std::string > m_group
Name of monitored group.
void fill(const ToolHandle< GenericMonitoringTool > &groupHandle, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable > > &&variables) const
Fills a vector of variables to a group by reference.

◆ fillVariablesPerOfflineMuon()

StatusCode TrigMuonMonitorAlgorithm::fillVariablesPerOfflineMuon ( const EventContext & ctx,
const xAOD::Muon * mu ) const
protectedvirtualinherited

Function that fills variables that are compared to offline muons but the trigger chains are not specified.

This is called in the for loop of offline muons in fillHistograms. Users should reimlement in a subclass if needed.

See also
fillHistograms
Parameters
ctxEventContext provided by athenaMT
muPointer to an offline muon provided in fillHistograms

Reimplemented in EFMuonMon, L2muCombMon, and L2MuonSAMon.

Definition at line 86 of file TrigMuonMonitorAlgorithm.cxx.

86 {
87 return StatusCode::SUCCESS;
88}

◆ fillVariablesPerOfflineMuonPerChain()

StatusCode L2MuonSAIOMon::fillVariablesPerOfflineMuonPerChain ( const EventContext & ctx,
const xAOD::Muon * mu,
const std::string & chain ) const
overrideprotectedvirtual

Function that fills variables of trigger objects associated to specified trigger chains comparing offline muons.

This is called in the for loop of trigger chains and offline muons in fillHistograms. Users should reimlement in a subclass if needed.

See also
fillHistograms
Parameters
ctxEventContext provided by athenaMT
muPointer to an offline muon provided in fillHistograms
chainTrigger chain provided in fillHistograms

Reimplemented from TrigMuonMonitorAlgorithm.

Definition at line 87 of file L2MuonSAIOMon.cxx.

87 {
88
89 ATH_MSG_DEBUG ("Filling histograms for " << name() << "...");
90
91 const float ZERO_LIMIT = 0.00001;
92
93 // get the best L2Inside-Out object matched to offline muon(dR between L2Inside-Out object and offline muon is minimum)
94 const xAOD::L2CombinedMuon* Trig_L2IOobject = searchL2InsideOut(ctx, mu, chain);
95
96 // offline muon variables
97 auto offPt = Monitored::Scalar<float>(chain+"_offPt",-999.);
98 auto offEta = Monitored::Scalar<float>(chain+"_offEta",-999.);
99 auto offPhi = Monitored::Scalar<float>(chain+"_offPhi",-999.);
100 offPt = mu->pt()/1e3 * mu->charge(); // convert to GeV
101 offEta = mu->eta();
102 offPhi = mu->phi();
103 float offCharge = mu->charge();
104
105
106 if( chain.find("probe") != std::string::npos ){ // L2Inside-Out efficiency using Tag&Probe chain
107 if(chain.find("L1MU14FCH") != std::string::npos){
108 if ( !getTrigDecisionTool()->isPassed("HLT_mu24_ivarmedium_L1MU14FCH", TrigDefs::requireDecision) ) return StatusCode::SUCCESS; // impose trigger pass in order to eliminate bias
109 }
110 else if(chain.find("L1MU18VFCH") != std::string::npos){
111 if ( !getTrigDecisionTool()->isPassed("HLT_mu24_ivarmedium_L1MU18VFCH", TrigDefs::requireDecision) ) return StatusCode::SUCCESS; // impose trigger pass in order to eliminate bias
112 }
113 else
114 {
115 return StatusCode::SUCCESS;
116 }
117
118 // search tag offline muon
119 const xAOD::Muon* tag = searchTagOfflineMuon( ctx, mu );
120 if( tag == nullptr ) return StatusCode::SUCCESS; // mu doesn't have no tag muons
121
122
123 // efficiency variables
124 auto passL2InsideOut = Monitored::Scalar<bool>(chain+"_passL2InsideOut",false);
125 auto passL2SA = Monitored::Scalar<bool>(chain+"_passL2SA",false);
126 auto offdR = Monitored::Scalar<float>(chain+"_offdR",1000.);
127 const auto* tag_ms_track = tag->trackParticle(xAOD::Muon::TrackParticleType::MuonSpectrometerTrackParticle);
128 if( !tag_ms_track) return StatusCode::SUCCESS; // tag muon dosen't have ms track
129 const auto* probe_ms_track = mu->trackParticle(xAOD::Muon::TrackParticleType::MuonSpectrometerTrackParticle);
130 if( !probe_ms_track ) return StatusCode::SUCCESS; // probe muon dosen't have ms track
131 offdR = xAOD::P4Helpers::deltaR(tag_ms_track, probe_ms_track);
132
133 passL2InsideOut = false;
134 passL2SA = false;
135
136 // retrieve probe l2SA objects
137 int legIndex_probe = 1; // probe
138 std::vector< TrigCompositeUtils::LinkInfo<xAOD::L2StandAloneMuonContainer> > featureCont = getTrigDecisionTool()->features<xAOD::L2StandAloneMuonContainer>( chain,
140 "HLT_MuonL2SAInfo",
143 legIndex_probe );
144
145 for(const TrigCompositeUtils::LinkInfo<xAOD::L2StandAloneMuonContainer>& probe_L2SALinkInfo : featureCont){
146 ATH_CHECK( probe_L2SALinkInfo.isValid() );
147 const ElementLink<xAOD::L2StandAloneMuonContainer> probe_L2SAobject = probe_L2SALinkInfo.link;
148 if( m_matchTool->isMatchedL2SA( (*probe_L2SAobject), mu ) ){
149 if( probe_L2SALinkInfo.state == TrigCompositeUtils::ActiveState::ACTIVE ) passL2SA = true;
150 }
151 }
152
153 if(passL2SA == true){
154 if(m_matchTool->isMatchedL2InsideOut( Trig_L2IOobject, mu ))
155 {
156 bool isPass = false;
157 ATH_CHECK(isPassedmuCombHypo( chain, Trig_L2IOobject ,isPass));
158 passL2InsideOut = isPass;
159 }
160 }
161 else{
162 return StatusCode::SUCCESS;
163 }
164
165
166 fill(m_group+"_"+chain, passL2InsideOut, passL2SA, offPt);
167
168 if( mu->pt()/1e3 > m_plateaus.at(chain) ){
169 fill(m_group+"_"+chain, passL2InsideOut, passL2SA, offEta, offPhi, offdR);
170 }
171 }
172 else{ // make detail histograms using normal L2Inside-Out chain
173 if( Trig_L2IOobject == nullptr ) return StatusCode::SUCCESS; // no L2Inside-Out objects
174 if( ! m_matchTool->isMatchedL2InsideOut(Trig_L2IOobject, mu) ) return StatusCode::SUCCESS; // offline muons is not matched to any L2Inside-Out objects
175
176
177 //L2Muon chamberID index
178 enum chamberID {
179 Inn_Barrel = 0,
180 Mid_Barrel,
181 Out_Barrel,
182 Inn_Endcap,
183 Mid_Endcap,
184 Out_Endcap
185 };
186 std::vector< int > L2Muon_chamberID_index;
187 auto mon_L2Muon_chamberID_index = Monitored::Collection(chain+"_L2Muon_chamberID_index",L2Muon_chamberID_index);
188 for( int i = 0; i < 6; i++){
189 L2Muon_chamberID_index.push_back(i);
190 }
191
192 // dR wrt offline
193 auto dRmin = Monitored::Scalar<float>(chain+"_dRmin",1000.);
194 dRmin = xAOD::P4Helpers::deltaR(mu, Trig_L2IOobject, false);
195
196 // region variables
197 const float ETA_OF_BARREL = 1.05;
198 auto regionBE = Monitored::Scalar<int>(chain+"_regionBE",-999);
199 auto isBarrel = Monitored::Scalar<bool>(chain+"_isBarrel",false);
200 auto isBarrelA = Monitored::Scalar<bool>(chain+"_isBarrelA",false);
201 auto isBarrelC = Monitored::Scalar<bool>(chain+"_isBarrelC",false);
202 auto isEndcap = Monitored::Scalar<bool>(chain+"_isEndcap",false);
203 auto isEndcapA = Monitored::Scalar<bool>(chain+"_isEndcapA",false);
204 auto isEndcapC = Monitored::Scalar<bool>(chain+"_isEndcapC",false);
205
206 // offline pt variables
207 auto pt4to6 = Monitored::Scalar<bool>(chain+"_pt4to6",false);
208 auto pt6to8 = Monitored::Scalar<bool>(chain+"_pt6to8",false);
209 auto ptover8 = Monitored::Scalar<bool>(chain+"_ptover8",false);
210
211 // define region
212 if( std::abs(offEta) < ETA_OF_BARREL ) {
213 regionBE = 0;
214 isBarrel = true;
215 if( offEta > 0. ) isBarrelA = true;
216 else isBarrelC = true;
217 }
218 else{
219 regionBE = 1;
220 isEndcap = true;
221 if( offEta > 0. ) isEndcapA = true;
222 else isEndcapC = true;
223 }
224
225 if( std::abs(offPt) > 4 ){
226 if( std::abs(offPt) < 6 ) pt4to6 = true;
227 else if( std::abs(offPt) < 8 ) pt6to8 = true;
228 else ptover8 = true;
229 }
230
231 // basic variables
232 auto cbioPt = Monitored::Scalar<float>(chain+"_Pt_wrt_offline",-999.);
233 auto cbioEta = Monitored::Scalar<float>(chain+"_Eta_wrt_offline",-999.);
234 auto cbioPhi = Monitored::Scalar<float>(chain+"_Phi_wrt_offline",-999.);
235 cbioPt = Trig_L2IOobject->pt()/1e3 * Trig_L2IOobject->charge(); // convert to GeV
236 cbioEta = Trig_L2IOobject->eta();
237 cbioPhi = Trig_L2IOobject->phi();
238
239 // L2Inside-Out track multiplicity per L2SA track
240 auto L2InsideOut_multiplicity = Monitored::Scalar<float>(chain+"_L2InsideOut_track_multiplicity",-999.);
241 L2InsideOut_multiplicity = 0;
242 std::vector< const xAOD::L2CombinedMuon* > Trig_L2IOobjects_tmp;
243 ATH_CHECK( matchL2IO_wContainer(ctx, chain, Trig_L2IOobjects_tmp) );
244 for(const auto& Trig_L2IOobject_tmp : Trig_L2IOobjects_tmp){
245 if( Trig_L2IOobject_tmp->muSATrack()->roiWord() == Trig_L2IOobject->muSATrack()->roiWord() ) L2InsideOut_multiplicity++;
246 }
247
248 // pt resolution
249 auto ptresol = Monitored::Scalar<float>(chain+"_ptresol",-999.);
250 if ( std::abs(offPt) > ZERO_LIMIT && std::abs(cbioPt) > ZERO_LIMIT ){
251 ptresol = std::abs(cbioPt)/std::abs(offPt) - 1.;
252 }
253
254 std::vector< float > ptresol_pos, ptresol_neg;
255 auto mon_ptresol_pos = Monitored::Collection(chain+"_ptresol_pos",ptresol_pos);
256 auto mon_ptresol_neg = Monitored::Collection(chain+"_ptresol_neg",ptresol_neg);
257 if( offCharge > 0. ) ptresol_pos.push_back(ptresol);
258 else ptresol_neg.push_back(ptresol);
259
260 // distance bw FTFroad and offlinesegment
261 std::vector< float > distance_bw_FTFroad_and_offlinesegment_Inn_Barrel;
262 std::vector< float > distance_bw_FTFroad_and_offlinesegment_Mid_Barrel;
263 std::vector< float > distance_bw_FTFroad_and_offlinesegment_Out_Barrel;
264 std::vector< float > distance_bw_FTFroad_and_offlinesegment_Inn_Endcap;
265 std::vector< float > distance_bw_FTFroad_and_offlinesegment_Mid_Endcap;
266 std::vector< float > distance_bw_FTFroad_and_offlinesegment_Out_Endcap;
267 auto mon_distance_bw_FTFroad_and_offlinesegment_Inn_Barrel = Monitored::Collection(chain+"_distance_bw_FTFroad_and_offlinesegment_Inn_Barrel",distance_bw_FTFroad_and_offlinesegment_Inn_Barrel);
268 auto mon_distance_bw_FTFroad_and_offlinesegment_Mid_Barrel = Monitored::Collection(chain+"_distance_bw_FTFroad_and_offlinesegment_Mid_Barrel",distance_bw_FTFroad_and_offlinesegment_Mid_Barrel);
269 auto mon_distance_bw_FTFroad_and_offlinesegment_Out_Barrel = Monitored::Collection(chain+"_distance_bw_FTFroad_and_offlinesegment_Out_Barrel",distance_bw_FTFroad_and_offlinesegment_Out_Barrel);
270 auto mon_distance_bw_FTFroad_and_offlinesegment_Inn_Endcap = Monitored::Collection(chain+"_distance_bw_FTFroad_and_offlinesegment_Inn_Endcap",distance_bw_FTFroad_and_offlinesegment_Inn_Endcap);
271 auto mon_distance_bw_FTFroad_and_offlinesegment_Mid_Endcap = Monitored::Collection(chain+"_distance_bw_FTFroad_and_offlinesegment_Mid_Endcap",distance_bw_FTFroad_and_offlinesegment_Mid_Endcap);
272 auto mon_distance_bw_FTFroad_and_offlinesegment_Out_Endcap = Monitored::Collection(chain+"_distance_bw_FTFroad_and_offlinesegment_Out_Endcap",distance_bw_FTFroad_and_offlinesegment_Out_Endcap);
273
274 std::vector< float > distance_bw_FTFroad_and_offlinesegment_vec;
275 std::vector< float > FTFroad_Aw;
276 std::vector< float > FTFroad_Bw;
277 std::vector< bool > FTFroad_fill;
278 for(int i=0; i<6; i++){
279 distance_bw_FTFroad_and_offlinesegment_vec.push_back(10000.);
280 FTFroad_Aw.push_back(Trig_L2IOobject->muSATrack()->roadAw(i, 0));
281 FTFroad_Bw.push_back(Trig_L2IOobject->muSATrack()->roadBw(i, 0));
282 FTFroad_fill.push_back(false);
283 }
284
285 // MDT hits residual
286 std::vector<float> res_Inn_Barrel, res_Mid_Barrel, res_Out_Barrel, res_Inn_Endcap, res_Mid_Endcap, res_Out_Endcap;
287 auto mon_res_Inn_Barrel = Monitored::Collection(chain+"_MDT_residual_Inn_Barrel",res_Inn_Barrel);
288 auto mon_res_Mid_Barrel = Monitored::Collection(chain+"_MDT_residual_Mid_Barrel",res_Mid_Barrel);
289 auto mon_res_Out_Barrel = Monitored::Collection(chain+"_MDT_residual_Out_Barrel",res_Out_Barrel);
290 auto mon_res_Inn_Endcap = Monitored::Collection(chain+"_MDT_residual_Inn_Endcap",res_Inn_Endcap);
291 auto mon_res_Mid_Endcap = Monitored::Collection(chain+"_MDT_residual_Mid_Endcap",res_Mid_Endcap);
292 auto mon_res_Out_Endcap = Monitored::Collection(chain+"_MDT_residual_Out_Endcap",res_Out_Endcap);
293
294 // distance bw MDT hits and offlinesegment
295 std::vector< float > distance_bw_MDT_and_offlinesegment_Inn_Barrel;
296 std::vector< float > distance_bw_MDT_and_offlinesegment_Mid_Barrel;
297 std::vector< float > distance_bw_MDT_and_offlinesegment_Out_Barrel;
298 std::vector< float > distance_bw_MDT_and_offlinesegment_Inn_Endcap;
299 std::vector< float > distance_bw_MDT_and_offlinesegment_Mid_Endcap;
300 std::vector< float > distance_bw_MDT_and_offlinesegment_Out_Endcap;
301 auto mon_distance_bw_MDT_and_offlinesegment_Inn_Barrel = Monitored::Collection(chain+"_distance_bw_MDT_and_offlinesegment_Inn_Barrel",distance_bw_MDT_and_offlinesegment_Inn_Barrel);
302 auto mon_distance_bw_MDT_and_offlinesegment_Mid_Barrel = Monitored::Collection(chain+"_distance_bw_MDT_and_offlinesegment_Mid_Barrel",distance_bw_MDT_and_offlinesegment_Mid_Barrel);
303 auto mon_distance_bw_MDT_and_offlinesegment_Out_Barrel = Monitored::Collection(chain+"_distance_bw_MDT_and_offlinesegment_Out_Barrel",distance_bw_MDT_and_offlinesegment_Out_Barrel);
304 auto mon_distance_bw_MDT_and_offlinesegment_Inn_Endcap = Monitored::Collection(chain+"_distance_bw_MDT_and_offlinesegment_Inn_Endcap",distance_bw_MDT_and_offlinesegment_Inn_Endcap);
305 auto mon_distance_bw_MDT_and_offlinesegment_Mid_Endcap = Monitored::Collection(chain+"_distance_bw_MDT_and_offlinesegment_Mid_Endcap",distance_bw_MDT_and_offlinesegment_Mid_Endcap);
306 auto mon_distance_bw_MDT_and_offlinesegment_Out_Endcap = Monitored::Collection(chain+"_distance_bw_MDT_and_offlinesegment_Out_Endcap",distance_bw_MDT_and_offlinesegment_Out_Endcap);
307 std::vector< float > distance_bw_MDT_and_offlinesegment_vec;
308 std::vector< int > MDTHitChamber_fill;
309 std::vector< int > MDTHitChamber;
310 std::vector< float > MDTHitR;
311 std::vector< float > MDTHitZ;
312
313 // # of MDT hits
314 std::vector<int> MDT_N_Inn_Barrel, MDT_N_Mid_Barrel, MDT_N_Out_Barrel, MDT_N_Inn_Endcap, MDT_N_Mid_Endcap, MDT_N_Out_Endcap;
315 auto mon_MDT_N_Inn_Barrel = Monitored::Collection(chain+"_MDT_N_Inn_Barrel",MDT_N_Inn_Barrel);
316 auto mon_MDT_N_Mid_Barrel = Monitored::Collection(chain+"_MDT_N_Mid_Barrel",MDT_N_Mid_Barrel);
317 auto mon_MDT_N_Out_Barrel = Monitored::Collection(chain+"_MDT_N_Out_Barrel",MDT_N_Out_Barrel);
318 auto mon_MDT_N_Inn_Endcap = Monitored::Collection(chain+"_MDT_N_Inn_Endcap",MDT_N_Inn_Endcap);
319 auto mon_MDT_N_Mid_Endcap = Monitored::Collection(chain+"_MDT_N_Mid_Endcap",MDT_N_Mid_Endcap);
320 auto mon_MDT_N_Out_Endcap = Monitored::Collection(chain+"_MDT_N_Out_Endcap",MDT_N_Out_Endcap);
321 int n_mdthits_BI = 0;
322 int n_mdthits_BM = 0;
323 int n_mdthits_BO = 0;
324 int n_mdthits_EI = 0;
325 int n_mdthits_EM = 0;
326 int n_mdthits_EO = 0;
327
328 int n_mdt_hits = Trig_L2IOobject->muSATrack()->nMdtHits();
329 for(int i_tube=0; i_tube<n_mdt_hits; i_tube++){
330 if( Trig_L2IOobject->muSATrack()->mdtHitIsOutlier(i_tube) != 0 ) continue;
331 float res = Trig_L2IOobject->muSATrack()->mdtHitResidual(i_tube);
332 int imr = Trig_L2IOobject->muSATrack()->mdtHitChamber(i_tube);
333 MDTHitChamber.push_back(imr);
334 MDTHitR.push_back(Trig_L2IOobject->muSATrack()->mdtHitR(i_tube));
335 MDTHitZ.push_back(Trig_L2IOobject->muSATrack()->mdtHitZ(i_tube));
336
337 if( imr == Inn_Barrel ){
338 n_mdthits_BI++;
339 res_Inn_Barrel.push_back(res);
340 }
341 else if( imr == Mid_Barrel ){
342 n_mdthits_BM++;
343 res_Mid_Barrel.push_back(res);
344 }
345 else if( imr == Out_Barrel ){
346 n_mdthits_BO++;
347 res_Out_Barrel.push_back(res);
348 }
349 else if( imr == Inn_Endcap ){
350 n_mdthits_EI++;
351 res_Inn_Endcap.push_back(res);
352 }
353 else if( imr == Mid_Endcap ){
354 n_mdthits_EM++;
355 res_Mid_Endcap.push_back(res);
356 }
357 else if( imr == Out_Endcap ){
358 n_mdthits_EO++;
359 res_Out_Endcap.push_back(res);
360 }
361 }
362
363 // reconstruction efficiency of superpoint
364 std::vector<bool> superpoint_exist_pt4to6, superpoint_exist_pt6to8, superpoint_exist_ptover8;
365 auto mon_superpoint_exist_pt4to6 = Monitored::Collection(chain+"_superpoint_pt4to6",superpoint_exist_pt4to6);
366 auto mon_superpoint_exist_pt6to8 = Monitored::Collection(chain+"_superpoint_pt6to8",superpoint_exist_pt6to8);
367 auto mon_superpoint_exist_ptover8 = Monitored::Collection(chain+"_superpoint_ptover8",superpoint_exist_ptover8);
368 std::vector<bool> segment_superpoint_exist(6, false);
369 std::vector<bool> offlinesegment_exist_pt4to6, offlinesegment_exist_pt6to8, offlinesegment_exist_ptover8;
370 auto mon_offlinesegment_exist_pt4to6 = Monitored::Collection(chain+"_offlinesegment_pt4to6",offlinesegment_exist_pt4to6);
371 auto mon_offlinesegment_exist_pt6to8 = Monitored::Collection(chain+"_offlinesegment_pt6to8",offlinesegment_exist_pt6to8);
372 auto mon_offlinesegment_exist_ptover8 = Monitored::Collection(chain+"_offlinesegment_ptover8",offlinesegment_exist_ptover8);
373
374 // # of superpoint
375 auto superpoint_multiplicity = Monitored::Scalar<int>(chain+"_superpoint_multiplicity",0);
376 std::vector< bool > superpoint_exist;
377 std::vector< float > superpointR;
378 int Num_L2Muon_chamberID = 12;
379 for( int i_chamber = 0; i_chamber < Num_L2Muon_chamberID; i_chamber++){
380 if( Trig_L2IOobject->muSATrack()->superPointR(i_chamber) < ZERO_LIMIT ){
381 superpoint_exist.push_back(false);
382 }
383 else{
384 superpoint_exist.push_back(true);
385 superpoint_multiplicity++;
386 }
387 superpointR.push_back(Trig_L2IOobject->muSATrack()->superPointR(i_chamber));
388 }
389
390
391 std::vector< bool > segment_exist(6, false);
392 for(unsigned int i_seg = 0; i_seg < mu->nMuonSegments(); i_seg++){
393 const xAOD::MuonSegment* segment = mu->muonSegment(i_seg);
394 if(!segment) continue;
395 float segmentX = segment->x();
396 float segmentY = segment->y();
397 float segmentZ = segment->z();
398 float segmentR = std::sqrt( std::pow(segmentX, 2.0) + std::pow(segmentY, 2.0) );
399 float segmentPx = segment->px();
400 float segmentPy = segment->py();
401 float segmentPz = segment->pz();
402 float segmentSector = segment->sector();
403 using namespace Muon::MuonStationIndex;
404 int segmentChamberIndex = toInt(segment->chamberIndex());
405 float distance_bw_FTFroad_and_offlinesegment = 99999.;
406 float distance_bw_MDT_and_offlinesegment = 99999.;
407 int roadChamberIndex = -1;
408 int MDTChamberIndex = -1;
409 if( segmentChamberIndex == 0 || segmentChamberIndex == 1 ){ // Inner Barrel
410 segment_exist.at(Inn_Barrel) = true;
411 roadChamberIndex = Inn_Barrel;
412 MDTChamberIndex = Inn_Barrel;
413 }
414 else if( segmentChamberIndex == 2 || segmentChamberIndex == 3 ){ // Middle Barrel
415 segment_exist.at(Mid_Barrel) = true;
416 roadChamberIndex = Mid_Barrel;
417 MDTChamberIndex = Mid_Barrel;
418 }
419 else if( segmentChamberIndex == 4 || segmentChamberIndex == 5 ){ // Outer Barrel
420 segment_exist.at(Out_Barrel) = true;
421 roadChamberIndex = Out_Barrel;
422 MDTChamberIndex = Out_Barrel;
423 }
424 else if( segmentChamberIndex == 7 || segmentChamberIndex == 8 ){ // Inner Endcap
425 segment_exist.at(Inn_Endcap) = true;
426 roadChamberIndex = Inn_Endcap;
427 MDTChamberIndex = Inn_Endcap;
428 }
429 else if( segmentChamberIndex == 9 || segmentChamberIndex == 10 ){ // Middle Endcap
430 segment_exist.at(Mid_Endcap) = true;
431 roadChamberIndex = Mid_Endcap;
432 MDTChamberIndex = Mid_Endcap;
433 }
434 else if( segmentChamberIndex == 11 || segmentChamberIndex == 12 ){ // Outer Endcap
435 segment_exist.at(Out_Endcap) = true;
436 roadChamberIndex = Out_Endcap;
437 MDTChamberIndex = Out_Endcap;
438 }
439
440 // Calc distance bw FTFroad and offlinesegment
441 if( roadChamberIndex != -1 ){
442 if( FTFroad_Aw.at(roadChamberIndex) > ZERO_LIMIT || FTFroad_Bw.at(roadChamberIndex) > ZERO_LIMIT ){
443 FTFroad_fill.at(roadChamberIndex) = true;
444 if( FTFroad_Aw.at(roadChamberIndex) < ZERO_LIMIT) distance_bw_FTFroad_and_offlinesegment = segmentR - FTFroad_Bw.at(roadChamberIndex);
445 else{
446 float ia = 1.0/FTFroad_Aw.at(roadChamberIndex);
447 float iaq = ia * ia;
448 distance_bw_FTFroad_and_offlinesegment = (segmentZ - ia * (segmentR - FTFroad_Bw.at(roadChamberIndex)))/std::sqrt(1.0 + iaq);
449 }
450 if( std::abs(distance_bw_FTFroad_and_offlinesegment) < std::abs(distance_bw_FTFroad_and_offlinesegment_vec.at(roadChamberIndex)) )
451 distance_bw_FTFroad_and_offlinesegment_vec.at(roadChamberIndex) = distance_bw_FTFroad_and_offlinesegment;
452 }
453 }
454
455 // Calc distance bw MDT hits and offlinesegment
456 if( MDTChamberIndex != -1 ){
457 float sector_phi = M_PI*(segmentSector - 1.0)/8.0;
458 float segmentR_projection = segmentX * std::cos(sector_phi) + segmentY * std::sin(sector_phi);
459 float segmentPr_projection = segmentPx * std::cos(sector_phi) + segmentPy * std::sin(sector_phi);
460
461 for(unsigned int i_tube=0; i_tube<MDTHitChamber.size(); i_tube++){
462 if( MDTHitChamber.at(i_tube) != MDTChamberIndex ) continue;
463 if( MDTChamberIndex < 3 ){ //Barrel
464 if( std::abs(segmentPz) < ZERO_LIMIT ) distance_bw_MDT_and_offlinesegment = MDTHitZ.at(i_tube) - segmentZ;
465 else{
466 float denominator = segmentPr_projection/segmentPz;
467 if( std::abs(denominator) < ZERO_LIMIT ) continue;
468 distance_bw_MDT_and_offlinesegment = MDTHitZ.at(i_tube) - ((MDTHitR.at(i_tube) - segmentR_projection)/denominator + segmentZ);
469 }
470 }
471 else{ //Endcap
472 if( std::abs(segmentPz) < ZERO_LIMIT ){
473 distance_bw_MDT_and_offlinesegment = MDTHitR.at(i_tube) - segmentR;
474 }
475 else{
476 float coeffi = (MDTHitZ.at(i_tube) - segmentZ)/segmentPz;
477 float segmentR_extrapolated = std::sqrt(std::pow(segmentX + coeffi * segmentPx, 2.0) + std::pow(segmentY + coeffi * segmentPy, 2.0));
478 distance_bw_MDT_and_offlinesegment = MDTHitR.at(i_tube) - segmentR_extrapolated;
479 }
480 }
481 distance_bw_MDT_and_offlinesegment_vec.push_back(distance_bw_MDT_and_offlinesegment);
482 MDTHitChamber_fill.push_back(MDTHitChamber.at(i_tube));
483 }
484 }
485 }
486
487 if( FTFroad_fill.at(Inn_Barrel) ){
488 distance_bw_FTFroad_and_offlinesegment_Inn_Barrel.push_back(distance_bw_FTFroad_and_offlinesegment_vec.at(Inn_Barrel));
489 }
490 if( FTFroad_fill.at(Mid_Barrel) ){
491 distance_bw_FTFroad_and_offlinesegment_Mid_Barrel.push_back(distance_bw_FTFroad_and_offlinesegment_vec.at(Mid_Barrel));
492 }
493 if( FTFroad_fill.at(Out_Barrel) ){
494 distance_bw_FTFroad_and_offlinesegment_Out_Barrel.push_back(distance_bw_FTFroad_and_offlinesegment_vec.at(Out_Barrel));
495 }
496 if( FTFroad_fill.at(Inn_Endcap) ){
497 distance_bw_FTFroad_and_offlinesegment_Inn_Endcap.push_back(distance_bw_FTFroad_and_offlinesegment_vec.at(Inn_Endcap));
498 }
499 if( FTFroad_fill.at(Mid_Endcap) ){
500 distance_bw_FTFroad_and_offlinesegment_Mid_Endcap.push_back(distance_bw_FTFroad_and_offlinesegment_vec.at(Mid_Endcap));
501 }
502 if( FTFroad_fill.at(Out_Endcap) ){
503 distance_bw_FTFroad_and_offlinesegment_Out_Endcap.push_back(distance_bw_FTFroad_and_offlinesegment_vec.at(Out_Endcap));
504 }
505
506 for( unsigned int i = 0; i < distance_bw_MDT_and_offlinesegment_vec.size(); i++ ){
507 if( MDTHitChamber_fill.at(i) == Inn_Barrel ){
508 distance_bw_MDT_and_offlinesegment_Inn_Barrel.push_back(distance_bw_MDT_and_offlinesegment_vec.at(i));
509 }
510 else if( MDTHitChamber_fill.at(i) == Mid_Barrel ){
511 distance_bw_MDT_and_offlinesegment_Mid_Barrel.push_back(distance_bw_MDT_and_offlinesegment_vec.at(i));
512 }
513 else if( MDTHitChamber_fill.at(i) == Out_Barrel ){
514 distance_bw_MDT_and_offlinesegment_Out_Barrel.push_back(distance_bw_MDT_and_offlinesegment_vec.at(i));
515 }
516 else if( MDTHitChamber_fill.at(i) == Inn_Endcap ){
517 distance_bw_MDT_and_offlinesegment_Inn_Endcap.push_back(distance_bw_MDT_and_offlinesegment_vec.at(i));
518 }
519 else if( MDTHitChamber_fill.at(i) == Mid_Endcap ){
520 distance_bw_MDT_and_offlinesegment_Mid_Endcap.push_back(distance_bw_MDT_and_offlinesegment_vec.at(i));
521 }
522 else if( MDTHitChamber_fill.at(i) == Out_Endcap ){
523 distance_bw_MDT_and_offlinesegment_Out_Endcap.push_back(distance_bw_MDT_and_offlinesegment_vec.at(i));
524 }
525 else{
526 ATH_MSG_WARNING( "undefined chamberID is pushed back into MDTHitChamber_fill" );
527 }
528 }
529
530 if( segment_exist.at(Inn_Barrel) ){
531 MDT_N_Inn_Barrel.push_back(n_mdthits_BI);
532 segment_superpoint_exist.at(Inn_Barrel) = superpoint_exist.at(Inn_Barrel);
533 }
534 if( segment_exist.at(Mid_Barrel) ){
535 MDT_N_Mid_Barrel.push_back(n_mdthits_BM);
536 segment_superpoint_exist.at(Mid_Barrel) = superpoint_exist.at(Mid_Barrel);
537 }
538 if( segment_exist.at(Out_Barrel) ){
539 MDT_N_Out_Barrel.push_back(n_mdthits_BO);
540 segment_superpoint_exist.at(Out_Barrel) = superpoint_exist.at(Out_Barrel);
541 }
542 if( segment_exist.at(Inn_Endcap) ){
543 MDT_N_Inn_Endcap.push_back(n_mdthits_EI);
544 segment_superpoint_exist.at(Inn_Endcap) = superpoint_exist.at(Inn_Endcap);
545 }
546 if( segment_exist.at(Mid_Endcap) ){
547 MDT_N_Mid_Endcap.push_back(n_mdthits_EM);
548 segment_superpoint_exist.at(Mid_Endcap) = superpoint_exist.at(Mid_Endcap);
549 }
550 if( segment_exist.at(Out_Endcap) ){
551 MDT_N_Out_Endcap.push_back(n_mdthits_EO);
552 segment_superpoint_exist.at(Out_Endcap) = superpoint_exist.at(Out_Endcap);
553 }
554
555 if( pt4to6 ){
556 offlinesegment_exist_pt4to6 = segment_exist;
557 superpoint_exist_pt4to6 = segment_superpoint_exist;
558 }
559 else if( pt6to8 ){
560 offlinesegment_exist_pt6to8 = segment_exist;
561 superpoint_exist_pt6to8 = segment_superpoint_exist;
562 }
563 else if( ptover8 ){
564 offlinesegment_exist_ptover8 = segment_exist;
565 superpoint_exist_ptover8 = segment_superpoint_exist;
566 }
567
568 fill(m_group+"_"+chain, dRmin, isBarrel, isEndcap);
569 fill(m_group+"_"+chain, cbioPt, isBarrel, isEndcap);
570 fill(m_group+"_"+chain, cbioEta);
571 fill(m_group+"_"+chain, cbioPhi, isBarrel, isEndcap);
572 fill(m_group+"_"+chain, L2InsideOut_multiplicity, offPt, isBarrel, isEndcap);
573 fill(m_group+"_"+chain, ptresol, offEta, pt4to6, pt6to8, ptover8);
574 fill(m_group+"_"+chain, ptresol, offPt, isBarrelA, isBarrelC, isEndcapA, isEndcapC);
575 fill(m_group+"_"+chain, mon_ptresol_pos, mon_ptresol_neg, isBarrelA, isBarrelC, isEndcapA, isEndcapC);
576 fill(m_group+"_"+chain, mon_distance_bw_FTFroad_and_offlinesegment_Inn_Barrel, pt4to6, pt6to8, ptover8);
577 fill(m_group+"_"+chain, mon_distance_bw_FTFroad_and_offlinesegment_Mid_Barrel, pt4to6, pt6to8, ptover8);
578 fill(m_group+"_"+chain, mon_distance_bw_FTFroad_and_offlinesegment_Out_Barrel, pt4to6, pt6to8, ptover8);
579 fill(m_group+"_"+chain, mon_distance_bw_FTFroad_and_offlinesegment_Inn_Endcap, pt4to6, pt6to8, ptover8);
580 fill(m_group+"_"+chain, mon_distance_bw_FTFroad_and_offlinesegment_Mid_Endcap, pt4to6, pt6to8, ptover8);
581 fill(m_group+"_"+chain, mon_distance_bw_FTFroad_and_offlinesegment_Out_Endcap, pt4to6, pt6to8, ptover8);
582 fill(m_group+"_"+chain, mon_res_Inn_Barrel);
583 fill(m_group+"_"+chain, mon_res_Mid_Barrel);
584 fill(m_group+"_"+chain, mon_res_Out_Barrel);
585 fill(m_group+"_"+chain, mon_res_Inn_Endcap);
586 fill(m_group+"_"+chain, mon_res_Mid_Endcap);
587 fill(m_group+"_"+chain, mon_res_Out_Endcap);
588 fill(m_group+"_"+chain, mon_distance_bw_MDT_and_offlinesegment_Inn_Barrel);
589 fill(m_group+"_"+chain, mon_distance_bw_MDT_and_offlinesegment_Mid_Barrel);
590 fill(m_group+"_"+chain, mon_distance_bw_MDT_and_offlinesegment_Out_Barrel);
591 fill(m_group+"_"+chain, mon_distance_bw_MDT_and_offlinesegment_Inn_Endcap);
592 fill(m_group+"_"+chain, mon_distance_bw_MDT_and_offlinesegment_Mid_Endcap);
593 fill(m_group+"_"+chain, mon_distance_bw_MDT_and_offlinesegment_Out_Endcap);
594 fill(m_group+"_"+chain, mon_MDT_N_Inn_Barrel);
595 fill(m_group+"_"+chain, mon_MDT_N_Mid_Barrel);
596 fill(m_group+"_"+chain, mon_MDT_N_Out_Barrel);
597 fill(m_group+"_"+chain, mon_MDT_N_Inn_Endcap);
598 fill(m_group+"_"+chain, mon_MDT_N_Mid_Endcap);
599 fill(m_group+"_"+chain, mon_MDT_N_Out_Endcap);
600 fill(m_group+"_"+chain, superpoint_multiplicity, regionBE, pt4to6, pt6to8, ptover8);
601 fill(m_group+"_"+chain, mon_L2Muon_chamberID_index, mon_superpoint_exist_pt4to6, mon_offlinesegment_exist_pt4to6);
602 fill(m_group+"_"+chain, mon_L2Muon_chamberID_index, mon_superpoint_exist_pt6to8, mon_offlinesegment_exist_pt6to8);
603 fill(m_group+"_"+chain, mon_L2Muon_chamberID_index, mon_superpoint_exist_ptover8, mon_offlinesegment_exist_ptover8);
604 }
605
606 return StatusCode::SUCCESS;
607}
#define M_PI
std::pair< std::vector< unsigned int >, bool > res
const ToolHandle< Trig::TrigDecisionTool > & getTrigDecisionTool() const
Get the trigger decision tool member.
const xAOD::Muon * searchTagOfflineMuon(const EventContext &ctx, const xAOD::Muon *probe) const
StatusCode isPassedmuCombHypo(const std::string &chain, const xAOD::L2CombinedMuon *Trig_L2IOobjects, bool &pass_muCombHypo) const
std::map< std::string, double > m_plateaus
const xAOD::L2CombinedMuon * searchL2InsideOut(const EventContext &ctx, const xAOD::Muon *mu, const std::string &trigger) const
ToolHandle< MuonMatchingTool > m_matchTool
virtual double eta() const
The pseudorapidity ( ) of the particle.
virtual double phi() const
The azimuthal angle ( ) of the particle.
float charge() const
get seeding muon charge
virtual double pt() const
The transverse momentum ( ) of the particle.
const xAOD::L2StandAloneMuon * muSATrack() const
Get the SA muon as a bare pointer.
int mdtHitChamber(unsigned int tube) const
float roadAw(int station, int sector) const
Slope.
float roadBw(int station, int sector) const
Intercept.
float mdtHitZ(unsigned int tube) const
float mdtHitResidual(unsigned int tube) const
int mdtHitIsOutlier(unsigned int tube) const
float mdtHitR(unsigned int tube) const
uint32_t nMdtHits() const
Get the online ID, offline ID, R, Z, redidual, time, space and sigma of each MDT tube.
uint32_t roiWord() const
Get the RoI ID of the seeding LVL1 muon.
float superPointR(int chamber) const
Get the measured radious of the muon in one particular super point.
float px() const
float y() const
Returns the x position.
float pz() const
Returns the pz.
float py() const
Returns the py.
::Muon::MuonStationIndex::ChIndex chamberIndex() const
Returns the chamber index.
float z() const
Returns the y position.
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
constexpr int toInt(const EnumType enumVal)
@ ACTIVE
The link was still active for one-or-more of the HLT Chains requested in the TDT.
Definition ActiveState.h:20
const std::string & featureString()
static const unsigned int includeFailedDecisions
Run3 synonym of alsoDeactivateTEs.
static const unsigned int lastFeatureOfType
Run 3 "enum". Only return the final feature along each route through the navigation.
double deltaR(double rapidity1, double phi1, double rapidity2, double phi2)
from bare bare rapidity,phi
L2CombinedMuon_v1 L2CombinedMuon
Define the latest version of the muon CB class.
L2StandAloneMuonContainer_v2 L2StandAloneMuonContainer
Define the latest version of the muon SA container.
MuonSegment_v1 MuonSegment
Reference the current persistent version:

◆ fillVariablesRatioPlots()

template<class T, class FUNCT>
StatusCode TrigMuonMonitorAlgorithm::fillVariablesRatioPlots ( const EventContext & ctx,
const xAOD::Muon * mu,
std::string && trigstep,
xAOD::Muon::TrackParticleType type,
FUNCT matchFunc ) const
protectedinherited

Function that fills variables of ratio plots.

See also
TrigMuonMonitorAlgorithm.icc for the implementation
Parameters
ctxEventContext provided by athenaMT
muPointer to an offline muon provided in fillHistograms
trigsteptrigger step
typexAOD::Muon::TrackParticleType of offline muon
matchFuncFunction pointer that implements cuts for the online muon candidates gotten by ReadHandle.

◆ 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

◆ GetEventInfo()

SG::ReadHandle< xAOD::EventInfo > AthMonitorAlgorithm::GetEventInfo ( const EventContext & ctx) const
inherited

Return a ReadHandle for an EventInfo object (get run/event numbers, etc.).

Parameters
ctxEventContext for the event
Returns
a SG::ReadHandle<xAOD::EventInfo>

Definition at line 111 of file AthMonitorAlgorithm.cxx.

111 {
112 return SG::ReadHandle<xAOD::EventInfo>(m_EventInfoKey, ctx);
113}
SG::ReadHandleKey< xAOD::EventInfo > m_EventInfoKey
Key for retrieving EventInfo from StoreGate.

◆ getGroup()

const ToolHandle< GenericMonitoringTool > & AthMonitorAlgorithm::getGroup ( const std::string & name) const
inherited

Get a specific monitoring tool from the tool handle array.

Finds a specific GenericMonitoringTool instance from the list of monitoring tools (a ToolHandleArray). Throws a FATAL warning if the object found is empty.

Parameters
namestring name of the desired tool
Returns
reference to the desired monitoring tool

Definition at line 168 of file AthMonitorAlgorithm.cxx.

168 {
169 // get the pointer to the tool, and check that it exists
170 auto idx = m_toolLookupMap.find(name);
171 //Check if the tool exists in the map
172 if (ATH_LIKELY(idx != m_toolLookupMap.end())) {
173 return m_tools[idx->second];
174 }
175 else {
176 //Check if the map is empty
177 if (m_toolLookupMap.empty()) {
178 ATH_MSG_FATAL("The m_toolLookupMap is empty. The tool " << name << " cannot be found in an empty map.");
179 return m_dummy;
180 }
181 //If the map is not empty and the tool was not found, print a fatal error
182 if (!m_toolLookupMap.empty()) {
183 std::string available = std::accumulate(
184 m_toolLookupMap.begin(), m_toolLookupMap.end(), std::string(""),
185 [](const std::string& s, auto h) { return s + "," + h.first; });
186 ATH_MSG_FATAL("The tool " << name << " could not be found in the tool array of the "
187 << "monitoring algorithm " << m_name << ". This probably reflects a discrepancy between "
188 << "your python configuration and c++ filling code. Note: your available groups are {"
189 << available << "}.");
190
191 return m_dummy;
192 }
193 if (!isInitialized()) {
195 "It seems that the AthMonitorAlgorithm::initialize was not called "
196 "in derived class initialize method, group name: " << name);
197 }
198 }
199 return m_dummy;
200}
#define ATH_MSG_FATAL(x)
#define ATH_LIKELY(x)
std::unordered_map< std::string, size_t > m_toolLookupMap
const ToolHandle< GenericMonitoringTool > m_dummy
ToolHandleArray< GenericMonitoringTool > m_tools
Array of Generic Monitoring Tools.

◆ getTrigDecisionTool()

const ToolHandle< Trig::TrigDecisionTool > & AthMonitorAlgorithm::getTrigDecisionTool ( ) const
inherited

Get the trigger decision tool member.

The trigger decision tool is used to check whether a specific trigger is passed by an event.

Returns
m_trigDecTool

Definition at line 203 of file AthMonitorAlgorithm.cxx.

203 {
204 return m_trigDecTool;
205}

◆ initialize()

StatusCode L2MuonSAIOMon::initialize ( )
overridevirtual

initialize

Returns
StatusCode

Reimplemented from TrigMuonMonitorAlgorithm.

Definition at line 15 of file L2MuonSAIOMon.cxx.

15 {
16
18 ATH_CHECK( m_L2MuonCBIOContainerKey.initialize() );
19
20 unsigned int nchains = m_monitored_chains.size();
21 if(nchains!=m_monitored_chains_plateau.size()){
22 ATH_MSG_ERROR("Configuration seems to be wrong. The size of \"Plateaus\" should be same as \"MonitoredChainds\".");
23 return StatusCode::FAILURE;
24 } else {
25 for(unsigned int ichain=0; ichain<nchains; ++ichain){
27 }
28 }
29 return StatusCode::SUCCESS;
30}
Gaudi::Property< std::vector< float > > m_monitored_chains_plateau
SG::ReadHandleKey< xAOD::L2CombinedMuonContainer > m_L2MuonCBIOContainerKey
virtual StatusCode initialize() override
initialize

◆ 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()

◆ isOverlap()

bool L2MuonSAIOMon::isOverlap ( const xAOD::L2CombinedMuon * matchSA_L2IOobject1,
const xAOD::L2CombinedMuon * matchSA_L2IOobject2 ) const
private

Definition at line 753 of file L2MuonSAIOMon.cxx.

753 {
754
755 ATH_MSG_DEBUG( " ...matchSA_L2IOobject1: pt/eta/phi=" << matchSA_L2IOobject1->pt()/Gaudi::Units::GeV << " / " << matchSA_L2IOobject1->eta() << " / " << matchSA_L2IOobject1->phi() );
756 ATH_MSG_DEBUG( " ...matchSA_L2IOobject2: pt/eta/phi=" << matchSA_L2IOobject2->pt()/Gaudi::Units::GeV << " / " << matchSA_L2IOobject2->eta() << " / " << matchSA_L2IOobject2->phi() );
757
758 const auto [mu1Pt, mu1Eta, mu1Phi] = L2ORPosForMatchFunc(matchSA_L2IOobject1);
759 const auto [mu2Pt, mu2Eta, mu2Phi] = L2ORPosForMatchFunc(matchSA_L2IOobject2);
760
761 // if dR or invMass is necessary but (eta,phi) info is not avaiable
762 // (i.e. eta,phi=0,0; rec failed)
763 const double ZERO_LIMIT_FOR_ETAPHI = 1e-4;
764 if( (std::abs(matchSA_L2IOobject1->eta()) <ZERO_LIMIT_FOR_ETAPHI && std::abs(matchSA_L2IOobject1->phi()) < ZERO_LIMIT_FOR_ETAPHI) ||
765 (std::abs(matchSA_L2IOobject2->eta()) <ZERO_LIMIT_FOR_ETAPHI && std::abs(matchSA_L2IOobject2->phi()) < ZERO_LIMIT_FOR_ETAPHI) ) {
766 ATH_MSG_DEBUG( " ...-> (eta,phi) info not available (rec at (eta,phi)=(0,0))" );
767 if( m_RequireDR || m_RequireMass ) {
768 ATH_MSG_DEBUG( " ...-> but dR of invMass check is required. cannot judge overlap -> return with false" );
769 return false;
770 }
771 }
772
773 // if charge or invMass is necessary but charge(=pT) info is not avaiable
774 const double ZERO_LIMIT_FOR_PT = 1e-4;
775 if( (std::abs(matchSA_L2IOobject1->pt()) <ZERO_LIMIT_FOR_PT) || (std::abs(matchSA_L2IOobject2->pt()) < ZERO_LIMIT_FOR_PT) ) {
776 ATH_MSG_DEBUG( " ...-> pT info not available (rec at pT=0)" );
778 ATH_MSG_DEBUG( " ...-> but same sign or invMass check is required. cannot judge overlap -> return with false" );
779 return false;
780 }
781 }
782
783
784 double absEta = (std::abs(mu1Pt) > std::abs(mu2Pt)) ? std::abs(mu1Eta) : std::abs(mu2Eta);
785 unsigned int iThres=0;
786 for(unsigned int i=0; i<(m_etaBins.size()-1); i++) {
787 if ( m_etaBins[i] <= absEta && absEta < m_etaBins[i+1] ) iThres = i;
788 }
789 float dRThres = m_dRCBThres[iThres];
790 float dRbySAThres = m_dRbySAThres[iThres];
791 float massThres = m_massCBThres[iThres];
792 ATH_MSG_DEBUG( " ...iThres=" << iThres );
793 if(m_RequireDR) ATH_MSG_DEBUG( " ...dR threshold=" << dRThres );
794 if(m_RequireDRbySA) ATH_MSG_DEBUG( " ...dR(byMF) threshold=" << dRbySAThres );
795 if(m_RequireMass) ATH_MSG_DEBUG( " ...mass threshold=" << massThres );
796
797
798
799 // same sign cut
800 bool sameSign = false;
801 if( m_RequireSameSign ) {
802 sameSign = ((mu1Pt*mu2Pt) > 0);
803 ATH_MSG_DEBUG( " ...-> sameSign=" << sameSign );
804 }
805
806 // dR cut
807 bool dRisClose = false;
808 float deta = mu1Eta - mu2Eta;
809 float dphi = xAOD::P4Helpers::deltaPhi(mu1Phi, mu2Phi);
810 float dR = std::sqrt(deta*deta + dphi*dphi);
811 if( m_RequireDR ) {
812 if( dR < dRThres ) dRisClose = true;
813 ATH_MSG_DEBUG( " ...-> dR=" << dR << " : dRisClose=" << dRisClose );
814 }
815
816 // dR(by L2SA) cut
817 bool dRbySAisClose = false;
818 const xAOD::L2StandAloneMuon* muSA1 = matchSA_L2IOobject1->muSATrack();
819 const xAOD::L2StandAloneMuon* muSA2 = matchSA_L2IOobject2->muSATrack();
820 if( m_RequireDRbySA ) {
821 // here, we do not check (eta,phi) of mF is not (0,0)
822 // (i.e. we apply muComb based cut even if muFast rec is failed)
823 float deta = muSA1->etaMS() - muSA2->etaMS();
824 float dphi = xAOD::P4Helpers::deltaPhi(muSA1->phiMS(), muSA2->phiMS());
825 float dRBySA = std::sqrt(deta*deta + dphi*dphi);
826 if( dRBySA < dRbySAThres ) dRbySAisClose = true;
827 ATH_MSG_DEBUG( " ...-> dR(by MF)=" << dRBySA << " : dRbySAisClose=" << dRbySAisClose );
828 }
829
830 // mass cut
831 const double TRACK_MASS = 0.; // just assume zero mass
832 bool massIsClose = false;
833 TLorentzVector lvioobj1, lvioobj2;
834 lvioobj1.SetPtEtaPhiM(std::abs(mu1Pt), mu1Eta, mu1Phi, TRACK_MASS);
835 lvioobj2.SetPtEtaPhiM(std::abs(mu2Pt), mu2Eta, mu2Phi, TRACK_MASS);
836 TLorentzVector lvsum = lvioobj1 + lvioobj2;
837 float invMass = lvsum.M();
838 if( m_RequireMass ) {
839 if( invMass < massThres ) massIsClose = true;
840 ATH_MSG_DEBUG( " ...-> invMass=" << invMass << " : massIsClose=" << massIsClose );
841 }
842
843
844 // total judge
845 bool overlap = false;
846 if( ((m_RequireSameSign && sameSign) || (! m_RequireSameSign)) &&
847 ((m_RequireDR && dRisClose) || (! m_RequireDR)) &&
848 ((m_RequireDRbySA && dRbySAisClose) || (! m_RequireDRbySA)) &&
849 ((m_RequireMass && massIsClose) || (! m_RequireMass)) ) {
850 overlap = true;
851 }
852 ATH_MSG_DEBUG( " ...=> isOverlap=" << overlap );
853
854 return overlap;
855}
static std::tuple< float, float, float > L2ORPosForMatchFunc(const xAOD::L2StandAloneMuon *trig)
Gaudi::Property< std::vector< float > > m_etaBins
Gaudi::Property< std::vector< float > > m_massCBThres
Gaudi::Property< std::vector< float > > m_dRCBThres
Gaudi::Property< std::vector< float > > m_dRbySAThres
float etaMS() const
Get the eta at muon spectrometer.
float phiMS() const
Get the phi at muon spectrometer.
double invMass(const I4Momentum &pA, const I4Momentum &pB)
invariant mass from two I4momentum references
Definition P4Helpers.h:252
bool absEta(const xAOD::TauJet &tau, float &out)
L2StandAloneMuon_v2 L2StandAloneMuon
Define the latest version of the muon SA class.

◆ isPassedmuCombHypo()

StatusCode L2MuonSAIOMon::isPassedmuCombHypo ( const std::string & chain,
const xAOD::L2CombinedMuon * Trig_L2IOobjects,
bool & pass_muCombHypo ) const
private

Definition at line 962 of file L2MuonSAIOMon.cxx.

962 {
963 pass_muCombHypo = false;
964
965 // config
966 std::vector< float > my_EtaBins = {0, 1.05, 1.5, 2.0, 9.9};
967 std::vector< float > my_muCombThres = {0., 0., 0., 0.};
968 bool my_pikCuts = true;
969 float my_maxPtToApplyPik = 25.;
970 float my_chi2MaxID = 3.5;
971 ATH_CHECK( decision_ptthreshold( chain, my_EtaBins, my_muCombThres, my_pikCuts, my_maxPtToApplyPik, my_chi2MaxID ) );
972 bool pikCut = true;
973 bool stdCut = true;
974
975 auto ptValue = Trig_L2IOobject->pt() * Trig_L2IOobject->charge()/1e3;
976 float fexPt = ptValue;
977 if(my_pikCuts && (std::abs(fexPt) < my_maxPtToApplyPik)){
978 if(Trig_L2IOobject->idTrack()->chiSquared() > my_chi2MaxID){
979 ATH_MSG_DEBUG("this obj failed at Kpi rejection:idTrack_chiSquared = " << Trig_L2IOobject->idTrack()->chiSquared() );
980 pikCut = false;
981 }
982 }
983
984 float absEta = std::abs(Trig_L2IOobject->eta());
985 unsigned int iThres = 0;
986 for(unsigned int i=0; i<(my_EtaBins.size()-1); i++) {
987 if ( my_EtaBins[i] <= absEta && absEta < my_EtaBins[i+1] ) iThres = i;
988 }
989 const float muCombThres = my_muCombThres[iThres];
990 if(Trig_L2IOobject->pt()/1e3 < muCombThres){
991 ATH_MSG_DEBUG("this obj failed at std Pt cut:muCombThres = " << muCombThres);
992 stdCut = false;
993 }
994
995 if(stdCut && pikCut){
996 ATH_MSG_DEBUG("this obj passed muCombhypo");
997 pass_muCombHypo = true;
998 }
999 return StatusCode::SUCCESS;
1000}
StatusCode decision_ptthreshold(const std::string &chain, std::vector< float > &my_EtaBins, std::vector< float > &my_muCombThres, bool &my_pikCuts, float &my_maxPtToApplyPik, float &my_chi2MaxID) const

◆ L2ORPosForMatchFunc() [1/2]

std::tuple< float, float, float > L2MuonSAIOMon::L2ORPosForMatchFunc ( const xAOD::L2CombinedMuon * trig)
inlinestaticprivate

Definition at line 1033 of file L2MuonSAIOMon.cxx.

1033 {
1034 return std::forward_as_tuple( (trig->pt()/1e3 * trig->charge() ), trig->eta(), trig->phi());
1035}

◆ L2ORPosForMatchFunc() [2/2]

std::tuple< float, float, float > L2MuonSAIOMon::L2ORPosForMatchFunc ( const xAOD::L2StandAloneMuon * trig)
inlinestaticprivate

Definition at line 1028 of file L2MuonSAIOMon.cxx.

1028 {
1029 return std::forward_as_tuple(trig->pt(), trig->etaMS(), trig->phiMS());
1030}
virtual double pt() const
The transverse momentum ( ) of the particle.

◆ L2OverlapRemover()

StatusCode L2MuonSAIOMon::L2OverlapRemover ( const std::vector< const xAOD::L2CombinedMuon * > & matchSA_L2IOobjects,
std::vector< bool > & isoverlap,
std::vector< bool > & passOR ) const
private

Definition at line 676 of file L2MuonSAIOMon.cxx.

676 {
677
678 ATH_MSG_DEBUG ("L2OverlapRemover ..." );
679
680 const size_t numMuon = matchSA_L2IOobjects.size();
681 bool errorWhenIdentifyingOverlap = false;
682
683 if(numMuon > 1){
684 std::vector<unsigned int> mucombResult;
685 //unsigned int i,j;
686 for(unsigned int i=0; i<numMuon; i++) {mucombResult.emplace_back(i); }
687 for(unsigned int i=0; i<numMuon-1; i++){
688 for(unsigned int j=i+1; j<numMuon; j++){
689 ATH_MSG_DEBUG("++ i=" << i << " vs j=" << j);
690 bool overlapped = isOverlap(matchSA_L2IOobjects.at(i), matchSA_L2IOobjects.at(j));
691 ATH_MSG_DEBUG("matchSA_L2IOobjects: i/j/Overlap = " << i << "/" << j << "/" << overlapped );
692 if( ! overlapped ){ // judged as different
693 ATH_MSG_DEBUG(" judged as: differenr objects");
694 if( mucombResult[i] == mucombResult[j] ) { // but marked as same by someone
695 ATH_MSG_DEBUG( "inconsistentency in muComb overlap removal for more than two objects" );
696 ATH_MSG_DEBUG( "two objects are judged as different but both were already marked as identical by someone else as: " );
697 ATH_MSG_DEBUG( "i/j/result[i]/result[j]=" << i << " / " << j << " / " << mucombResult[i] << " / " << mucombResult[j] );
698 errorWhenIdentifyingOverlap = true;
699 }
700 }
701 else{ // judged as overlap
702 if( (mucombResult[j] != j && mucombResult[i] != mucombResult[j]) || (mucombResult[j] == j && mucombResult[i] != i) ){
703 ATH_MSG_DEBUG( "inconsistentency in muComb based overlap removal for more than two objects" );
704 ATH_MSG_DEBUG( "two objects are judged as overlap but only either was already marked as overlap to someone else: " );
705 ATH_MSG_DEBUG( "i/j/result[i]/result[j]=" << i << " / " << j << " / " << mucombResult[i] << " / " << mucombResult[j] );
706 errorWhenIdentifyingOverlap = true;
707 }
708 ATH_MSG_DEBUG(" judged as: overlapped objects");
709 if( mucombResult[i] == i ) {
710 ATH_MSG_DEBUG( " i is not yet marked as overlap. so, it is a newly found overlap" );
711 ATH_MSG_DEBUG( " -> marking mucombResult[j] as i..." );
712 mucombResult[j] = i;
713 isoverlap[i] = true;
714 isoverlap[j] = true;
715 } else {
716 ATH_MSG_DEBUG( " both i/j already marked as overlap by: mucombResult[i]=" << mucombResult[i] );
717 ATH_MSG_DEBUG( " -> do nothing..." );
718 }
719 }
720 }
721 }
722
723
724 if( errorWhenIdentifyingOverlap ) {
725 ATH_MSG_WARNING( "error when resolving overlap. exitting with all EVs active..." );
726 } else {
727
728 unsigned int n_uniqueMuon = 0;
729 for(unsigned int i=0; i<numMuon; i++) {
730 ATH_MSG_DEBUG( "muComb based results: i=" << i << ": ");
731 if( mucombResult[i] != i ) {
732 ATH_MSG_DEBUG( " overlap to j=" << mucombResult[i] );
733 } else {
734 n_uniqueMuon++;
735 ATH_MSG_DEBUG( " unique" );
736 }
737 }
738
739 ATH_MSG_DEBUG( "nr of unique Muons after muComb-based removal=" << n_uniqueMuon );
740
741 if( numMuon != n_uniqueMuon ){
742 ATH_CHECK( chooseBestMuon(matchSA_L2IOobjects, passOR, mucombResult) );
743 } else {
744 ATH_MSG_DEBUG( "no overlap identified. exitting with all EventViews active" );
745 }
746 }
747 }
748
749 return StatusCode::SUCCESS;
750}
StatusCode chooseBestMuon(const std::vector< const xAOD::L2CombinedMuon * > &matchSA_L2IOobjects, std::vector< bool > &passOR, std::vector< unsigned int > &mucombResult) const
bool isOverlap(const xAOD::L2CombinedMuon *matchSA_L2IOobject1, const xAOD::L2CombinedMuon *matchSA_L2IOobject2) const

◆ matchL2IO_wContainer()

StatusCode L2MuonSAIOMon::matchL2IO_wContainer ( const EventContext & ctx,
const std::string & chain,
std::vector< const xAOD::L2CombinedMuon * > & Trig_L2IOobjects ) const
private

Definition at line 610 of file L2MuonSAIOMon.cxx.

610 {
611
612 ATH_MSG_DEBUG ("matchL2IO_wContainer ..." );
613
614 // retrieve l2io objects
615 SG::ReadHandle<xAOD::L2CombinedMuonContainer> L2IOobjects( m_L2MuonCBIOContainerKey, ctx );
616
617 // retrieve l2SA objects
618 std::vector< TrigCompositeUtils::LinkInfo<xAOD::L2StandAloneMuonContainer> > featureCont;
619 if( chain.find("probe") != std::string::npos ){ // if tag & probe chain, retrieve probe L2SA objects
620 int legIndex_probe = 1; // probe
623 "HLT_MuonL2SAInfo",
626 legIndex_probe );
627 }
628 else{
631 "HLT_MuonL2SAInfo" );
632 }
633
634 // match l2io objects to l2sa objects using roiWord
635 std::vector< const xAOD::L2CombinedMuon* > matchSA_L2IOobjects;
636 for(const auto L2IOobject : *L2IOobjects){
637 ATH_MSG_DEBUG(" L2IOobject->muSATrack()->roiWord()/L2IOobject->pt(): " << L2IOobject->muSATrack()->roiWord() << "/" << L2IOobject->pt() );
638 for(const TrigCompositeUtils::LinkInfo<xAOD::L2StandAloneMuonContainer>& L2SALinkInfo : featureCont){
639 ATH_CHECK( L2SALinkInfo.isValid() );
640 const ElementLink<xAOD::L2StandAloneMuonContainer> L2SAobject = L2SALinkInfo.link;
641 if( !L2SAobject.isValid() ) continue;
642 ATH_MSG_DEBUG(" L2SAobject->roiWord()/L2SALinkInfo.state: " << (*L2SAobject)->roiWord() << "/" << L2SALinkInfo.state );
643
644 if( L2IOobject->muSATrack()->roiWord() != (*L2SAobject)->roiWord() ) continue;
645 if( L2SALinkInfo.state != TrigCompositeUtils::ActiveState::ACTIVE ){
646 break;
647 }else{
648 matchSA_L2IOobjects.push_back(L2IOobject);
649 ATH_MSG_DEBUG(" matchSA_L2IOobject->muSATrack()->roiWord()/matchSA_L2IOobject->pt(): " << L2IOobject->muSATrack()->roiWord() << "/" << L2IOobject->pt() );
650 break;
651 }
652 }
653 }
654 ATH_MSG_DEBUG(" matchSA_L2IOobjects.size(): " << matchSA_L2IOobjects.size() );
655
656 const size_t num_matchSAMuon = matchSA_L2IOobjects.size();
657 if( num_matchSAMuon == 0 ){
658 ATH_MSG_DEBUG(" NO matchSA_L2IOobjects ");
659 return StatusCode::SUCCESS;
660 }
661
662 std::vector< bool > isoverlap( num_matchSAMuon, false );
663 std::vector< bool > passOR( num_matchSAMuon, true );
664
665 // L2CBOverlapRemover
666 ATH_CHECK( L2OverlapRemover( matchSA_L2IOobjects, isoverlap, passOR ) );
667 for(unsigned int i=0; i<num_matchSAMuon; i++) { // push back trig Inside-Out objects passing L2CBOverlapRemover
668 if( isoverlap[i] && !passOR[i] ) continue;
669 Trig_L2IOobjects.push_back(matchSA_L2IOobjects.at(i));
670 }
671
672 return StatusCode::SUCCESS;
673}
StatusCode L2OverlapRemover(const std::vector< const xAOD::L2CombinedMuon * > &matchSA_L2IOobjects, std::vector< bool > &isoverlap, std::vector< bool > &passOR) const

◆ 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 }

◆ muCombHypo_TDTworkaround()

StatusCode L2MuonSAIOMon::muCombHypo_TDTworkaround ( const std::string & chain,
const std::vector< const xAOD::L2CombinedMuon * > & Trig_L2IOobjects,
std::vector< bool > & pass_muCombHypo ) const
private

Definition at line 941 of file L2MuonSAIOMon.cxx.

941 {
942
943
944 int requireMuonNum = 1;
945
946 int passHypo_MuonNum = 0;
947 for(auto &Trig_L2IOobject : Trig_L2IOobjects){
948 bool isPass_muCombHypo = false;
949 ATH_CHECK(isPassedmuCombHypo( chain, Trig_L2IOobject ,isPass_muCombHypo));
950 bool pass_muCombHypo_obj = isPass_muCombHypo;
951 pass_muCombHypo.push_back(pass_muCombHypo_obj);
952 if( pass_muCombHypo_obj ) passHypo_MuonNum++;
953 }
954
955 if( passHypo_MuonNum >= requireMuonNum ){
956 ATH_MSG_DEBUG("this evt passed muCombhypo");
957 }
958 return StatusCode::SUCCESS;
959}

◆ 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.

◆ parseList()

StatusCode AthMonitorAlgorithm::parseList ( const std::string & line,
std::vector< std::string > & result ) const
virtualinherited

Parse a string into a vector.

The input string is a single long string of all of the trigger names. It parses this string and turns it into a vector, where each element is one trigger or trigger category.

Parameters
lineThe input string.
resultThe parsed output vector of strings.
Returns
StatusCode

Definition at line 350 of file AthMonitorAlgorithm.cxx.

350 {
351 std::string item;
352 std::stringstream ss(line);
353
354 ATH_MSG_DEBUG( "AthMonitorAlgorithm::parseList()" );
355
356 while ( std::getline(ss, item, ',') ) {
357 std::stringstream iss(item); // remove whitespace
358 iss >> item;
359 result.push_back(item);
360 }
361
362 return StatusCode::SUCCESS;
363}
static Double_t ss

◆ 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 }

◆ searchL2InsideOut()

const xAOD::L2CombinedMuon * L2MuonSAIOMon::searchL2InsideOut ( const EventContext & ctx,
const xAOD::Muon * mu,
const std::string & trigger ) const
private

Definition at line 1038 of file L2MuonSAIOMon.cxx.

1038 {
1039 ATH_MSG_DEBUG("MuonMonitoring::searchL2InsideOut()");
1040
1041 const xAOD::L2CombinedMuon* offlinematched_L2IOobject = nullptr;
1042
1043 //TDT workaround
1044 std::vector< const xAOD::L2CombinedMuon* > Trig_L2IOobjects;
1045 if( !matchL2IO_wContainer(ctx, trig, Trig_L2IOobjects).isSuccess() ) {
1046 ATH_MSG_WARNING("matchL2IO_wContainer failed, returning nullptr");
1047 return offlinematched_L2IOobject;
1048 }
1049 if( Trig_L2IOobjects.empty() ) {
1050 return offlinematched_L2IOobject;
1051 }
1052
1053 float reqdR = 1000.;
1054
1055 double offlEta = mu->eta();
1056 double offlPhi = mu->phi();
1057
1058 int loop_counter = 0;
1059 int match_index = 0;
1060 for(auto Trig_L2IOobject : Trig_L2IOobjects){
1061 double trigEta = Trig_L2IOobject->eta();
1062 double trigPhi = Trig_L2IOobject->phi();
1063 double deta = offlEta - trigEta;
1064 double dphi = xAOD::P4Helpers::deltaPhi(offlPhi, trigPhi);
1065 double dR = std::sqrt(deta*deta + dphi*dphi);
1066
1067 ATH_MSG_VERBOSE("Trigger muon candidate eta=" << trigEta << " phi=" << trigPhi << " pt=" << Trig_L2IOobject->pt() << " dR=" << dR);
1068 if( dR<reqdR ){
1069 reqdR = dR;
1070 match_index = loop_counter;
1071 ATH_MSG_DEBUG("* Trigger muon eta=" << trigEta << " phi=" << trigPhi << " pt=" << Trig_L2IOobject->pt() << " dR=" << dR );
1072 }
1073 loop_counter++;
1074 }
1075
1076 offlinematched_L2IOobject = Trig_L2IOobjects.at(match_index);
1077 return offlinematched_L2IOobject;
1078}
#define ATH_MSG_VERBOSE(x)

◆ searchTagOfflineMuon()

const xAOD::Muon * L2MuonSAIOMon::searchTagOfflineMuon ( const EventContext & ctx,
const xAOD::Muon * probe ) const
private

Definition at line 1081 of file L2MuonSAIOMon.cxx.

1081 {
1082 ATH_MSG_DEBUG("MuonMonitoring::searchTagOfflineMuon()");
1083
1084 const double ZERO_LIMIT = 0.00001;
1085
1086 double Jpsimass = 3.0969;
1087 double Zmass = 91.1876;
1088 double my_Jpsimass_lowlim = 81.;
1089 double my_Jpsimass_highlim = 101.;
1090 double my_Zmass_lowlim = 2.7;
1091 double my_Zmass_highlim = 3.5;
1092
1093 const xAOD::Muon *tag = nullptr;
1094
1095 SG::ReadHandle<xAOD::MuonContainer> muons(m_MuonContainerKey, ctx);
1096 if (! muons.isValid() ) {
1097 ATH_MSG_ERROR("evtStore() does not contain muon Collection with name "<< m_MuonContainerKey);
1098 return tag;
1099 }
1100
1101 double mass_diff_min = 999.;
1102 double tpdR_min = 999.;
1103 bool tpfromZ = false;
1104 for( const xAOD::Muon* mu : *muons ){
1105 if( mu->quality() != xAOD::Muon::Quality::Medium &&
1106 mu->quality() != xAOD::Muon::Quality::Tight ) continue;
1107 if( mu->charge()*probe->charge() > 0 ) continue;
1108 const auto* tag_ms_track = mu->trackParticle(xAOD::Muon::TrackParticleType::MuonSpectrometerTrackParticle);
1109 if( !tag_ms_track) continue; // tag muon dosen't have ms track
1110 TLorentzVector lvmu = mu->p4();
1111 TLorentzVector lvprobe = probe->p4();
1112 double dimu_mass = (lvmu+lvprobe).M()/1.e3;
1113 double tpdR = lvmu.DeltaR(lvprobe);
1114 if( dimu_mass > my_Jpsimass_lowlim && dimu_mass < my_Jpsimass_highlim ){
1115 if( tpfromZ ) continue; // Z has higher priority than Jpsi
1116 double mass_diff = std::abs(dimu_mass - Jpsimass);
1117 if( mass_diff - mass_diff_min < -1.*ZERO_LIMIT ){
1118 mass_diff_min = mass_diff;
1119 tpdR_min =tpdR;
1120 tag = mu;
1121 }
1122 else if( std::abs(mass_diff - mass_diff_min) < ZERO_LIMIT){
1123 if( tpdR - tpdR_min < 0. ){
1124 mass_diff_min = mass_diff;
1125 tpdR_min = tpdR;
1126 tag = mu;
1127 }
1128 }
1129 }
1130 else if( dimu_mass > my_Zmass_lowlim && dimu_mass < my_Zmass_highlim ){
1131 tpfromZ = true;
1132 double mass_diff = std::abs(dimu_mass - Zmass);
1133 if( mass_diff - mass_diff_min < -1.*ZERO_LIMIT ){
1134 mass_diff_min = mass_diff;
1135 tpdR_min =tpdR;
1136 tag = mu;
1137 }
1138 else if( std::abs(mass_diff - mass_diff_min) < ZERO_LIMIT){
1139 if( tpdR - tpdR_min < 0. ){
1140 mass_diff_min = mass_diff;
1141 tpdR_min =tpdR;
1142 tag = mu;
1143 }
1144 }
1145 }
1146 }
1147
1148 return tag;
1149}
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Definition Muon_v1.cxx:71
float charge() const

◆ selectEvents()

bool TrigMuonMonitorAlgorithm::selectEvents ( ) const
protectedvirtualinherited

Function that defines the event selection for anlayses User should reimlement in a subclass if needed.

Returns
True if the event is used for an analysis.

Reimplemented in TrigMuonEfficiencyMon.

Definition at line 65 of file TrigMuonMonitorAlgorithm.cxx.

65 {
66 return true;
67}

◆ selectMuons()

StatusCode TrigMuonMonitorAlgorithm::selectMuons ( const EventContext & ctx,
SG::ReadHandle< xAOD::MuonContainer > & muons,
std::vector< const xAOD::Muon * > & probes ) const
protectedvirtualinherited

Function that defines the event selection for anlayses Users should reimlement in a subclass if needed.

Parameters
ctxEventContext provided by athenaMT
muonsOffline muons in the MuonContainer
probesList of offline muons that are used in analyses

Reimplemented in TrigMuonEfficiencyMon.

Definition at line 70 of file TrigMuonMonitorAlgorithm.cxx.

70 {
71 for (const xAOD::Muon* mu : *muons) {
72 if(mu->author()==xAOD::Muon::Author::MuidCo &&
73 m_muonSelectionTool->getQuality(*mu)<=xAOD::Muon::Quality::Medium ){
74 probes.push_back(mu);
75 }
76 }
77 return StatusCode::SUCCESS;
78}
ToolHandle< CP::IMuonSelectionTool > m_muonSelectionTool

◆ 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.

75{
76 return BaseAlg::sysExecute (ctx);
77}

◆ 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.

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

◆ trigChainsArePassed()

bool AthMonitorAlgorithm::trigChainsArePassed ( const std::vector< std::string > & vTrigNames) const
inherited

Check whether triggers are passed.

For the event, use the trigger decision tool to check that at least one of the triggers listed in the supplied vector is passed.

Parameters
vTrigNamesList of trigger names.
Returns
If empty input, default to true. If at least one trigger is specified, returns whether at least one trigger was passed.

Definition at line 208 of file AthMonitorAlgorithm.cxx.

208 {
209
210
211 // If no triggers were given, return true.
212 if (vTrigNames.empty()) return true;
213
214
215 // Trigger: Check if this Algorithm is being run as an Express Stream job.
216 // Events are entering the express stream are chosen randomly, and by chain,
217 // Hence an additional check should be aplied to see if the chain(s)
218 // monitored here are responsible for the event being selected for
219 // the express stream.
220
221 const auto group = m_trigDecTool->getChainGroup(vTrigNames);
223 const auto passedBits = m_trigDecTool->isPassedBits(group);
224 bool expressPass = passedBits & TrigDefs::Express_passed; //bitwise AND
225 if(!expressPass) {
226 return false;
227 }
228 }
229
230 // monitor the event if any of the chains in the chain group passes the event.
231 return group->isPassed();
232
233}
Gaudi::Property< bool > m_enforceExpressTriggers

◆ 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_dataType

AthMonitorAlgorithm::DataType_t AthMonitorAlgorithm::m_dataType
protectedinherited

Instance of the DataType_t enum.

Definition at line 356 of file AthMonitorAlgorithm.h.

◆ m_dataTypeStr

Gaudi::Property<std::string> AthMonitorAlgorithm::m_dataTypeStr {this,"DataType","userDefined"}
protectedinherited

DataType string pulled from the job option and converted to enum.

Definition at line 358 of file AthMonitorAlgorithm.h.

358{this,"DataType","userDefined"};

◆ m_defaultLBDuration

Gaudi::Property<float> AthMonitorAlgorithm::m_defaultLBDuration {this,"DefaultLBDuration",60.}
protectedinherited

Default duration of one lumi block.

Definition at line 365 of file AthMonitorAlgorithm.h.

365{this,"DefaultLBDuration",60.};

◆ m_detailLevel

Gaudi::Property<int> AthMonitorAlgorithm::m_detailLevel {this,"DetailLevel",0}
protectedinherited

Sets the level of detail used in the monitoring.

Definition at line 366 of file AthMonitorAlgorithm.h.

366{this,"DetailLevel",0};

◆ 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_DQFilterTools

ToolHandleArray<IDQFilterTool> AthMonitorAlgorithm::m_DQFilterTools {this,"FilterTools",{}}
protectedinherited

Array of Data Quality filter tools.

Definition at line 346 of file AthMonitorAlgorithm.h.

346{this,"FilterTools",{}};

◆ m_dRbySAThres

Gaudi::Property< std::vector<float> > L2MuonSAIOMon::m_dRbySAThres {this, "dRbySAThres", {0, 0, 0, 0, 0}, "mufast DR threshold of L2CB"}
private

Definition at line 48 of file L2MuonSAIOMon.h.

48{this, "dRbySAThres", {0, 0, 0, 0, 0}, "mufast DR threshold of L2CB"};

◆ m_dRCBThres

Gaudi::Property< std::vector<float> > L2MuonSAIOMon::m_dRCBThres {this, "DRThres", {0.002, 0.001, 0.002, 0.002, 0.002}, "DR threshold of L2CB"}
private

Definition at line 47 of file L2MuonSAIOMon.h.

47{this, "DRThres", {0.002, 0.001, 0.002, 0.002, 0.002}, "DR threshold of L2CB"};

◆ m_dummy

const ToolHandle<GenericMonitoringTool> AthMonitorAlgorithm::m_dummy
privateinherited

Definition at line 374 of file AthMonitorAlgorithm.h.

◆ m_enforceExpressTriggers

Gaudi::Property<bool> AthMonitorAlgorithm::m_enforceExpressTriggers
privateinherited
Initial value:
{this,
"EnforceExpressTriggers", false,
"Requires that matched triggers made the event enter the express stream"}

Definition at line 377 of file AthMonitorAlgorithm.h.

377 {this,
378 "EnforceExpressTriggers", false,
379 "Requires that matched triggers made the event enter the express stream"};

◆ m_environment

AthMonitorAlgorithm::Environment_t AthMonitorAlgorithm::m_environment
protectedinherited

Instance of the Environment_t enum.

Definition at line 355 of file AthMonitorAlgorithm.h.

◆ m_environmentStr

Gaudi::Property<std::string> AthMonitorAlgorithm::m_environmentStr {this,"Environment","user"}
protectedinherited

Environment string pulled from the job option and converted to enum.

Definition at line 357 of file AthMonitorAlgorithm.h.

357{this,"Environment","user"};

◆ m_etaBins

Gaudi::Property< std::vector<float> > L2MuonSAIOMon::m_etaBins {this, "EtaBins", {0, 0.9, 1.1, 1.9, 2.1, 9.9}, "eta bins of DR and mass thresholds"}
private

Definition at line 46 of file L2MuonSAIOMon.h.

46{this, "EtaBins", {0, 0.9, 1.1, 1.9, 2.1, 9.9}, "eta bins of DR and mass thresholds"};

◆ m_EventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> AthMonitorAlgorithm::m_EventInfoKey {this,"EventInfoKey","EventInfo"}
protectedinherited

Key for retrieving EventInfo from StoreGate.

Definition at line 367 of file AthMonitorAlgorithm.h.

367{this,"EventInfoKey","EventInfo"};

◆ 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_fileKey

Gaudi::Property<std::string> AthMonitorAlgorithm::m_fileKey {this,"FileKey",""}
protectedinherited

Internal Athena name for file.

Definition at line 363 of file AthMonitorAlgorithm.h.

363{this,"FileKey",""};

◆ m_group

Gaudi::Property<std::string> TrigMuonMonitorAlgorithm::m_group {this, "Group", "", "Histogram group"}
protectedinherited

Name of monitored group.

Definition at line 144 of file TrigMuonMonitorAlgorithm.h.

144{this, "Group", "", "Histogram group"};

◆ m_L2MuonCBIOContainerKey

SG::ReadHandleKey<xAOD::L2CombinedMuonContainer> L2MuonSAIOMon::m_L2MuonCBIOContainerKey {this, "L2CombinedMuonContainerName_IO", "HLT_MuonL2CBInfoIOmode", "L2MuonCBIO container"}
private

Definition at line 29 of file L2MuonSAIOMon.h.

29{this, "L2CombinedMuonContainerName_IO", "HLT_MuonL2CBInfoIOmode", "L2MuonCBIO container"};

◆ m_lbDurationDataKey

SG::ReadCondHandleKey<LBDurationCondData> AthMonitorAlgorithm::m_lbDurationDataKey {this,"LBDurationCondDataKey","LBDurationCondData","SG Key of LBDurationCondData object"}
protectedinherited

Definition at line 350 of file AthMonitorAlgorithm.h.

351{this,"LBDurationCondDataKey","LBDurationCondData","SG Key of LBDurationCondData object"};

◆ m_lumiDataKey

SG::ReadCondHandleKey<LuminosityCondData> AthMonitorAlgorithm::m_lumiDataKey {this,"LuminosityCondDataKey","LuminosityCondData","SG Key of LuminosityCondData object"}
protectedinherited

Definition at line 348 of file AthMonitorAlgorithm.h.

349{this,"LuminosityCondDataKey","LuminosityCondData","SG Key of LuminosityCondData object"};

◆ m_massCBThres

Gaudi::Property< std::vector<float> > L2MuonSAIOMon::m_massCBThres {this, "MassThres", {0.004, 0.002, 0.006, 0.006, 0.006}, "mass threshold of L2CB"}
private

Definition at line 49 of file L2MuonSAIOMon.h.

49{this, "MassThres", {0.004, 0.002, 0.006, 0.006, 0.006}, "mass threshold of L2CB"};

◆ m_matchTool

ToolHandle<MuonMatchingTool> TrigMuonMonitorAlgorithm::m_matchTool {this, "MuonMatchingTool", "MuonMatchingTool", "Tool for matching offline and online objects"}
protectedinherited

Definition at line 130 of file TrigMuonMonitorAlgorithm.h.

130{this, "MuonMatchingTool", "MuonMatchingTool", "Tool for matching offline and online objects"};

◆ m_monitored_chains

Gaudi::Property<std::vector<std::string> > TrigMuonMonitorAlgorithm::m_monitored_chains {this, "MonitoredChains", {}, "Trigger chains that are monitored"}
protectedinherited

List of trigger chains that are monitored in fillVariablesPerChain and fillVariablesPerOfflineMuonPerChain.

Definition at line 138 of file TrigMuonMonitorAlgorithm.h.

138{this, "MonitoredChains", {}, "Trigger chains that are monitored"};

◆ m_monitored_chains_plateau

Gaudi::Property<std::vector<float> > L2MuonSAIOMon::m_monitored_chains_plateau {this, "Plateaus", {}, "List of plateaus of measured trigger"}
private

Definition at line 27 of file L2MuonSAIOMon.h.

27{this, "Plateaus", {}, "List of plateaus of measured trigger"};

◆ m_MuonContainerKey

SG::ReadHandleKey<xAOD::MuonContainer> TrigMuonMonitorAlgorithm::m_MuonContainerKey {this, "MuonContainerName", "Muons", "Offline muon container"}
protectedinherited

Definition at line 134 of file TrigMuonMonitorAlgorithm.h.

134{this, "MuonContainerName", "Muons", "Offline muon container"};

◆ m_muonSelectionTool

ToolHandle<CP::IMuonSelectionTool> TrigMuonMonitorAlgorithm::m_muonSelectionTool {this,"MuonSelectionTool","CP::MuonSelectionTool/MuonSelectionTool","MuonSelectionTool"}
protectedinherited

Definition at line 131 of file TrigMuonMonitorAlgorithm.h.

131{this,"MuonSelectionTool","CP::MuonSelectionTool/MuonSelectionTool","MuonSelectionTool"};

◆ m_muontype

Gaudi::Property<int> TrigMuonMonitorAlgorithm::m_muontype
protectedinherited
Initial value:
{this, "MuonType",
static_cast<int>(xAOD::Muon::MuonType::Combined),
"MuonType used for monitoring"}

Requirement for the offline muon type considered in analyses.

Definition at line 140 of file TrigMuonMonitorAlgorithm.h.

140 {this, "MuonType",
141 static_cast<int>(xAOD::Muon::MuonType::Combined),
142 "MuonType used for monitoring"};

◆ m_name

std::string AthMonitorAlgorithm::m_name
privateinherited

Definition at line 371 of file AthMonitorAlgorithm.h.

◆ m_plateaus

std::map<std::string, double> L2MuonSAIOMon::m_plateaus {}
private

Definition at line 28 of file L2MuonSAIOMon.h.

28{};

◆ m_ratio_measurement_threshold

const float TrigMuonMonitorAlgorithm::m_ratio_measurement_threshold = 4
protectedinherited

Threshold for ratio measurement.

Definition at line 147 of file TrigMuonMonitorAlgorithm.h.

◆ m_RequireDR

bool L2MuonSAIOMon::m_RequireDR = true
private

Definition at line 52 of file L2MuonSAIOMon.h.

◆ m_RequireDRbySA

bool L2MuonSAIOMon::m_RequireDRbySA = false
private

Definition at line 53 of file L2MuonSAIOMon.h.

◆ m_RequireMass

bool L2MuonSAIOMon::m_RequireMass = true
private

Definition at line 54 of file L2MuonSAIOMon.h.

◆ m_RequireSameSign

bool L2MuonSAIOMon::m_RequireSameSign = true
private

Definition at line 55 of file L2MuonSAIOMon.h.

◆ m_toolLookupMap

std::unordered_map<std::string, size_t> AthMonitorAlgorithm::m_toolLookupMap
privateinherited

Definition at line 372 of file AthMonitorAlgorithm.h.

◆ m_tools

ToolHandleArray<GenericMonitoringTool> AthMonitorAlgorithm::m_tools {this,"GMTools",{}}
protectedinherited

Array of Generic Monitoring Tools.

Definition at line 341 of file AthMonitorAlgorithm.h.

341{this,"GMTools",{}};

◆ m_trigDecTool

PublicToolHandle<Trig::TrigDecisionTool> AthMonitorAlgorithm::m_trigDecTool
protectedinherited

Tool to tell whether a specific trigger is passed.

Definition at line 345 of file AthMonitorAlgorithm.h.

◆ m_triggerChainString

Gaudi::Property<std::string> AthMonitorAlgorithm::m_triggerChainString {this,"TriggerChain",""}
protectedinherited

Trigger chain string pulled from the job option and parsed into a vector.

Definition at line 360 of file AthMonitorAlgorithm.h.

360{this,"TriggerChain",""};

◆ m_trigLiveFractionDataKey

SG::ReadCondHandleKey<TrigLiveFractionCondData> AthMonitorAlgorithm::m_trigLiveFractionDataKey {this,"TrigLiveFractionCondDataKey","TrigLiveFractionCondData", "SG Key of TrigLiveFractionCondData object"}
protectedinherited

Definition at line 352 of file AthMonitorAlgorithm.h.

353{this,"TrigLiveFractionCondDataKey","TrigLiveFractionCondData", "SG Key of TrigLiveFractionCondData object"};

◆ m_useLumi

Gaudi::Property<bool> AthMonitorAlgorithm::m_useLumi {this,"EnableLumi",false}
protectedinherited

Allows use of various luminosity functions.

Definition at line 364 of file AthMonitorAlgorithm.h.

364{this,"EnableLumi",false};

◆ 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_vTrigChainNames

std::vector<std::string> AthMonitorAlgorithm::m_vTrigChainNames
protectedinherited

Vector of trigger chain names parsed from trigger chain string.

Definition at line 361 of file AthMonitorAlgorithm.h.


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