67 cout<<
"ERROR: The combination tool is not initialized\n";
75 int electronClass = mySimpleElectron.
getElClass();
78 bool isEB = mySimpleElectron.
isEB();
81 float energyRelError = energyError / energy;
82 float momentumRelError = momentumError / momentum;
83 float errorRatio = energyRelError / momentumRelError;
86 float eOverP = energy / momentum;
87 float eOverPerror =
sqrt(
88 (energyError/momentum)*(energyError/momentum) +
89 (energy*momentumError/momentum/momentum)*
90 (energy*momentumError/momentum/momentum));
93 float regressionInputs[11];
94 regressionInputs[0] = energy;
95 regressionInputs[1] = energyRelError;
96 regressionInputs[2] = momentum;
97 regressionInputs[3] = momentumRelError;
98 regressionInputs[4] = errorRatio;
99 regressionInputs[5] = eOverP;
100 regressionInputs[6] = eOverPerror;
101 regressionInputs[7] =
static_cast<float>(isEcalDriven);
102 regressionInputs[8] =
static_cast<float>(isTrackerDriven);
103 regressionInputs[9] =
static_cast<float>(electronClass);
104 regressionInputs[10] =
static_cast<float>(isEB);
109 &&fabs(momentum-energy)<15.*
sqrt(momentumError*momentumError + energyError*energyError)
110 && ( (momentumError < 10.*momentum) || (energy < 200.) )
114 if(weight>1.) weight = 1.;
115 else if(weight<0.) weight = 0.;
118 float combinedMomentum = weight*momentum + (1.-
weight)*energy;
119 float combinedMomentumError =
sqrt(weight*weight*momentumError*momentumError + (1.-weight)*(1.-weight)*energyError*energyError);
123 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)