64 std::cout<<
"ERROR: The combination tool is not initialized\n";
72 int electronClass = mySimpleElectron.
getElClass();
75 bool isEB = mySimpleElectron.
isEB();
78 float energyRelError = energyError /
energy;
79 float momentumRelError = momentumError / momentum;
80 float errorRatio = energyRelError / momentumRelError;
83 float eOverP = energy / momentum;
84 float eOverPerror =
sqrt(
85 (energyError/momentum)*(energyError/momentum) +
86 (energy*momentumError/momentum/momentum)*
87 (energy*momentumError/momentum/momentum));
90 float regressionInputs[11];
91 regressionInputs[0] =
energy;
92 regressionInputs[1] = energyRelError;
93 regressionInputs[2] = momentum;
94 regressionInputs[3] = momentumRelError;
95 regressionInputs[4] = errorRatio;
96 regressionInputs[5] = eOverP;
97 regressionInputs[6] = eOverPerror;
98 regressionInputs[7] =
static_cast<float>(isEcalDriven);
99 regressionInputs[8] =
static_cast<float>(isTrackerDriven);
100 regressionInputs[9] =
static_cast<float>(electronClass);
101 regressionInputs[10] =
static_cast<float>(isEB);
106 &&fabs(momentum-energy)<15.*
sqrt(momentumError*momentumError + energyError*energyError)
107 &&((momentumError < 10.*momentum) || (energy < 200.))
111 if(weight>1.) weight = 1.;
112 else if(weight<0.) weight = 0.;
115 float combinedMomentum = weight*momentum + (1.-
weight)*energy;
116 float combinedMomentumError =
sqrt(weight*weight*momentumError*momentumError + (1.-weight)*(1.-weight)*energyError*energyError);
120 if(momentumError!=999. || weight==0.)
double GetResponse(const float *vector) const
void setCombinedMomentum(double combinedMomentum)
double getTrackerMomentum() const
double getNewEnergy() const
bool isTrackerDriven() const
double getNewEnergyError() const
void setCombinedMomentumError(double combinedMomentumError)
double getTrackerMomentumError() const
bool isEcalDriven() const
float energyError(float E, float *par)