]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/RESONANCES/AliRsnMiniMonitorTask.h
Added DCA of daughters and DCA product computation (Massimo)
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnMiniMonitorTask.h
CommitLineData
64129b35 1#ifndef ALIRSNMINIMonitorTask_H
2#define ALIRSNMINIMonitorTask_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 "AliRsnMiniMonitor.h"
20
21class TList;
22
23class AliTriggerAnalysis;
24class AliRsnMiniEvent;
25class AliRsnCutSet;
26
27class AliRsnMiniMonitorTask : public AliAnalysisTaskSE {
28
29public:
30
31 AliRsnMiniMonitorTask();
32 AliRsnMiniMonitorTask(const char *name, Bool_t isMC = kFALSE);
33 AliRsnMiniMonitorTask(const AliRsnMiniMonitorTask &copy);
61f275d1 34 AliRsnMiniMonitorTask &operator=(const AliRsnMiniMonitorTask &copy);
64129b35 35 virtual ~AliRsnMiniMonitorTask();
36
61f275d1 37 void UseMC(Bool_t yn = kTRUE) {fUseMC = yn;}
64129b35 38 void UseCentrality(const char *type) {fUseCentrality = kTRUE; fCentralityType = type; fCentralityType.ToUpper();}
39 void UseMultiplicity(const char *type) {fUseCentrality = kFALSE; fCentralityType = type; fCentralityType.ToUpper();}
40 void SetEventCuts(AliRsnCutSet *cuts) {fEventCuts = cuts;}
41 Int_t AddTrackCuts(AliRsnCutSet *cuts);
42 TClonesArray *Outputs() {return &fHistograms;}
61f275d1 43
64129b35 44 virtual void UserCreateOutputObjects();
61f275d1 45 virtual void UserExec(Option_t *);
46 virtual void Terminate(Option_t *);
47
64129b35 48 AliRsnMiniMonitor *CreateMonitor(const char *name, AliRsnMiniMonitor::EType type, Int_t cutID);
61f275d1 49
64129b35 50private:
51
52 Char_t CheckCurrentEvent();
53 Double_t ComputeCentrality(Bool_t isESD);
54
55 Bool_t fUseMC; // use or not MC info
56 Int_t fEvNum; //! absolute event counter
57 Bool_t fUseCentrality; // if true, use centrality for event, otherwise use multiplicity
58 TString fCentralityType; // definition used to choose what centrality or multiplicity to use
61f275d1 59
64129b35 60 TList *fOutput; // output list
61 TClonesArray fHistograms; // list of histogram definitions
61f275d1 62
64129b35 63 AliRsnCutSet *fEventCuts; // cuts on events
64 TObjArray fTrackCuts; // list of single track cuts
65 AliRsnEvent fRsnEvent; //! interface object to the event
66 Bool_t fBigOutput; // flag if open file for output list
67
68 ClassDef(AliRsnMiniMonitorTask, 1); // AliRsnMiniMonitorTask
69};
70
61f275d1 71inline AliRsnMiniMonitor *AliRsnMiniMonitorTask::CreateMonitor
64129b35 72(const char *name, AliRsnMiniMonitor::EType type, Int_t cutID)
73{
74//
75// Create a new histogram definition in the task,
76// which is then returned to the user for its configuration
77//
78
61f275d1 79 Int_t n = fHistograms.GetEntries();
64129b35 80 AliRsnMiniMonitor *newDef = new (fHistograms[n]) AliRsnMiniMonitor(name, type, cutID);
61f275d1 81
64129b35 82 return newDef;
83}
84
85#endif