]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskEmcalDiJetBase.h
Fix for Coverity defect 21879
[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;
6e8b6371 11class AliAnalysisManager;
8e49a788 12class AliJetContainer;
6e8b6371 13
9239b066 14#include "AliAnalysisTaskEmcalJet.h"
6e8b6371 15
9239b066 16class AliAnalysisTaskEmcalDiJetBase : public AliAnalysisTaskEmcalJet {
6e8b6371 17 public:
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
22 };
23
c66364a6 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
28 };
29
6e8b6371 30 AliAnalysisTaskEmcalDiJetBase();
31 AliAnalysisTaskEmcalDiJetBase(const char *name);
32 virtual ~AliAnalysisTaskEmcalDiJetBase();
33
34 void UserCreateOutputObjects();
35 void Terminate(Option_t *option);
6e8b6371 36
37 Bool_t SelectEvent(); //decides if event is used for analysis
38
39 //Setters
c66364a6 40 void SetDebug(Int_t d) { fDebug = d;}
41
42 void SetJetCorrelationType(JetCorrelationType c) { fJetCorrelationType = c; }
6e8b6371 43
c66364a6 44 void SetFullChargedMatchingType(JetFullChargedMatchingType m) { fJetFullChargedMatchingType = m; }
6e8b6371 45
46 void SetTriggerClass(const char *n) { fTriggerClass = n; }
47
4bd08270 48 void SetContainerFull(Int_t c) { fContainerFull = c;}
49 void SetContainerCharged(Int_t c) { fContainerCharged = c;}
50 void SetContainerFullMC(Int_t c) { fContainerFullMC = c;}
6e8b6371 51 void SetContainerChargedMC(Int_t c) { fContainerChargedMC = c;}
52
53 void SetRhoType(Int_t i) { fRhoType = i;}
54
55 void SetDoChargedCharged(Bool_t b) { fDoChargedCharged = b;}
bb84b374 56 void SetDoFullCharged(Bool_t b) { fDoFullCharged = b;}
57 void SetDoFullFull(Bool_t b) { fDoFullFull = b;}
6e8b6371 58
59 void SetMinSharedFraction(Double_t f) { fMinFractionShared = f;}
60
6e8b6371 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;
9b6b9c9e 69 Double_t GetZ(Double_t trkPx, Double_t trkPy, Double_t trkPz, Double_t jetPx, Double_t jetPy, Double_t jetPz) const;
6e8b6371 70
9b6b9c9e 71 AliEmcalJet* GetLeadingJetOppositeHemisphere(Int_t type, Int_t typea, const AliEmcalJet *jetTrig);
72 AliEmcalJet* GetSecondLeadingJetOppositeHemisphere(Int_t type, Int_t typea, const AliEmcalJet *jetTrig);
6ab30d5f 73
6e8b6371 74 protected:
75 virtual Bool_t RetrieveEventObjects();
76
9b6b9c9e 77 Bool_t IsSameJet(Int_t jt, Int_t ja, Int_t type, Bool_t isMC = kFALSE);
78 Double_t GetJetPt(const AliEmcalJet *jet, Int_t type);
6e8b6371 79
80 void MatchJetsGeo(Int_t cFull, Int_t cCharged,
81 Int_t iDebug = 0, Float_t maxDist = 0.3, Int_t type = 0);
82 Double_t GetFractionSharedPt(const AliEmcalJet *jetFull, const AliEmcalJet *jetCharged) const;
83
6e8b6371 84 void SetChargedFractionIndex();
85 void SetChargedFractionIndexMC();
86
c66364a6 87 Bool_t fDebug; // debug level
88 JetCorrelationType fJetCorrelationType; // type of correlation between jets
6e8b6371 89 JetFullChargedMatchingType fJetFullChargedMatchingType; //matching type between full and charged jets to be used
c66364a6 90 TString fTriggerClass; // trigger class to analyze EJ1 or EJ2
6e8b6371 91
92 Int_t fContainerCharged; // number of container with charged jets DET
93 Int_t fContainerFull; // number of container with full jets DET
94 Int_t fContainerChargedMC; // number of container with charged jets MC
95 Int_t fContainerFullMC; // number of container with full jets MC
96
97 Int_t fRhoType; // rho type
98 Double_t fRhoChVal; // charged rho value
99 Double_t fRhoFullVal; // scaled charged rho value
100
101 Bool_t fDoChargedCharged; // do charged-charged ana
102 Bool_t fDoFullCharged; // do full-charged ana
bb84b374 103 Bool_t fDoFullFull; // do full-full ana
6e8b6371 104
6e8b6371 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
8e49a788 112 TH1F *fhNEvents; //! Histo number of events
113 TH1 *fHistTrialsSelEvents; //!trials from pyxsec.root only for selected events
6e8b6371 114
115 private:
116 AliAnalysisTaskEmcalDiJetBase(const AliAnalysisTaskEmcalDiJetBase&); // not implemented
117 AliAnalysisTaskEmcalDiJetBase &operator=(const AliAnalysisTaskEmcalDiJetBase&); // not implemented
118
8e49a788 119 ClassDef(AliAnalysisTaskEmcalDiJetBase, 5) // dijet base task
6e8b6371 120};
121#endif