23StatusCode L2muCombMon :: fillVariablesPerChain(
const EventContext &ctx,
const std::string &chain)
const {
38 if(saLinkInfo.size()>1){
51 cbPt = (*muEL)->pt()/1e3 * (*muEL)->charge();
52 cbEta = (*muEL)->eta();
53 cbPhi = (*muEL)->phi();
60 saEta = (*saEL)->eta();
61 saPhi = (*saEL)->phi();
66 float SATrackPt = -999.;
67 if( (*muEL)->muSATrackLink().isValid() ) {
68 SATrack = (*muEL)->muSATrack();
69 SATrackPt = SATrack->
pt();
78 bool off_cb_match =
false;
79 bool off_sa_match =
false;
87 if( RecMuonCBmatchL2SA && L2SA_success) off_sa_match =
true;
88 if( RecMuonCBmatchL2CB && L2CB_success) off_cb_match =
true;
92 if(!off_cb_match) L2CBOFFmatching_failure =
true;
94 else if (off_sa_match) L2CB_failure =
true;
97 fill(
m_group+
"_"+chain, saPt, saEta, saPhi, L2SA_success, L2CB_failure);
101 fill(
m_group+
"_"+chain, cbPt, cbEta, cbPhi, L2CB_success, L2CBOFFmatching_failure);
110 if( (*muEL)->muSATrackLink().isValid() && std::abs(saPt) >
ZERO_LIMIT ){
111 ptratio_toSA = std::abs(cbPt / saPt);
112 dEta_toSA = cbEta - saEta;
114 dR_toSA = sqrt(dEta_toSA*dEta_toSA + dPhi_toSA*dPhi_toSA);
116 fill(
m_group+
"_"+chain, ptratio_toSA, dEta_toSA, dPhi_toSA, dR_toSA);
128 if( (*muEL)->idTrackLink().isValid() ) {
129 idtrk = (*muEL)->idTrack();
130 trkPt = idtrk->
pt() / 1e3 * idtrk->
charge();
131 trkEta = idtrk->
eta();
132 trkPhi = idtrk->
phi0();
147 if( (*muEL)->idTrackLink().isValid() && std::abs(saPt) >
ZERO_LIMIT ){
148 ptratio_TrktoSA = std::abs(cbPt / saPt);
149 dEta_TrktoSA = cbEta - saEta;
151 dR_TrktoSA = sqrt(dEta_TrktoSA*dEta_TrktoSA + dPhi_TrktoSA*dPhi_TrktoSA);
153 fill(
m_group+
"_"+chain, ptratio_TrktoSA, dEta_TrktoSA, dPhi_TrktoSA, dR_TrktoSA);
158 std::vector<int> vec_MF_error;
164 vec_MF_error.push_back(2);
168 vec_MF_error.push_back(1);
172 vec_MF_error.push_back(3);
175 if(!
error) vec_MF_error.push_back(0);
181 return StatusCode::SUCCESS;
185StatusCode L2muCombMon :: fillVariablesPerOfflineMuonPerChain(
const EventContext&,
const xAOD::Muon* mu,
const std::string &chain)
const {
187 ATH_MSG_DEBUG (
"Filling histograms for " << name() <<
"...");
195 float offPt = mu->pt()/1e3;
202 if ( !muLinkInfo.
isValid() )
return StatusCode::SUCCESS;
210 if( !
m_matchTool->isMatchedL2CB(*muEL, mu) )
return StatusCode::SUCCESS;
214 float cbPt = (*muEL)->pt()/1e3;
215 if ( std::abs(offPt) >
ZERO_LIMIT && std::abs(cbPt) >
ZERO_LIMIT ) ptresol = std::abs(cbPt)/std::abs(offPt) - 1.;
240 return StatusCode::SUCCESS;
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.
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.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
float chiSquared() const
Returns the of the overall track fit.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
float phi0() const
Returns the parameter, which has range to .
void findLinks(const Decision *start, const std::string &linkName, std::vector< LinkInfo< T > > &links, unsigned int behaviour=TrigDefs::allFeaturesOfType, std::set< const xAOD::TrigComposite * > *fullyExploredFrom=nullptr)
search back the TC links for the object of type T linked to the one of TC (recursively) Populates pro...