47 if (
false == answer)
ATH_MSG_FATAL(
"Invalid neutral PFO Scale has been specified in PFlowUtils::PFOWeightTool");
53 return StatusCode::FAILURE;
56 int isInDenseEnvironment =
false;
57 float expectedEnergy = 0.0;
58 bool gotVariable = cpfo.
attribute(xAOD::PFODetails::PFOAttributes::eflowRec_isInDenseEnvironment,isInDenseEnvironment);
59 gotVariable &= cpfo.
attribute(xAOD::PFODetails::PFOAttributes::eflowRec_tracksExpectedEnergyDeposit,expectedEnergy);
61 ATH_MSG_WARNING(
"This charged PFO did not have eflowRec_isInDenseEnvironment or eflowRec_tracksExpectedEnergyDeposit set");
62 return StatusCode::FAILURE;
65 if (
CP::EM == theNeutralPFOScale){
68 float EoverP = expectedEnergy/cpfo.
e();
72 }
else if(cpfo.
pt()<60e3) {
73 float interpolf = (1.0 - (cpfo.
pt()-30000)/30000);
74 weight = EoverP + interpolf * (1-EoverP);
81 ATH_MSG_VERBOSE(
"cpfo pt: " << cpfo.
pt() <<
", E/P: " << EoverP <<
", weight: " << weight);
83 if(isInDenseEnvironment) {
88 else if (
CP::LC == theNeutralPFOScale){
89 if(!isInDenseEnvironment){
90 if(cpfo.
pt()<30e3 || cpfo.
pt() >= 60e03) weight = 1;
98 if (weight<1
e-9) {weight = 1
e-20;}
100 return StatusCode::SUCCESS;
107 return StatusCode::FAILURE;
114 if (
false == answer)
ATH_MSG_FATAL(
"Invalid neutral PFO Scale has been specified in PFlowUtils::PFOWeightTool");
118 if(cpfo.
pt()>100e3) {
120 return StatusCode::FAILURE;
124 int isInDenseEnvironment = accDenseEnv(cpfo);
127 if (
CP::EM == theNeutralPFOScale){
132 ATH_MSG_VERBOSE(
"cpfo in dense environment? " << isInDenseEnvironment);
138 else if (
CP::LC == theNeutralPFOScale){
139 if(!isInDenseEnvironment){
140 if(cpfo.
pt()<30e3 || cpfo.
pt() >= 60e03) weight = 1;
147 if (weight<1
e-9) {weight = 1
e-20;}
149 return StatusCode::SUCCESS;
155 float expectedEnergy = accExpE(cpfo);
157 float EoverP = expectedEnergy/cpfo.
e();
160 }
else if(cpfo.
pt()<60e3) {
161 float interpolf = (1.0 - (cpfo.
pt()-30000)/30000);
162 weight = EoverP + interpolf * (1-EoverP);
167 ATH_MSG_VERBOSE(
"cpfo pt: " << cpfo.
pt() <<
", E/P: " << EoverP <<
", weight: " << weight);
174 float expectedEnergy = accExpE(cpfo);
176 float EoverP = expectedEnergy/cpfo.
e();
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
SG::ConstAccessor< T, ALLOC > ConstAccessor
virtual double pt() const override
signal_t signalType() const
virtual double e() const override
The total energy of the particle.
bool attribute(PFODetails::PFOAttributes AttributeType, T &anAttribute) const
get a PFO Variable via enum
virtual double e() const
The total energy of the particle.
virtual double pt() const
The transverse momentum ( ) of the particle.
Select isolated Photons, Electrons and Muons.
PFO_JetMETConfig_inputScale
PFO_v1 PFO
Definition of the current "pfo version".
FlowElement_v1 FlowElement
Definition of the current "pfo version".