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