#include <Rtypes.h>
#include "TClonesArray.h"
+#include "TObjArray.h"
#include "TTree.h"
#include "TTreeStream.h"
#include "AliESDEvent.h"
#include "AliESDtrack.h"
+#include "AliESDpid.h"
#include "AliTOFRecoParam.h"
#include "AliTOFReconstructor.h"
#include "AliTOFGeometry.h"
#include "AliTOFtrackerMI.h"
#include "AliTOFtrack.h"
-#include "AliTOFpidESD.h"
+
+#include "AliMathBase.h"
class TGeoManager;
//_____________________________________________________________________________
AliTOFtrackerMI::AliTOFtrackerMI():
- fRecoParam(0x0),
+ fkRecoParam(0x0),
fGeom(0x0),
- fPid(0x0),
fN(0),
fNseeds(0),
fNseedsTOF(0),
fDy(0),
fDz(0),
fTracks(new TClonesArray("AliTOFtrack")),
- fSeeds(new TClonesArray("AliESDtrack")),
+ fSeeds(new TObjArray(100)),
fDebugStreamer(0x0)
{
//AliTOFtrackerMI main Ctor
+ for (Int_t ii=0; ii<kMaxCluster; ii++) fClusters[ii]=0x0;
+
fDy=AliTOFGeometry::XPad();
fDz=AliTOFGeometry::ZPad();
fDebugStreamer = new TTreeSRedirector("TOFdebug.root");
//_____________________________________________________________________________
AliTOFtrackerMI::~AliTOFtrackerMI(){
//
- //
+ // Destructor
//
if (fDebugStreamer) {
//fDebugStreamer->Close();
delete fDebugStreamer;
}
- delete fRecoParam;
+ delete fkRecoParam;
delete fGeom;
- delete fPid;
if (fTracks){
fTracks->Delete();
delete fTracks;
delete fSeeds;
fSeeds=0x0;
}
+
+ for (Int_t ii=0; ii<kMaxCluster; ii++)
+ if (fClusters[ii]) fClusters[ii]->Delete();
+
+}
+//_____________________________________________________________________________
+void AliTOFtrackerMI::GetPidSettings(AliESDpid *esdPID) {
+ //
+ // Sets TOF resolution from RecoParams
+ //
+ if (fkRecoParam)
+ esdPID->GetTOFResponse().SetTimeResolution(fkRecoParam->GetTimeResolution());
+ else
+ AliWarning("fkRecoParam not yet set; cannot set PID settings");
}
//_____________________________________________________________________________
-Int_t AliTOFtrackerMI::PropagateBack(AliESDEvent* event) {
+Int_t AliTOFtrackerMI::PropagateBack(AliESDEvent * const event) {
//
// Gets seeds from ESD event and Match with TOF Clusters
//
// initialize RecoParam for current event
+ AliDebug(1,"Initializing params for TOF");
- AliInfo("Initializing params for TOF... ");
-
- fRecoParam = AliTOFReconstructor::GetRecoParam(); // instantiate reco param from STEER...
+ fkRecoParam = AliTOFReconstructor::GetRecoParam(); // instantiate reco param from STEER...
- if (fRecoParam == 0x0) {
+ if (fkRecoParam == 0x0) {
AliFatal("No Reco Param found for TOF!!!");
}
- //fRecoParam->Dump();
- //if(fRecoParam->GetApplyPbPbCuts())fRecoParam=fRecoParam->GetPbPbparam();
- //fRecoParam->PrintParameters();
-
- Double_t parPID[2];
- parPID[0]=fRecoParam->GetTimeResolution();
- parPID[1]=fRecoParam->GetTimeNSigma();
- fPid=new AliTOFpidESD(parPID);
+ //fkRecoParam->Dump();
+ //if(fkRecoParam->GetApplyPbPbCuts())fkRecoParam=fkRecoParam->GetPbPbparam();
+ //fkRecoParam->PrintParameters();
//Initialise some counters
Int_t ntrk=event->GetNumberOfTracks();
fNseeds = ntrk;
- TClonesArray &aESDTrack = *fSeeds;
-
//Load ESD tracks into a local Array of ESD Seeds
-
- for (Int_t i=0; i<fNseeds; i++) {
- AliESDtrack *t=event->GetTrack(i);
- new(aESDTrack[i]) AliESDtrack(*t);
- }
+ for (Int_t i=0; i<fNseeds; i++)
+ fSeeds->AddLast(event->GetTrack(i));
//Prepare ESD tracks candidates for TOF Matching
CollectESD();
MatchTracksMI(kFALSE); // assign track to clusters
MatchTracksMI(kTRUE); // assign clusters to esd
- Info("PropagateBack","Number of matched tracks: %d",fnmatch);
- Info("PropagateBack","Number of good matched tracks: %d",fngoodmatch);
- Info("PropagateBack","Number of bad matched tracks: %d",fnbadmatch);
+ AliInfo(Form("Number of matched tracks = %d (good = %d, bad = %d)",fnmatch,fngoodmatch,fnbadmatch));
//Update the matched ESD tracks
for (Int_t i=0; i<ntrk; i++) {
AliESDtrack *t=event->GetTrack(i);
- AliESDtrack *seed =(AliESDtrack*)fSeeds->UncheckedAt(i);
- if(seed->GetTOFsignal()>0){
- t->SetTOFsignal(seed->GetTOFsignal());
- t->SetTOFcluster(seed->GetTOFcluster());
- Int_t tlab[3];
- seed->GetTOFLabel(tlab);
- t->SetTOFLabel(tlab);
- AliTOFtrack *track = new AliTOFtrack(*seed);
- Float_t info[10];
- Double_t times[10];
- seed->GetTOFInfo(info);
- seed->GetIntegratedTimes(times);
- t->UpdateTrackParams(track,AliESDtrack::kTOFout);
- t->SetIntegratedLength(seed->GetIntegratedLength());
- t->SetIntegratedTimes(times);
- t->SetTOFsignalToT(seed->GetTOFsignalToT());
- t->SetTOFCalChannel(seed->GetTOFCalChannel());
- //
- t->SetTOFInfo(info);
- delete track;
+ AliESDtrack *seed =(AliESDtrack*)fSeeds->At(i);
+
+ if ( (seed->GetStatus()&AliESDtrack::kTOFin)!=0 ) {
+ t->SetStatus(AliESDtrack::kTOFin);
+ //if(seed->GetTOFsignal()>0){
+ if ( (seed->GetStatus()&AliESDtrack::kTOFout)!=0 ) {
+ t->SetStatus(AliESDtrack::kTOFout);
+ t->SetTOFsignal(seed->GetTOFsignal());
+ t->SetTOFcluster(seed->GetTOFcluster());
+ Int_t tlab[3]; seed->GetTOFLabel(tlab);
+ t->SetTOFLabel(tlab);
+
+ // Check done:
+ // by calling the AliESDtrack::UpdateTrackParams,
+ // the current track parameters are changed
+ // and it could cause refit problems.
+ // We need to update only the following track parameters:
+ // the track length and expected times.
+ // Removed AliESDtrack::UpdateTrackParams call
+ // Called AliESDtrack::SetIntegratedTimes(...) and
+ // AliESDtrack::SetIntegratedLength() routines.
+ /*
+ AliTOFtrack *track = new AliTOFtrack(*seed);
+ t->UpdateTrackParams(track,AliESDtrack::kTOFout);
+ delete track;
+ */
+
+ Double_t times[10]; seed->GetIntegratedTimes(times);
+ t->SetIntegratedTimes(times);
+ t->SetIntegratedLength(seed->GetIntegratedLength());
+ t->SetTOFsignalToT(seed->GetTOFsignalToT());
+ t->SetTOFCalChannel(seed->GetTOFCalChannel());
+ t->SetTOFDeltaBC(seed->GetTOFDeltaBC());
+ t->SetTOFL0L1(seed->GetTOFL0L1());
+ //
+ // Make attention, please:
+ // AliESDtrack::fTOFInfo array does not be stored in the AliESDs.root file
+ // it is there only for a check during the reconstruction step.
+ Float_t info[10];
+ seed->GetTOFInfo(info);
+ t->SetTOFInfo(info);
+ }
}
}
//Make TOF PID
- fPid->MakePID(event);
fSeeds->Clear();
- fTracks->Clear();
+ fTracks->Delete();
return 0;
}
Int_t c1=0;
for (Int_t i=0; i<fNseeds; i++) {
- AliESDtrack *t =(AliESDtrack*)fSeeds->UncheckedAt(i);
+ AliESDtrack *t =(AliESDtrack*)fSeeds->At(i);
if ((t->GetStatus()&AliESDtrack::kTPCout)==0)continue;
- // TRD good tracks, already propagated at 372 cm
-
AliTOFtrack *track = new AliTOFtrack(*t); // New
- Double_t x = track->GetX(); //New
-
- if (((t->GetStatus()&AliESDtrack::kTRDout)!=0 ) &&
- ( x >= AliTOFGeometry::RinTOF()) ){
- track->SetSeedIndex(i);
- t->UpdateTrackParams(track,AliESDtrack::kTOFout);
- new(aTOFTrack[fNseedsTOF]) AliTOFtrack(*track);
- fNseedsTOF++;
- c0++;
- delete track;
+ Float_t x = (Float_t)track->GetX(); //New
+
+ // TRD good tracks, already propagated at 371 cm
+ if ( ( (t->GetStatus()&AliESDtrack::kTRDout)!=0 ) &&
+ ( x >= AliTOFGeometry::Rmin() ) ) {
+ if ( track->PropagateToInnerTOF() ) {
+ track->SetSeedIndex(i);
+ t->UpdateTrackParams(track,AliESDtrack::kTOFin);
+ new(aTOFTrack[fNseedsTOF]) AliTOFtrack(*track);
+ fNseedsTOF++;
+ c0++;
+ delete track;
+ }
}
- // Propagate the rest of TPCbp
-
+ // Propagate the rest of TPCbp
else {
- if(track->PropagateToInnerTOF()){ // temporary solution
+ if ( track->PropagateToInnerTOF() ) { // temporary solution
track->SetSeedIndex(i);
- t->UpdateTrackParams(track,AliESDtrack::kTOFout);
+ t->UpdateTrackParams(track,AliESDtrack::kTOFin);
new(aTOFTrack[fNseedsTOF]) AliTOFtrack(*track);
fNseedsTOF++;
c1++;
}
-
-
-
-
-
-
-//
-//
//_________________________________________________________________________
-void AliTOFtrackerMI::MatchTracks( Bool_t /*mLastStep*/){
+void AliTOFtrackerMI::MatchTracks( Bool_t /*mLastStep*/) const {
return;
}
//
void AliTOFtrackerMI::MatchTracksMI(Bool_t mLastStep){
//Match ESD tracks to clusters in TOF
- const Float_t kTofOffset = 26; // time offset
- const Float_t kMinQuality = -6.; // minimal quality
- const Float_t kMaxQualityD = 1.; // max delta quality if cluster used
- const Float_t kForbiddenR = 0.1; // minimal PID according TPC
+ const Float_t kTofOffset = 0; // time offset
+ const Float_t kMinQuality = -6.; // minimal quality
+ const Float_t kMaxQualityD = 1.; // max delta quality if cluster used
+ const Float_t kForbiddenR = 0.1; // minimal PID according TPC
- static const Double_t kMasses[]={
+ static const Double_t kMasses[AliPID::kSPECIES+1]={
0.000511, 0.105658, 0.139570, 0.493677, 0.938272, 1.875613
};
Int_t nSteps=(Int_t)(fTOFHeigth/0.1);
- //AliTOFcalib *calib = new AliTOFcalib(); // AdC
-
//PH Arrays (moved outside of the loop)
Float_t * trackPos[4];
for (Int_t ii=0; ii<4; ii++) trackPos[ii] = new Float_t[nSteps];
Int_t * clind = new Int_t[fN];
// Some init
-
- Int_t index[1000];
- Float_t quality[1000];
- Float_t dist3D[1000][6];
- Double_t times[1000][6];
- Float_t mintimedist[1000];
- Float_t likelihood[1000];
- Float_t length[1000];
- AliTOFcluster *clusters[1000];
- Double_t tpcpid[5];
+ const Int_t kNclusterMax = 1000; // related to fN value
+ AliTOFcluster *clusters[kNclusterMax];
+ Int_t index[kNclusterMax];
+ Float_t quality[kNclusterMax];
+ Float_t dist3D[kNclusterMax][6];
+ Double_t times[kNclusterMax][6];
+ Float_t mintimedist[kNclusterMax];
+ Float_t likelihood[kNclusterMax];
+ Float_t length[kNclusterMax];
+ Double_t tpcpid[AliPID::kSPECIES+1]; // overrun_static - coverity warning
dist3D[0][0]=1;
for (Int_t i=0; i<fNseedsTOF; i++) {
AliTOFtrack *track =(AliTOFtrack*)fTracks->UncheckedAt(i);
- AliESDtrack *t =(AliESDtrack*)fSeeds->UncheckedAt(track->GetSeedIndex());
+ AliESDtrack *t =(AliESDtrack*)fSeeds->At(track->GetSeedIndex());
Bool_t hasTime = ( (t->GetStatus()& AliESDtrack::kTIME)>0) ? kTRUE:kFALSE; // did we integrate time
Float_t trdquality = t->GetTRDQuality();
//
//
t->GetTPCpid(tpcpid);
Double_t sumpid=0;
- for (Int_t ipid=0;ipid<5;ipid++){
+ for (Int_t ipid=0;ipid<AliPID::kSPECIES;ipid++){
sumpid+=tpcpid[ipid];
}
- for (Int_t ipid=0;ipid<5;ipid++){
+ for (Int_t ipid=0;ipid<AliPID::kSPECIES;ipid++){
if (sumpid>0) tpcpid[ipid]/=sumpid;
else{
tpcpid[ipid]=0.2;
trackTOFin->GetExternalParameters(x,par);
Double_t cov[15];
trackTOFin->GetExternalCovariance(cov);
+
+ if (cov[0]<0. || cov[2]<0.) {
+ AliWarning(Form("Very strange track (%d)! At least one of its covariance matrix diagonal elements is negative!",i));
+ //delete trackTOFin;
+ //continue;
+ }
+
Float_t scalefact=3.;
Double_t dphi=
scalefact*
- ((5*TMath::Sqrt(cov[0]) + 3.*fDy +10.*TMath::Abs(par[2]))/fR);
+ ((5*TMath::Sqrt(TMath::Abs(cov[0])) + 3.*fDy + 10.*TMath::Abs(par[2]))/fR);
Double_t dz=
scalefact*
- (5*TMath::Sqrt(cov[2]) + 3.*fDz +10.*TMath::Abs(par[3]));
+ (5*TMath::Sqrt(TMath::Abs(cov[2])) + 3.*fDz + 10.*TMath::Abs(par[3]));
Double_t phi=TMath::ATan2(par[0],x) + trackTOFin->GetAlpha();
if (phi<-TMath::Pi())phi+=2*TMath::Pi();
// find the clusters in the window of the track
for (Int_t k=FindClusterIndex(z-dz); k<fN; k++) {
+
+ if (nc>=kNclusterMax) {
+ AliWarning("No more matchable clusters can be stored! Please, increase the corresponding vectors size.");
+ break;
+ }
+
AliTOFcluster *c=fClusters[k];
if (c->GetZ() > z+dz) break;
// if (c->IsUsed()) continue;
nc++;
}
+ AliDebug(1,Form(" Number of matchable TOF clusters for the track number %d: %d",i,nc));
+
//
// select close clusters
//
// Bool_t dump = kTRUE;
for (Int_t icl=0; icl<nc; icl++){
Float_t distances[5];
- if (nfound>=1000) break;
+
index[nfound]=clind[icl];
AliTOFcluster *cluster = fClusters[clind[icl]];
- GetLinearDistances(trackTOFin,cluster, distances);
+ GetLinearDistances(trackTOFin, cluster, distances);
dist3D[nfound][0] = distances[4];
dist3D[nfound][1] = distances[1];
dist3D[nfound][2] = distances[2];
//
clusters[nfound] = cluster;
//
- //length and TOF updates
+ //length and TOF updates
trackTOFin->GetIntegratedTimes(times[nfound]);
length[nfound] = trackTOFin->GetIntegratedLength();
length[nfound]+=distances[4];
Double_t tof2=AliTOFGeometry::TdcBinWidth()*cluster->GetTDC()+kTofOffset; // in ps
// Float_t tgamma = TMath::Sqrt(cluster->GetR()*cluster->GetR()+cluster->GetZ()*cluster->GetZ())/0.03; //time for "primary" gamma
//if (trackTOFin->GetPt()<0.7 && TMath::Abs(tgamma-tof2)<350) continue; // gamma conversion candidate - TEMPORARY
- for(Int_t j=0;j<=5;j++){
+ for(Int_t j=0;j<AliPID::kSPECIES+1;j++){
+
Double_t mass=kMasses[j];
times[nfound][j]+=distances[4]/3e-2*TMath::Sqrt(mom*mom+mass*mass)/mom; // add time distance
if ( TMath::Abs(times[nfound][j]-tof2)<mintimedist[nfound] && tpcpid[j]>kForbiddenR){
}
//
nfound++;
- }
+ }
+
+ AliDebug(1,Form(" Number of track points for the track number %d: %d",i,nfound));
+
if (nfound == 0 ) {
fnunmatch++;
delete trackTOFin;
//
//choose the best cluster
//
- //Float_t quality[1000];
- //Int_t index[1000];
- for (Int_t kk=0; kk<1000; kk++) quality[kk]=0;
+ //Float_t quality[kNclusterMax];
+ //Int_t index[kNclusterMax];
+ for (Int_t kk=0; kk<kNclusterMax; kk++) quality[kk]=0;
//
AliTOFcluster * cgold=0;
Int_t igold =-1;
// Double_t tof2=25.*cgold->GetTDC()-350; // in ps
Double_t tof2=AliTOFGeometry::TdcBinWidth()*cgold->GetTDC()+kTofOffset; // in ps
Float_t tgamma = TMath::Sqrt(cgold->GetR()*cgold->GetR()+cgold->GetZ()*cgold->GetZ())/0.03;
- Float_t info[11]={dist3D[igold][0],dist3D[igold][1],dist3D[igold][2],dist3D[igold][3],dist3D[igold][4],mintimedist[igold],
- -1,tgamma, qualityGold,cgold->GetQuality(),0};
+ Float_t info[10]={dist3D[igold][0],
+ dist3D[igold][1],
+ dist3D[igold][2],
+ dist3D[igold][3],
+ dist3D[igold][4],
+ mintimedist[igold],
+ -1,
+ tgamma,
+ qualityGold,
+ cgold->GetQuality()};
// GetLinearDistances(trackTOFin,cgold,&info[6]);
if (inonfake>=0){
info[6] = inonfake;
t->SetTOFInfo(info);
t->SetTOFsignal(tof2);
t->SetTOFcluster(cgold->GetIndex());
+ t->SetTOFDeltaBC(cgold->GetDeltaBC());
+ t->SetTOFL0L1(cgold->GetL0L1Latency());
AliDebug(2, Form("%7i %7i %10i %10i %10i %10i %7i",
i,
for (Int_t i=0; i<nc; i++) {
AliTOFcluster *c=(AliTOFcluster*)clusters->UncheckedAt(i);
- fClusters[i]=new AliTOFcluster(*c); fN++;
+//PH fClusters[i]=new AliTOFcluster(*c); fN++;
+ fClusters[i]=c; fN++;
//AliInfo(Form("%4i %4i %f %f %f %f %f %2i %1i %2i %1i %2i",i, fClusters[i]->GetIndex(),fClusters[i]->GetZ(),fClusters[i]->GetR(),fClusters[i]->GetPhi(), fClusters[i]->GetTDC(),fClusters[i]->GetADC(),fClusters[i]->GetDetInd(0),fClusters[i]->GetDetInd(1),fClusters[i]->GetDetInd(2),fClusters[i]->GetDetInd(3),fClusters[i]->GetDetInd(4)));
//AliInfo(Form("%i %f",i, fClusters[i]->GetZ()));
//This function unloads TOF clusters
//--------------------------------------------------------------------
for (Int_t i=0; i<fN; i++) {
- delete fClusters[i];
+//PH delete fClusters[i];
fClusters[i] = 0x0;
}
fN=0;
return m;
}
-
-
+//_________________________________________________________________________
Float_t AliTOFtrackerMI::GetLinearDistances(AliTOFtrack * track, AliTOFcluster *cluster, Float_t distances[5])
{
//
// calclates distance between cluster and track
// use linear aproximation
//
- const Float_t kRaddeg = 180/3.14159265358979312;
+ //const Float_t kRaddeg = 180/3.14159265358979312;
+ const Float_t kRaddeg = TMath::RadToDeg();
//
// Float_t tiltangle = fGeom->GetAngles(cluster->fdetIndex[1],cluster->fdetIndex[2])/kRaddeg; //tiltangle
Int_t cind[5];
Float_t phi = TMath::ATan2(cpos[1],cpos[0]);
if(phi<0) phi=2.*TMath::Pi()+phi;
// Get the local angle in the sector philoc
- Float_t phiangle = (Int_t (phi*kRaddeg/20.) + 0.5)*20./kRaddeg;
+ Float_t phiangle = (Int_t (phi*kRaddeg/20.) + 0.5)*20./kRaddeg;
//
Double_t v0[3];
Double_t dir[3];
temp = cpos[0]*cosphi+cpos[1]*sinphi;
cpos[1] = -cpos[0]*sinphi+cpos[1]*cosphi;
cpos[0] = temp;
- temp = v0[0]*cosphi+v0[1]*sinphi;
+ temp = v0[0]*cosphi+v0[1]*sinphi;
v0[1] = -v0[0]*sinphi+v0[1]*cosphi;
v0[0] = temp;
//
temp = cpos[0]*costh+cpos[2]*sinth;
cpos[2] = -cpos[0]*sinth+cpos[2]*costh;
cpos[0] = temp;
- temp = v0[0]*costh+v0[2]*sinth;
- v0[2] = -v0[0]*sinth+v0[2]*costh;
- v0[0] = temp;
+ temp = v0[0]*costh+v0[2]*sinth;
+ v0[2] = -v0[0]*sinth+v0[2]*costh;
+ v0[0] = temp;
//
//
//rotate direction vector
//
- temp = dir[0]*cosphi+dir[1]*sinphi;
+ temp = dir[0]*cosphi+dir[1]*sinphi;
dir[1] = -dir[0]*sinphi+dir[1]*cosphi;
dir[0] = temp;
//
- temp = dir[0]*costh+dir[2]*sinth;
- dir[2] = -dir[0]*sinth+dir[2]*costh;
- dir[0] = temp;
+ temp = dir[0]*costh+dir[2]*sinth;
+ dir[2] = -dir[0]*sinth+dir[2]*costh;
+ dir[0] = temp;
//
Float_t v3[3];
Float_t k = (cpos[0]-v0[0])/dir[0];
//
// Debuging part of the matching
//
- if (track->GetLabel()==cluster->GetLabel(0) ||track->GetLabel()==cluster->GetLabel(1) ){
+ if (track->GetLabel()==cluster->GetLabel(0) ||
+ track->GetLabel()==cluster->GetLabel(1) ||
+ track->GetLabel()==cluster->GetLabel(2) ){
TTreeSRedirector& cstream = *fDebugStreamer;
Float_t tdc = cluster->GetTDC();
cstream<<"Tracks"<<
return distances[3];
}
-
-
-void AliTOFtrackerMI::GetLikelihood(Float_t dy, Float_t dz, const Double_t *cov, AliTOFtrack * /*track*/, Float_t & py, Float_t &pz)
+//_________________________________________________________________________
+void AliTOFtrackerMI::GetLikelihood(Float_t dy, Float_t dz, const Double_t *cov, AliTOFtrack * /*track*/, Float_t & py, Float_t &pz) const
{
//
// get likelihood - track covariance taken
Float_t normwidth, normd, p0,p1;
- Float_t sigmay = TMath::Max(TMath::Sqrt(cov[0]+kMeanSigmaY*kMeanSigmaY),kMaxSigmaY);
- Float_t sigmaz = TMath::Max(TMath::Sqrt(cov[2]+kMeanSigmaZ*kMeanSigmaZ),kMaxSigmaZ);
+ Float_t sigmay = TMath::Max(TMath::Sqrt(TMath::Abs(cov[0])+kMeanSigmaY*kMeanSigmaY),kMaxSigmaY);
+ Float_t sigmaz = TMath::Max(TMath::Sqrt(TMath::Abs(cov[2])+kMeanSigmaZ*kMeanSigmaZ),kMaxSigmaZ);
py=0;
pz=0;
//
normwidth = fDy/sigmay;
normd = dy/sigmay;
- p0 = 0.5*(1+TMath::Erf(normd-normwidth*0.5));
- p1 = 0.5*(1+TMath::Erf(normd+normwidth*0.5));
+ p0 = 0.5*(1+AliMathBase::ErfFast(normd-normwidth*0.5));
+ p1 = 0.5*(1+AliMathBase::ErfFast(normd+normwidth*0.5));
py+= 0.75*(p1-p0);
//
normwidth = fDy/(3.*sigmay);
normd = dy/(3.*sigmay);
- p0 = 0.5*(1+TMath::Erf(normd-normwidth*0.5));
- p1 = 0.5*(1+TMath::Erf(normd+normwidth*0.5));
+ p0 = 0.5*(1+AliMathBase::ErfFast(normd-normwidth*0.5));
+ p1 = 0.5*(1+AliMathBase::ErfFast(normd+normwidth*0.5));
py+= 0.25*(p1-p0);
//
// pz calculation - 75% admixture of original sigma - 25% tails
//
normwidth = fDz/sigmaz;
normd = dz/sigmaz;
- p0 = 0.5*(1+TMath::Erf(normd-normwidth*0.5));
- p1 = 0.5*(1+TMath::Erf(normd+normwidth*0.5));
+ p0 = 0.5*(1+AliMathBase::ErfFast(normd-normwidth*0.5));
+ p1 = 0.5*(1+AliMathBase::ErfFast(normd+normwidth*0.5));
pz+= 0.75*(p1-p0);
//
normwidth = fDz/(3.*sigmaz);
normd = dz/(3.*sigmaz);
- p0 = 0.5*(1+TMath::Erf(normd-normwidth*0.5));
- p1 = 0.5*(1+TMath::Erf(normd+normwidth*0.5));
+ p0 = 0.5*(1+AliMathBase::ErfFast(normd-normwidth*0.5));
+ p1 = 0.5*(1+AliMathBase::ErfFast(normd+normwidth*0.5));
pz+= 0.25*(p1-p0);
}
//_________________________________________________________________________