//-----------------------------------------------------------------
// Implementation of the TOF PID class
-// Very naive one... Should be made better by the detector experts...
// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
//-----------------------------------------------------------------
-#include "TFile.h"
-#include "TTree.h"
-#include "TClonesArray.h"
#include "TError.h"
-
#include "AliTOFpidESD.h"
-#include "AliESD.h"
#include "AliESDtrack.h"
-#include "AliTOFdigit.h"
-#include "AliTOFGeometry.h"
-#include <Riostream.h>
-
-#include <stdlib.h>
-
+#include "AliESD.h"
ClassImp(AliTOFpidESD)
0.000511, 0.105658, 0.139570, 0.493677, 0.938272, 1.875613
};
- Int_t nPID=0;
Int_t ntrk=event->GetNumberOfTracks();
AliESDtrack **tracks=new AliESDtrack*[ntrk];
Double_t time[10]; t->GetIntegratedTimes(time);
Double_t p[10];
Double_t mom=t->GetP();
- nPID++;
for (Int_t j=0; j<AliESDtrack::kSPECIES; j++) {
Double_t mass=kMasses[j];
Double_t dpp=0.01; //mean relative pt resolution;
* about the suitability of this software for any purpose. It is *
* provided "as is" without express or implied warranty. *
**************************************************************************/
-
+////////////////////////////////////////////////////////////////////////
+//
+// AliTOFtrack class
+//
+// Authors: Bologna-CERN-ITEP-Salerno Group
+//
+// Description: class for handling ESD extracted tracks for TOF matching.
/* $Id$ */
#include <Riostream.h>
#include <TObject.h>
-#include "AliTOFGeometry.h"
#include "AliTOFtrack.h"
#include "AliESDtrack.h"
//_____________________________________________________________________________
void AliTOFtrack::GetCovariance(Double_t cc[15]) const {
+ //
+ // Returns the covariance matrix.
+ //
cc[0]=fCyy;
cc[1]=fCzy; cc[2]=fCzz;
Double_t ymax=AliTOFGeometry::RinTOF()*TMath::Tan(0.5*AliTOFGeometry::GetAlpha());
Bool_t skip = kFALSE;
- Double_t y=this->GetYat(AliTOFGeometry::RinTOF(),skip);
+ Double_t y=GetYat(AliTOFGeometry::RinTOF(),skip);
if(skip){
return 0;
}
if (y > ymax) {
- if (!this->Rotate(AliTOFGeometry::GetAlpha())) {
+ if (!Rotate(AliTOFGeometry::GetAlpha())) {
return 0;
}
} else if (y <-ymax) {
- if (!this->Rotate(-AliTOFGeometry::GetAlpha())) {
+ if (!Rotate(-AliTOFGeometry::GetAlpha())) {
return 0;
}
}
- Double_t x = this->GetX();
+ Double_t x = GetX();
Int_t nsteps=Int_t((370.-x)/0.5); // 0.5 cm Steps
for (Int_t istep=0;istep<nsteps;istep++){
Float_t xp = x+istep*0.5;
Double_t param[2];
- this->GetPropagationParameters(holes,param);
- this->PropagateTo(xp,param[0],param[1]);
+ GetPropagationParameters(holes,param);
+ PropagateTo(xp,param[0],param[1]);
}
- if(!this->PropagateTo(AliTOFGeometry::RinTOF()))return 0;
+ if(!PropagateTo(AliTOFGeometry::RinTOF()))return 0;
return 1;
return 1;
}
-
-
+//_________________________________________________________________________
+Double_t AliTOFtrack::GetYat(Double_t xk, Bool_t skip) const {
+//-----------------------------------------------------------------
+// This function calculates the Y-coordinate of a track at the plane x=xk.
+// Needed for matching with the TOF (I.Belikov)
+//-----------------------------------------------------------------
+ skip=kFALSE;
+ Double_t c1=fC*fX - fE, r1=TMath::Sqrt(TMath::Abs(1.- c1*c1));
+ Double_t c2=fC*xk - fE, r2=TMath::Sqrt(TMath::Abs(1.- c2*c2));
+ if( ((1.- c2*c2)<0) || ((1.- c1*c1)<0) ) skip=kTRUE;
+ return fY + (xk-fX)*(c1+c2)/(r1+r2);
+}
//_________________________________________________________________________
void AliTOFtrack::GetPxPyPz(Double_t& px, Double_t& py, Double_t& pz) const
{
//_____________________________________________________________________________
void AliTOFtrack::GetPropagationParameters(Bool_t holes, Double_t *param) {
+ //Get average medium density, x0 while propagating the track
+
+ //For TRD holes description
Double_t thetamin = (90.-31.1) * TMath::Pi()/180.;
Double_t thetamax = (90.+31.1) * TMath::Pi()/180.;
Double_t zmin = -55.;
Double_t zmax = 55.;
+ // Detector inner/outer radii
Double_t rTPC = 261.53;
Double_t rTPCTRD = 294.5;
Double_t rTRD = 369.1;
+ // Medium parameters
Double_t x0TPC = 40.;
Double_t rhoTPC =0.06124;
Double_t x0TRD = 171.7;
Double_t rhoTRD =0.33;
- Int_t isec = this->GetSector();
+ Int_t isec = GetSector();
Double_t xtr,ytr,ztr;
- this->GetGlobalXYZ(xtr,ytr,ztr);
+ GetGlobalXYZ(xtr,ytr,ztr);
Float_t thetatr = TMath::ATan2(TMath::Sqrt(xtr*xtr+ytr*ytr),ztr);
if(holes){
}
}
- if(this->GetX() <= rTPC)
+ if(GetX() <= rTPC)
{param[0]=x0TPC;param[1]=rhoTPC;}
- else if(this->GetX() > rTPC && this->GetX() < rTPCTRD)
+ else if(GetX() > rTPC && GetX() < rTPCTRD)
{param[0]=x0Air;param[1]=rhoAir;}
- else if(this->GetX() >= rTPCTRD && this->GetX() < rTRD)
+ else if(GetX() >= rTPCTRD && GetX() < rTRD)
{param[0]=x0TRD;param[1]=rhoTRD;}
- else if(this->GetX() >= rTRD )
+ else if(GetX() >= rTRD )
{param[0]=x0Air;param[1]=rhoAir;}
-
}
#ifndef ALITOFTRACK_H
#define ALITOFTRACK_H
-
+// Description: class for handling ESD extracted tracks for TOF matching.
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
class AliESDtrack;
class AliTOFtrack : public AliKalmanTrack {
-// Represents reconstructed TOF track
-
public:
AliTOFtrack():AliKalmanTrack(){}
return Int_t(TVector2::Phi_0_2pi(fAlpha)/AliTOFGeometry::GetAlpha())%AliTOFGeometry::NSectors();}
Double_t GetC() const {return fC;}
- void GetCovariance(Double_t cov[15]) const;
+ void GetCovariance(Double_t cov[15]) const; // track covariance
Double_t GetEta() const {return fE;}
- void GetExternalCovariance(Double_t cov[15]) const ;
- void GetExternalParameters(Double_t& xr, Double_t x[5]) const ;
+ void GetExternalCovariance(Double_t cov[15]) const ;// track covariance
+ void GetExternalParameters(Double_t& xr, Double_t x[5]) const ;//track parameters
Double_t GetSigmaY2() const {return fCyy;}
Double_t GetSigmaZ2() const {return fCzz;}
- Double_t Get1Pt() const {return (1e-9*TMath::Abs(fC)/fC + fC)*GetConvConst();}
+ Double_t Get1Pt() const {return (1e-9*TMath::Abs(fC)/fC + fC)*GetConvConst();}
Double_t GetP() const {
return TMath::Abs(GetPt())*sqrt(1.+GetTgl()*GetTgl());
}
Int_t Compare(const TObject *o) const;
- Double_t GetYat(Double_t xk, Bool_t skip) const {
-//-----------------------------------------------------------------
-// This function calculates the Y-coordinate of a track at the plane x=xk.
-// Needed for matching with the TOF (I.Belikov)
-//-----------------------------------------------------------------
- skip=kFALSE;
- Double_t c1=fC*fX - fE, r1=TMath::Sqrt(TMath::Abs(1.- c1*c1));
- Double_t c2=fC*xk - fE, r2=TMath::Sqrt(TMath::Abs(1.- c2*c2));
- if( ((1.- c2*c2)<0) || ((1.- c1*c1)<0) ) skip=kTRUE;
- return fY + (xk-fX)*(c1+c2)/(r1+r2);
- }
-
-
+ Double_t GetYat(Double_t xk, Bool_t skip) const;
Int_t PropagateTo(Double_t xr, Double_t x0=8.72, Double_t rho=5.86e-3);
Int_t PropagateToInnerTOF(Bool_t holes);
void ResetCovariance();
};
-#endif
+#endif