]>
Commit | Line | Data |
---|---|---|
70fdd197 | 1 | /* $Id: AliTriggerAnalysis.h 35782 2009-10-22 11:54:31Z jgrosseo $ */ |
ff8c4f30 | 2 | |
70fdd197 | 3 | #ifndef ALITRIGGERANALYSIS_H |
4 | #define ALITRIGGERANALYSIS_H | |
ff8c4f30 | 5 | |
6 | #include <TObject.h> | |
ff8c4f30 | 7 | |
7a11141c | 8 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
9 | * See cxx source for full Copyright notice */ | |
10 | ||
11 | //------------------------------------------------------------------------- | |
70fdd197 | 12 | // Implementation of Class AliTriggerAnalysis |
13 | // This class provides function to check if events have been triggered based on the data in the ESD | |
14 | // The trigger bits, trigger class inputs and only the data (offline trigger) can be used | |
7a11141c | 15 | // Origin: Jan Fiete Grosse-Oetringhaus, CERN |
16 | //------------------------------------------------------------------------- | |
17 | ||
ff8c4f30 | 18 | class AliESDEvent; |
449618cd | 19 | class AliESDtrackCuts; |
27704f6c | 20 | class TH1F; |
21 | class TH2F; | |
70fdd197 | 22 | class TCollection; |
c01a136b | 23 | class TMap; |
ff8c4f30 | 24 | |
70fdd197 | 25 | class AliTriggerAnalysis : public TObject |
ff8c4f30 | 26 | { |
27 | public: | |
449618cd | 28 | enum Trigger { kAcceptAll = 1, kMB1 = 2, kMB2, kMB3, kSPDGFO, kSPDGFOBits, kV0A, kV0C, kV0OR, kV0AND, kV0ABG, kV0CBG, kZDC, kZDCA, kZDCC, kFMDA, kFMDC, kFPANY, kNSD1, kMB1Prime, kStartOfFlags = 0x0100, kOfflineFlag = 0x8000, kOneParticle = 0x16000, kOneTrack = 0x20000}; // MB1, MB2, MB3 definition from ALICE-INT-2005-025 |
c8d3e441 | 29 | enum AliceSide { kASide = 1, kCSide, kCentralBarrel }; |
733f0542 | 30 | enum V0Decision { kV0Invalid = -1, kV0Empty = 0, kV0BB, kV0BG, kV0Fake }; |
ff8c4f30 | 31 | |
70fdd197 | 32 | AliTriggerAnalysis(); |
61899827 | 33 | virtual ~AliTriggerAnalysis(); |
907972ff | 34 | |
35 | void EnableHistograms(); | |
a2ce3799 | 36 | void SetAnalyzeMC(Bool_t flag = kTRUE) { fMC = flag; } |
61899827 | 37 | |
38 | Bool_t IsTriggerFired(const AliESDEvent* aEsd, Trigger trigger); | |
70fdd197 | 39 | |
40 | // using trigger bits in ESD | |
41 | Bool_t IsTriggerBitFired(const AliESDEvent* aEsd, Trigger trigger) const; | |
42 | Bool_t IsTriggerBitFired(ULong64_t triggerMask, Trigger trigger) const; | |
43 | Bool_t IsTriggerBitFired(const AliESDEvent* aEsd, ULong64_t tclass) const; | |
44 | ||
45 | // using ESD data from detectors | |
61899827 | 46 | Bool_t IsOfflineTriggerFired(const AliESDEvent* aEsd, Trigger trigger); |
70fdd197 | 47 | |
48 | // using trigger classes in ESD | |
49 | Bool_t IsTriggerClassFired(const AliESDEvent* aEsd, const Char_t* tclass) const; | |
50 | ||
c01a136b | 51 | // some "raw" trigger functions |
296dd262 | 52 | Int_t SPDFiredChips(const AliESDEvent* aEsd, Int_t origin, Bool_t fillHists = kFALSE); |
61899827 | 53 | Bool_t SPDGFOTrigger(const AliESDEvent* aEsd, Int_t origin); |
97fa3cbc | 54 | V0Decision V0Trigger(const AliESDEvent* aEsd, AliceSide side, Bool_t online, Bool_t fillHists = kFALSE); |
c01a136b | 55 | Bool_t ZDCTrigger(const AliESDEvent* aEsd, AliceSide side) const; |
61899827 | 56 | Bool_t FMDTrigger(const AliESDEvent* aEsd, AliceSide side); |
85c71ba7 | 57 | Int_t SSDClusters(const AliESDEvent* aEsd); |
70fdd197 | 58 | static const char* GetTriggerName(Trigger trigger); |
59 | ||
907972ff | 60 | void FillHistograms(const AliESDEvent* aEsd); |
c01a136b | 61 | void FillTriggerClasses(const AliESDEvent* aEsd); |
ff8c4f30 | 62 | |
63 | void SetSPDGFOThreshhold(Int_t t) { fSPDGFOThreshold = t; } | |
27704f6c | 64 | void SetSPDGFOEfficiency(TH1F* hist) { fSPDGFOEfficiency = hist; } |
61899827 | 65 | void SetV0TimeOffset(Float_t offset) { fV0TimeOffset = offset; } |
97fa3cbc | 66 | void SetV0AdcThr(Float_t thr) { fV0AdcThr = thr; } |
67 | void SetV0HwPars(Float_t thr, Float_t winLow, Float_t winHigh) { fV0HwAdcThr = thr; fV0HwWinLow = winLow; fV0HwWinHigh = winHigh; } | |
7a11141c | 68 | void SetFMDThreshold(Float_t low, Float_t hit) { fFMDLowCut = low; fFMDHitCut = hit; } |
ff8c4f30 | 69 | |
70 | Int_t GetSPDGFOThreshhold() const { return fSPDGFOThreshold; } | |
61899827 | 71 | Float_t GetV0TimeOffset() const { return fV0TimeOffset; } |
97fa3cbc | 72 | Float_t GetV0AdcThr() const { return fV0AdcThr; } |
7a11141c | 73 | Float_t GetFMDLowThreshold() const { return fFMDLowCut; } |
74 | Float_t GetFMDHitThreshold() const { return fFMDHitCut; } | |
907972ff | 75 | |
76 | virtual Long64_t Merge(TCollection* list); | |
61899827 | 77 | void SaveHistograms() const; |
c01a136b | 78 | |
79 | void PrintTriggerClasses() const; | |
449618cd | 80 | void SetESDTrackCuts(AliESDtrackCuts* cuts) { fEsdTrackCuts = cuts;} |
81 | AliESDtrackCuts* GetESDTrackCuts() const {return fEsdTrackCuts;} | |
ff8c4f30 | 82 | |
83 | protected: | |
70fdd197 | 84 | Bool_t IsL0InputFired(const AliESDEvent* aEsd, UInt_t input) const; |
85 | Bool_t IsL1InputFired(const AliESDEvent* aEsd, UInt_t input) const; | |
86 | Bool_t IsL2InputFired(const AliESDEvent* aEsd, UInt_t input) const; | |
87 | Bool_t IsInputFired(const AliESDEvent* aEsd, Char_t level, UInt_t input) const; | |
88 | ||
2078f478 | 89 | Float_t V0CorrectLeadingTime(Int_t i, Float_t time, Float_t adc, Int_t runNumber) const; |
bcd135ec | 90 | Float_t V0LeadingTimeWeight(Float_t adc) const; |
907972ff | 91 | |
61899827 | 92 | Int_t FMDHitCombinations(const AliESDEvent* aEsd, AliceSide side, Bool_t fillHists = kFALSE); |
ff8c4f30 | 93 | |
94 | Int_t fSPDGFOThreshold; // number of chips to accept a SPD GF0 trigger | |
27704f6c | 95 | TH1F* fSPDGFOEfficiency; // SPD FASTOR efficiency - is applied in SPDFiredChips. Histogram contains efficiency as function of chip number (bin 1..400: first layer; 401..1200: second layer) |
733f0542 | 96 | |
61899827 | 97 | Float_t fV0TimeOffset; // time offset applied to the times read from the V0 (in ns) |
97fa3cbc | 98 | Float_t fV0AdcThr; // thresholds applied on V0 ADC data |
99 | Float_t fV0HwAdcThr; // online V0 trigger - thresholds applied on ADC data | |
100 | Float_t fV0HwWinLow; // online V0 trigger - lower edge of time window | |
101 | Float_t fV0HwWinHigh; // online V0 trigger - upper edge of time window | |
102 | ||
7a11141c | 103 | Float_t fFMDLowCut; // |
104 | Float_t fFMDHitCut; // | |
907972ff | 105 | |
27704f6c | 106 | TH2F* fHistBitsSPD; // offline trigger bits (calculated from clusters) vs hardware trigger bits |
107 | TH1F* fHistFiredBitsSPD; // fired hardware bits | |
108 | TH1F* fHistV0A; // histograms that histogram the criterion the cut is applied on: bb triggers | |
109 | TH1F* fHistV0C; // histograms that histogram the criterion the cut is applied on: bb triggers | |
110 | TH1F* fHistZDC; // histograms that histogram the criterion the cut is applied on: fired bits (6 bins) | |
111 | TH1F* fHistFMDA; // histograms that histogram the criterion the cut is applied on: number of hit combination above threshold | |
112 | TH1F* fHistFMDC; // histograms that histogram the criterion the cut is applied on: number of hit combination above threshold | |
113 | TH1F* fHistFMDSingle; // histograms that histogram the criterion the cut is applied on: single mult value (more than one entry per event) | |
114 | TH1F* fHistFMDSum; // histograms that histogram the criterion the cut is applied on: summed mult value (more than one entry per event) | |
c01a136b | 115 | |
116 | TMap* fTriggerClasses; // counts the active trigger classes (uses the full string) | |
117 | ||
a2ce3799 | 118 | Bool_t fMC; // flag if MC is analyzed |
449618cd | 119 | AliESDtrackCuts* fEsdTrackCuts; //Track Cuts to select ESD tracks |
7a11141c | 120 | |
449618cd | 121 | ClassDef(AliTriggerAnalysis, 10) |
ff8c4f30 | 122 | |
123 | private: | |
70fdd197 | 124 | AliTriggerAnalysis(const AliTriggerAnalysis&); |
125 | AliTriggerAnalysis& operator=(const AliTriggerAnalysis&); | |
ff8c4f30 | 126 | }; |
127 | ||
128 | #endif |