1 #ifndef ALIEMCALJETTASK_H
2 #define ALIEMCALJETTASK_H
14 #include "AliAnalysisTaskSE.h"
16 class AliEmcalJetTask : public AliAnalysisTaskSE {
29 kRX1Jet=1<<8, // user defined radii, use SetRadius(Double_t)
36 AliEmcalJetTask(const char *name);
37 virtual ~AliEmcalJetTask();
39 void UserCreateOutputObjects();
40 void UserExec(Option_t *option);
41 void Terminate(Option_t *option);
43 void SelectConstituents(UInt_t constSel, UInt_t MCconstSel) { fConstSel = constSel; fMCConstSel = MCconstSel; };
44 void SetAlgo(Int_t a) { if (a==0) fJetType |= kKT; else fJetType |= kAKT; } // for backward compatibility only
45 void SetClusName(const char *n) { fCaloName = n ; }
46 void SetJetsName(const char *n) { fJetsName = n ; }
47 void SetJetType(UInt_t t) { fJetType = t ; }
48 void SetMarkConstituents(UInt_t m) { fMarkConst = m ; }
49 void SetMinJetArea(Double_t a) { fMinJetArea = a ; }
50 void SetMinJetClusPt(Double_t min) { fMinJetClusPt = min ; }
51 void SetMinJetPt(Double_t j) { fMinJetPt = j ; }
52 void SetMinJetTrackPt(Double_t min) { fMinJetTrackPt = min ; }
53 void SetRadius(Double_t r) { fRadius = r ; if ((fJetType & (kRX1Jet|kRX2Jet|kRX3Jet)) == 0) AliWarning("Radius value will be ignored if jet type is not set to a user defined radius (kRX1Jet,kRX2Jet,kRX3Jet)."); }
54 void SetTracksName(const char *n) { fTracksName = n ; }
55 void SetType(Int_t t) { if (t==0) fJetType |= kFullJet;
56 else if (t==1) fJetType |= kChargedJet;
57 else if (t==2) fJetType |= kNeutralJet; } // for backward compatibility only
58 void SetEtaRange(Double_t emi, Double_t ema) {fEtaMin = emi; fEtaMax = ema; }
59 void SetPhiRange(Double_t pmi, Double_t pma) {fPhiMin = pmi; fPhiMax = pma; }
60 void SetJetEtaRange(Double_t emi, Double_t ema) {fJetEtaMin = emi; fJetEtaMax = ema; }
61 void SetJetPhiRange(Double_t pmi, Double_t pma) {fJetPhiMin = pmi; fJetPhiMax = pma; }
62 void SetGhostArea(Double_t gharea) { fGhostArea = gharea; }
63 void SetMinMCLabel(Int_t s) { fMinMCLabel = s ; }
64 void SelectCollisionCandidates(UInt_t offlineTriggerMask = AliVEvent::kMB)
69 fOfflineTriggerMask = offlineTriggerMask;
73 AliWarning("Manually setting the event selection for jet finders is not allowed! Using trigger=old_trigger | your_trigger");
74 fOfflineTriggerMask = fOfflineTriggerMask | offlineTriggerMask;
78 UInt_t GetJetType() { return fJetType; }
83 Bool_t GetSortedArray(Int_t indexes[], std::vector<fastjet::PseudoJet> array) const;
85 TString fTracksName; // name of track collection
86 TString fCaloName; // name of calo cluster collection
87 TString fJetsName; // name of jet collection
88 UInt_t fJetType; // jet type (algorithm, radius, constituents)
89 UInt_t fConstSel; // select constituents from a previous jet finding
90 UInt_t fMCConstSel; // select MC constituents (label!=0) from a previous jet finding
91 UInt_t fMarkConst; // constituents are marked (via TObject::SetBit) as belonging to the # leading jets
92 Double_t fRadius; // jet radius
93 Double_t fMinJetTrackPt; // min jet track momentum (applied before clustering)
94 Double_t fMinJetClusPt; // min jet cluster momentum (applied before clustering)
95 Double_t fPhiMin; // minimum phi for constituents (applied before clustering)
96 Double_t fPhiMax; // maximum phi for constituents (applied before clustering)
97 Double_t fEtaMin; // minimum eta for constituents (applied before clustering)
98 Double_t fEtaMax; // maximum eta for constituents (applied before clustering)
99 Double_t fMinJetArea; // min area to keep jet in output
100 Double_t fMinJetPt; // min jet pt to keep jet in output
101 Double_t fJetPhiMin; // minimum phi to keep jet in output
102 Double_t fJetPhiMax; // maximum phi to keep jet in output
103 Double_t fJetEtaMin; // minimum eta to keep jet in output
104 Double_t fJetEtaMax; // maximum eta to keep jet in output
105 Double_t fGhostArea; // ghost area
106 Int_t fMinMCLabel; // minimum MC label value for the tracks/clusters being considered MC particles
107 Bool_t fIsInit; //!=true if already initialized
108 Bool_t fIsPSelSet; //!=true if physics selection was set
109 Bool_t fIsMcPart; //!=true if MC particles are given as input
110 Bool_t fIsEmcPart; //!=true if emcal particles are given as input (for clusters)
111 TClonesArray *fJets; //!jet collection
112 AliVEvent *fEvent; //!current event
113 TClonesArray *fTracks; //!tracks collection
114 TClonesArray *fClus; //!cluster collection
117 AliEmcalJetTask(const AliEmcalJetTask&); // not implemented
118 AliEmcalJetTask &operator=(const AliEmcalJetTask&); // not implemented
120 ClassDef(AliEmcalJetTask, 9) // Jet producing task