#include <limits.h>
#include <float.h>
#include "TParticle.h"
+#include "TObjArray.h"
#include "AliStack.h"
#include "AliMCEvent.h"
#include "AliESDEvent.h"
fIgnoreTPCzRange(kFALSE),
fIgnoreTPCzRangeMax(FLT_MAX),
fIgnoreTPCzRangeMin(-FLT_MAX),
+ fCutChi2PerClusterTPC(kFALSE),
+ fMaxChi2PerClusterTPC(FLT_MAX),
+ fMinChi2PerClusterTPC(-FLT_MAX),
fParamType(kGlobal),
fParamMix(kPure),
fTrack(NULL),
fIgnoreTPCzRange(that.fIgnoreTPCzRange),
fIgnoreTPCzRangeMax(that.fIgnoreTPCzRangeMax),
fIgnoreTPCzRangeMin(that.fIgnoreTPCzRangeMin),
+ fCutChi2PerClusterTPC(that.fCutChi2PerClusterTPC),
+ fMaxChi2PerClusterTPC(that.fMaxChi2PerClusterTPC),
+ fMinChi2PerClusterTPC(that.fMinChi2PerClusterTPC),
fParamType(that.fParamType),
fParamMix(that.fParamMix),
fTrack(NULL),
fIgnoreTPCzRange=that.fIgnoreTPCzRange;
fIgnoreTPCzRangeMax=that.fIgnoreTPCzRangeMax;
fIgnoreTPCzRangeMin=that.fIgnoreTPCzRangeMin;
+ fCutChi2PerClusterTPC=that.fCutChi2PerClusterTPC;
+ fMaxChi2PerClusterTPC=that.fMaxChi2PerClusterTPC;
+ fMinChi2PerClusterTPC=that.fMinChi2PerClusterTPC;
fParamType=that.fParamType;
fParamMix=that.fParamMix;
////////////////////////////////////////////////////////////////
if (!fTrack) return kFALSE;
+
Bool_t pass=kTRUE;
//check the common cuts for the current particle fTrack (MC,AOD,ESD)
if (fCutPt) {if (fTrack->Pt() < fPtMin || fTrack->Pt() >= fPtMax ) pass=kFALSE;}
}
}
if (!fAliESDtrackCuts->IsSelected(static_cast<AliESDtrack*>(fTrack))) pass=kFALSE;
+ if (fCutChi2PerClusterTPC)
+ {
+ Float_t tpcchi2 = (fParamType==kESD_TPConly)?
+ esdTrack->GetTPCchi2Iter1():esdTrack->GetTPCchi2();
+ Int_t ntpccls = esdTrack->GetTPCNcls();
+ tpcchi2 = (ntpccls>0)?tpcchi2/ntpccls:-FLT_MAX;
+ if (tpcchi2<fMinChi2PerClusterTPC || tpcchi2 >=fMaxChi2PerClusterTPC)
+ pass=kFALSE;
+ }
}
return pass; //true by default, if we didn't set any cuts