|
ATLAS Offline Software
|
Go to the documentation of this file.
24 m_pimpl = std::make_unique<Root::TElectronEfficiencyCorrectionTool>(
25 (this->
name() +
".TElectronEfficiencyCorrection").c_str());
36 return StatusCode::FAILURE;
46 if (
m_pimpl->initialize() == 0) {
48 "Could not initialize the TElectronEfficiencyCorrectionTool!");
49 return StatusCode::FAILURE;
54 std::map<float, std::vector<float>>
tmp;
62 m_SF = baseName +
".EFF_" +
key +
"_SF";
71 m_toys = baseName +
".EFF_" +
key +
"__toys";
84 return StatusCode::SUCCESS;
96 std::optional<SG::WriteDecorHandle<xAOD::ElectronContainer, double>>
SF;
97 std::optional<SG::WriteDecorHandle<xAOD::ElectronContainer, double>> TotalUp;
98 std::optional<SG::WriteDecorHandle<xAOD::ElectronContainer, double>>
100 std::optional<SG::WriteDecorHandle<xAOD::ElectronContainer, double>> uncorrUp;
101 std::optional<SG::WriteDecorHandle<xAOD::ElectronContainer, double>>
103 std::optional<SG::WriteDecorHandle<xAOD::ElectronContainer, int>> HistIndex;
104 std::optional<SG::WriteDecorHandle<xAOD::ElectronContainer, int>> HistBin;
116 SF.emplace(m_SF, ctx);
117 TotalUp.emplace(m_TotalUp, ctx);
118 TotalDown.emplace(m_TotalDown, ctx);
120 uncorrUp.emplace(m_uncorrUp, ctx);
121 uncorrDown.emplace(m_uncorrDown, ctx);
122 HistIndex.emplace(m_HistIndex, ctx);
123 HistBin.emplace(m_HistBin, ctx);
124 corrUp.emplace(m_corrUp, ctx);
125 corrDown.emplace(m_corrDown, ctx);
128 toys.emplace(m_toys, ctx);
137 if (std::abs(
el->eta()) > 2.469 ||
el->pt() < 10000) {
147 HistIndex.value()(*el) =
result.histIndex;
148 HistBin.value()(*el) =
result.histBinNum;
149 corrUp.value()(*el) =
result.Corr;
150 corrDown.value()(*el) =
result.Corr;
153 toys.value()(*el) =
result.toys;
160 double cluster_eta(-9999.9);
163 ATH_MSG_ERROR(
"ERROR no cluster associated to the Electron \n");
164 return StatusCode::FAILURE;
170 cluster_eta = cluster->
eta();
172 cluster_eta = cluster->
etaBE(2);
177 const double energy = cluster->
e();
178 const double parEta =
el->eta();
179 const double coshEta = std::cosh(parEta);
180 double et = (coshEta != 0.) ?
energy / coshEta : 0.;
182 if (
et < m_lowestEt) {
187 const int status = m_pimpl->calculate(
193 return StatusCode::FAILURE;
197 ATH_MSG_INFO(
"--------------------------------------------");
223 HistIndex.value()(*el) =
result.histIndex;
224 HistBin.value()(*el) =
result.histBinNum;
225 const size_t corrsize =
result.Corr.size();
226 std::vector<double>
up(corrsize, 0);
227 std::vector<double> down(corrsize, 0);
228 for (
size_t i = 0;
i < corrsize; ++
i) {
232 corrUp.value()(*el) = std::move(
up);
233 corrDown.value()(*el) = std::move(down);
236 toys.value()(*el) = std::move(
result.toys);
241 return StatusCode::SUCCESS;
Extra patterns decribing particle interation process.
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_TotalUp
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_TotalDown
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_corrUp
const float SF[NF]
Cross sections for Fluor.
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_uncorrDown
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronContainer
Input collection name.
Helper class to provide constant type-safe access to aux data.
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_uncorrUp
const uint16_t AuthorFwdElectron
Electron reconstructed by the Forward cluster-based algorithm.
const std::string & key() const
Return the StoreGate ID for the referenced object.
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_HistIndex
Gaudi::Property< std::string > m_mapFile
Label for the collection.
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_HistBin
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.
Gaudi::Property< std::string > m_isoKey
Description of a calorimeter cluster.
virtual double eta() const
The pseudorapidity ( ) of the particle.
::StatusCode StatusCode
StatusCode definition for legacy code.
Handle class for adding a decoration to an object.
std::pair< std::vector< unsigned int >, bool > res
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_toys
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Gaudi::Property< std::string > m_idKey
virtual StatusCode initialize() override final
Gaudi::Property< int > m_mode
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_SF
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_corrDown
double m_lowestEt
Number of Correlated syst.
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
std::unique_ptr< Root::TElectronEfficiencyCorrectionTool > m_pimpl
Lowest Et for the reccomendations.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
std::string convertToOneKey(const std::string &recokey, const std::string &idkey, const std::string &isokey, const std::string &trigkey)
virtual StatusCode execute(const EventContext &ctx) const override final
Gaudi::Property< std::string > m_recoKey
Gaudi::Property< std::string > m_triggerKey
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
Gaudi::Property< bool > m_decorate
std::string getValueByKey(const std::string &mapFile, const std::string &key)
Gaudi::Property< int > m_number_of_toys
virtual double e() const
The total energy of the particle.