1 #ifndef ALIANALYSISTASKEMCALDIJETBASE_H
2 #define ALIANALYSISTASKEMCALDIJETBASE_H
11 class AliAnalysisManager;
12 class AliJetContainer;
14 #include "AliAnalysisTaskEmcalJet.h"
16 class AliAnalysisTaskEmcalDiJetBase : public AliAnalysisTaskEmcalJet {
18 enum JetFullChargedMatchingType {
19 kFraction = 0, // match full and charged jets with largest shared charged pt fraction
20 kGeo = 1, // match full and charged jets geometrically
21 kNoMatching = 3 // include autocorrelation in dijet correlation
24 enum JetCorrelationType {
25 kCorrelateAll = 0, // correlate all jets with all jets in event
26 kCorrelateTwo = 1, // correlate all jets with leading jet in opposite hemisphere
27 kCorrelateLS = 2 // correlate leading and subleading jet
30 AliAnalysisTaskEmcalDiJetBase();
31 AliAnalysisTaskEmcalDiJetBase(const char *name);
32 virtual ~AliAnalysisTaskEmcalDiJetBase();
34 void UserCreateOutputObjects();
35 void Terminate(Option_t *option);
37 Bool_t SelectEvent(); //decides if event is used for analysis
40 void SetDebug(Int_t d) { fDebug = d;}
42 void SetJetCorrelationType(JetCorrelationType c) { fJetCorrelationType = c; }
44 void SetFullChargedMatchingType(JetFullChargedMatchingType m) { fJetFullChargedMatchingType = m; }
46 void SetTriggerClass(const char *n) { fTriggerClass = n; }
48 void SetContainerFull(Int_t c) { fContainerFull = c;}
49 void SetContainerCharged(Int_t c) { fContainerCharged = c;}
50 void SetContainerFullMC(Int_t c) { fContainerFullMC = c;}
51 void SetContainerChargedMC(Int_t c) { fContainerChargedMC = c;}
53 void SetRhoType(Int_t i) { fRhoType = i;}
55 void SetDoChargedCharged(Bool_t b) { fDoChargedCharged = b;}
56 void SetDoFullCharged(Bool_t b) { fDoFullCharged = b;}
57 void SetDoFullFull(Bool_t b) { fDoFullFull = b;}
59 void SetPtMinTriggerJet(Double_t ptmin) { fPtMinTriggerJet = ptmin;}
60 void SetDoPtBias(Bool_t b) { fDoPtBias = b;}
62 void SetMinSharedFraction(Double_t f) { fMinFractionShared = f;}
64 void ResetMatchFlag() { fMatchingDone = kFALSE; }
67 Double_t GetDeltaPhi(const AliEmcalJet* jet1, const AliEmcalJet* jet2);
68 Double_t GetDeltaPhi(Double_t phi1,Double_t phi2);
69 Double_t GetDeltaR(const AliEmcalJet* jet1, const AliEmcalJet* jet2) const;
71 Double_t GetZ(const AliVParticle *trk, const AliEmcalJet *jet) const;
72 Double_t GetZ(Double_t trkPx, Double_t trkPy, Double_t trkPz, Double_t jetPx, Double_t jetPy, Double_t jetPz) const;
74 AliEmcalJet* GetLeadingJetOppositeHemisphere(Int_t type, Int_t typea, const AliEmcalJet *jetTrig);
75 AliEmcalJet* GetSecondLeadingJetOppositeHemisphere(Int_t type, Int_t typea, const AliEmcalJet *jetTrig);
78 virtual Bool_t RetrieveEventObjects();
80 Bool_t IsSameJet(Int_t jt, Int_t ja, Int_t type, Bool_t isMC = kFALSE);
81 Double_t GetJetPt(const AliEmcalJet *jet, Int_t type);
83 void MatchJetsGeo(Int_t cFull, Int_t cCharged,
84 Int_t iDebug = 0, Float_t maxDist = 0.3, Int_t type = 0);
85 Double_t GetFractionSharedPt(const AliEmcalJet *jetFull, const AliEmcalJet *jetCharged) const;
87 void SetChargedFractionIndex();
88 void SetChargedFractionIndexMC();
90 Bool_t fDebug; // debug level
91 JetCorrelationType fJetCorrelationType; // type of correlation between jets
92 JetFullChargedMatchingType fJetFullChargedMatchingType; //matching type between full and charged jets to be used
93 TString fTriggerClass; // trigger class to analyze EJ1 or EJ2
95 Int_t fContainerCharged; // number of container with charged jets DET
96 Int_t fContainerFull; // number of container with full jets DET
97 Int_t fContainerChargedMC; // number of container with charged jets MC
98 Int_t fContainerFullMC; // number of container with full jets MC
100 Int_t fRhoType; // rho type
101 Double_t fRhoChVal; // charged rho value
102 Double_t fRhoFullVal; // scaled charged rho value
104 Bool_t fDoChargedCharged; // do charged-charged ana
105 Bool_t fDoFullCharged; // do full-charged ana
106 Bool_t fDoFullFull; // do full-full ana
108 Double_t fPtMinTriggerJet; // minimum pT of trigger jet
109 Bool_t fDoPtBias; // pT trigger jet > pT assoc jet
110 Double_t fMinFractionShared; // minimum fraction charged pT
112 Bool_t fMatchingDone; // flag to indicate if matching is done or not
113 TArrayI faFullFracIndex; // index of charged jet with largest shared charged fraction - detector level
114 TArrayI faFullFracIndexMC; // index of charged jet with largest shared charged fraction - particle level
116 TH1F *fhNEvents; //! Histo number of events
117 TH1 *fHistTrialsSelEvents; //!trials from pyxsec.root only for selected events
120 AliAnalysisTaskEmcalDiJetBase(const AliAnalysisTaskEmcalDiJetBase&); // not implemented
121 AliAnalysisTaskEmcalDiJetBase &operator=(const AliAnalysisTaskEmcalDiJetBase&); // not implemented
123 ClassDef(AliAnalysisTaskEmcalDiJetBase, 6) // dijet base task