]>
Commit | Line | Data |
---|---|---|
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 | |
22 | class AliESDEvent; | |
17ba346c | 23 | class TH2F; |
61899827 | 24 | class TCollection; |
25 | class AliTriggerAnalysis; | |
26 | ||
296dd262 | 27 | class AliPhysicsSelection : public AliAnalysisCuts |
61899827 | 28 | { |
29 | public: | |
30 | AliPhysicsSelection(); | |
31 | virtual ~AliPhysicsSelection(); | |
32 | ||
296dd262 | 33 | // AliAnalysisCuts interface |
9eeae5d5 | 34 | virtual Bool_t IsSelected(TObject* obj) { return IsCollisionCandidate((const AliESDEvent*) obj); } |
35 | virtual Bool_t IsSelected(TList*) { return kFALSE; } | |
296dd262 | 36 | |
61899827 | 37 | Bool_t IsCollisionCandidate(const AliESDEvent* aEsd); |
38 | Bool_t Initialize(UInt_t runNumber); | |
decf6fd4 | 39 | |
a2ce3799 | 40 | void SetAnalyzeMC(Bool_t flag = kTRUE) { fMC = flag; } |
91bea6e7 | 41 | void SetSkipTriggerClassSelection(Bool_t flag = kTRUE) { fSkipTriggerClassSelection = flag; } |
91bea6e7 | 42 | |
296dd262 | 43 | void AddBackgroundIdentification(AliAnalysisCuts* background) { fBackgroundIdentification = background; } |
44 | ||
61899827 | 45 | virtual void Print(Option_t* option = "") const; |
46 | virtual Long64_t Merge(TCollection* list); | |
47 | void SaveHistograms(const char* folder = 0) const; | |
48 | ||
91bea6e7 | 49 | const TList* GetCollisionTriggerClasses() const { return &fCollTrigClasses; } |
50 | const TList* GetBGTriggerClasses() const { return &fBGTrigClasses; } | |
51 | void AddCollisionTriggerClass(const char* className){ fCollTrigClasses.Add(new TObjString(className)); fUsingCustomClasses = kTRUE; } | |
52 | void AddBGTriggerClass(const char* className) { fBGTrigClasses.Add(new TObjString(className)); fUsingCustomClasses = kTRUE; } | |
53 | ||
15f7c3c9 | 54 | AliTriggerAnalysis* GetTriggerAnalysis() { return (fTriggerAnalysis.GetEntries() > 0) ? (AliTriggerAnalysis*) fTriggerAnalysis.At(0) : 0; } |
61899827 | 55 | |
17ba346c | 56 | const TH2F* GetStatisticsHistogram() const { return fHistStatistics; } |
57 | const TH2F* GetBunchCrossingHistogram() const { return fHistBunchCrossing; } | |
58 | ||
61899827 | 59 | protected: |
296dd262 | 60 | Bool_t CheckTriggerClass(const AliESDEvent* aEsd, const char* trigger) const; |
a2ce3799 | 61 | Int_t GetTriggerScheme(UInt_t runNumber); |
296dd262 | 62 | |
63 | Int_t fCurrentRun; // run number for which the object is initialized | |
a2ce3799 | 64 | Bool_t fMC; // flag if MC is analyzed |
296dd262 | 65 | TList fCollTrigClasses; // trigger class identifying collision candidates |
66 | TList fBGTrigClasses; // trigger classes identifying background events | |
67 | ||
68 | TList fTriggerAnalysis; // list of offline trigger objects (several are needed to keep the control histograms separate per trigger class) | |
61899827 | 69 | |
296dd262 | 70 | AliAnalysisCuts* fBackgroundIdentification; // class that performs additional background identification |
61899827 | 71 | |
17ba346c | 72 | TH2F* fHistStatistics; // how many events are cut away why |
73 | TH2F* fHistBunchCrossing; // histograms of accepted bunch crossing numbers | |
61899827 | 74 | |
91bea6e7 | 75 | Bool_t fSkipTriggerClassSelection; // flag that determines if the trigger classs selection is skipped |
76 | Bool_t fUsingCustomClasses; // flag that is set if costum trigger classes are defined | |
77 | ||
a2ce3799 | 78 | ClassDef(AliPhysicsSelection, 2) |
61899827 | 79 | |
80 | private: | |
81 | AliPhysicsSelection(const AliPhysicsSelection&); | |
82 | AliPhysicsSelection& operator=(const AliPhysicsSelection&); | |
83 | }; | |
84 | ||
85 | #endif |