fRunLoader(0x0),
fKeyIterator(0x0),
fReadParticles(kFALSE),
+ fCheckParticlePID(kFALSE),
fNTrackPoints(0),
fdR(0.0),
fClusterMap(kFALSE),
fRunLoader(0x0),
fKeyIterator(0x0),
fReadParticles(kFALSE),
+ fCheckParticlePID(kFALSE),
fNTrackPoints(0),
fdR(0.0),
fClusterMap(kFALSE),
continue;
}
esdtrack->GetESDpid(pidtable);
- //esdtrack->GetVertexPxPyPz(mom[0],mom[1],mom[2]);
esdtrack->GetConstrainedPxPyPz(mom);
- //esdtrack->GetVertexXYZ(pos[0],pos[1],pos[2]);
esdtrack->GetConstrainedXYZ(pos);
pos[0] -= vertexpos[0];//we are interested only in relative position to Primary vertex at this point
pos[1] -= vertexpos[1];
Error("ReadNext","Can not find track with such label.");
continue;
}
+ if(Pass(p->GetPdgCode()))
+ {
+ if ( AliHBTParticle::GetDebug() > 5 )
+ Info("ReadNext","Simulated Particle PID (%d) did not pass the cut.",p->GetPdgCode());
+ continue; //check if we are intersted with particles of this type
+ }
// if(p->GetPdgCode()<0) charge = -1;
particle = new AliHBTParticle(*p,i);
}
-
+
+ if(CheckTrack(esdtrack)) continue;
+
//Here we apply Bayes' formula
Double_t rc=0.;
for (Int_t s=0; s<AliESDtrack::kSPECIES; s++) rc+=concentr[s]*pidtable[s];
return 0;
}
/********************************************************************/
+Bool_t AliHBTReaderESD::CheckTrack(AliESDtrack* t) const
+{
+ //Performs check of the track
+
+ if ( (t->GetConstrainedChi2() < fChi2Min) || (t->GetConstrainedChi2() > fChi2Min) ) return kTRUE;
+
+ if ( (t->GetTPCclusters(0x0) < fNTPCClustMin) || (t->GetTPCclusters(0x0) > fNTPCClustMax) ) return kTRUE;
+
+ Float_t chisqpercl = t->GetTPCchi2()/((Double_t)t->GetTPCclusters(0x0));
+ if ( (chisqpercl < fTPCChi2PerClustMin) || (chisqpercl > fTPCChi2PerClustMin) ) return kTRUE;
+
+ Double_t cc[15];
+ t->GetConstrainedExternalCovariance(cc);
+
+ if ( (cc[0] < fC00Min) || (cc[0] > fC00Max) ) return kTRUE;
+ if ( (cc[2] < fC11Min) || (cc[2] > fC11Max) ) return kTRUE;
+ if ( (cc[5] < fC22Min) || (cc[5] > fC22Max) ) return kTRUE;
+ if ( (cc[9] < fC33Min) || (cc[9] > fC33Max) ) return kTRUE;
+ if ( (cc[14] < fC44Min) || (cc[14] > fC44Max) ) return kTRUE;
+
+
+ t->GetInnerExternalCovariance(cc);
+
+ if ( (cc[0] < fTPCC00Min) || (cc[0] > fTPCC00Max) ) return kTRUE;
+ if ( (cc[2] < fTPCC11Min) || (cc[2] > fTPCC11Max) ) return kTRUE;
+ if ( (cc[5] < fTPCC22Min) || (cc[5] > fTPCC22Max) ) return kTRUE;
+ if ( (cc[9] < fTPCC33Min) || (cc[9] > fTPCC33Max) ) return kTRUE;
+ if ( (cc[14] < fTPCC44Min) || (cc[14] > fTPCC44Max) ) return kTRUE;
+
+ return kFALSE;
+
+}
+/********************************************************************/
+
+void AliHBTReaderESD::SetChi2(Float_t min, Float_t max)
+{
+ //sets range of Chi2 per Cluster
+ fChi2Min = min;
+ fChi2Max = max;
+}
+/********************************************************************/
void AliHBTReaderESD::SetTPCNClustersRange(Int_t min,Int_t max)
{
class TFile;
class AliRunLoader;
class AliESD;
+class AliESDtrack;
class AliHBTReaderESD: public AliHBTReader
{
void ReadParticles(Bool_t flag){fReadParticles = flag;}
Bool_t ReadsTracks() const {return kTRUE;}
Bool_t ReadsParticles() const {return fReadParticles;}
-
+ void SetCheckParticlePID(Bool_t flag){fCheckParticlePID = flag;}
+
void ReadDataTPC(){}
void ReadDataITS(){}
void SetTPCNClustersRange(Int_t min,Int_t max);
void SetTPCChi2PerCluserRange(Float_t min, Float_t max);
+
+ void SetChi2(Float_t min, Float_t max);
void SetC00Range(Float_t min, Float_t max);
void SetC11Range(Float_t min, Float_t max);
void SetC22Range(Float_t min, Float_t max);
static Int_t GetSpeciesPdgCode(ESpecies spec);//skowron
Int_t ReadESD(AliESD* esd);
+
protected:
Int_t ReadNext();
TFile* OpenFile(Int_t evno);//opens files to be read for given event
-
+ Bool_t CheckTrack(AliESDtrack* t) const;
+
TString fESDFileName;//name of the file with tracks
TString fGAlFileName;//name of the file with tracks
TFile* fFile;//! pointer to current ESD file
AliRunLoader* fRunLoader;//!Run Loader
TIter* fKeyIterator;
Bool_t fReadParticles;//flag indicating wether to read particles from kinematics
+ Bool_t fCheckParticlePID;//flag indicating to perform the check on PID of simulated particle
Int_t fNTrackPoints;//number of track points; if==0 track points are not created
Float_t fdR;//spacing between points (along radius) in cm
// Required parameters at vertex
+ Float_t fChi2Min;//Chi^2 min value
+ Float_t fChi2Max;//Chi^2 max value
+
Float_t fC00Min;//C00 (0th diagonal element of covariance matrix) min value
Float_t fC00Max;//C00 (0th diagonal element of covariance matrix) max value