49 const size_t nc = (1 << n);
55 std::fill_n(dev.begin(), n, 0);
63 for(
size_t i=0;i<nc;i++){
74 if(!
fs.accept_process(n, reals, tights))
continue;
76 for(
size_t j=0;j<n;j++){
78 double x = reals[j]? 1 :
m_particles[j].fake_factor.nominal;
80 double theta = reals[j]? 0 : 1;
81 for(
size_t k=0;k<n;k++){
87 if(reals.count() == 0){
91 for(
size_t k=0;k<n;k++){
97 ATH_MSG_ERROR(
"the process is not supported.Please try to use process = '0R' instead");
98 return StatusCode::FAILURE;
103 ATH_MSG_ERROR(
"the option and particle type are not supported by this method");
104 return StatusCode::FAILURE;
107 weight.nominal += wei;
110 for(
size_t i=0;i<n;i++){
111 for(
auto const &kv :
m_particles[i].fake_factor.uncertainties){
112 auto & uncertainties = weight.uncertainties[kv.first];
113 uncertainties.up += dev[i] * kv.second.up;
114 uncertainties.down += dev[i] * kv.second.down;
119 return StatusCode::SUCCESS;
Scalar theta() const
theta method
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
virtual FakeBkgTools::Client clientForDB() override final
This indicates which type of efficiencies/fake factor need to be filled.
ApplyE2YFakeRate(const std::string &name)
Standard constructor.
virtual StatusCode addEventCustom() override
~ApplyE2YFakeRate()
Standard destructor.
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
virtual StatusCode getEventWeightCustom(FakeBkgTools::Weight &weight, const FakeBkgTools::FinalState &fs) override
Select isolated Photons, Electrons and Muons.
@ Photon
The object is a photon.
@ Electron
The object is an electron.