//
// kElectron : fPIDFinal[0]
// kMuon : fPIDFinal[1]
-// kPion : fPIDFinal[2]
-// kKaon : fPIDFinal[3]
+// kPion : fPIDFinal[2]
+// kKaon : fPIDFinal[3]
// kProton : fPIDFinal[4]
// kPhoton : fPIDFinal[5]
-// kPi0 : fPIDFinal[6]
+// kPi0 : fPIDFinal[6]
// kNeutron : fPIDFinal[7]
// kKaon0 : fPIDFinal[8]
// kEleCon : fPIDFinal[9]
// Compute the values of the weigh for a given energy the parametrised distribution using the data initialised before.
//
Double_t constante = 0.;
- Double_t energyParam;
switch (type) {
constante = 1.;
break;
case 2:
- constante = 1.;
+ constante = 1.;
break;
case 3:
constante = PowerExp(energy, fHadronEnergyProb);
break;
}
- energyParam = constante;
+ // cout << "Weight " << constante << " for energy "<< energy<< " GeV "<< endl;
- // // cout << "Weight " << constante << " for energy "<< energy<< " GeV "<< endl;
-
- return energyParam;
+ return constante;
}
// with the array of parameters passed as the second arg
//
- Double_t y;
- y = params[0];
+ Double_t y = params[0];
y += params[1] * x;
y += params[2] * x * x;
y += params[3] * x * x * x;
// with the array of parameters passed as the second arg
//
- Double_t y;
- y = params[0];
+ Double_t y = params[0];
return y;
}
// with the array of parameters passed as the second arg
//
- Double_t y;
+ Double_t y=0.;
+
if(x>0){
- y = params[0];
- y += params[1] / x;
- y += params[2] / (x * x);
- y += params[3] / (x * x * x);
- y += params[4] / (x * x * x * x);
- y += params[5] / (x * x * x * x * x);
+ y = params[0];
+ y += params[1] / x;
+ y += params[2] / (x * x);
+ y += params[3] / (x * x * x);
+ y += params[4] / (x * x * x * x);
+ y += params[5] / (x * x * x * x * x);
}
- else
- y=0.;
+
return y;
}
// with the array of parameters passed as the second arg
//
- Double_t y;
+ Double_t y=0.;
if(x>0){
y = params[0] / x;
y += params[1] ;
// y += params[4] * 0.;
// y += params[5] * 0.;
}
- else
- y=0.;
+
return y;
// with the array of parameters passed as the second arg
//
- Double_t y;
+ Double_t y=0.;
if(x>0){
y = params[0] / ( x * x);
y += params[1] / x;
y += params[4] * x * x ;
// y += params[5] * 0.;
}
- else
- y=0.;
return y;
// par[0]*TMath::Power(x[0],par[1])
// par[0]*TMath::Exp((x[0]-par[1])*par[2]);
- Double_t y;
-
- y = params[0] *TMath::Power( x,params[1]);
- y += params[2] *TMath::Exp((x-params[3])*params[4]);
+ Double_t y = params[0] *TMath::Power( x,params[1]);
+ y += params[2] *TMath::Exp((x-params[3])*params[4]);
return y;
{
// as a first step, all array elements are initialized to 0.0
- Int_t i, j;
+ Int_t i=0, j=0;
for (i = 0; i < 6; i++) {
for (j = 0; j < 6; j++) {
fGamma[i][j] = fHadron[i][j] = fPiZero[i][j] = 0.;
fGamma1to10[i][j] = fHadron1to10[i][j] = 0.;
}
- fGammaEnergyProb[i] = fGammaEnergyProb[i];
- fPiZeroEnergyProb[i] = fPiZeroEnergyProb[i];
- fHadronEnergyProb[i] = fHadronEnergyProb[i];
+ //Why we had the next 3 lines?
+ //fGammaEnergyProb[i] = fGammaEnergyProb[i];
+ //fPiZeroEnergyProb[i] = fPiZeroEnergyProb[i];
+ //fHadronEnergyProb[i] = fHadronEnergyProb[i];
}
// New parameterization for lambda0^2 (=x): f(x) = normLandau*TMath::Landau(x,mpvLandau,widthLandau)+normgaus*TMath::Gaus(x,meangaus,sigmagaus)
{
// as a first step, all array elements are initialized to 0.0
- Int_t i, j;
+ Int_t i=0, j=0;
for (i = 0; i < 6; i++) {
for (j = 0; j < 6; j++) {
fGamma[i][j] = fHadron[i][j] = fPiZero[i][j] = 0.;