X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PHOS%2FAliPHOSPIDv1.h;h=3e7ff285e1fbc0d68f5d230170a2172ba19b27eb;hb=d3b046c5c8af22f7e709ce6a32058e6726bb083c;hp=eb2c5d1a7211d9f85392abafd80122c44cfd44e1;hpb=17323043f584137499bf2a6e2f2e2da17448b152;p=u%2Fmrichter%2FAliRoot.git diff --git a/PHOS/AliPHOSPIDv1.h b/PHOS/AliPHOSPIDv1.h index eb2c5d1a721..3e7ff285e1f 100644 --- a/PHOS/AliPHOSPIDv1.h +++ b/PHOS/AliPHOSPIDv1.h @@ -5,6 +5,25 @@ /* $Id$ */ +/* History of cvs commits: + * + * $Log$ + * Revision 1.60 2007/04/01 15:40:15 kharlov + * Correction for actual vertex position implemented + * + * Revision 1.59 2007/03/06 06:57:46 kharlov + * DP:calculation of distance to CPV done in TSM + * + * Revision 1.58 2006/04/12 11:32:03 alibrary + * Simplification of Makefile and some small corrections + * + * Revision 1.57 2006/01/23 17:51:48 hristov + * Using the recommended way of forward declarations for TVector and TMatrix (see v5-08-00 release notes). Additional clean-up + * + * Revision 1.56 2005/05/28 14:19:04 schutz + * Compilation warnings fixed by T.P. + * + */ //_________________________________________________________________________ // Implementation version v1 of the PHOS particle identifier @@ -12,36 +31,38 @@ // Oh yeah //*-- Author: Yves Schutz (SUBATECH), Gustavo Conesa. +// --- Standard library --- + // --- ROOT system --- -class TVector3 ; -class TMatrix ; -class TPrincipal ; -class TROOT ; -class TTree ; class TCanvas ; class TFolder ; -class TMatrixD ; class TFormula; -// --- Standard library --- +class TPrincipal ; +class TROOT ; +class TTree ; +#include "TVector3.h" +#include + // --- AliRoot header files --- -class AliPHOSEmcRecPoint ; -class AliPHOSCpvRecPoint ; class AliPHOSClusterizerv1 ; +class AliPHOSCpvRecPoint ; +class AliPHOSEmcRecPoint ; +class AliPHOSTrackSegment ; class AliPHOSTrackSegmentMakerv1 ; - #include "AliPHOSPID.h" -#include "AliESDtrack.h" +#include "AliPID.h" + class AliPHOSPIDv1 : public AliPHOSPID { public: AliPHOSPIDv1() ; // ctor - AliPHOSPIDv1(const TString alirunFileNameFile, const TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ; + AliPHOSPIDv1(AliPHOSGeometry *geom); AliPHOSPIDv1(const AliPHOSPIDv1 & pid) ; // cpy ctor virtual ~AliPHOSPIDv1() ; // dtor - virtual void Exec(Option_t *option); // Does the job + virtual void TrackSegments2RecParticles(Option_t *option); // Does the job //Get file name that contain the PCA const TString GetFileNamePrincipal(TString particle) const; @@ -49,10 +70,6 @@ public: //Get file name that contain PID parameters const TString GetFileNameParameters() const {return fFileNameParameters ;} - // Get number of rec.particles in this run - virtual Int_t GetRecParticlesInRun() const {return fRecParticlesInRun ;} - - // Get PID parameters as they are defined in fParameters Float_t GetParameterCalibration (Int_t i) const; Float_t GetParameterCpv2Emc (Int_t i, TString axis) const; @@ -62,10 +79,14 @@ public: Float_t GetParameterPi0Boundary (Int_t i) const; // Get energy-dependent PID parameters - Float_t GetCalibratedEnergy (Float_t e) const; Float_t GetCpv2EmcDistanceCut (TString axis, Float_t e) const ; Float_t GetEllipseParameter (TString particle, TString param, Float_t e) const; + Double_t GetThresholdChargedNeutral () const {return fChargedNeutralThreshold;} + Float_t GetTOFEnergyThreshold () const {return fTOFEnThreshold;} + Float_t GetDispersionEnergyThreshold () const {return fDispEnThreshold;} + Int_t GetDispersionMultiplicityThreshold () const {return fDispMultThreshold;} + //Do bayesian PID void SetBayesianPID(Bool_t set){ fBayesian = set ;} @@ -77,9 +98,16 @@ public: void SetParameterPhotonBoundary(Int_t i, Float_t param); void SetParameterPi0Boundary (Int_t i, Float_t param); + void SetThresholdChargedNeutral (Double_t th) {fChargedNeutralThreshold = th;} + void SetTOFEnergyThreshold (Float_t th) {fTOFEnThreshold = th;} + void SetDispersionEnergyThreshold (Float_t th) {fDispEnThreshold = th;} + void SetDispersionMultiplicityThreshold (Int_t th) {fDispMultThreshold = th;} + //Switch to "on flyght" mode, without writing to TreeR and file - void SetWriting(const Bool_t toWrite = kFALSE){fWrite = toWrite;} - void Print() const ; + void SetWriting(Bool_t toWrite = kFALSE){fWrite = toWrite;} + void Print(const Option_t * = "") const ; + + void GetVertex(void) ; //Extracts vertex in current event virtual const char * Version() const { return "pid-v1" ; } @@ -87,8 +115,6 @@ public: private: - const TString BranchName() const ; - virtual void Init() ; virtual void InitParameters() ; void MakeRecParticles(void ) ; void MakePID(void) ; @@ -100,16 +126,13 @@ private: 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 - Float_t GetDistance (AliPHOSEmcRecPoint * emc, AliPHOSCpvRecPoint * cpv, Option_t * axis)const ; - Int_t GetCPVBit (AliPHOSEmcRecPoint * emc, AliPHOSCpvRecPoint * cpv, Int_t EffPur, Float_t e) const; + 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) ; - virtual void WriteRecParticles() ; void SetParameters() ; //Fills the matrix of parameters - void Unload(); //PID population void SetInitPID(const Double_t * pid) ; @@ -119,7 +142,6 @@ 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 - Int_t fNEvent ; //! current event number TString fFileNamePrincipalPhoton ; // File name of the photon principals TString fFileNamePrincipalPi0 ; // File name of the pi0 principals TString fFileNameParameters ; // File name with PID parameters @@ -128,55 +150,48 @@ private: Double_t *fX ; //! Shower shape for the principal data Double_t *fPPhoton ; //! Principal photon eigenvalues Double_t *fPPi0 ; //! Principal pi0 eigenvalues - Int_t fRecParticlesInRun ; //! Total number of recparticles in one run - TMatrix *fParameters; //! Matrix of identification Parameters + TMatrixF *fParameters; //! Matrix of identification Parameters + + TVector3 fVtx ; //! Vertex position in current event //Initial pid population - Double_t fInitPID[AliESDtrack::kSPECIESN] ; // Initial population to do bayesian PID + Double_t fInitPID[AliPID::kSPECIESCN] ; // 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 fTelectron[3] ; // gaussian tof response for electrons */ -/* TFormula * fTFelectron ; // the formula */ -/* Double_t fTmuon[3] ; // gaussian tof response for muon */ -/* TFormula * fTFmuon ; // the formula */ - Double_t fTpiong[3] ; // gaussian tof response for pions - TFormula * fTFpiong ; // the formula -/* Double_t fTpionl[3] ; // gaussian tof response for pions */ -/* TFormula * fTFpionl ; // 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 - /* Double_t fTpion[9] ; // gaussian tof response for pions */ -/* Double_t fTkaon[9] ; // landau tof response for kaons */ -/* Double_t fThhadron[9] ; // landau tof response for nucleons */ + 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[9] ; // gaussian ss response for EM - Double_t fDpi0[9] ; // gaussian ss response for pi0 - Double_t fDhadron[9] ; // gaussian ss response for hadrons - - // gaussian ss response for muons - //CPV-EMCAL distance -/* Double_t fCPVelectron[9] ; // gaussian emc-cpv distance response for electron */ -/* Double_t fCPVcharged[9] ; // landau emc-cpv distance response for charged part (no elect) */ - Double_t fXelectron[9] ; // gaussian emc-cpv distance response for electron - Double_t fXcharged[9] ; // landau emc-cpv distance response for charged part (no elect) */ - Double_t fZelectron[9] ; // gaussian emc-cpv distance response for electron - Double_t fZcharged[9] ; // landau emc-cpv distance response for charged part (no elect) */ - -/* Double_t fCPVchargedg[9] ; // gaussian emc-cpv distance response for charged part (no elect) */ -/* Double_t fCPVchargedl[9] ; // landau emc-cpv distance response for charged part (no elect) */ - - ClassDef( AliPHOSPIDv1,11) // Particle identifier implementation version 1 + 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 };