66 unsigned long expectedTightLeptonsBitset = 0;
76 return StatusCode::SUCCESS;
84 unsigned int nLooseLeps = 0;
85 unsigned int ipart = 0;
92 if(!newtights[ipart++])
continue;
95 float FF_value =
particle.fake_factor.nominal;
97 outputEventWeight.
nominal *= FF_value;
98 for(
auto const& particleUncPair :
particle.fake_factor.uncertainties){
100 float FF_abs_err_up = particleUncPair.second.up;
101 float FF_abs_err_down = particleUncPair.second.down;
103 float FF_rel_err_up = FF_abs_err_up / fabs(FF_value);
104 float FF_rel_err_down = FF_abs_err_down / fabs(FF_value);
108 unc.up *= (1+FF_rel_err_up);
109 unc.down *= (1-FF_rel_err_down);
118 if(nLooseLeps % 2 == 0){
119 outputEventWeight.
nominal *= -1;
124 eventUncPair.second.up = (eventUncPair.second.up - 1.f) * outputEventWeight.
nominal;
125 eventUncPair.second.down = (1.f - eventUncPair.second.down) * outputEventWeight.
nominal;
130 return StatusCode::SUCCESS;
137 unsigned int ipart = 0;
149 unsigned int nValidCombinations = 0;
151 for(
unsigned long c=0;
c<
nc;++
c)
154 if(!
fs.accept_selection(newtights, charges)){
160 if((newtights | tights) == tights){
161 ATH_MSG_DEBUG(
"eventSatisfiesCriteria: newtights|tights == tights. newtights is " << newtights <<
" while tights is " << tights);
165 if((newtights&tights) != tights){
166 ATH_MSG_DEBUG(
"eventSatisfiesCriteria: newtights&tights != tights. newtights is " << newtights <<
" while tights is " << tights);
169 ++nValidCombinations;
170 expectedTightLeptonsBitset =
c;
173 if(!nValidCombinations)
return false;
174 if(nValidCombinations > 1)
176 ATH_MSG_ERROR(
"this type of selection/process is currently not supported by the fake factor method");