// --- ROOT system ---
#include <TMath.h>
#include <TString.h>
-#include <TFormula.h>
+//#include <TFormula.h>
//---- ANALYSIS system ----
#include "AliCaloPID.h"
fEMCALNeutralWeight(0.),
fPHOSPhotonWeight(0.), fPHOSPi0Weight(0.),
fPHOSElectronWeight(0.), fPHOSChargeWeight(0.) ,
-fPHOSNeutralWeight(0.), fPHOSWeightFormula(0),
-fPHOSPhotonWeightFormula(0x0), fPHOSPi0WeightFormula(0x0),
+fPHOSNeutralWeight(0.), //fPHOSWeightFormula(0),
+//fPHOSPhotonWeightFormula(0x0), fPHOSPi0WeightFormula(0x0),
fDispCut(0.),fTOFCut(0.), fDebug(-1),
fRecalculateBayesian(kFALSE), fParticleFlux(kLow), fEMCALPIDUtils(new AliEMCALPIDUtils)
{
fEMCALNeutralWeight(0.),
fPHOSPhotonWeight(0.), fPHOSPi0Weight(0.),
fPHOSElectronWeight(0.), fPHOSChargeWeight(0.) ,
-fPHOSNeutralWeight(0.), fPHOSWeightFormula(0),
-fPHOSPhotonWeightFormula(0x0), fPHOSPi0WeightFormula(0x0),
+fPHOSNeutralWeight(0.), //fPHOSWeightFormula(0),
+//fPHOSPhotonWeightFormula(0x0), fPHOSPi0WeightFormula(0x0),
fDispCut(0.),fTOFCut(0.), fDebug(-1),
fRecalculateBayesian(kTRUE), fParticleFlux(flux), fEMCALPIDUtils(new AliEMCALPIDUtils)
{
fEMCALNeutralWeight(0.),
fPHOSPhotonWeight(0.), fPHOSPi0Weight(0.),
fPHOSElectronWeight(0.), fPHOSChargeWeight(0.) ,
-fPHOSNeutralWeight(0.), fPHOSWeightFormula(0),
-fPHOSPhotonWeightFormula(0x0), fPHOSPi0WeightFormula(0x0),
+fPHOSNeutralWeight(0.), //fPHOSWeightFormula(0),
+//fPHOSPhotonWeightFormula(0x0), fPHOSPi0WeightFormula(0x0),
fDispCut(0.),fTOFCut(0.), fDebug(-1),
fRecalculateBayesian(kTRUE), fParticleFlux(-1), fEMCALPIDUtils( (AliEMCALPIDUtils*) emcalpid)
{
fPHOSElectronWeight(pid.fPHOSElectronWeight),
fPHOSChargeWeight(pid.fPHOSChargeWeight),
fPHOSNeutralWeight(pid.fPHOSNeutralWeight),
-fPHOSWeightFormula(pid.fPHOSWeightFormula),
-fPHOSPhotonWeightFormula(new TFormula(*pid.fPHOSPhotonWeightFormula)),
-fPHOSPi0WeightFormula (new TFormula(*pid.fPHOSPi0WeightFormula)),
+//fPHOSWeightFormula(pid.fPHOSWeightFormula),
+//fPHOSPhotonWeightFormula(new TFormula(*pid.fPHOSPhotonWeightFormula)),
+//fPHOSPi0WeightFormula (new TFormula(*pid.fPHOSPi0WeightFormula)),
fDispCut(pid.fDispCut),fTOFCut(pid.fTOFCut),
fDebug(pid.fDebug), fRecalculateBayesian(pid.fRecalculateBayesian),
fParticleFlux(pid.fParticleFlux),
AliCaloPID::~AliCaloPID() {
//Dtor
- if(fPHOSPhotonWeightFormula) delete fPHOSPhotonWeightFormula ;
- if(fPHOSPi0WeightFormula) delete fPHOSPi0WeightFormula ;
+// if(fPHOSPhotonWeightFormula) delete fPHOSPhotonWeightFormula ;
+// if(fPHOSPi0WeightFormula) delete fPHOSPi0WeightFormula ;
if(fEMCALPIDUtils) delete fEMCALPIDUtils ;
}
fPHOSNeutralWeight = 0.5 ;
//Formula to set the PID weight threshold for photon or pi0
- fPHOSWeightFormula = kTRUE;
- if(fPHOSPhotonWeightFormula) delete fPHOSPhotonWeightFormula;
- if(fPHOSPi0WeightFormula) delete fPHOSPi0WeightFormula;
- fPHOSPhotonWeightFormula =
- new TFormula("photonWeight","0.98*(x<40)+ 0.68*(x>=100)+(x>=40 && x<100)*(0.98+x*(6e-3)-x*x*(2e-04)+x*x*x*(1.1e-06))");
- fPHOSPi0WeightFormula =
- new TFormula("pi0Weight","0.98*(x<65)+ 0.915*(x>=100)+(x>=65 && x-x*(1.95e-3)-x*x*(4.31e-05)+x*x*x*(3.61e-07))");
+ //fPHOSWeightFormula = kTRUE;
+ //if(fPHOSPhotonWeightFormula) delete fPHOSPhotonWeightFormula;
+ //if(fPHOSPi0WeightFormula) delete fPHOSPi0WeightFormula;
+ //fPHOSPhotonWeightFormula =
+ //new TFormula("photonWeight","0.98*(x<40)+ 0.68*(x>=100)+(x>=40 && x<100)*(0.98+x*(6e-3)-x*x*(2e-04)+x*x*x*(1.1e-06))");
+ //fPHOSPi0WeightFormula =
+ //new TFormula("pi0Weight","0.98*(x<65)+ 0.915*(x>=100)+(x>=65 && x-x*(1.95e-3)-x*x*(4.31e-05)+x*x*x*(3.61e-07))");
fDispCut = 1.5;
fTOFCut = 5.e-9;
Float_t wNe = fPHOSNeutralWeight ;
- if(calo == "PHOS" && fPHOSWeightFormula){
- wPh = fPHOSPhotonWeightFormula->Eval(energy) ;
- wPi0 = fPHOSPi0WeightFormula->Eval(energy);
- }
+// if(calo == "PHOS" && fPHOSWeightFormula){
+// wPh = fPHOSPhotonWeightFormula->Eval(energy) ;
+// wPi0 = fPHOSPi0WeightFormula->Eval(energy);
+// }
if(calo == "EMCAL"){
sprintf(onePar,"fPHOSNeutralWeight =%2.2f (PHOS bayesian weight for neutral hadrons)\n",fPHOSNeutralWeight) ;
parList+=onePar ;
- if(fPHOSWeightFormula){
- sprintf(onePar,"PHOS Photon Weight Formula: %s\n",(fPHOSPhotonWeightFormula->GetExpFormula("p")).Data()) ;
- parList+=onePar;
- sprintf(onePar,"PHOS Pi0 Weight Formula: %s\n",(fPHOSPi0WeightFormula->GetExpFormula("p")).Data()) ;
- parList+=onePar;
- }
+// if(fPHOSWeightFormula){
+// sprintf(onePar,"PHOS Photon Weight Formula: %s\n",(fPHOSPhotonWeightFormula->GetExpFormula("p")).Data()) ;
+// parList+=onePar;
+// sprintf(onePar,"PHOS Pi0 Weight Formula: %s\n",(fPHOSPi0WeightFormula->GetExpFormula("p")).Data()) ;
+// parList+=onePar;
+// }
return parList;
fEMCALPhotonWeight, fEMCALPi0Weight,
fEMCALElectronWeight, fEMCALChargeWeight, fEMCALNeutralWeight) ;
- printf("PHOS Parametrized weight on? = %d\n", fPHOSWeightFormula) ;
- if(fPHOSWeightFormula){
- printf("Photon weight formula = %s\n", (fPHOSPhotonWeightFormula->GetExpFormula("p")).Data());
- printf("Pi0 weight formula = %s\n", (fPHOSPhotonWeightFormula->GetExpFormula("p")).Data());
- }
+// printf("PHOS Parametrized weight on? = %d\n", fPHOSWeightFormula) ;
+// if(fPHOSWeightFormula){
+// printf("Photon weight formula = %s\n", (fPHOSPhotonWeightFormula->GetExpFormula("p")).Data());
+// printf("Pi0 weight formula = %s\n", (fPHOSPhotonWeightFormula->GetExpFormula("p")).Data());
+// }
printf("TOF cut = %e\n",fTOFCut);
printf("Dispersion cut = %2.2f\n",fDispCut);
#include <TObject.h>
class TString ;
class TLorentzVector ;
-class TFormula ;
+//class TFormula ;
class TTask;
//--- AliRoot system ---
Float_t GetPHOSChargeWeight() const { return fPHOSChargeWeight ; }
Float_t GetPHOSNeutralWeight() const { return fPHOSNeutralWeight ; }
- Bool_t IsPHOSPIDWeightFormulaOn() const { return fPHOSWeightFormula ; }
- TFormula * GetPHOSPhotonWeightFormula() const { return fPHOSPhotonWeightFormula ; }
- TFormula * GetPHOSPi0WeightFormula() const { return fPHOSPi0WeightFormula ; }
-
+// Bool_t IsPHOSPIDWeightFormulaOn() const { return fPHOSWeightFormula ; }
+// TFormula * GetPHOSPhotonWeightFormula() const { return fPHOSPhotonWeightFormula ; }
+// TFormula * GetPHOSPi0WeightFormula() const { return fPHOSPi0WeightFormula ; }
+//
//Weight setters
void SetEMCALPhotonWeight(Float_t w){ fEMCALPhotonWeight = w ; }
void SetEMCALPi0Weight(Float_t w){ fEMCALPi0Weight = w ; }
void SetPHOSChargeWeight(Float_t w){ fPHOSChargeWeight = w ; }
void SetPHOSNeutralWeight(Float_t w){ fPHOSNeutralWeight = w ; }
- void UsePHOSPIDWeightFormula(Bool_t par) { fPHOSWeightFormula = par; }
- void SetPHOSPhotonWeightFormula(TFormula * const photon) { fPHOSPhotonWeightFormula = photon; }
- void SetPHOSPi0WeightFormula(TFormula * const pi0) { fPHOSPi0WeightFormula = pi0; }
+// void UsePHOSPIDWeightFormula(Bool_t par) { fPHOSWeightFormula = par; }
+// void SetPHOSPhotonWeightFormula(TFormula * const photon) { fPHOSPhotonWeightFormula = photon; }
+// void SetPHOSPi0WeightFormula(TFormula * const pi0) { fPHOSPi0WeightFormula = pi0; }
//PID bits setters and getters
void SetDispersionCut(Float_t dcut ) {fDispCut = dcut; }
Float_t fPHOSChargeWeight; //Bayesian PID weight for charged hadrons in PHOS
Float_t fPHOSNeutralWeight; //Bayesian PID weight for neutral hadrons in PHOS
- Bool_t fPHOSWeightFormula ; //Use parametrized weight threshold, function of energy
- TFormula * fPHOSPhotonWeightFormula ; //Formula for photon weight
- TFormula * fPHOSPi0WeightFormula ; //Formula for pi0 weight
+// Bool_t fPHOSWeightFormula ; //Use parametrized weight threshold, function of energy
+// TFormula * fPHOSPhotonWeightFormula ; //Formula for photon weight
+// TFormula * fPHOSPi0WeightFormula ; //Formula for pi0 weight
Float_t fDispCut; //Cut on dispersion, used in PID evaluation
Float_t fTOFCut; //Cut on TOF, used in PID evaluation