]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ANALYSIS/AliPhysicsSelection.h
- removed TObjArray for the storing of clusters
[u/mrichter/AliRoot.git] / ANALYSIS / AliPhysicsSelection.h
CommitLineData
61899827 1/* $Id: AliPhysicsSelection.h 35782 2009-10-22 11:54:31Z jgrosseo $ */
2
3#ifndef ALIPHYSICSSELECTION_H
4#define ALIPHYSICSSELECTION_H
5
6/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
7 * See cxx source for full Copyright notice */
8
9//-------------------------------------------------------------------------
10// Implementation of Class AliPhysicsSelection
11//
12// This class selects collision candidates from data runs, applying selection cuts on triggers
13// and background rejection based on the content of the ESD
14//
15// Origin: Jan Fiete Grosse-Oetringhaus, CERN
16//-------------------------------------------------------------------------
17
296dd262 18#include <AliAnalysisCuts.h>
61899827 19#include <TList.h>
91bea6e7 20#include "TObjString.h"
61899827 21
22class AliESDEvent;
17ba346c 23class TH2F;
61899827 24class TCollection;
25class AliTriggerAnalysis;
85c71ba7 26class AliAnalysisTaskSE;
61899827 27
296dd262 28class AliPhysicsSelection : public AliAnalysisCuts
61899827 29{
85c71ba7 30
31 enum {kStatTriggerClass=1,kStatHWTrig,kStatV0ABG,kStatV0CBG,kStatMB1,kStatMB1Prime,kStatFMD,kStatFO1,kStatFO2,kStatV0A,kStatV0C,kStatSSD1,kStatFO1AndV0,kStatV0,kStatAny2Hits,kStatOffline,kStatBG,kStatAccepted};
32
33#ifdef VERBOSE_STAT
34 enum {kStatRowBG=5,kStatRowAcc,kStatRowBGFrac,kStatRowAccFrac,kStatRowErrGood,kStatRowFracGood,kStatRowGood};
35#else
36 enum {kStatRowBG=5,kStatRowAcc,kStatRowGood};
37#endif
38
39 enum {kStatIdxAll=0,kStatIdxBin0=1};
40
41
42public:
43
44 AliPhysicsSelection();
45 virtual ~AliPhysicsSelection();
61899827 46
85c71ba7 47 // AliAnalysisCuts interface
48 virtual Bool_t IsSelected(TObject* obj) { return IsCollisionCandidate((const AliESDEvent*) obj); }
49 virtual Bool_t IsSelected(TList*) { return kFALSE; }
296dd262 50
85c71ba7 51 Bool_t IsCollisionCandidate(const AliESDEvent* aEsd);
52 Bool_t Initialize(Int_t runNumber);
decf6fd4 53
85c71ba7 54 void SetAnalyzeMC(Bool_t flag = kTRUE) { fMC = flag; }
55 void SetSkipTriggerClassSelection(Bool_t flag = kTRUE) { fSkipTriggerClassSelection = flag; }
56 void SetSkipV0(Bool_t flag=kTRUE) { fSkipV0 = flag;}
91bea6e7 57
85c71ba7 58 void AddBackgroundIdentification(AliAnalysisCuts* background) { fBackgroundIdentification = background; }
296dd262 59
85c71ba7 60 virtual void Print(Option_t* option = "") const;
61 virtual Long64_t Merge(TCollection* list);
62 void SaveHistograms(const char* folder = 0) const;
61899827 63
85c71ba7 64 const TList* GetCollisionTriggerClasses() const { return &fCollTrigClasses; }
65 const TList* GetBGTriggerClasses() const { return &fBGTrigClasses; }
66 void AddCollisionTriggerClass(const char* className){ fCollTrigClasses.Add(new TObjString(className)); fUsingCustomClasses = kTRUE; }
67 void AddBGTriggerClass(const char* className) { fBGTrigClasses.Add(new TObjString(className)); fUsingCustomClasses = kTRUE; }
91bea6e7 68
85c71ba7 69 AliTriggerAnalysis* GetTriggerAnalysis() { return (fTriggerAnalysis.GetEntries() > 0) ? (AliTriggerAnalysis*) fTriggerAnalysis.At(0) : 0; }
61899827 70
85c71ba7 71 const TH2F* GetStatisticsHistogram(Int_t idx=kStatIdxAll) const { return fHistStatistics[idx]; }
72 const TH2F* GetBunchCrossingHistogram() const { return fHistBunchCrossing; }
17ba346c 73
85c71ba7 74 void SetBIFactors(Int_t run);
75
76 void SetUseBXNumbers(Bool_t flag = kTRUE) {fUseBXNumbers = flag;}
77 void SetComputeBG (Bool_t flag = kTRUE) {fComputeBG = flag; if(flag) fUseBXNumbers = flag;}
78 void SetBin0Callback( const char * cb) {fBin0CallBack = cb;}
79
80protected:
81 Bool_t CheckTriggerClass(const AliESDEvent* aEsd, const char* trigger) const;
82 Int_t GetTriggerScheme(UInt_t runNumber) const;
83 const char * GetBXIDs(UInt_t runNumber, const char * trigger ) ;
84 const char * GetFillingScheme(UInt_t runNumber) ;
85 Int_t GetRatioBBBE(Int_t runNumber);
86 TH2F * BookHistStatistics(const char * tag) ;
87
296dd262 88
85c71ba7 89 Int_t fCurrentRun; // run number for which the object is initialized
90 Bool_t fMC; // flag if MC is analyzed
91 TList fCollTrigClasses; // trigger class identifying collision candidates
92 TList fBGTrigClasses; // trigger classes identifying background events
296dd262 93
85c71ba7 94 TList fTriggerAnalysis; // list of offline trigger objects (several are needed to keep the control histograms separate per trigger class)
61899827 95
85c71ba7 96 AliAnalysisCuts* fBackgroundIdentification; // class that performs additional background identification
61899827 97
85c71ba7 98 TH2F* fHistStatistics[2]; // how many events are cut away why {all,bin 0}
99 TH2F* fHistBunchCrossing; // histograms of accepted bunch crossing numbers
61899827 100
85c71ba7 101 Bool_t fSkipTriggerClassSelection; // flag that determines if the trigger classs selection is skipped
102 Bool_t fUsingCustomClasses; // flag that is set if costum trigger classes are defined
103 Bool_t fSkipV0; // ignore information from v0
104
105 Float_t fBIFactorA; // ratio of interacting over non interacting bunch intensities for beam 1
106 Float_t fBIFactorC; // ratio of interacting over non interacting bunch intensities for beam 2
107
108 Int_t fRatioBEEE; // ratio between the number of BX in the Beam-Empty and the Empty-Empty. Depends on the filling and on the trigger scheme
109
110 Bool_t fComputeBG; // Switch on computation of background and filling of relevant stat table entries. If you enable this you can only process one run at a time (the relative bunch intensity used to compute this chages from run to run)
111 Bool_t fUseBXNumbers; // Explicitely select "good" bunch crossing numbers (exclude pilot, afterpulses and fakes). If you anable this you can only process runs within the same filling scheme.
112 TString fFillingScheme; // stores the filling scheme of the current run.
113
114 TString fBin0CallBack; // callback used to determine if an event is in the bin0 (name of the task where the callback is implemented);
91bea6e7 115
85c71ba7 116 ClassDef(AliPhysicsSelection, 5)
61899827 117
85c71ba7 118 private:
119 AliPhysicsSelection(const AliPhysicsSelection&);
120 AliPhysicsSelection& operator=(const AliPhysicsSelection&);
61899827 121};
122
123#endif