New class for normalization studies (Giacomo)
[u/mrichter/AliRoot.git] / PWG3 / vertexingHF / AliAnalysisTaskSED0Mass.h
CommitLineData
49061176 1#ifndef ALIANALYSISTASKSED0MASS_H
2#define ALIANALYSISTASKSED0MASS_H
3
4/* Copyright(c) 1998-2009, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7//*************************************************************************
8// Class AliAnalysisTaskSED0Mass
9// AliAnalysisTaskSE for D0 candidates invariant mass histogram
a41f6fad 10// and comparison to MC truth (kinematics stored in the AOD) and cut variables
11// distributions
49061176 12// Authors: A.Dainese, andrea.dainese@ln.infn.it
13// and C.Bianchin, chiara.bianchin@pd.infn.it
14//*************************************************************************
15
16#include <TROOT.h>
17#include <TSystem.h>
18#include <TNtuple.h>
19#include <TH1F.h>
20
21#include "AliAnalysisTaskSE.h"
ea0d8716 22#include "AliRDHFCutsD0toKpi.h"
a96083b9 23#include "AliNormalizationCounter.h"
ea0d8716 24
4e61a020 25class AliAODEvent;
49061176 26
27class AliAnalysisTaskSED0Mass : public AliAnalysisTaskSE
28{
29 public:
30
31 AliAnalysisTaskSED0Mass();
ea0d8716 32 AliAnalysisTaskSED0Mass(const char *name,AliRDHFCutsD0toKpi* cuts);
49061176 33 virtual ~AliAnalysisTaskSED0Mass();
34
35
36 // Implementation of interface methods
37 virtual void UserCreateOutputObjects();
38 virtual void Init();
39 virtual void LocalInit() {Init();}
40 virtual void UserExec(Option_t *option);
41 virtual void Terminate(Option_t *option);
42
feb73eca 43 void SetArray(Int_t type=AliAnalysisTaskSED0Mass::kD0){fArray=type;}
feb73eca 44 enum{kD0,kLS};
ce39f0ac 45
46 void SetReadMC(Bool_t readMC=kFALSE){fReadMC=readMC;}
ea0d8716 47 void SetCutOnDistr(Bool_t cutondistr=kFALSE){fCutOnDistr=cutondistr;}
6b3e3c78 48 void SetUsePid4Distr(Bool_t usepid=kTRUE){fUsePid4Distr=usepid;}
449b1302 49 void SetFillOnlyD0D0bar(Int_t flagfill){fFillOnlyD0D0bar=flagfill;}
6b3e3c78 50
51 Bool_t GetCutOnDistr() const {return fCutOnDistr;}
52 Bool_t GetUsePid4Distr() const {return fUsePid4Distr;}
449b1302 53 Int_t GetFillOnlyD0D0bar() const {return fFillOnlyD0D0bar;}
54
49061176 55 private:
56
57 AliAnalysisTaskSED0Mass(const AliAnalysisTaskSED0Mass &source);
58 AliAnalysisTaskSED0Mass& operator=(const AliAnalysisTaskSED0Mass& source);
6b3e3c78 59 void FillMassHists(AliAODEvent *aodev,AliAODRecoDecayHF2Prong *part, TClonesArray *arrMC, AliRDHFCutsD0toKpi *cuts, TList *listout);
4e61a020 60 void FillVarHists(AliAODEvent *aodev,AliAODRecoDecayHF2Prong *part, TClonesArray *arrMC, AliRDHFCutsD0toKpi *cuts, TList *listout);
61 AliAODVertex* GetPrimaryVtxSkipped(AliAODEvent *aodev,AliAODRecoDecayHF2Prong *d);
62
6b3e3c78 63 TList *fOutputMass; //! list send on output slot 1
64 TList *fDistr; //! list send on output slot 2
65 TH1F *fNentries; //! histogram with number of events on output slot 3
66 TList *fChecks; //! list send on output slot 4
67 AliRDHFCutsD0toKpi *fCuts; // Cuts - sent to output slot 5
68 Int_t fArray; // can be D0 or Like Sign candidates
69 Bool_t fReadMC; // flag for MC array: kTRUE = read it, kFALSE = do not read it
70 Bool_t fCutOnDistr; // flag to decide if apply cut also on distributions: 0 no cuts, 1 looser cuts, 2 tighter cuts
71 Bool_t fUsePid4Distr; // flag to use the particle identification to fill the signal histograms of distributions. It has effect only with fReadMC=kFALSE
a96083b9 72 AliNormalizationCounter *fCounter;//!AliNormalizationCounter on output slot 6
6b3e3c78 73 Int_t fNPtBins; // number of pt bins
74 Int_t* fTotPosPairs; //[fNPtBins]
75 Int_t* fTotNegPairs; //[fNPtBins]
76 Double_t fLsNormalization; // normalization
449b1302 77 Int_t fFillOnlyD0D0bar; // flag to fill mass histogram with D0/D0bar only (0 = fill with both, 1 = fill with D0 only, 2 = fill with D0bar only)
6b3e3c78 78
a96083b9 79 ClassDef(AliAnalysisTaskSED0Mass,10); // AliAnalysisTaskSE for the MC association of heavy-flavour decay candidates
49061176 80};
81
82#endif
87020237 83