]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetBase.h
Dijet user code (Marta)
[u/mrichter/AliRoot.git] / PWGJE / EMCALJetTasks / UserTasks / AliAnalysisTaskEmcalDiJetBase.h
CommitLineData
6e8b6371 1#ifndef ALIANALYSISTASKEMCALDIJETBASE_H
2#define ALIANALYSISTASKEMCALDIJETBASE_H
3
4class TH1;
5class TH2;
6class TH3;
7class TH3F;
8class THnSparse;
9class TClonesArray;
10class TArrayI;
11class AliAnalysisUtils;
12class AliAnalysisManager;
13class AliGenPythiaEventHeader;
14
15#include "AliJetContainer.h"
16
17#include "AliAnalysisTaskEmcalJetDev.h"
18
19class AliAnalysisTaskEmcalDiJetBase : public AliAnalysisTaskEmcalJetDev {
20 public:
21 enum JetFullChargedMatchingType {
22 kFraction = 0, // match full and charged jets with largest shared charged pt fraction
23 kGeo = 1, // match full and charged jets geometrically
24 kNoMatching = 3 // include autocorrelation in dijet correlation
25 };
26
27 AliAnalysisTaskEmcalDiJetBase();
28 AliAnalysisTaskEmcalDiJetBase(const char *name);
29 virtual ~AliAnalysisTaskEmcalDiJetBase();
30
31 void UserCreateOutputObjects();
32 void Terminate(Option_t *option);
33 Bool_t UserNotify();
34
35
36 void InitOnce();
37
38 Bool_t SelectEvent(); //decides if event is used for analysis
39
40 //Setters
41 void SetDebug(Int_t d) { fDebug = d;}
42
43 void SetFullChargedMatchingType(JetFullChargedMatchingType m) {fJetFullChargedMatchingType = m;}
44
45 void SetTriggerClass(const char *n) { fTriggerClass = n; }
46
47 void SetContainerFull(Int_t c) { fContainerFull = c;}
48 void SetContainerCharged(Int_t c) { fContainerCharged = c;}
49 void SetContainerFullMC(Int_t c) { fContainerFullMC = c;}
50 void SetContainerChargedMC(Int_t c) { fContainerChargedMC = c;}
51
52 void SetRhoType(Int_t i) { fRhoType = i;}
53
54 void SetDoChargedCharged(Bool_t b) { fDoChargedCharged = b;}
55 void SetDoFullCharged(Bool_t b) { fDoFullCharged = b;}
56
57 void SetMinSharedFraction(Double_t f) { fMinFractionShared = f;}
58
59 void SetIsPythiaPtHard(Bool_t b) { fIsPythiaPtHard =b; }
60
61 void ResetMatchFlag() { fMatchingDone = kFALSE; }
62
63 //Getters
64 Double_t GetDeltaPhi(const AliEmcalJet* jet1, const AliEmcalJet* jet2);
65 Double_t GetDeltaPhi(Double_t phi1,Double_t phi2);
66 Double_t GetDeltaR(const AliEmcalJet* jet1, const AliEmcalJet* jet2) const;
67
68 Double_t GetZ(const AliVParticle *trk, const AliEmcalJet *jet) const;
69 Double_t GetZ(const Double_t trkPx, const Double_t trkPy, const Double_t trkPz, const Double_t jetPx, const Double_t jetPy, const Double_t jetPz) const;
70
71 protected:
72 virtual Bool_t RetrieveEventObjects();
73
74 Bool_t IsSameJet(const Int_t jt, const Int_t ja, const Int_t type, const Bool_t isMC = kFALSE);
75 Double_t GetJetPt(const AliEmcalJet *jet, const Int_t type);
76
77 void MatchJetsGeo(Int_t cFull, Int_t cCharged,
78 Int_t iDebug = 0, Float_t maxDist = 0.3, Int_t type = 0);
79 Double_t GetFractionSharedPt(const AliEmcalJet *jetFull, const AliEmcalJet *jetCharged) const;
80
81 Bool_t PythiaInfoFromFile(const char* currFile, Float_t &xsec, Float_t &trials, Int_t &pthard);
82
83 void SetChargedFractionIndex();
84 void SetChargedFractionIndexMC();
85
86 Bool_t fDebug; // debug level
87 JetFullChargedMatchingType fJetFullChargedMatchingType; //matching type between full and charged jets to be used
88 TString fTriggerClass; // trigger class to analyze EJ1 or EJ2
89
90 Int_t fContainerCharged; // number of container with charged jets DET
91 Int_t fContainerFull; // number of container with full jets DET
92 Int_t fContainerChargedMC; // number of container with charged jets MC
93 Int_t fContainerFullMC; // number of container with full jets MC
94
95 Int_t fRhoType; // rho type
96 Double_t fRhoChVal; // charged rho value
97 Double_t fRhoFullVal; // scaled charged rho value
98
99 Bool_t fDoChargedCharged; // do charged-charged ana
100 Bool_t fDoFullCharged; // do full-charged ana
101
102 Bool_t fUseAnaUtils; // used for LHC13* data
103 AliAnalysisUtils *fAnalysisUtils; //! vertex selection
104
105 Double_t fPtMinTriggerJet; // minimum pT of trigger jet
106 Double_t fMinFractionShared; // minimum fraction charged pT
107
108 Bool_t fMatchingDone; // flag to indicate if matching is done or not
109 TArrayI faFullFracIndex; // index of charged jet with largest shared charged fraction - detector level
110 TArrayI faFullFracIndexMC; // index of charged jet with largest shared charged fraction - particle level
111
112 Bool_t fIsPythiaPtHard; //pythia in pt hard bins
113 AliGenPythiaEventHeader *fPythiaHeader; //!event Pythia header
114 Double_t fPtHard; //!event pt hard
115 Int_t fPtHardBin; //!event pt hard bin
116 Int_t fNTrials; //!event trials
117
118
119 TH1F *fhNEvents; //! Histo number of events
120 TH1 *fHistTrials; //!trials from pyxsec.root
121 TH1 *fHistTrialsSelEvents; //!trials from pyxsec.root only for selected events
122 TProfile *fHistXsection; //!x section from pyxsec.root
123 TH1 *fHistEvents; //!total number of events per pt hard bin
124
125
126 private:
127 AliAnalysisTaskEmcalDiJetBase(const AliAnalysisTaskEmcalDiJetBase&); // not implemented
128 AliAnalysisTaskEmcalDiJetBase &operator=(const AliAnalysisTaskEmcalDiJetBase&); // not implemented
129
130 ClassDef(AliAnalysisTaskEmcalDiJetBase, 1) // jet sample analysis task
131};
132#endif