|
ATLAS Offline Software
|
Go to the documentation of this file.
21 ATH_MSG_ERROR(
"Configuration seems to be wrong. The size of \"L1Seeds\" and \"Thresholds\" should be same as \"MonitoredChainds\".");
22 return StatusCode::FAILURE;
24 for(
unsigned int ichain=0; ichain<nchains; ++ichain){
42 if(
m_eff_method.value().find(
"TagAndProbe")!=std::string::npos){
51 return StatusCode::SUCCESS;
79 bool activestate =
false;
89 bool activestate =
false;
91 L2SApass = activestate;
100 bool activestate =
false;
102 L2CBpass = activestate;
111 bool activestate =
false;
113 EFSApass = activestate;
122 bool activestate =
false;
124 EFCBpass = activestate;
133 bool activestate =
false;
135 EFIsopass = activestate;
143 bool activestate =
false;
145 EFSAFSpass = activestate;
153 bool activestate =
false;
155 EFCBFSpass = activestate;
163 " doEFSA:" <<
m_doEFSA <<
" EFSApass:" << EFSApass <<
" doEFCB:" <<
m_doEFCB <<
" EFCBpass:" << EFCBpass <<
" doEFIso:" <<
m_doEFIso <<
" EFIsopass:" << EFIsopass <<
164 " doEFSAFS:" <<
m_doEFSAFS <<
" EFSAFSpass:" << EFSAFSpass <<
" doEFCBFS:" <<
m_doEFCBFS <<
" EFCBFSpass:" << EFCBFSpass);
168 fill(
m_group, muPt, L1pass, L2SApass, L2CBpass, EFSApass, EFCBpass, EFIsopass, EFSAFSpass, EFCBFSpass);
172 fill(
m_group, muEta, muPhi, averageMu, L1pass, L2SApass, L2CBpass, EFSApass, EFCBpass, EFIsopass, EFSAFSpass, EFCBFSpass);
175 return StatusCode::SUCCESS;
182 std::vector<float> vec_invmass;
185 std::vector<std::pair<const xAOD::Muon*, const xAOD::Muon*> > dimuons;
188 for(; mu1_it!=mu1_end; ++mu1_it){
195 for(++mu2_it; mu2_it!=mu2_end; ++mu2_it){
202 TLorentzVector lvmu1 = mu1->
p4();
203 TLorentzVector lvmu2 = mu2->
p4();
204 double dimu_mass = (lvmu1+lvmu2).M()/1.e3;
205 vec_invmass.push_back(dimu_mass);
207 bool bit_dR = lvmu1.DeltaR(lvmu2)>0.5;
213 if(extTrack1 && extTrack2){
214 TLorentzVector lvext1 = lvmu1;
215 TLorentzVector lvext2 = lvmu2;
216 double mupt1 = mu1->
pt();
217 double mupt2 = mu2->
pt();
218 lvext1.SetPtEtaPhiM( mupt1, extTrack1->
position().eta(), extTrack1->
position().phi(), mu1->
m());
219 lvext2.SetPtEtaPhiM( mupt2, extTrack2->
position().eta(), extTrack2->
position().phi(), mu2->
m());
225 if(
m_eff_method ==
"TTbarTagAndProbe" && !bit_dR )
continue;
227 if(
m_eff_method ==
"ZTagAndProbe" && !(bit_mass && bit_dR) )
continue;
229 dimuons.emplace_back(mu1,mu2);
237 for (std::pair<const xAOD::Muon*,const xAOD::Muon*> dimu : dimuons){
245 if(
std::find(probes.begin(), probes.end(), dimu.second)==probes.end()){
247 if( std::abs( dimu.second->eta() ) > 0. && std::abs( dimu.second->eta() ) < 1.05 ) probes.push_back(dimu.second);
249 else probes.push_back(dimu.second);
253 if(
std::find(probes.begin(), probes.end(), dimu.first)==probes.end()){
255 if( std::abs( dimu.first->eta() ) > 0. && std::abs( dimu.first->eta() ) < 1.05 ) probes.push_back(dimu.first);
257 else probes.push_back(dimu.first);
262 return StatusCode::SUCCESS;;
Gaudi::Property< std::vector< std::string > > m_monitored_chains_L1
Const iterator class for DataVector/DataList.
Gaudi::Property< bool > m_doL2CB
Gaudi::Property< std::string > m_group
Name of monitored group.
std::string find(const std::string &s)
return a remapped string
ToolHandle< MuonMatchingTool > m_matchTool
virtual FourMom_t p4() const
The full 4-momentum of the particle.
const Amg::Vector3D & position() const
Access method for the position.
Gaudi::Property< std::string > m_eff_method
const ToolHandle< Trig::TrigDecisionTool > & getTrigDecisionTool() const
Get the trigger decision tool member.
Gaudi::Property< bool > m_doEFIso
Gaudi::Property< double > m_mass_highlim
virtual StatusCode selectMuons(SG::ReadHandle< xAOD::MuonContainer > &muons, std::vector< const xAOD::Muon * > &probes) const override
Function that defines the event selection for anlayses Users should reimlement in a subclass if neede...
Gaudi::Property< std::vector< double > > m_monitored_chains_threshold
TrigMuonEfficiencyMon(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< bool > m_doEFCBFS
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
std::map< std::string, std::string > m_l1seeds
Gaudi::Property< std::string > m_event_trigger
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< bool > m_doEFCB
virtual StatusCode initialize() override
initialize
virtual double pt() const
The transverse momentum ( ) of the particle.
Gaudi::Property< double > m_mass_lowlim
virtual bool selectEvents() const override
Function that defines the event selection for anlayses User should reimlement in a subclass if needed...
Base class from which analyzers can define a derived class to do specific analysis.
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 off...
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.
virtual double m() const
The invariant mass of the particle..
StatusCode selectMuonsTagAndProbe(SG::ReadHandle< xAOD::MuonContainer > &muons, std::vector< const xAOD::Muon * > &probes) const
Gaudi::Property< std::vector< std::string > > m_monitored_chains
List of trigger chains that are monitored in fillVariablesPerChain and fillVariablesPerOfflineMuonPer...
Gaudi::Property< bool > m_doL2SA
virtual float lbAverageInteractionsPerCrossing(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Calculate the average mu, i.e.
Gaudi::Property< int > m_muontype
Requirement for the offline muon type considered in analyses.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
Gaudi::Property< bool > m_doEFSA
Gaudi::Property< bool > m_doEFSAFS
Gaudi::Property< bool > m_BarrelOnly
Gaudi::Property< bool > m_use_extrapolator
virtual StatusCode initialize() override
initialize
const TrackParticle * primaryTrackParticle() const
Returns a pointer (which should not usually be NULL, but might be if the muon has been stripped of in...
@ STACO
Tracks produced by STACO.
Gaudi::Property< bool > m_doL1
Class describing a TrackParticle.
Declare a monitored scalar variable.
Gaudi::Property< std::string > m_tag_trig
ToolHandle< CP::IMuonSelectionTool > m_muonSelectionTool
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
std::map< std::string, double > m_thresholds
MuonType muonType() const