ATLAS Offline Software
Loading...
Searching...
No Matches
TrackAnalysisStore.cxx File Reference

Go to the source code of this file.

Functions

template<>
bool IDTPM2::TrackAnalysisStore::isGoodOffline< xAOD::Electron > (const xAOD::Electron &elec, const std::string &quality, const std::string &)
 FIXME: the checks whether these are of the right quality are done using strings at the moment so these should be converted to use our own custom enum to get round all the different enums for the different actual EDM types.
template<>
bool IDTPM2::TrackAnalysisStore::isGoodOffline< xAOD::Muon > (const xAOD::Muon &muon, const std::string &quality, const std::string &)
 check if it is an good muon ... it is a shame this can't be as simple as the electron code ...
template<>
bool IDTPM2::TrackAnalysisStore::isGoodOffline< xAOD::TauJet > (const xAOD::TauJet &tau, const std::string &quality, const std::string &prongs)
 and check if it is a good tau

Detailed Description

Author
sutt@.nosp@m.cern.nosp@m..ch
    the rest of the fetching code, particulatly the non template 
    pieces, or the conctrete template instantiations 

Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration

Definition in file TrackAnalysisStore.cxx.

Function Documentation

◆ IDTPM2::TrackAnalysisStore::isGoodOffline< xAOD::Electron >()

template<>
bool IDTPM2::TrackAnalysisStore::isGoodOffline< xAOD::Electron > ( const xAOD::Electron & elec,
const std::string & quality,
const std::string &  )

FIXME: the checks whether these are of the right quality are done using strings at the moment so these should be converted to use our own custom enum to get round all the different enums for the different actual EDM types.

check if this is a good Electron - do we want this in the ElectronTraits some how ?? probably not at the moment

Definition at line 145 of file TrackAnalysisStore.cxx.

145 {
146 // no additional selection - this can go into a specific selector probably ...
147 if ( quality.empty() ) return true;
148 return elec.passSelection(quality);
149}
bool passSelection(bool &value, const std::string &menu) const
Check if the egamma object pass a selection menu (using the name) If the menu decision is stored in t...

◆ IDTPM2::TrackAnalysisStore::isGoodOffline< xAOD::Muon >()

template<>
bool IDTPM2::TrackAnalysisStore::isGoodOffline< xAOD::Muon > ( const xAOD::Muon & muon,
const std::string & quality,
const std::string &  )

check if it is an good muon ... it is a shame this can't be as simple as the electron code ...

should allow this to be set also

hmmm - it looks like if it passed "Tight" selection, then it does not pass medium selection, as the goups are exclusive - this is onsensical !

std::cout << "isGoodOffline: muon " << quality << "\t" << good_muon << std::endl;

Definition at line 158 of file TrackAnalysisStore.cxx.

158 {
159
160 if ( quality.empty() ) return true;
161
163 if ( muon.muonType() != xAOD::Muon::Combined ) return false;
164
165 bool good_muon = false;
166
169 if ( quality=="Tight" ) good_muon = (muon.quality()<=xAOD::Muon::Quality::Tight);
170 else if ( quality=="Medium" ) good_muon = (muon.quality()<=xAOD::Muon::Quality::Medium);
171 else if ( quality=="Loose" ) good_muon = (muon.quality()<=xAOD::Muon::Quality::Loose);
172 else if ( quality=="VeryLoose" ) good_muon = (muon.quality()<=xAOD::Muon::Quality::VeryLoose);
173 else good_muon = true;
174
176
177 return good_muon;
178}

◆ IDTPM2::TrackAnalysisStore::isGoodOffline< xAOD::TauJet >()

template<>
bool IDTPM2::TrackAnalysisStore::isGoodOffline< xAOD::TauJet > ( const xAOD::TauJet & tau,
const std::string & quality,
const std::string & prongs )

and check if it is a good tau

run 3 selection

do we want to build this in as well ?? bool not_a_electron = !( tauisTau(xAOD::TauJetParameters::EleBDTMedium) ); bool not_a_muon = !( tauisTau(xAOD::TauJetParameters::MuonVeto) ); bool best_tau = good_tau && not_a_electron && not_a_muon;

Definition at line 185 of file TrackAnalysisStore.cxx.

185 {
186
187 if ( quality.empty() && prongs.empty() ) return true;
188
189# ifndef XAODTAU_VERSIONS_TAUJET_V3_H
190 int Ntracks = tau.nTracks();
191# else
192 int Ntracks=0; tau.detail( xAOD::TauJetParameters::nChargedTracks, Ntracks );
193# endif
194
195 bool good_tau = false;
196
198 if ( quality == "Tight" ) good_tau = tau.isTau(xAOD::TauJetParameters::JetRNNSigTight);
199 else if ( quality == "Medium" ) good_tau = tau.isTau(xAOD::TauJetParameters::JetRNNSigMedium);
200 else if ( quality == "Loose" ) good_tau = tau.isTau(xAOD::TauJetParameters::JetRNNSigLoose);
201 else if ( quality == "JetRNNSigTight" ) good_tau = tau.isTau(xAOD::TauJetParameters::JetRNNSigTight); // so it doesn't confuse anyone
202 else if ( quality == "JetRNNSigMedium" ) good_tau = tau.isTau(xAOD::TauJetParameters::JetRNNSigMedium);
203 else if ( quality == "JetRNNSigLoose" ) good_tau = tau.isTau(xAOD::TauJetParameters::JetRNNSigLoose);
204 else good_tau = true;
205
206 // std::cout << "isGoodOffline: tau " << quality << "\t" << prongs << "\t(" << Ntracks << ") " << good_tau << std::endl;
207
212 if ( prongs.empty() ) return good_tau;
213 else if ( prongs=="1Prong" && Ntracks==1 ) return good_tau;
214 else if ( prongs=="2Prong" && Ntracks==2 ) return good_tau;
215 else if ( prongs=="3Prong" && Ntracks==3 ) return good_tau;
216
217 return false;
218
219}