AliPhysics  cda3415 (cda3415)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliNormalizationCounter.h
Go to the documentation of this file.
1 #ifndef ALINORMALIZATIONCOUNTER_H
2 #define ALINORMALIZATIONCOUNTER_H
3 
4 /**************************************************************************
5  * Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
6  * *
7  * Author: The ALICE Off-line Project. *
8  * Contributors are mentioned in the code where appropriate. *
9  * *
10  * Permission to use, copy, modify and distribute this software and its *
11  * documentation strictly for non-commercial purposes is hereby granted *
12  * without fee, provided that the above copyright notice appears in all *
13  * copies and that both the copyright notice and this permission notice *
14  * appear in the supporting documentation. The authors make no claims *
15  * about the suitability of this software for any purpose. It is *
16  * provided "as is" without express or implied warranty. *
17  **************************************************************************/
18 
19 /* $Id$ */
20 
21 //*************************************************************************
29 
30 #include <TROOT.h>
31 #include <TSystem.h>
32 #include <TNtuple.h>
33 #include <TH1F.h>
34 #include <TH2F.h>
35 #include <TH1D.h>
36 #include <AliESDEvent.h>
37 #include <AliESDtrack.h>
38 #include <AliAODTrack.h>
39 #include <AliAODEvent.h>
40 #include <AliVParticle.h>
41 #include "AliAnalysisTaskSE.h"
42 #include "AliCounterCollection.h"
43 #include "AliAnalysisDataSlot.h"
44 #include "AliAnalysisDataContainer.h"
45 #include "AliRDHFCuts.h"
46 //#include "AliAnalysisVertexingHF.h"
47 
49 {
50  public:
51 
53  AliNormalizationCounter(const char *name);
54  virtual ~AliNormalizationCounter();
56 
57  AliCounterCollection* GetCounter(){return &fCounters;}
58  void Init();
59  void Add(const AliNormalizationCounter*);
60  void SetESD(Bool_t flag){fESD=flag;}
61  void SetStudyMultiplicity(Bool_t flag, Float_t etaRange){ fMultiplicity=flag; fMultiplicityEtaRange=etaRange; }
62  void SetStudySpherocity(Bool_t flag, Double_t nsteps=100.){fSpherocity=flag;
63  fSpherocitySteps=nsteps;}
64  void StoreEvent(AliVEvent*,AliRDHFCuts *,Bool_t mc=kFALSE, Int_t multiplicity=-9999, Double_t spherocity=-99.);
65  void StoreCandidates(AliVEvent*, Int_t nCand=0,Bool_t flagFilter=kTRUE);
66  TH1D* DrawAgainstRuns(TString candle="candid(filter)",Bool_t drawHist=kTRUE);
67  TH1D* DrawRatio(TString candle1="candid(filter)",TString candle2="triggered");
68  void PrintRubrics();
69  Double_t GetSum(TString candle="triggered");
70  Double_t GetSum(TString candle,Int_t minmultiplicity, Int_t maxmultiplicity);
71 
72  TH2F* GetHist(Bool_t filtercuts=kTRUE,Bool_t spdtracklets=kTRUE,Bool_t drawHist=kFALSE);
74  Double_t GetNEventsForNorm(Int_t runnumber);
77  Double_t GetNEventsForNorm(Int_t minmultiplicity, Int_t maxmultiplicity);
78  Double_t GetNEventsForNormSpheroOnly(Double_t minspherocity, Double_t maxspherocity);
79  Double_t GetNEventsForNorm(Int_t minmultiplicity, Int_t maxmultiplicity, Double_t minspherocity, Double_t maxspherocity);
80  TH1D* DrawNEventsForNorm(Bool_t drawRatio=kFALSE);
81 
82  private:
85  Int_t Multiplicity(AliVEvent* event);
86  void FillCounters(TString name, Int_t runNumber, Int_t multiplicity, Double_t spherocity);
87 
88 
89  AliCounterCollection fCounters;
93  Bool_t fSpherocity; // flag for spherocity
94  Double_t fSpherocitySteps; // binning in spherocity
99 
101  ClassDef(AliNormalizationCounter,7);
103 };
104 #endif
AliCounterCollection * GetCounter()
TH2F * fHistTrackFilterSpdMult
hist to store no of analysis candidates vs no of tracks in the event
double Double_t
Definition: External.C:58
void StoreCandidates(AliVEvent *, Int_t nCand=0, Bool_t flagFilter=kTRUE)
Definition: External.C:236
Bool_t fESD
internal counter
long long Long64_t
Definition: External.C:43
TH2F * fHistTrackAnaSpdMult
hist to store no of filter candidates vs SPD multiplicity
TList * list
Bool_t fMultiplicity
flag for ESD vs AOD
TH1D * DrawAgainstRuns(TString candle="candid(filter)", Bool_t drawHist=kTRUE)
AliCounterCollection fCounters
void Add(const AliNormalizationCounter *)
TH2F * fHistTrackAnaEvMult
hist to store no of filter candidates vs no of tracks in the event
Int_t Multiplicity(AliVEvent *event)
void SetStudyMultiplicity(Bool_t flag, Float_t etaRange)
int Int_t
Definition: External.C:63
float Float_t
Definition: External.C:68
Definition: External.C:212
void SetStudySpherocity(Bool_t flag, Double_t nsteps=100.)
TH1D * DrawNEventsForNorm(Bool_t drawRatio=kFALSE)
TH1D * DrawRatio(TString candle1="candid(filter)", TString candle2="triggered")
Long64_t Merge(TCollection *list)
Float_t fMultiplicityEtaRange
flag for multiplicity
Double_t GetSum(TString candle="triggered")
void StoreEvent(AliVEvent *, AliRDHFCuts *, Bool_t mc=kFALSE, Int_t multiplicity=-9999, Double_t spherocity=-99.)
AliNormalizationCounter & operator=(const AliNormalizationCounter &source)
TH2F * GetHist(Bool_t filtercuts=kTRUE, Bool_t spdtracklets=kTRUE, Bool_t drawHist=kFALSE)
Double_t GetNEventsForNormSpheroOnly(Double_t minspherocity, Double_t maxspherocity)
bool Bool_t
Definition: External.C:53
void FillCounters(TString name, Int_t runNumber, Int_t multiplicity, Double_t spherocity)