![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
25 m_specifiedSystematics(),
26 m_recommendedSystematics(),
28 m_calibrationTool(
"MuonMomentumCalibrationTool"),
29 m_muonSelectionToolVeryLooseVeto(
"MuonSelectionToolVeryLooseVeto"),
30 m_muonSelectionTool(
"MuonSelectionTool"),
31 m_muonSelectionToolLoose(
"MuonSelectionToolLoose")
42 ATH_MSG_INFO(
" top::MuonObjectCollectionMaker initialize");
44 for (
const std::string&
WP :
m_config->muonIsolationWPs()) {
54 const std:: string& syststr =
m_config->systematics();
55 std::set<std::string> syst;
58 bool ok =
m_config->getSystematicsList(syststr, syst);
60 ATH_MSG_ERROR(
" top::MuonObjectCollectionMaker could not determine systematic list");
61 return StatusCode::FAILURE;
65 if (
m_config->contains(syst,
"AllMuons")) {
76 ATH_MSG_INFO(
" top::MuonObjectCollectionMaker completed initialize");
77 return StatusCode::SUCCESS;
104 if (executeNominal && !
m_config->isSystNominal(
m_config->systematicName(systematic.hash())))
continue;
105 if (!executeNominal &&
m_config->isSystNominal(
m_config->systematicName(systematic.hash())))
continue;
115 for (
auto muon : *(shallow_xaod_copy.first)) {
120 ATH_MSG_ERROR(
"MuonSegmentsAuxDyn.chamberIndex is not available in your derivation, so UseMVALowPt cannot be performed.");
121 ATH_MSG_ERROR(
"Please turn OFF UseMVALowPt or use more recent p-tag");
123 throw std::runtime_error(
"Missing MuonSegmentsAux.chamberIndex variable");
129 if (
muon->primaryTrackParticle()) {
140 muon->auxdecor<
float>(
"d0sig") = d0sig;
142 if (eventInfo->
isAvailable<
float>(
"AnalysisTop_PRIVTX_z_position")) {
143 float vtx_z = eventInfo->
auxdata<
float>(
"AnalysisTop_PRIVTX_z_position");
144 float delta_z0 =
muon->primaryTrackParticle()->z0() +
muon->primaryTrackParticle()->vz() - vtx_z;
145 muon->auxdecor<
float>(
"delta_z0") = delta_z0;
146 muon->auxdecor<
float>(
"delta_z0_sintheta") = delta_z0 *
std::sin(
muon->primaryTrackParticle()->theta());
153 const char passIsol = (muonIsoWP.second->accept(*
muon)) ? 1 : 0;
154 muon->auxdecor<
char>(
"AnalysisTop_Isol_" + muonIsoWP.first) = passIsol;
160 if (!setLinks)
ATH_MSG_ERROR(
" Cannot set original object links for muons, MET recalculation may struggle");
163 std::string outputSGKey =
m_config->sgKeyMuons(systematic.hash());
164 std::string outputSGKeyAux = outputSGKey +
"Aux.";
167 StatusCode saveAux =
evtStore()->tds()->record(shallow_xaod_copy.second, outputSGKeyAux);
168 if (!
save || !saveAux) {
169 return StatusCode::FAILURE;
173 return StatusCode::SUCCESS;
183 for (
auto muon : *xaod) {
188 return StatusCode::SUCCESS;
196 for (
auto s : systList) {
198 if(!
m_config->getTreeFilter()->filterTree(
s.name()))
continue;
200 if (
s.name() ==
"") {
214 if (!
filter.filterTree(
s.name())) {
def retrieve(aClass, aKey=None)
std::list< CP::SystematicSet > m_specifiedSystematics
std::shared_ptr< top::TopConfig > m_config
TopConfig A simple configuration that is NOT a singleton.
std::vector< CP::SystematicSet > make_systematics_vector(const SystematicSet &systematics)
utility functions for working with systematics
StatusCode initialize()
Dummy implementation of the initialisation function.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
ToolHandle< CP::IMuonCalibrationAndSmearingTool > m_calibrationTool
double d0significance(const xAOD::TrackParticle *tp, double d0_uncert_beam_spot_2)
Class creating a shallow copy of an existing auxiliary container.
float beamPosSigmaX() const
The width of the beam spot in the X direction.
Helper class to provide constant type-safe access to aux data.
bool m_isFirstCheckForLowPtMVA
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
def save(self, fileName="./columbo.out")
std::unordered_map< std::string, ToolHandle< CP::IIsolationSelectionTool > > m_muonIsolationTools
– Isolation –///
::StatusCode StatusCode
StatusCode definition for legacy code.
void check(bool thingToCheck, const std::string &usefulFailureMessage)
Print an error message and terminate if thingToCheck is false.
Accessor< T, ALLOC >::reference_type auxdata(const std::string &name)
Fetch an aux data variable, as a non-const reference.
float beamPosSigmaY() const
The width of the beam spot in the Y direction.
bool isAvailable(const std::string &name, const std::string &clsname="") const
Check if an aux variable is available for reading.
ToolHandle< CP::IMuonSelectionTool > m_muonSelectionToolVeryLooseVeto
std::pair< std::unique_ptr< T >, std::unique_ptr< ShallowAuxContainer > > shallowCopyContainer(const T &cont, [[maybe_unused]] const EventContext &ctx)
Function making a shallow copy of a constant container.
Class describing the basic event information.
float beamPosSigmaXY() const
The beam spot shape's X-Y correlation.
bool setOriginalObjectLink(const IParticle &original, IParticle ©)
This function should be used by CP tools when they make a deep copy of an object in their correctedCo...
std::list< CP::SystematicSet > m_recommendedSystematics
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
ToolHandle< CP::IMuonSelectionTool > m_muonSelectionToolLoose
ToolHandle< CP::IMuonSelectionTool > m_muonSelectionTool
virtual const std::list< CP::SystematicSet > & specifiedSystematics() const
Base class for elements of a container that can have aux data.
MuonObjectCollectionMaker(const std::string &name)