]>
Commit | Line | Data |
---|---|---|
af61092c | 1 | #ifndef ALIRSNMINIANALYSISTASK_H |
2 | #define ALIRSNMINIANALYSISTASK_H | |
3 | ||
4 | // | |
5 | // Analysis task for 'mini' sub-package | |
6 | // Contains all definitions needed for running an analysis: | |
7 | // -- global event cut | |
8 | // -- a list of track cuts (any number) | |
9 | // -- definitions of output histograms | |
10 | // -- values to be computed. | |
11 | // | |
12 | ||
13 | #include <TString.h> | |
14 | #include <TClonesArray.h> | |
15 | ||
16 | #include "AliAnalysisTaskSE.h" | |
17 | ||
18 | #include "AliRsnEvent.h" | |
19 | #include "AliRsnMiniValue.h" | |
20 | #include "AliRsnMiniOutput.h" | |
21 | ||
22 | class TList; | |
23 | ||
24 | class AliTriggerAnalysis; | |
25 | class AliRsnMiniEvent; | |
26 | class AliRsnCutSet; | |
27 | ||
28 | class AliRsnMiniAnalysisTask : public AliAnalysisTaskSE { | |
29 | ||
30 | public: | |
31 | ||
32 | AliRsnMiniAnalysisTask(); | |
33 | AliRsnMiniAnalysisTask(const char *name, Bool_t isMC = kFALSE); | |
34 | AliRsnMiniAnalysisTask(const AliRsnMiniAnalysisTask ©); | |
35 | AliRsnMiniAnalysisTask &operator=(const AliRsnMiniAnalysisTask ©); | |
36 | virtual ~AliRsnMiniAnalysisTask(); | |
37 | ||
38 | void UseMC(Bool_t yn = kTRUE) {fUseMC = yn;} | |
4fb0dfa3 | 39 | void UseESDTriggerMask(UInt_t trgMask) {fTriggerMask = trgMask;} |
af61092c | 40 | void UseCentrality(const char *type) {fUseCentrality = kTRUE; fCentralityType = type; fCentralityType.ToUpper();} |
41 | void SetUseCentralityPatch(Bool_t isAOD049) {fUseAOD049CentralityPatch = isAOD049;} | |
da997f6c | 42 | void SetUseCentralityPatchPbPb2011(Int_t centralityPatchPbPb2011) {fUseCentralityPatchPbPb2011 = centralityPatchPbPb2011;} |
af61092c | 43 | void UseMultiplicity(const char *type) {fUseCentrality = kFALSE; fCentralityType = type; fCentralityType.ToUpper();} |
44 | void UseContinuousMix() {fContinuousMix = kTRUE;} | |
45 | void UseBinnedMix() {fContinuousMix = kFALSE;} | |
46 | void SetNMix(Int_t nmix) {fNMix = nmix;} | |
47 | void SetMaxDiffMult (Double_t val) {fMaxDiffMult = val;} | |
48 | void SetMaxDiffVz (Double_t val) {fMaxDiffVz = val;} | |
49 | void SetMaxDiffAngle(Double_t val) {fMaxDiffAngle = val;} | |
50 | void SetEventCuts(AliRsnCutSet *cuts) {fEventCuts = cuts;} | |
51 | void SetMixPrintRefresh(Int_t n) {fMixPrintRefresh = n;} | |
088ca370 | 52 | void SetMaxNDaughters(Short_t n) {fMaxNDaughters = n;} |
53 | void SetCheckMomentumConservation(Bool_t checkP) {fCheckP = checkP;} | |
31dbef4e | 54 | void SetCheckFeedDown(Bool_t checkFeedDown) {fCheckFeedDown = checkFeedDown;} |
55 | void SetDselection(UShort_t originDselection); | |
56 | void SetRejectCandidateIfNotFromQuark(Bool_t opt){fRejectIfNoQuark=opt;} | |
af61092c | 57 | Int_t AddTrackCuts(AliRsnCutSet *cuts); |
58 | TClonesArray *Outputs() {return &fHistograms;} | |
59 | TClonesArray *Values() {return &fValues;} | |
088ca370 | 60 | Short_t GetMaxNDaughters() {return fMaxNDaughters;} |
af61092c | 61 | void SetEventQAHist(TString type,TH2F *histo); |
62 | void UseBigOutput(Bool_t b=kTRUE) { fBigOutput = b; } | |
63 | ||
64 | virtual void UserCreateOutputObjects(); | |
65 | virtual void UserExec(Option_t *); | |
66 | virtual void Terminate(Option_t *); | |
67 | virtual void FinishTaskOutput(); | |
68 | ||
69 | Int_t ValueID(AliRsnMiniValue::EType type, Bool_t useMC = kFALSE); | |
70 | Int_t CreateValue(AliRsnMiniValue::EType type, Bool_t useMC = kFALSE); | |
71 | AliRsnMiniOutput *CreateOutput(const char *name, AliRsnMiniOutput::EOutputType type, AliRsnMiniOutput::EComputation src); | |
72 | AliRsnMiniOutput *CreateOutput(const char *name, const char *outType, const char *compType); | |
73 | ||
74 | private: | |
75 | ||
76 | Char_t CheckCurrentEvent(); | |
77 | void FillMiniEvent(Char_t evType); | |
78 | Double_t ComputeAngle(); | |
79 | Double_t ComputeCentrality(Bool_t isESD); | |
80 | Double_t ComputeMultiplicity(Bool_t isESD,TString type); | |
57b34356 | 81 | Double_t ComputeTracklets(); |
af61092c | 82 | Double_t ApplyCentralityPatchAOD049(); |
da997f6c | 83 | Double_t ApplyCentralityPatchPbPb2011(); |
af61092c | 84 | void FillTrueMotherESD(AliRsnMiniEvent *event); |
85 | void FillTrueMotherAOD(AliRsnMiniEvent *event); | |
86 | void StoreTrueMother(AliRsnMiniPair *pair, AliRsnMiniEvent *event); | |
87 | Bool_t EventsMatch(AliRsnMiniEvent *event1, AliRsnMiniEvent *event2); | |
88 | ||
89 | Bool_t fUseMC; // use or not MC info | |
90 | Int_t fEvNum; //! absolute event counter | |
4fb0dfa3 | 91 | UInt_t fTriggerMask; //trigger mask |
af61092c | 92 | Bool_t fUseCentrality; // if true, use centrality for event, otherwise use multiplicity |
93 | TString fCentralityType; // definition used to choose what centrality or multiplicity to use | |
94 | Bool_t fUseAOD049CentralityPatch; //flag to enable AOD049 centrality patch | |
da997f6c | 95 | Int_t fUseCentralityPatchPbPb2011; //for PbPb 2011 centrality flattening |
af61092c | 96 | |
97 | Bool_t fContinuousMix; // mixing --> technique chosen (continuous or binned) | |
98 | Int_t fNMix; // mixing --> required number of mixes | |
99 | Double_t fMaxDiffMult; // mixing --> max difference in multiplicity | |
100 | Double_t fMaxDiffVz; // mixing --> max difference in Vz of prim vert | |
101 | Double_t fMaxDiffAngle; // mixing --> max difference in reaction plane angle | |
102 | ||
103 | TList *fOutput; // output list | |
104 | TClonesArray fHistograms; // list of histogram definitions | |
105 | TClonesArray fValues; // list of values to be computed | |
106 | TH1F *fHEventStat; // histogram of event statistics | |
107 | TH1F *fHAEventsVsMulti; // histogram of event statistics | |
57b34356 | 108 | TH1F *fHAEventsVsTracklets; // histogram of event statistics |
af61092c | 109 | TH2F *fHAEventVz; // histogram of vertex-z vs. multiplicity/centrality |
110 | TH2F *fHAEventMultiCent;// histogram of multiplicity vs. centrality | |
111 | TH2F *fHAEventPlane; // histogram of event plane vs. multiplicity/centrality | |
112 | ||
113 | AliRsnCutSet *fEventCuts; // cuts on events | |
114 | TObjArray fTrackCuts; // list of single track cuts | |
115 | AliRsnEvent fRsnEvent; //! interface object to the event | |
116 | TTree *fEvBuffer; //! mini-event buffer | |
117 | AliTriggerAnalysis *fTriggerAna; //! trigger analysis | |
118 | AliESDtrackCuts *fESDtrackCuts; //! quality cut for ESD tracks | |
119 | AliRsnMiniEvent *fMiniEvent; //! mini-event cursor | |
120 | Bool_t fBigOutput; // flag if open file for output list | |
121 | Int_t fMixPrintRefresh; // how often info in mixing part is printed | |
088ca370 | 122 | Short_t fMaxNDaughters; // maximum number of allowed mother's daughter |
123 | Bool_t fCheckP; // flag to set in order to check the momentum conservation for mothers | |
31dbef4e | 124 | |
125 | Bool_t fCheckFeedDown; // flag to set in order to check the particle feed down (specific for D meson analysis) | |
126 | UShort_t fOriginDselection; // flag to select D0 origins. 0 Only from charm 1 only from beauty 2 both from charm and beauty (specific for D meson analysis) | |
127 | Bool_t fKeepDfromB; // flag for the feed down from b quark decay (specific for D meson analysis) | |
128 | Bool_t fKeepDfromBOnly; // flag to keep only the charm particles that comes from beauty decays (specific for D meson analysis) | |
129 | Bool_t fRejectIfNoQuark; // flag to remove events not generated with PYTHIA | |
130 | ||
57b34356 | 131 | ClassDef(AliRsnMiniAnalysisTask, 10); // AliRsnMiniAnalysisTask |
af61092c | 132 | }; |
133 | ||
af61092c | 134 | |
af61092c | 135 | #endif |