ROOT logo
AliRoot » PHOS » AliPHOSPIDv1

class AliPHOSPIDv1: public AliPHOSPID

 Implementation version v1 of the PHOS particle identifier
 Particle identification based on the
     - RCPV: distance from CPV recpoint to EMCA recpoint.
     - TOF
     - PCA: Principal Components Analysis..
 The identified particle has an identification number corresponding
 to a 9 bits number:
     -Bit 0 to 2: bit set if RCPV > CpvEmcDistance (each bit corresponds
      to a different efficiency-purity point of the photon identification)
     -Bit 3 to 5: bit set if TOF  < TimeGate (each bit corresponds
      to a different efficiency-purity point of the photon identification)
     -Bit 6 to 9: bit set if Principal Components are
      inside an ellipse defined by the parameters a, b, c, x0 and y0.
      (each bit corresponds to a different efficiency-purity point of the
      photon identification)
      The PCA (Principal components analysis) needs a file that contains
      a previous analysis of the correlations between the particles. This
      file is $ALICE_ROOT/PHOS/PCA8pa15_0.5-100.root. Analysis done for
      energies between 0.5 and 100 GeV.
      A calibrated energy is calculated. The energy of the reconstructed
      cluster is corrected with the formula A + B * E  + C * E^2, whose
      parameters where obtained through the study of the reconstructed
      energy distribution of monoenergetic photons.

      All the parameters (RCPV(2 rows-3 columns),TOF(1r-3c),PCA(5r-4c)
      and calibration(1r-3c))are stored in a file called
      $ALICE_ROOT/PHOS/Parameters.dat. Each time that AliPHOSPIDv1 is
      initialized, this parameters are copied to a Matrix (9,4), a
      TMatrixD object.

 use case:
  root [0] AliPHOSPIDv1 * p = new AliPHOSPIDv1("galice1.root")
  Warning in <TDatabasePDG::TDatabasePDG>: object already instantiated
          // reading headers from file galice1.root and create  RecParticles
 TrackSegments and RecPoints are used
          // set file name for the branch RecParticles
  root [1] p->ExecuteTask("deb all time")
          // available options
          // "deb" - prints # of reconstructed particles
          // "deb all" -  prints # and list of RecParticles
          // "time" - prints benchmarking results

  root [2] AliPHOSPIDv1 * p2 = new AliPHOSPIDv1("galice1.root","v1",kTRUE)
  Warning in <TDatabasePDG::TDatabasePDG>: object already instantiated
                //Split mode.
  root [3] p2->ExecuteTask()

Function Members (Methods)

public:
AliPHOSPIDv1()
AliPHOSPIDv1(AliPHOSGeometry* geom)
AliPHOSPIDv1(const AliPHOSPIDv1& pid)
virtual~AliPHOSPIDv1()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
Float_tGetCpv2EmcDistanceCut(TString axis, Float_t e) const
Float_tGetDispersionEnergyThreshold() const
Int_tGetDispersionMultiplicityThreshold() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Float_tGetEllipseParameter(TString particle, TString param, Float_t e) const
const TStringGetFileNameParameters() const
const TStringGetFileNamePrincipal(TString particle) const
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
Float_tGetParameterCalibration(Int_t i) const
Float_tGetParameterCpv2Emc(Int_t i, TString axis) const
Float_tGetParameterPhotonBoundary(Int_t i) const
Float_tGetParameterPi0Boundary(Int_t i) const
Float_tGetParameterTimeGate(Int_t i) const
Float_tGetParameterToCalculateEllipse(TString particle, TString param, Int_t i) const
TClonesArray*AliPHOSPID::GetRecParticles() const
Double_tGetThresholdChargedNeutral() const
virtual const char*TObject::GetTitle() const
Float_tGetTOFEnergyThreshold() const
virtual UInt_tTObject::GetUniqueID() const
voidGetVertex()
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
AliPHOSPIDv1&operator=(const AliPHOSPIDv1&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPrint(Option_t* = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidSetBayesianPID(Bool_t set)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidSetDispersionEnergyThreshold(Float_t th)
voidSetDispersionMultiplicityThreshold(Int_t th)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidAliPHOSPID::SetESD(AliESDEvent* esd)
voidAliPHOSPID::SetInput(TTree* clustersTree, TClonesArray* trackSegments)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetParameterCalibration(Int_t i, Float_t param)
voidSetParameterCpv2Emc(Int_t i, TString axis, Float_t cut)
voidSetParameterPhotonBoundary(Int_t i, Float_t param)
voidSetParameterPi0Boundary(Int_t i, Float_t param)
voidSetParameterTimeGate(Int_t i, Float_t gate)
voidSetParameterToCalculateEllipse(TString particle, TString param, Int_t i, Float_t value)
voidSetThresholdChargedNeutral(Double_t th)
voidSetTOFEnergyThreshold(Float_t th)
virtual voidTObject::SetUniqueID(UInt_t uid)
voidSetWriting(Bool_t toWrite = kFALSE)
virtual voidShowMembers(TMemberInspector&)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTrackSegments2RecParticles(Option_t* option)
virtual voidTObject::UseCurrentStyle()
virtual const char*Version() const
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()

Data Members

protected:
TObjArray*AliPHOSPID::fCPVRecPoints!Array with CPV clusters
TObjArray*AliPHOSPID::fEMCRecPoints!Array with EMC clusters
AliESDEvent*AliPHOSPID::fESD! ESD object
AliPHOSGeometry*AliPHOSPID::fGeom! Pointer to PHOS Geometry
TClonesArray*AliPHOSPID::fRecParticles!Array with reconstructed particles (PID)
TClonesArray*AliPHOSPID::fTrackSegments!Array with found track segments
private:
Bool_tfBayesianDo PID bayesian
Double_tfChargedNeutralThresholdThreshold to differentiate between charged and neutral
TFormula*fDFmuonthe formula
Bool_tfDefaultInit! kTRUE if the task was created by defaut ctor (only parameters are initialized)
Double_tfDhadron[10]gaussian ss response for hadrons
Float_tfDispEnThresholdMinimum energy to use shower shape
Int_tfDispMultThresholdMinimum multiplicity to use shower shape
Double_tfDmuon[3]gaussian ss response for muon
Double_tfDphoton[10]gaussian ss response for EM
Double_tfDpi0[10]gaussian ss response for pi0
TFormula*fERecWeightthe formula
Double_tfERecWeightPar[4]gaussian tof response for photon
TStringfFileNameParametersFile name with PID parameters
TStringfFileNamePrincipalPhotonFile name of the photon principals
TStringfFileNamePrincipalPi0File name of the pi0 principals
Double_tfInitPID[14]Initial population to do bayesian PID
Double_t*fPPhoton! Principal photon eigenvalues
Double_t*fPPi0! Principal pi0 eigenvalues
TMatrixF*fParameters! Matrix of identification Parameters
TPrincipal*fPrincipalPhoton! TPrincipal from photon pca file
TPrincipal*fPrincipalPi0! TPrincipal from pi0 pca file
TFormula*fTFhhadrongthe formula
TFormula*fTFhhadronlthe formula
TFormula*fTFkaongthe formula
TFormula*fTFkaonlthe formula
TFormula*fTFphotonthe formula
TFormula*fTFpiongthe formula
Float_tfTOFEnThresholdMaximum energy to use TOF
Double_tfThhadrong[3]gaus tof response for heavy hadrons
Double_tfThhadronl[3]landau tof response for heavy hadrons
Double_tfTkaong[3]landau tof response for kaons
Double_tfTkaonl[3]landau tof response for kaons
Double_tfTphoton[3]gaussian tof response for photon
Double_tfTpiong[3]gaussian tof response for pions
TVector3fVtx! Vertex position in current event
Bool_tfWrite! To write result to file
Double_t*fX! Shower shape for the principal data
Double_tfXcharged[10]landau emc-cpv distance response for charged part (no elect) */
Double_tfXelectron[10]gaussian emc-cpv distance response for electron
Double_tfZcharged[10]landau emc-cpv distance response for charged part (no elect) */
Double_tfZelectron[10]gaussian emc-cpv distance response for electron

Class Charts

Inheritance Chart:
TObject
AliPHOSPID
AliPHOSPIDv1

Function documentation

AliPHOSPIDv1()
 default ctor
AliPHOSPIDv1(const AliPHOSPIDv1& pid)
 ctor
AliPHOSPIDv1(AliPHOSGeometry* geom)
ctor with the indication on where to look for the track segments
~AliPHOSPIDv1()
 dtor
void InitParameters()
 Initialize PID parameters
void TrackSegments2RecParticles(Option_t* option)
 Steering method to perform particle reconstruction and identification
 for the event range from fFirstEvent to fLastEvent.
Double_t GausF(Double_t x, Double_t y, Double_t* par)
Given the energy x and the parameter y (tof, shower dispersion or cpv-emc distance),
this method returns a density probability of this parameter, given by a gaussian
function whose parameters depend with the energy  with a function: a/(x*x)+b/x+b
Float_t xorg = x;
Double_t GausPol2(Double_t x, Double_t y, Double_t* par)
Given the energy x and the parameter y (tof, shower dispersion or cpv-emc distance),
this method returns a density probability of this parameter, given by a gaussian
function whose parameters depend with the energy like second order polinomial
const TString GetFileNamePrincipal(TString particle) const
Get file name that contains the PCA for a particle ("photon or pi0")
Float_t GetParameterCalibration(Int_t i) const
 Get the i-th parameter "Calibration"
Float_t GetParameterCpv2Emc(Int_t i, TString axis) const
 Get the i-th parameter "CPV-EMC distance" for the specified axis
Float_t GetCpv2EmcDistanceCut(TString axis, Float_t e) const
 Get CpvtoEmcDistance Cut depending on the cluster energy, axis and
 Purity-Efficiency point
Float_t GetEllipseParameter(TString particle, TString param, Float_t e) const
 Calculates the parameter param of the ellipse
Float_t GetParameterPhotonBoundary(Int_t i) const
 Get the parameter "i" to calculate the boundary on the moment M2x
 for photons at high p_T
Float_t GetParameterPi0Boundary(Int_t i) const
 Get the parameter "i" to calculate the boundary on the moment M2x
 for pi0 at high p_T
Float_t GetParameterTimeGate(Int_t i) const
 Get TimeGate parameter depending on Purity-Efficiency i:
 i=0 - Low purity, i=1 - Medium purity, i=2 - High purity
Float_t GetParameterToCalculateEllipse(TString particle, TString param, Int_t i) const
 Get the parameter "i" that is needed to calculate the ellipse
 parameter "param" for the particle "particle" ("photon" or "pi0")
Int_t GetCPVBit(AliPHOSTrackSegment* ts, Int_t EffPur, Float_t e) const
Calculates the pid bit for the CPV selection per each purity.
Int_t GetPrincipalBit(TString particle, const Double_t* P, Int_t EffPur, Float_t e) const
Is the particle inside de PCA ellipse?
Int_t GetHardPhotonBit(AliPHOSEmcRecPoint* emc) const
 Set bit for identified hard photons (E > 30 GeV)
 if the second moment M2x is below the boundary
Int_t GetHardPi0Bit(AliPHOSEmcRecPoint* emc) const
 Set bit for identified hard pi0  (E > 30 GeV)
 if the second moment M2x is above the boundary
TVector3 GetMomentumDirection(AliPHOSEmcRecPoint* emc, AliPHOSCpvRecPoint* cpv) const
 Calculates the momentum direction:
   1. if only a EMC RecPoint, direction is given by IP and this RecPoint
   2. if a EMC RecPoint and CPV RecPoint, direction is given by the line through the 2 recpoints
  However because of the poor position resolution of PPSD the direction is always taken as if we were
  in case 1.
Double_t LandauF(Double_t x, Double_t y, Double_t* par)
Given the energy x and the parameter y (tof, shower dispersion or cpv-emc distance),
this method returns a density probability of this parameter, given by a landau
function whose parameters depend with the energy  with a function: a/(x*x)+b/x+b
Double_t LandauPol2(Double_t x, Double_t y, Double_t* par)
void MakePID()
 construct the PID weight from a Bayesian Method
void MakeRecParticles()
 Makes a RecParticle out of a TrackSegment
void Print(Option_t* = "") const
 Print the parameters used for the particle type identification
void PrintRecParticles(Option_t* option)
 Print table of reconstructed particles
void SetParameters()
 PCA : To do the Principal Components Analysis it is necessary
 the Principal file, which is opened here
void SetParameterCalibration(Int_t i, Float_t param)
 Set parameter "Calibration" i to a value param
void SetParameterCpv2Emc(Int_t i, TString axis, Float_t cut)
 Set the parameters to calculate Cpv-to-Emc Distance Cut depending on
 Purity-Efficiency point i
void SetParameterPhotonBoundary(Int_t i, Float_t param)
 Set parameter "Hard photon boundary" i to a value param
void SetParameterPi0Boundary(Int_t i, Float_t param)
 Set parameter "Hard pi0 boundary" i to a value param
void SetParameterTimeGate(Int_t i, Float_t gate)
 Set the parameter TimeGate depending on Purity-Efficiency point i
void SetParameterToCalculateEllipse(TString particle, TString param, Int_t i, Float_t value)
 Set the parameter "i" that is needed to calculate the ellipse
 parameter "param" for a particle "particle"
void GetVertex(void)
void SetInitPID(const Double_t* pid)
 Sets values for the initial population of each particle type
void GetInitPID(Double_t* pid) const
 Gets values for the initial population of each particle type
const TString GetFileNameParameters() const
Get file name that contain PID parameters
Double_t GetThresholdChargedNeutral() const
Float_t GetTOFEnergyThreshold() const
{return fTOFEnThreshold;}
Float_t GetDispersionEnergyThreshold() const
Int_t GetDispersionMultiplicityThreshold() const
void SetBayesianPID(Bool_t set)
Do bayesian PID
{ fBayesian = set ;}
void SetThresholdChargedNeutral(Double_t th)
void SetTOFEnergyThreshold(Float_t th)
void SetDispersionEnergyThreshold(Float_t th)
void SetDispersionMultiplicityThreshold(Int_t th)
void SetWriting(Bool_t toWrite = kFALSE)
Switch to "on flyght" mode, without writing to TreeR and file
{fWrite = toWrite;}
const char * Version() const
{ return "pid-v1" ; }