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=Gaudi::Hive::currentContext()) const
 Calculate the average mu, i.e.
virtual float lbInteractionsPerCrossing (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate instantaneous number of interactions, i.e.
virtual float lbAverageLuminosity (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate average luminosity (in ub-1 s-1 => 10^30 cm-2 s-1).
virtual float lbLuminosityPerBCID (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the instantaneous luminosity per bunch crossing.
virtual double lbDuration (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the duration of the luminosity block (in seconds)
virtual float lbAverageLivefraction (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the average luminosity livefraction.
virtual float livefractionPerBCID (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the live fraction per bunch crossing ID.
virtual double lbLumiWeight (const EventContext &ctx=Gaudi::Hive::currentContext()) 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 (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 {this, "MuonType", xAOD::Muon::MuonType::Combined, "MuonType used for monitoring"}
 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.

64{
65 return 0;
66}

◆ 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 860 of file L2MuonSAIOMon.cxx.

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

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

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

◆ 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(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.
virtual StatusCode selectMuons(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...
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.
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 82 of file TrigMuonMonitorAlgorithm.cxx.

82 {
83 return StatusCode::SUCCESS;
84}

◆ 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 87 of file TrigMuonMonitorAlgorithm.cxx.

87 {
88 return StatusCode::SUCCESS;
89}

◆ 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 ElementLink<xAOD::TrackParticleContainer> &tag_ms_track = tag->muonSpectrometerTrackParticleLink();
128 if( !tag_ms_track.isValid() ) return StatusCode::SUCCESS; // tag muon dosen't have ms track
129 const ElementLink<xAOD::TrackParticleContainer> &probe_ms_track = mu->muonSpectrometerTrackParticleLink();
130 if( !probe_ms_track.isValid() ) return StatusCode::SUCCESS; // probe muon dosen't have ms track
131 float tpext_deta = (*tag_ms_track)->eta() - (*probe_ms_track)->eta();
132 float tpext_dphi = xAOD::P4Helpers::deltaPhi((*tag_ms_track)->phi(), (*probe_ms_track)->phi());
133 offdR = std::sqrt(tpext_deta*tpext_deta + tpext_dphi*tpext_dphi);
134
135 passL2InsideOut = false;
136 passL2SA = false;
137
138 // retrieve probe l2SA objects
139 int legIndex_probe = 1; // probe
140 std::vector< TrigCompositeUtils::LinkInfo<xAOD::L2StandAloneMuonContainer> > featureCont = getTrigDecisionTool()->features<xAOD::L2StandAloneMuonContainer>( chain,
142 "HLT_MuonL2SAInfo",
145 legIndex_probe );
146
147 for(const TrigCompositeUtils::LinkInfo<xAOD::L2StandAloneMuonContainer>& probe_L2SALinkInfo : featureCont){
148 ATH_CHECK( probe_L2SALinkInfo.isValid() );
149 const ElementLink<xAOD::L2StandAloneMuonContainer> probe_L2SAobject = probe_L2SALinkInfo.link;
150 if( m_matchTool->isMatchedL2SA( (*probe_L2SAobject), mu ) ){
151 if( probe_L2SALinkInfo.state == TrigCompositeUtils::ActiveState::ACTIVE ) passL2SA = true;
152 }
153 }
154
155 if(passL2SA == true){
156 if(m_matchTool->isMatchedL2InsideOut( Trig_L2IOobject, mu ))
157 {
158 bool isPass = false;
159 ATH_CHECK(isPassedmuCombHypo( chain, Trig_L2IOobject ,isPass));
160 passL2InsideOut = isPass;
161 }
162 }
163 else{
164 return StatusCode::SUCCESS;
165 }
166
167
168 fill(m_group+"_"+chain, passL2InsideOut, passL2SA, offPt);
169
170 if( mu->pt()/1e3 > m_plateaus.at(chain) ){
171 fill(m_group+"_"+chain, passL2InsideOut, passL2SA, offEta, offPhi, offdR);
172 }
173 }
174 else{ // make detail histograms using normal L2Inside-Out chain
175 if( Trig_L2IOobject == nullptr ) return StatusCode::SUCCESS; // no L2Inside-Out objects
176 if( ! m_matchTool->isMatchedL2InsideOut(Trig_L2IOobject, mu) ) return StatusCode::SUCCESS; // offline muons is not matched to any L2Inside-Out objects
177
178
179 //L2Muon chamberID index
180 enum chamberID {
181 Inn_Barrel = 0,
182 Mid_Barrel,
183 Out_Barrel,
184 Inn_Endcap,
185 Mid_Endcap,
186 Out_Endcap
187 };
188 std::vector< int > L2Muon_chamberID_index;
189 auto mon_L2Muon_chamberID_index = Monitored::Collection(chain+"_L2Muon_chamberID_index",L2Muon_chamberID_index);
190 for( int i = 0; i < 6; i++){
191 L2Muon_chamberID_index.push_back(i);
192 }
193
194 // dR wrt offline
195 auto dRmin = Monitored::Scalar<float>(chain+"_dRmin",1000.);
196 dRmin = xAOD::P4Helpers::deltaR(mu, Trig_L2IOobject, false);
197
198 // region variables
199 const float ETA_OF_BARREL = 1.05;
200 auto regionBE = Monitored::Scalar<int>(chain+"_regionBE",-999);
201 auto isBarrel = Monitored::Scalar<bool>(chain+"_isBarrel",false);
202 auto isBarrelA = Monitored::Scalar<bool>(chain+"_isBarrelA",false);
203 auto isBarrelC = Monitored::Scalar<bool>(chain+"_isBarrelC",false);
204 auto isEndcap = Monitored::Scalar<bool>(chain+"_isEndcap",false);
205 auto isEndcapA = Monitored::Scalar<bool>(chain+"_isEndcapA",false);
206 auto isEndcapC = Monitored::Scalar<bool>(chain+"_isEndcapC",false);
207
208 // offline pt variables
209 auto pt4to6 = Monitored::Scalar<bool>(chain+"_pt4to6",false);
210 auto pt6to8 = Monitored::Scalar<bool>(chain+"_pt6to8",false);
211 auto ptover8 = Monitored::Scalar<bool>(chain+"_ptover8",false);
212
213 // define region
214 if( std::abs(offEta) < ETA_OF_BARREL ) {
215 regionBE = 0;
216 isBarrel = true;
217 if( offEta > 0. ) isBarrelA = true;
218 else isBarrelC = true;
219 }
220 else{
221 regionBE = 1;
222 isEndcap = true;
223 if( offEta > 0. ) isEndcapA = true;
224 else isEndcapC = true;
225 }
226
227 if( std::abs(offPt) > 4 ){
228 if( std::abs(offPt) < 6 ) pt4to6 = true;
229 else if( std::abs(offPt) < 8 ) pt6to8 = true;
230 else ptover8 = true;
231 }
232
233 // basic variables
234 auto cbioPt = Monitored::Scalar<float>(chain+"_Pt_wrt_offline",-999.);
235 auto cbioEta = Monitored::Scalar<float>(chain+"_Eta_wrt_offline",-999.);
236 auto cbioPhi = Monitored::Scalar<float>(chain+"_Phi_wrt_offline",-999.);
237 cbioPt = Trig_L2IOobject->pt()/1e3 * Trig_L2IOobject->charge(); // convert to GeV
238 cbioEta = Trig_L2IOobject->eta();
239 cbioPhi = Trig_L2IOobject->phi();
240
241 // L2Inside-Out track multiplicity per L2SA track
242 auto L2InsideOut_multiplicity = Monitored::Scalar<float>(chain+"_L2InsideOut_track_multiplicity",-999.);
243 L2InsideOut_multiplicity = 0;
244 std::vector< const xAOD::L2CombinedMuon* > Trig_L2IOobjects_tmp;
245 ATH_CHECK( matchL2IO_wContainer(ctx, chain, Trig_L2IOobjects_tmp) );
246 for(const auto& Trig_L2IOobject_tmp : Trig_L2IOobjects_tmp){
247 if( Trig_L2IOobject_tmp->muSATrack()->roiWord() == Trig_L2IOobject->muSATrack()->roiWord() ) L2InsideOut_multiplicity++;
248 }
249
250 // pt resolution
251 auto ptresol = Monitored::Scalar<float>(chain+"_ptresol",-999.);
252 if ( std::abs(offPt) > ZERO_LIMIT && std::abs(cbioPt) > ZERO_LIMIT ){
253 ptresol = std::abs(cbioPt)/std::abs(offPt) - 1.;
254 }
255
256 std::vector< float > ptresol_pos, ptresol_neg;
257 auto mon_ptresol_pos = Monitored::Collection(chain+"_ptresol_pos",ptresol_pos);
258 auto mon_ptresol_neg = Monitored::Collection(chain+"_ptresol_neg",ptresol_neg);
259 if( offCharge > 0. ) ptresol_pos.push_back(ptresol);
260 else ptresol_neg.push_back(ptresol);
261
262 // distance bw FTFroad and offlinesegment
263 std::vector< float > distance_bw_FTFroad_and_offlinesegment_Inn_Barrel;
264 std::vector< float > distance_bw_FTFroad_and_offlinesegment_Mid_Barrel;
265 std::vector< float > distance_bw_FTFroad_and_offlinesegment_Out_Barrel;
266 std::vector< float > distance_bw_FTFroad_and_offlinesegment_Inn_Endcap;
267 std::vector< float > distance_bw_FTFroad_and_offlinesegment_Mid_Endcap;
268 std::vector< float > distance_bw_FTFroad_and_offlinesegment_Out_Endcap;
269 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);
270 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);
271 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);
272 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);
273 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);
274 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);
275
276 std::vector< float > distance_bw_FTFroad_and_offlinesegment_vec;
277 std::vector< float > FTFroad_Aw;
278 std::vector< float > FTFroad_Bw;
279 std::vector< bool > FTFroad_fill;
280 for(int i=0; i<6; i++){
281 distance_bw_FTFroad_and_offlinesegment_vec.push_back(10000.);
282 FTFroad_Aw.push_back(Trig_L2IOobject->muSATrack()->roadAw(i, 0));
283 FTFroad_Bw.push_back(Trig_L2IOobject->muSATrack()->roadBw(i, 0));
284 FTFroad_fill.push_back(false);
285 }
286
287 // MDT hits residual
288 std::vector<float> res_Inn_Barrel, res_Mid_Barrel, res_Out_Barrel, res_Inn_Endcap, res_Mid_Endcap, res_Out_Endcap;
289 auto mon_res_Inn_Barrel = Monitored::Collection(chain+"_MDT_residual_Inn_Barrel",res_Inn_Barrel);
290 auto mon_res_Mid_Barrel = Monitored::Collection(chain+"_MDT_residual_Mid_Barrel",res_Mid_Barrel);
291 auto mon_res_Out_Barrel = Monitored::Collection(chain+"_MDT_residual_Out_Barrel",res_Out_Barrel);
292 auto mon_res_Inn_Endcap = Monitored::Collection(chain+"_MDT_residual_Inn_Endcap",res_Inn_Endcap);
293 auto mon_res_Mid_Endcap = Monitored::Collection(chain+"_MDT_residual_Mid_Endcap",res_Mid_Endcap);
294 auto mon_res_Out_Endcap = Monitored::Collection(chain+"_MDT_residual_Out_Endcap",res_Out_Endcap);
295
296 // distance bw MDT hits and offlinesegment
297 std::vector< float > distance_bw_MDT_and_offlinesegment_Inn_Barrel;
298 std::vector< float > distance_bw_MDT_and_offlinesegment_Mid_Barrel;
299 std::vector< float > distance_bw_MDT_and_offlinesegment_Out_Barrel;
300 std::vector< float > distance_bw_MDT_and_offlinesegment_Inn_Endcap;
301 std::vector< float > distance_bw_MDT_and_offlinesegment_Mid_Endcap;
302 std::vector< float > distance_bw_MDT_and_offlinesegment_Out_Endcap;
303 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);
304 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);
305 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);
306 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);
307 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);
308 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);
309 std::vector< float > distance_bw_MDT_and_offlinesegment_vec;
310 std::vector< int > MDTHitChamber_fill;
311 std::vector< int > MDTHitChamber;
312 std::vector< float > MDTHitR;
313 std::vector< float > MDTHitZ;
314
315 // # of MDT hits
316 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;
317 auto mon_MDT_N_Inn_Barrel = Monitored::Collection(chain+"_MDT_N_Inn_Barrel",MDT_N_Inn_Barrel);
318 auto mon_MDT_N_Mid_Barrel = Monitored::Collection(chain+"_MDT_N_Mid_Barrel",MDT_N_Mid_Barrel);
319 auto mon_MDT_N_Out_Barrel = Monitored::Collection(chain+"_MDT_N_Out_Barrel",MDT_N_Out_Barrel);
320 auto mon_MDT_N_Inn_Endcap = Monitored::Collection(chain+"_MDT_N_Inn_Endcap",MDT_N_Inn_Endcap);
321 auto mon_MDT_N_Mid_Endcap = Monitored::Collection(chain+"_MDT_N_Mid_Endcap",MDT_N_Mid_Endcap);
322 auto mon_MDT_N_Out_Endcap = Monitored::Collection(chain+"_MDT_N_Out_Endcap",MDT_N_Out_Endcap);
323 int n_mdthits_BI = 0;
324 int n_mdthits_BM = 0;
325 int n_mdthits_BO = 0;
326 int n_mdthits_EI = 0;
327 int n_mdthits_EM = 0;
328 int n_mdthits_EO = 0;
329
330 int n_mdt_hits = Trig_L2IOobject->muSATrack()->nMdtHits();
331 for(int i_tube=0; i_tube<n_mdt_hits; i_tube++){
332 if( Trig_L2IOobject->muSATrack()->mdtHitIsOutlier(i_tube) != 0 ) continue;
333 float res = Trig_L2IOobject->muSATrack()->mdtHitResidual(i_tube);
334 int imr = Trig_L2IOobject->muSATrack()->mdtHitChamber(i_tube);
335 MDTHitChamber.push_back(imr);
336 MDTHitR.push_back(Trig_L2IOobject->muSATrack()->mdtHitR(i_tube));
337 MDTHitZ.push_back(Trig_L2IOobject->muSATrack()->mdtHitZ(i_tube));
338
339 if( imr == Inn_Barrel ){
340 n_mdthits_BI++;
341 res_Inn_Barrel.push_back(res);
342 }
343 else if( imr == Mid_Barrel ){
344 n_mdthits_BM++;
345 res_Mid_Barrel.push_back(res);
346 }
347 else if( imr == Out_Barrel ){
348 n_mdthits_BO++;
349 res_Out_Barrel.push_back(res);
350 }
351 else if( imr == Inn_Endcap ){
352 n_mdthits_EI++;
353 res_Inn_Endcap.push_back(res);
354 }
355 else if( imr == Mid_Endcap ){
356 n_mdthits_EM++;
357 res_Mid_Endcap.push_back(res);
358 }
359 else if( imr == Out_Endcap ){
360 n_mdthits_EO++;
361 res_Out_Endcap.push_back(res);
362 }
363 }
364
365 // reconstruction efficiency of superpoint
366 std::vector<bool> superpoint_exist_pt4to6, superpoint_exist_pt6to8, superpoint_exist_ptover8;
367 auto mon_superpoint_exist_pt4to6 = Monitored::Collection(chain+"_superpoint_pt4to6",superpoint_exist_pt4to6);
368 auto mon_superpoint_exist_pt6to8 = Monitored::Collection(chain+"_superpoint_pt6to8",superpoint_exist_pt6to8);
369 auto mon_superpoint_exist_ptover8 = Monitored::Collection(chain+"_superpoint_ptover8",superpoint_exist_ptover8);
370 std::vector<bool> segment_superpoint_exist(6, false);
371 std::vector<bool> offlinesegment_exist_pt4to6, offlinesegment_exist_pt6to8, offlinesegment_exist_ptover8;
372 auto mon_offlinesegment_exist_pt4to6 = Monitored::Collection(chain+"_offlinesegment_pt4to6",offlinesegment_exist_pt4to6);
373 auto mon_offlinesegment_exist_pt6to8 = Monitored::Collection(chain+"_offlinesegment_pt6to8",offlinesegment_exist_pt6to8);
374 auto mon_offlinesegment_exist_ptover8 = Monitored::Collection(chain+"_offlinesegment_ptover8",offlinesegment_exist_ptover8);
375
376 // # of superpoint
377 auto superpoint_multiplicity = Monitored::Scalar<int>(chain+"_superpoint_multiplicity",0);
378 std::vector< bool > superpoint_exist;
379 std::vector< float > superpointR;
380 int Num_L2Muon_chamberID = 12;
381 for( int i_chamber = 0; i_chamber < Num_L2Muon_chamberID; i_chamber++){
382 if( Trig_L2IOobject->muSATrack()->superPointR(i_chamber) < ZERO_LIMIT ){
383 superpoint_exist.push_back(false);
384 }
385 else{
386 superpoint_exist.push_back(true);
387 superpoint_multiplicity++;
388 }
389 superpointR.push_back(Trig_L2IOobject->muSATrack()->superPointR(i_chamber));
390 }
391
392
393 std::vector< bool > segment_exist(6, false);
394 for(unsigned int i_seg = 0; i_seg < mu->nMuonSegments(); i_seg++){
395 const xAOD::MuonSegment* segment = mu->muonSegment(i_seg);
396 if(!segment) continue;
397 float segmentX = segment->x();
398 float segmentY = segment->y();
399 float segmentZ = segment->z();
400 float segmentR = std::sqrt( std::pow(segmentX, 2.0) + std::pow(segmentY, 2.0) );
401 float segmentPx = segment->px();
402 float segmentPy = segment->py();
403 float segmentPz = segment->pz();
404 float segmentSector = segment->sector();
405 using namespace Muon::MuonStationIndex;
406 int segmentChamberIndex = toInt(segment->chamberIndex());
407 float distance_bw_FTFroad_and_offlinesegment = 99999.;
408 float distance_bw_MDT_and_offlinesegment = 99999.;
409 int roadChamberIndex = -1;
410 int MDTChamberIndex = -1;
411 if( segmentChamberIndex == 0 || segmentChamberIndex == 1 ){ // Inner Barrel
412 segment_exist.at(Inn_Barrel) = true;
413 roadChamberIndex = Inn_Barrel;
414 MDTChamberIndex = Inn_Barrel;
415 }
416 else if( segmentChamberIndex == 2 || segmentChamberIndex == 3 ){ // Middle Barrel
417 segment_exist.at(Mid_Barrel) = true;
418 roadChamberIndex = Mid_Barrel;
419 MDTChamberIndex = Mid_Barrel;
420 }
421 else if( segmentChamberIndex == 4 || segmentChamberIndex == 5 ){ // Outer Barrel
422 segment_exist.at(Out_Barrel) = true;
423 roadChamberIndex = Out_Barrel;
424 MDTChamberIndex = Out_Barrel;
425 }
426 else if( segmentChamberIndex == 7 || segmentChamberIndex == 8 ){ // Inner Endcap
427 segment_exist.at(Inn_Endcap) = true;
428 roadChamberIndex = Inn_Endcap;
429 MDTChamberIndex = Inn_Endcap;
430 }
431 else if( segmentChamberIndex == 9 || segmentChamberIndex == 10 ){ // Middle Endcap
432 segment_exist.at(Mid_Endcap) = true;
433 roadChamberIndex = Mid_Endcap;
434 MDTChamberIndex = Mid_Endcap;
435 }
436 else if( segmentChamberIndex == 11 || segmentChamberIndex == 12 ){ // Outer Endcap
437 segment_exist.at(Out_Endcap) = true;
438 roadChamberIndex = Out_Endcap;
439 MDTChamberIndex = Out_Endcap;
440 }
441
442 // Calc distance bw FTFroad and offlinesegment
443 if( roadChamberIndex != -1 ){
444 if( FTFroad_Aw.at(roadChamberIndex) > ZERO_LIMIT || FTFroad_Bw.at(roadChamberIndex) > ZERO_LIMIT ){
445 FTFroad_fill.at(roadChamberIndex) = true;
446 if( FTFroad_Aw.at(roadChamberIndex) < ZERO_LIMIT) distance_bw_FTFroad_and_offlinesegment = segmentR - FTFroad_Bw.at(roadChamberIndex);
447 else{
448 float ia = 1.0/FTFroad_Aw.at(roadChamberIndex);
449 float iaq = ia * ia;
450 distance_bw_FTFroad_and_offlinesegment = (segmentZ - ia * (segmentR - FTFroad_Bw.at(roadChamberIndex)))/std::sqrt(1.0 + iaq);
451 }
452 if( std::abs(distance_bw_FTFroad_and_offlinesegment) < std::abs(distance_bw_FTFroad_and_offlinesegment_vec.at(roadChamberIndex)) )
453 distance_bw_FTFroad_and_offlinesegment_vec.at(roadChamberIndex) = distance_bw_FTFroad_and_offlinesegment;
454 }
455 }
456
457 // Calc distance bw MDT hits and offlinesegment
458 if( MDTChamberIndex != -1 ){
459 float sector_phi = M_PI*(segmentSector - 1.0)/8.0;
460 float segmentR_projection = segmentX * std::cos(sector_phi) + segmentY * std::sin(sector_phi);
461 float segmentPr_projection = segmentPx * std::cos(sector_phi) + segmentPy * std::sin(sector_phi);
462
463 for(unsigned int i_tube=0; i_tube<MDTHitChamber.size(); i_tube++){
464 if( MDTHitChamber.at(i_tube) != MDTChamberIndex ) continue;
465 if( MDTChamberIndex < 3 ){ //Barrel
466 if( std::abs(segmentPz) < ZERO_LIMIT ) distance_bw_MDT_and_offlinesegment = MDTHitZ.at(i_tube) - segmentZ;
467 else{
468 float denominator = segmentPr_projection/segmentPz;
469 if( std::abs(denominator) < ZERO_LIMIT ) continue;
470 distance_bw_MDT_and_offlinesegment = MDTHitZ.at(i_tube) - ((MDTHitR.at(i_tube) - segmentR_projection)/denominator + segmentZ);
471 }
472 }
473 else{ //Endcap
474 if( std::abs(segmentPz) < ZERO_LIMIT ){
475 distance_bw_MDT_and_offlinesegment = MDTHitR.at(i_tube) - segmentR;
476 }
477 else{
478 float coeffi = (MDTHitZ.at(i_tube) - segmentZ)/segmentPz;
479 float segmentR_extrapolated = std::sqrt(std::pow(segmentX + coeffi * segmentPx, 2.0) + std::pow(segmentY + coeffi * segmentPy, 2.0));
480 distance_bw_MDT_and_offlinesegment = MDTHitR.at(i_tube) - segmentR_extrapolated;
481 }
482 }
483 distance_bw_MDT_and_offlinesegment_vec.push_back(distance_bw_MDT_and_offlinesegment);
484 MDTHitChamber_fill.push_back(MDTHitChamber.at(i_tube));
485 }
486 }
487 }
488
489 if( FTFroad_fill.at(Inn_Barrel) ){
490 distance_bw_FTFroad_and_offlinesegment_Inn_Barrel.push_back(distance_bw_FTFroad_and_offlinesegment_vec.at(Inn_Barrel));
491 }
492 if( FTFroad_fill.at(Mid_Barrel) ){
493 distance_bw_FTFroad_and_offlinesegment_Mid_Barrel.push_back(distance_bw_FTFroad_and_offlinesegment_vec.at(Mid_Barrel));
494 }
495 if( FTFroad_fill.at(Out_Barrel) ){
496 distance_bw_FTFroad_and_offlinesegment_Out_Barrel.push_back(distance_bw_FTFroad_and_offlinesegment_vec.at(Out_Barrel));
497 }
498 if( FTFroad_fill.at(Inn_Endcap) ){
499 distance_bw_FTFroad_and_offlinesegment_Inn_Endcap.push_back(distance_bw_FTFroad_and_offlinesegment_vec.at(Inn_Endcap));
500 }
501 if( FTFroad_fill.at(Mid_Endcap) ){
502 distance_bw_FTFroad_and_offlinesegment_Mid_Endcap.push_back(distance_bw_FTFroad_and_offlinesegment_vec.at(Mid_Endcap));
503 }
504 if( FTFroad_fill.at(Out_Endcap) ){
505 distance_bw_FTFroad_and_offlinesegment_Out_Endcap.push_back(distance_bw_FTFroad_and_offlinesegment_vec.at(Out_Endcap));
506 }
507
508 for( unsigned int i = 0; i < distance_bw_MDT_and_offlinesegment_vec.size(); i++ ){
509 if( MDTHitChamber_fill.at(i) == Inn_Barrel ){
510 distance_bw_MDT_and_offlinesegment_Inn_Barrel.push_back(distance_bw_MDT_and_offlinesegment_vec.at(i));
511 }
512 else if( MDTHitChamber_fill.at(i) == Mid_Barrel ){
513 distance_bw_MDT_and_offlinesegment_Mid_Barrel.push_back(distance_bw_MDT_and_offlinesegment_vec.at(i));
514 }
515 else if( MDTHitChamber_fill.at(i) == Out_Barrel ){
516 distance_bw_MDT_and_offlinesegment_Out_Barrel.push_back(distance_bw_MDT_and_offlinesegment_vec.at(i));
517 }
518 else if( MDTHitChamber_fill.at(i) == Inn_Endcap ){
519 distance_bw_MDT_and_offlinesegment_Inn_Endcap.push_back(distance_bw_MDT_and_offlinesegment_vec.at(i));
520 }
521 else if( MDTHitChamber_fill.at(i) == Mid_Endcap ){
522 distance_bw_MDT_and_offlinesegment_Mid_Endcap.push_back(distance_bw_MDT_and_offlinesegment_vec.at(i));
523 }
524 else if( MDTHitChamber_fill.at(i) == Out_Endcap ){
525 distance_bw_MDT_and_offlinesegment_Out_Endcap.push_back(distance_bw_MDT_and_offlinesegment_vec.at(i));
526 }
527 else{
528 ATH_MSG_WARNING( "undefined chamberID is pushed back into MDTHitChamber_fill" );
529 }
530 }
531
532 if( segment_exist.at(Inn_Barrel) ){
533 MDT_N_Inn_Barrel.push_back(n_mdthits_BI);
534 segment_superpoint_exist.at(Inn_Barrel) = superpoint_exist.at(Inn_Barrel);
535 }
536 if( segment_exist.at(Mid_Barrel) ){
537 MDT_N_Mid_Barrel.push_back(n_mdthits_BM);
538 segment_superpoint_exist.at(Mid_Barrel) = superpoint_exist.at(Mid_Barrel);
539 }
540 if( segment_exist.at(Out_Barrel) ){
541 MDT_N_Out_Barrel.push_back(n_mdthits_BO);
542 segment_superpoint_exist.at(Out_Barrel) = superpoint_exist.at(Out_Barrel);
543 }
544 if( segment_exist.at(Inn_Endcap) ){
545 MDT_N_Inn_Endcap.push_back(n_mdthits_EI);
546 segment_superpoint_exist.at(Inn_Endcap) = superpoint_exist.at(Inn_Endcap);
547 }
548 if( segment_exist.at(Mid_Endcap) ){
549 MDT_N_Mid_Endcap.push_back(n_mdthits_EM);
550 segment_superpoint_exist.at(Mid_Endcap) = superpoint_exist.at(Mid_Endcap);
551 }
552 if( segment_exist.at(Out_Endcap) ){
553 MDT_N_Out_Endcap.push_back(n_mdthits_EO);
554 segment_superpoint_exist.at(Out_Endcap) = superpoint_exist.at(Out_Endcap);
555 }
556
557 if( pt4to6 ){
558 offlinesegment_exist_pt4to6 = segment_exist;
559 superpoint_exist_pt4to6 = segment_superpoint_exist;
560 }
561 else if( pt6to8 ){
562 offlinesegment_exist_pt6to8 = segment_exist;
563 superpoint_exist_pt6to8 = segment_superpoint_exist;
564 }
565 else if( ptover8 ){
566 offlinesegment_exist_ptover8 = segment_exist;
567 superpoint_exist_ptover8 = segment_superpoint_exist;
568 }
569
570 fill(m_group+"_"+chain, dRmin, isBarrel, isEndcap);
571 fill(m_group+"_"+chain, cbioPt, isBarrel, isEndcap);
572 fill(m_group+"_"+chain, cbioEta);
573 fill(m_group+"_"+chain, cbioPhi, isBarrel, isEndcap);
574 fill(m_group+"_"+chain, L2InsideOut_multiplicity, offPt, isBarrel, isEndcap);
575 fill(m_group+"_"+chain, ptresol, offEta, pt4to6, pt6to8, ptover8);
576 fill(m_group+"_"+chain, ptresol, offPt, isBarrelA, isBarrelC, isEndcapA, isEndcapC);
577 fill(m_group+"_"+chain, mon_ptresol_pos, mon_ptresol_neg, isBarrelA, isBarrelC, isEndcapA, isEndcapC);
578 fill(m_group+"_"+chain, mon_distance_bw_FTFroad_and_offlinesegment_Inn_Barrel, pt4to6, pt6to8, ptover8);
579 fill(m_group+"_"+chain, mon_distance_bw_FTFroad_and_offlinesegment_Mid_Barrel, pt4to6, pt6to8, ptover8);
580 fill(m_group+"_"+chain, mon_distance_bw_FTFroad_and_offlinesegment_Out_Barrel, pt4to6, pt6to8, ptover8);
581 fill(m_group+"_"+chain, mon_distance_bw_FTFroad_and_offlinesegment_Inn_Endcap, pt4to6, pt6to8, ptover8);
582 fill(m_group+"_"+chain, mon_distance_bw_FTFroad_and_offlinesegment_Mid_Endcap, pt4to6, pt6to8, ptover8);
583 fill(m_group+"_"+chain, mon_distance_bw_FTFroad_and_offlinesegment_Out_Endcap, pt4to6, pt6to8, ptover8);
584 fill(m_group+"_"+chain, mon_res_Inn_Barrel);
585 fill(m_group+"_"+chain, mon_res_Mid_Barrel);
586 fill(m_group+"_"+chain, mon_res_Out_Barrel);
587 fill(m_group+"_"+chain, mon_res_Inn_Endcap);
588 fill(m_group+"_"+chain, mon_res_Mid_Endcap);
589 fill(m_group+"_"+chain, mon_res_Out_Endcap);
590 fill(m_group+"_"+chain, mon_distance_bw_MDT_and_offlinesegment_Inn_Barrel);
591 fill(m_group+"_"+chain, mon_distance_bw_MDT_and_offlinesegment_Mid_Barrel);
592 fill(m_group+"_"+chain, mon_distance_bw_MDT_and_offlinesegment_Out_Barrel);
593 fill(m_group+"_"+chain, mon_distance_bw_MDT_and_offlinesegment_Inn_Endcap);
594 fill(m_group+"_"+chain, mon_distance_bw_MDT_and_offlinesegment_Mid_Endcap);
595 fill(m_group+"_"+chain, mon_distance_bw_MDT_and_offlinesegment_Out_Endcap);
596 fill(m_group+"_"+chain, mon_MDT_N_Inn_Barrel);
597 fill(m_group+"_"+chain, mon_MDT_N_Mid_Barrel);
598 fill(m_group+"_"+chain, mon_MDT_N_Out_Barrel);
599 fill(m_group+"_"+chain, mon_MDT_N_Inn_Endcap);
600 fill(m_group+"_"+chain, mon_MDT_N_Mid_Endcap);
601 fill(m_group+"_"+chain, mon_MDT_N_Out_Endcap);
602 fill(m_group+"_"+chain, superpoint_multiplicity, regionBE, pt4to6, pt6to8, ptover8);
603 fill(m_group+"_"+chain, mon_L2Muon_chamberID_index, mon_superpoint_exist_pt4to6, mon_offlinesegment_exist_pt4to6);
604 fill(m_group+"_"+chain, mon_L2Muon_chamberID_index, mon_superpoint_exist_pt6to8, mon_offlinesegment_exist_pt6to8);
605 fill(m_group+"_"+chain, mon_L2Muon_chamberID_index, mon_superpoint_exist_ptover8, mon_offlinesegment_exist_ptover8);
606 }
607
608 return StatusCode::SUCCESS;
609}
#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 if (ATH_LIKELY(idx != m_toolLookupMap.end())) {
172 return m_tools[idx->second];
173 }
174 else {
175 // treat empty tool handle case as in Monitored::Group
176 if (m_toolLookupMap.empty()) {
177 return m_dummy;
178 }
179
180 if (!isInitialized()) {
182 "It seems that the AthMonitorAlgorithm::initialize was not called "
183 "in derived class initialize method");
184 } else {
185 std::string available = std::accumulate(
186 m_toolLookupMap.begin(), m_toolLookupMap.end(), std::string(""),
187 [](const std::string& s, auto h) { return s + "," + h.first; });
188 ATH_MSG_FATAL("The tool " << name << " could not be found in the tool array of the "
189 << "monitoring algorithm " << m_name << ". This probably reflects a discrepancy between "
190 << "your python configuration and c++ filling code. Note: your available groups are {"
191 << available << "}.");
192 }
193 }
194 return m_dummy;
195}
#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 198 of file AthMonitorAlgorithm.cxx.

198 {
199 return m_trigDecTool;
200}

◆ 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 755 of file L2MuonSAIOMon.cxx.

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

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

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

◆ L2ORPosForMatchFunc() [2/2]

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

Definition at line 1030 of file L2MuonSAIOMon.cxx.

1030 {
1031 return std::forward_as_tuple(trig->pt(), trig->etaMS(), trig->phiMS());
1032}
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 678 of file L2MuonSAIOMon.cxx.

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

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

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

◆ 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 345 of file AthMonitorAlgorithm.cxx.

345 {
346 std::string item;
347 std::stringstream ss(line);
348
349 ATH_MSG_DEBUG( "AthMonitorAlgorithm::parseList()" );
350
351 while ( std::getline(ss, item, ',') ) {
352 std::stringstream iss(item); // remove whitespace
353 iss >> item;
354 result.push_back(item);
355 }
356
357 return StatusCode::SUCCESS;
358}
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 1040 of file L2MuonSAIOMon.cxx.

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

◆ searchTagOfflineMuon()

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

Definition at line 1083 of file L2MuonSAIOMon.cxx.

1083 {
1084 ATH_MSG_DEBUG("MuonMonitoring::searchTagOfflineMuon()");
1085
1086 const double ZERO_LIMIT = 0.00001;
1087
1088 double Jpsimass = 3.0969;
1089 double Zmass = 91.1876;
1090 double my_Jpsimass_lowlim = 81.;
1091 double my_Jpsimass_highlim = 101.;
1092 double my_Zmass_lowlim = 2.7;
1093 double my_Zmass_highlim = 3.5;
1094
1095 const xAOD::Muon *tag = nullptr;
1096
1097 SG::ReadHandle<xAOD::MuonContainer> muons(m_MuonContainerKey, ctx);
1098 if (! muons.isValid() ) {
1099 ATH_MSG_ERROR("evtStore() does not contain muon Collection with name "<< m_MuonContainerKey);
1100 return tag;
1101 }
1102
1103 double mass_diff_min = 999.;
1104 double tpdR_min = 999.;
1105 bool tpfromZ = false;
1106 for( const xAOD::Muon* mu : *muons ){
1107 if( mu->muonType()>m_muontype ) continue;
1108 if( mu->quality() != xAOD::Muon::Medium && mu->quality() != xAOD::Muon::Tight ) continue;
1109 if( mu->charge()*probe->charge() > 0 ) continue;
1110 const ElementLink<xAOD::TrackParticleContainer> &tag_ms_track = mu->muonSpectrometerTrackParticleLink();
1111 if( !tag_ms_track.isValid() ) continue; // tag muon dosen't have ms track
1112 TLorentzVector lvmu = mu->p4();
1113 TLorentzVector lvprobe = probe->p4();
1114 double dimu_mass = (lvmu+lvprobe).M()/1.e3;
1115 double tpdR = lvmu.DeltaR(lvprobe);
1116 if( dimu_mass > my_Jpsimass_lowlim && dimu_mass < my_Jpsimass_highlim ){
1117 if( tpfromZ ) continue; // Z has higher priority than Jpsi
1118 double mass_diff = std::abs(dimu_mass - Jpsimass);
1119 if( mass_diff - mass_diff_min < -1.*ZERO_LIMIT ){
1120 mass_diff_min = mass_diff;
1121 tpdR_min =tpdR;
1122 tag = mu;
1123 }
1124 else if( std::abs(mass_diff - mass_diff_min) < ZERO_LIMIT){
1125 if( tpdR - tpdR_min < 0. ){
1126 mass_diff_min = mass_diff;
1127 tpdR_min = tpdR;
1128 tag = mu;
1129 }
1130 }
1131 }
1132 else if( dimu_mass > my_Zmass_lowlim && dimu_mass < my_Zmass_highlim ){
1133 tpfromZ = true;
1134 double mass_diff = std::abs(dimu_mass - Zmass);
1135 if( mass_diff - mass_diff_min < -1.*ZERO_LIMIT ){
1136 mass_diff_min = mass_diff;
1137 tpdR_min =tpdR;
1138 tag = mu;
1139 }
1140 else if( std::abs(mass_diff - mass_diff_min) < ZERO_LIMIT){
1141 if( tpdR - tpdR_min < 0. ){
1142 mass_diff_min = mass_diff;
1143 tpdR_min =tpdR;
1144 tag = mu;
1145 }
1146 }
1147 }
1148 }
1149
1150 return tag;
1151}
Gaudi::Property< int > m_muontype
Requirement for the offline muon type considered in analyses.
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 ( 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
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->muonType()<=m_muontype &&
73 (mu->author()==xAOD::Muon::Author::MuidCo || mu->author()==xAOD::Muon::Author::STACO) &&
74 m_muonSelectionTool->getQuality(*mu)<=xAOD::Muon::Medium ){
75 probes.push_back(mu);
76 }
77 }
78 return StatusCode::SUCCESS;
79}
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.

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

◆ sysInitialize()

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

Override sysInitialize.

Override sysInitialize from the base class.

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

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

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

Reimplemented in HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

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

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

141{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 129 of file TrigMuonMonitorAlgorithm.h.

129{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 137 of file TrigMuonMonitorAlgorithm.h.

137{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 133 of file TrigMuonMonitorAlgorithm.h.

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

◆ m_muonSelectionTool

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

Definition at line 130 of file TrigMuonMonitorAlgorithm.h.

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

◆ m_muontype

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

Requirement for the offline muon type considered in analyses.

Definition at line 139 of file TrigMuonMonitorAlgorithm.h.

139{this, "MuonType", xAOD::Muon::MuonType::Combined, "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 144 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: