- private:
-
- const TString AliPHOSPIDv1::BranchName() const ;
- virtual void Init() ;
- void MakeRecParticles(void ) ;
- Float_t GetDistance(AliPHOSEmcRecPoint * emc, AliPHOSRecPoint * cpv, Option_t * Axis)const ; // Relative Distance CPV-EMC
- Int_t GetPrincipalSign(Double_t* P, Int_t ell, Int_t eff_pur)const ; //Principal cut
- TVector3 GetMomentumDirection(AliPHOSEmcRecPoint * emc, AliPHOSRecPoint * cpv)const ;
- void PrintRecParticles(Option_t * option) ;
- void SetParameters() ;
- virtual void WriteRecParticles(Int_t event) ;
-
- private:
-
- TString fFileName ; // Name of the file which contains the Principal file
- TString fFileNamePar ; // Name of the file which contains the parameters
- TString fFrom ; // name of Recpoints and TrackSegments
- TString fHeaderFileName ; // file name with event header
- TString fTrackSegmentsTitle; // branch name with track segments
- TString fRecPointsTitle ; // branch name with rec points
- TString fRecParticlesTitle ; // branch name with rec particles
-
- Int_t fNEvent ; //! current event number
- AliPHOSClusterizer * fClusterizer ; //! clusterizer
- AliPHOSTrackSegmentMaker * fTSMaker ; //! track segment maker
- TPrincipal * fPrincipal ; //! TPrincipal from fFileName
- Int_t fRecParticlesInRun ; //! Total number of recparticles in one run
- Double_t * fX ; //! Principal data
- Double_t * fP ; //! Principal eigenvalues
- TMatrixD * fParameters ; //! Matrix of all identification Parameters
-
- ClassDef( AliPHOSPIDv1,2) // Particle identifier implementation version 1
+ virtual void InitParameters() ;
+ void MakeRecParticles(void ) ;
+ void MakePID(void) ;
+
+ //Functions to calculate the PID probability
+ // Double_t ChargedHadronDistProb(Double_t x, Double_t y, Double_t * parg, Double_t * parl) ;
+ Double_t GausF (Double_t x, Double_t y, Double_t *par) ; //gaussian probability, parameter dependence a+b/(x*x)+c/x
+ Double_t GausPol2(Double_t x, Double_t y, Double_t *par) ; //gaussian probability, parameter dependence a+b*x+c*x*x
+ Double_t LandauF(Double_t x, Double_t y, Double_t *par) ; //gaussian probability, parameter dependence a+b/(x*x)+c/x
+ Double_t LandauPol2(Double_t x, Double_t y, Double_t *par) ; //gaussian probability, parameter dependence a+b*x+c*x*x
+ // Relative Distance CPV-EMC
+ Int_t GetCPVBit (AliPHOSTrackSegment * ts, Int_t EffPur, Float_t e) const;
+ Int_t GetPrincipalBit (TString particle, const Double_t* P, Int_t EffPur, Float_t e)const ; //Principal cut
+ Int_t GetHardPhotonBit(AliPHOSEmcRecPoint * emc) const;
+ Int_t GetHardPi0Bit (AliPHOSEmcRecPoint * emc) const;
+ TVector3 GetMomentumDirection(AliPHOSEmcRecPoint * emc, AliPHOSCpvRecPoint * cpv)const ;
+ void PrintRecParticles(Option_t * option) ;
+ void SetParameters() ; //Fills the matrix of parameters
+
+ //PID population
+ void SetInitPID(const Double_t * pid) ;
+ void GetInitPID(Double_t * pid) const ;
+
+private:
+ Bool_t fBayesian ; // Do PID bayesian
+ Bool_t fDefaultInit; //! kTRUE if the task was created by defaut ctor (only parameters are initialized)
+ Bool_t fWrite ; //! To write result to file
+ TString fFileNamePrincipalPhoton ; // File name of the photon principals
+ TString fFileNamePrincipalPi0 ; // File name of the pi0 principals
+ TString fFileNameParameters ; // File name with PID parameters
+ TPrincipal *fPrincipalPhoton ; //! TPrincipal from photon pca file
+ TPrincipal *fPrincipalPi0 ; //! TPrincipal from pi0 pca file
+ Double_t *fX ; //! Shower shape for the principal data
+ Double_t *fPPhoton ; //! Principal photon eigenvalues
+ Double_t *fPPi0 ; //! Principal pi0 eigenvalues
+ TMatrixF *fParameters; //! Matrix of identification Parameters
+
+ TVector3 fVtx ; //! Vertex position in current event
+
+ //Initial pid population
+ Double_t fInitPID[AliPID::kSPECIESN] ; // Initial population to do bayesian PID
+ // pid probability function parameters
+ // ToF
+ Double_t fTphoton[3] ; // gaussian tof response for photon
+ TFormula * fTFphoton ; // the formula
+ Double_t fTpiong[3] ; // gaussian tof response for pions
+ TFormula * fTFpiong ; // the formula
+ Double_t fTkaong[3] ; // landau tof response for kaons
+ TFormula * fTFkaong ; // the formula
+ Double_t fTkaonl[3] ; // landau tof response for kaons
+ TFormula * fTFkaonl ; // the formula
+ Double_t fThhadrong[3] ; // gaus tof response for heavy hadrons
+ TFormula * fTFhhadrong ; // the formula
+ Double_t fThhadronl[3] ; // landau tof response for heavy hadrons
+ TFormula * fTFhhadronl ; // the formula
+
+ //Shower dispersion
+ Double_t fDmuon[3] ; // gaussian ss response for muon
+ TFormula * fDFmuon ; // the formula
+ Double_t fDphoton[10] ; // gaussian ss response for EM
+ Double_t fDpi0[10] ; // gaussian ss response for pi0
+ Double_t fDhadron[10] ; // gaussian ss response for hadrons
+
+ Double_t fXelectron[10] ; // gaussian emc-cpv distance response for electron
+ Double_t fXcharged[10] ; // landau emc-cpv distance response for charged part (no elect) */
+ Double_t fZelectron[10] ; // gaussian emc-cpv distance response for electron
+ Double_t fZcharged[10] ; // landau emc-cpv distance response for charged part (no elect) */
+
+
+ Double_t fERecWeightPar[4] ; // gaussian tof response for photon
+ TFormula * fERecWeight ; // the formula
+ Double_t fChargedNeutralThreshold ; //Threshold to differentiate between charged and neutral
+ Float_t fTOFEnThreshold; //Maximum energy to use TOF
+ Float_t fDispEnThreshold; //Minimum energy to use shower shape
+ Int_t fDispMultThreshold ; //Minimum multiplicity to use shower shape
+
+ ClassDef( AliPHOSPIDv1,13) // Particle identifier implementation version 1