#ifndef ALIFLOWTRACKCUTS_H
#define ALIFLOWTRACKCUTS_H
+#include <TMatrix.h>
#include "AliFlowTrackSimpleCuts.h"
#include "AliESDtrackCuts.h"
#include "TMCProcess.h"
+#include "AliESDtrack.h"
+#include "AliPID.h"
-class TDirectory;
+class TObjArray;
class AliVParticle;
class AliMCParticle;
class AliFlowTrack;
class AliMCEvent;
class AliVEvent;
class AliMultiplicity;
+class AliESDpid;
class AliFlowTrackCuts : public AliFlowTrackSimpleCuts {
static AliFlowTrackCuts* GetStandardITSTPCTrackCuts2009(Bool_t selPrimaries=kTRUE);
enum trackParameterType { kMC, kGlobal, kESD_TPConly, kESD_SPDtracklet };
- enum trackParameterMix { kPure, kTrackWithMCkine, kTrackWithMCPID, kTrackWithMCpt };
+ enum trackParameterMix { kPure, kTrackWithMCkine, kTrackWithMCPID, kTrackWithMCpt, kTrackWithPtFromFirstMother };
+ enum PIDsource {kTPCpid, kTOFpid, kTPCTOFpid};
//setters (interface to AliESDtrackCuts)
void SetMinNClustersTPC( Int_t a ) {fAliESDtrackCuts->SetMinNClustersTPC(a);}
void SetClusterRequirementITS( AliESDtrackCuts::Detector det,
AliESDtrackCuts::ITSClusterRequirement req = AliESDtrackCuts::kOff )
{ fAliESDtrackCuts->SetClusterRequirementITS(det,req); }
- void SetMaxChi2PerClusterTPC( Float_t a ) {fAliESDtrackCuts->SetMaxChi2PerClusterTPC(a);}
+ void SetMaxChi2PerClusterTPC( Float_t a ) {fMaxChi2PerClusterTPC=a;fCutChi2PerClusterTPC=kTRUE;}
+ void SetMinChi2PerClusterTPC( Float_t a ) {fMinChi2PerClusterTPC=a;fCutChi2PerClusterTPC=kTRUE;}
void SetMaxChi2PerClusterITS( Float_t a ) {fAliESDtrackCuts->SetMaxChi2PerClusterITS(a);}
void SetRequireTPCRefit( Bool_t a ) {fAliESDtrackCuts->SetRequireTPCRefit(a);}
void SetRequireTPCStandAlone( Bool_t a) {fAliESDtrackCuts->SetRequireTPCStandAlone(a);}
void SetFakesAreOK( Bool_t b ) {fFakesAreOK=b;}
void SetSPDtrackletDeltaPhiMax( Double_t m ) {fSPDtrackletDeltaPhiMax=m; fCutSPDtrackletDeltaPhi=kTRUE;}
void SetSPDtrackletDeltaPhiMin( Double_t m ) {fSPDtrackletDeltaPhiMin=m; fCutSPDtrackletDeltaPhi=kTRUE;}
+ void SetIgnoreSignInPID( Bool_t b ) {fIgnoreSignInPID=b;}
+ void SetIgnoreTPCzRange( Double_t min, Double_t max )
+ { fIgnoreTPCzRange=kTRUE; fIgnoreTPCzRangeMin=min; fIgnoreTPCzRangeMax=max; }
Int_t GetMinNClustersTPC() const {return fAliESDtrackCuts->GetMinNClusterTPC();}
Int_t GetMinNClustersITS() const {return fAliESDtrackCuts->GetMinNClustersITS();}
Double_t GetSPDtrackletDeltaPhiMin() const {return fSPDtrackletDeltaPhiMin;}
void SetQA(const char* dirname);
- TDirectory* GetQA() const {return fQA;}
+ TObjArray* GetQA() const {return fQA;}
//MC stuff
- void SetMCprocessType( TMCProcess t ) { fMCprocessType = t; fCutMCprocessType=kTRUE; }
+ void SetCutMC( Bool_t b=kTRUE ) {fCutMC=b;}
+ void SetMCprocessType( TMCProcess t ) { fMCprocessType = t; fCutMCprocessType=kTRUE; fCutMC=kTRUE;}
+ void SetMCisPrimary( Bool_t b ) { fMCisPrimary=b; fCutMCisPrimary=kTRUE; fCutMC=kTRUE;}
+ void SetMCPID( Int_t pid ) { fMCPID=pid; fCutMCPID=kTRUE; fCutMC=kTRUE; }
TMCProcess GetMCprocessType() const { return fMCprocessType; }
- void SetMCisPrimary( Bool_t b ) { fMCisPrimary=b; fCutMCisPrimary=kTRUE; }
Bool_t GetMCisPrimary() const {return fMCisPrimary;}
+ Int_t GetMCPID() const {return fMCPID;}
void SetParamType(trackParameterType paramType) {fParamType=paramType;}
trackParameterType GetParamType() const {return fParamType;}
trackParameterMix GetParamMix() const {return fParamMix;}
virtual Bool_t IsSelected(TObject* obj, Int_t id=-666);
+ virtual Bool_t IsSelectedMCtruth(TObject* obj, Int_t id=-666);
AliVParticle* GetTrack() const {return fTrack;}
AliMCParticle* GetMCparticle() const {return fMCparticle;}
AliFlowTrack* MakeFlowTrack() const;
void SetMCevent(AliMCEvent* mcEvent) {fMCevent=mcEvent;}
AliMCEvent* GetMCevent() const {return fMCevent;}
- void SetEvent(AliVEvent* event) {fEvent=event;}
+ void SetEvent(AliVEvent* event) {Clear();fEvent=event;}
AliVEvent* GetEvent() const {return fEvent;}
Int_t GetNumberOfInputObjects() const;
TObject* GetInputObject(Int_t i);
+ void Clear(Option_t* option="");
+
+ //PID
+ void SetPID(AliPID::EParticleType pid, PIDsource s=kTPCTOFpid) {fAliPID=pid; fPIDsource=s; fCutPID=kTRUE; InitPIDcuts();}
+ void SetESDpid(AliESDpid* o) {fESDpid=o;}
+ void SetTPCTOFpidCrossOverPt(Double_t pt) {fTPCTOFpidCrossOverPt=pt;}
+ void SetTPCpidCuts(TMatrixF* mat) {fTPCpidCuts=new TMatrixF(*mat);}
+ void SetTOFpidCuts(TMatrixF* mat) {fTOFpidCuts=new TMatrixF(*mat);}
protected:
Bool_t PassesCuts(AliVParticle* track);
Bool_t PassesCuts(AliFlowTrackSimple* track);
Bool_t PassesCuts(AliMultiplicity* track, Int_t id);
Bool_t PassesMCcuts();
+ Bool_t PassesMCcuts(AliMCEvent* mcevent, Int_t label);
+ Bool_t PassesTPCpidCut(AliESDtrack* track);
+ Bool_t PassesTOFpidCut(AliESDtrack* track);
void HandleESDtrack(AliESDtrack* track);
void HandleVParticle(AliVParticle* track);
void DefineHistograms();
+ void InitPIDcuts();
//the cuts
AliESDtrackCuts* fAliESDtrackCuts; //alianalysis cuts
- TDirectory* fQA; //qa histograms go here
+ TObjArray* fQA; //qa histograms go here
+ Bool_t fCutMC; //do we cut on MC?
Bool_t fCutMCprocessType; //do we cut on mc process type?
TMCProcess fMCprocessType; //mc process type
Bool_t fCutMCPID; //cut on MC pid?
Bool_t fCutSPDtrackletDeltaPhi; //are we cutting on the trcklet deltaphi?
Double_t fSPDtrackletDeltaPhiMax; //maximal deltaphi for tracklets
Double_t fSPDtrackletDeltaPhiMin; //minimal deltaphi for tracklets
+ Bool_t fIgnoreTPCzRange; //ignore tracks going close to central membrane
+ Double_t fIgnoreTPCzRangeMax; //max z to ignore
+ Double_t fIgnoreTPCzRangeMin; //min z to ignore
+ Bool_t fCutChi2PerClusterTPC; //cut on tpc chi2
+ Float_t fMaxChi2PerClusterTPC; //max chi2 tpc/cluster
+ Float_t fMinChi2PerClusterTPC; //min chi2 tpc/cluster
+ Bool_t fCutNClustersTPC; //cut on clusters?
+ Int_t fNClustersTPCMax; //max tpc ncls
+ Int_t fNClustersTPCMin; //min tpc clusters
trackParameterType fParamType; //parameter type tu cut on
trackParameterMix fParamMix; //parameter mixing
- Bool_t fCleanupTrack; //check if we need to delete the track
AliVParticle* fTrack; //!the track to apply cuts on
Double_t fTrackPhi; //!track phi
Double_t fTrackEta; //!track eta
AliMCEvent* fMCevent; //!mc event
AliMCParticle* fMCparticle; //!mc particle
AliVEvent* fEvent; //!placeholder for current event
+ AliESDtrack fTPCtrack; //!placeholder for TPC only track to avoid new/delete on every track
+
+ //PID
+ AliESDpid* fESDpid; //pid obj
+ PIDsource fPIDsource; //pid source
+ TMatrixF* fTPCpidCuts; //tpc pid cuts
+ TMatrixF* fTOFpidCuts; //tof pid cuts
+ Double_t fTPCTOFpidCrossOverPt; //pt cross over for pid, below TPC is taken, above TOF
+ AliPID::EParticleType fAliPID; //alipid
- ClassDef(AliFlowTrackCuts,3)
+ ClassDef(AliFlowTrackCuts,4)
};
#endif