15 #include <TClonesArray.h>
17 #include "AliVEvent.h"
20 #include "AliESDtrack.h"
22 #include "AliTLorentzVector.h"
40 fSelectionModeAny(kFALSE),
43 fEmcalTrackSelection(0),
47 fBaseClassName =
"AliVTrack";
48 SetClassName(
"AliVTrack");
49 fMassHypothesis = 0.139;
61 fSelectionModeAny(kFALSE),
63 fTrackCutsPeriod(period),
64 fEmcalTrackSelection(0),
95 AliInfo(
"Using custom track cuts");
99 AliInfo(Form(
"Objects are of type %s: AOD track selection will be done.",
fLoadedClass->GetName()));
103 AliInfo(Form(
"Objects are of type %s: ESD track selection will be done.",
fLoadedClass->GetName()));
107 AliWarning(Form(
"Objects are of type %s: no track filtering will be done!!",
fLoadedClass->GetName()));
127 AliInfo(Form(
"Using track cuts %d (no data period was provided!)",
fTrackFilterType));
131 AliInfo(Form(
"Objects are of type %s: AOD track selection will be done.",
fLoadedClass->GetName()));
135 AliInfo(Form(
"Objects are of type %s: ESD track selection will be done.",
fLoadedClass->GetName()));
139 AliWarning(Form(
"Objects are of type %s: no track filtering will be done!!",
fLoadedClass->GetName()));
157 TIter nextBitmap(trackBitmaps);
160 while ((bits = static_cast<TBits*>(nextBitmap()))) {
167 if (bits->FirstSetBit() == 0) {
170 else if (bits->FirstSetBit() == 1) {
171 if ((vTrack->GetStatus()&AliVTrack::kITSrefit) != 0) {
209 UInt_t rejectionReason;
215 AliDebug(2,
"Track not accepted.");
285 if (mass < 0) mass = track->M();
287 Bool_t useConstrainedParams = kFALSE;
291 useConstrainedParams = kTRUE;
295 if (useConstrainedParams) {
296 const AliESDtrack *esdtrack =
static_cast<const AliESDtrack*
>(track);
297 mom.SetPtEtaPhiM(esdtrack->GetConstrainedParam()->Pt(), esdtrack->GetConstrainedParam()->Eta(), esdtrack->GetConstrainedParam()->Phi(),
mass);
300 mom.SetPtEtaPhiM(track->Pt(), track->Eta(), track->Phi(),
mass);
305 mom.SetPtEtaPhiM(0, 0, 0, 0);
338 if (mass < 0) mass = vp->M();
342 AliESDtrack *track =
static_cast<AliESDtrack*
>(vp);
343 mom.SetPtEtaPhiM(track->GetConstrainedParam()->Pt(), track->GetConstrainedParam()->Eta(), track->GetConstrainedParam()->Phi(),
mass);
346 mom.SetPtEtaPhiM(vp->Pt(), vp->Eta(), vp->Phi(),
mass);
351 mom.SetPtEtaPhiM(0, 0, 0, 0);
371 if (mass < 0) mass = vp->M();
375 AliESDtrack *track =
static_cast<AliESDtrack*
>(vp);
376 mom.SetPtEtaPhiM(track->GetConstrainedParam()->Pt(), track->GetConstrainedParam()->Eta(), track->GetConstrainedParam()->Phi(),
mass);
379 mom.SetPtEtaPhiM(vp->Pt(), vp->Eta(), vp->Phi(),
mass);
384 mom.SetPtEtaPhiM(0, 0, 0, 0);
407 if (mass < 0) mass = vp->M();
411 AliESDtrack *track =
static_cast<AliESDtrack*
>(vp);
412 mom.SetPtEtaPhiM(track->GetConstrainedParam()->Pt(), track->GetConstrainedParam()->Eta(), track->GetConstrainedParam()->Phi(),
mass);
415 mom.SetPtEtaPhiM(vp->Pt(), vp->Eta(), vp->Phi(),
mass);
421 mom.SetPtEtaPhiM(0, 0, 0, 0);
441 if (mass < 0) mass = vp->M();
445 AliESDtrack *track =
static_cast<AliESDtrack*
>(vp);
446 mom.SetPtEtaPhiM(track->GetConstrainedParam()->Pt(), track->GetConstrainedParam()->Eta(), track->GetConstrainedParam()->Phi(),
mass);
449 mom.SetPtEtaPhiM(vp->Pt(), vp->Eta(), vp->Phi(),
mass);
455 mom.SetPtEtaPhiM(0, 0, 0, 0);
473 if (!r)
return kFALSE;
475 AliTLorentzVector mom;
495 if (!r)
return kFALSE;
497 AliTLorentzVector mom;
548 if (icut < fListOfCuts->GetEntries()) {
549 return static_cast<AliVCuts *
>(
fListOfCuts->At(icut));
562 static TString trackString;
574 return trackString.Data();
Interface for virtual track selection.
ClassImp(AliAnalysisTaskTriggerRates) AliAnalysisTaskTriggerRates
TObjArray * fFilteredTracks
! tracks filtered using fEmcalTrackSelection
static TString fgDefTrackCutsPeriod
! default period string used to generate track cuts
Container with name, TClonesArray and cuts for particles.
Track selected under the constrained hybrid track cuts.
virtual Bool_t ApplyParticleCuts(const AliVParticle *vp, UInt_t &rejectionReason) const
UInt_t fAODFilterBits
track filter bits
virtual void SetArray(AliVEvent *event)
const TClonesArray * GetAcceptedTrackBitmaps() const
void SetSelectionModeAny()
AliVCuts * GetTrackCuts(Int_t icut)
virtual Bool_t GetNextMomentum(TLorentzVector &mom)
AliEmcalTrackSelection * fEmcalTrackSelection
! track selection object
TClass * fLoadedClass
! Class of the objects contained in the TClonesArray
virtual Bool_t GetMomentum(TLorentzVector &mom, Int_t i) const
ETrackFilterType_t fTrackFilterType
track filter type
TString fTrackCutsPeriod
period string used to generate track cuts
void SetArray(AliVEvent *event)
Container for particles within the EMCAL framework.
Track selected under the constrained hybrid track cuts without ITS refit.
virtual Bool_t GetAcceptMomentum(TLorentzVector &mom, Int_t i) const
virtual Bool_t GetMomentumFromTrack(TLorentzVector &mom, const AliVTrack *track, Double_t mass) const
virtual Bool_t ApplyTrackCuts(const AliVTrack *vp, UInt_t &rejectionReason) const
virtual Bool_t AcceptTrack(const AliVTrack *vp, UInt_t &rejectionReason) const
Double_t GetMinPt() const
Int_t GetNumberOfCutObjects() const
TArrayC fTrackTypes
! track types
TObjArray * fListOfCuts
list of track cut objects
void AddTrackCuts(AliVCuts *cuts)
Implement virtual track selection for AOD analysis.
void SetClassName(const char *clname)
virtual AliVTrack * GetNextTrack()
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
Bool_t fSelectionModeAny
accept track if any of the cuts is fulfilled
const TString & GetArrayName() const
Double_t fMassHypothesis
if < 0 it will use a PID mass when available
virtual AliVTrack * GetTrack(Int_t i=-1) const
Track selected under the global hybrid track cuts.
TObjArray * GetAcceptedTracks(const TClonesArray *const tracks)
virtual AliVTrack * GetNextAcceptTrack()
Char_t GetTrackType(const AliVTrack *track) const
void AddTrackCuts(AliVCuts *cuts)
TString fBaseClassName
name of the base class that this container can handle
virtual AliVTrack * GetAcceptTrack(Int_t i=-1) const
virtual Bool_t GetNextAcceptMomentum(TLorentzVector &mom)
void SetSelectionModeAll()
const char * GetTitle() const
virtual Bool_t ApplyKinematicCuts(const AliTLorentzVector &mom, UInt_t &rejectionReason) const
TClonesArray * fClArray
! Pointer to array in input event
Int_t GetNEntries() const
Int_t fCurrentID
! current ID for automatic loops
Implementation of virtual track selection for ESDs.