![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
24 m_specifiedSystematics(),
25 m_recommendedSystematics(),
27 m_calibrationTool(
"MuonMomentumCalibrationTool"),
28 m_muonSelectionToolVeryLooseVeto(
"MuonSelectionToolVeryLooseVeto"),
29 m_softmuonSelectionTool(
"SoftMuonSelectionTool"){
38 ATH_MSG_INFO(
" top::SoftMuonObjectCollectionMaker initialize");
45 const std:: string& syststr =
m_config->systematics();
46 std::set<std::string> syst;
49 bool ok =
m_config->getSystematicsList(syststr, syst);
51 ATH_MSG_ERROR(
" top::SoftMuonObjectCollectionMaker could not determine systematic list");
52 return StatusCode::FAILURE;
56 if (
m_config->contains(syst,
"AllMuons")) {
59 if (
m_config->contains(syst,
"AllSoftMuons")) {
68 ATH_MSG_INFO(
" top::SoftMuonObjectCollectionMaker completed initialize");
69 return StatusCode::SUCCESS;
88 if (executeNominal && !
m_config->isSystNominal(
m_config->systematicName(systematic.hash())))
continue;
89 if (!executeNominal &&
m_config->isSystNominal(
m_config->systematicName(systematic.hash())))
continue;
102 if (
muon->primaryTrackParticle()) {
112 muon->auxdecor<
float>(
"d0sig") = d0sig;
114 if (eventInfo->
isAvailable<
float>(
"AnalysisTop_PRIVTX_z_position")) {
115 float vtx_z = eventInfo->
auxdata<
float>(
"AnalysisTop_PRIVTX_z_position");
116 float delta_z0 =
muon->primaryTrackParticle()->z0() +
muon->primaryTrackParticle()->vz() - vtx_z;
117 muon->auxdecor<
float>(
"delta_z0") = delta_z0;
118 muon->auxdecor<
float>(
"delta_z0_sintheta") = delta_z0 *
std::sin(
muon->primaryTrackParticle()->theta());
128 ATH_MSG_ERROR(
" Cannot set original object links for soft muons");
129 return StatusCode::FAILURE;
133 std::string outputSGKey =
m_config->sgKeySoftMuons(systematic.hash());
134 std::string outputSGKeyAux = outputSGKey +
"Aux.";
137 StatusCode saveAux =
evtStore()->tds()->record(shallow_xaod_copy.second, outputSGKeyAux);
138 if (!
save || !saveAux) {
139 return StatusCode::FAILURE;
143 return StatusCode::SUCCESS;
151 systematic.hash())),
"Failed to retrieve Soft Muons");
154 for (
auto muon : *xaod) {
159 return StatusCode::SUCCESS;
169 if(!
m_config->getTreeFilter()->filterTree(
s.name()))
continue;
171 if (
s.name() ==
"") {
185 if (!
filter.filterTree(
s.name())) {
def retrieve(aClass, aKey=None)
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
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StatusCode initialize()
Dummy implementation of the initialisation function.
double d0significance(const xAOD::TrackParticle *tp, double d0_uncert_beam_spot_2)
std::list< CP::SystematicSet > m_recommendedSystematics
Class creating a shallow copy of an existing auxiliary container.
Class to wrap a set of SystematicVariations.
float beamPosSigmaX() const
The width of the beam spot in the X direction.
virtual const std::list< CP::SystematicSet > & specifiedSystematics() const
std::shared_ptr< top::TopConfig > m_config
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
def save(self, fileName="./columbo.out")
SoftMuonObjectCollectionMaker(const std::string &name)
::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.
ToolHandle< CP::IMuonCalibrationAndSmearingTool > m_calibrationTool
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.
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...
ToolHandle< CP::IMuonSelectionTool > m_muonSelectionToolVeryLooseVeto
std::list< CP::SystematicSet > m_specifiedSystematics
Base class for elements of a container that can have aux data.
ToolHandle< CP::IMuonSelectionTool > m_softmuonSelectionTool