]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG0/AliTriggerAnalysis.h
move macro to macro dir
[u/mrichter/AliRoot.git] / PWG0 / AliTriggerAnalysis.h
CommitLineData
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 18class AliESDEvent;
907972ff 19class TH1;
70fdd197 20class TCollection;
ff8c4f30 21
70fdd197 22class AliTriggerAnalysis : public TObject
ff8c4f30 23{
24 public:
70fdd197 25 enum Trigger { kAcceptAll = 1, kMB1 = 2, kMB2, kMB3, kSPDGFO, kV0A, kV0C, kZDC, kZDCA, kZDCC, kFMDA, kFMDC, kFPANY, kStartOfFlags = 0x0100, kOfflineFlag = 0x8000 }; // MB1, MB2, MB3 definition from ALICE-INT-2005-025
c8d3e441 26 enum AliceSide { kASide = 1, kCSide, kCentralBarrel };
ff8c4f30 27
70fdd197 28 AliTriggerAnalysis();
29 virtual ~AliTriggerAnalysis() {}
907972ff 30
31 void EnableHistograms();
ff8c4f30 32
70fdd197 33 Bool_t IsTriggerFired(const AliESDEvent* aEsd, Trigger trigger) const;
34
35 // using trigger bits in ESD
36 Bool_t IsTriggerBitFired(const AliESDEvent* aEsd, Trigger trigger) const;
37 Bool_t IsTriggerBitFired(ULong64_t triggerMask, Trigger trigger) const;
38 Bool_t IsTriggerBitFired(const AliESDEvent* aEsd, ULong64_t tclass) const;
39
40 // using ESD data from detectors
41 Bool_t IsOfflineTriggerFired(const AliESDEvent* aEsd, Trigger trigger) const;
42
43 // using trigger classes in ESD
44 Bool_t IsTriggerClassFired(const AliESDEvent* aEsd, const Char_t* tclass) const;
45
46 static const char* GetTriggerName(Trigger trigger);
47
907972ff 48 void FillHistograms(const AliESDEvent* aEsd);
ff8c4f30 49
50 void SetSPDGFOThreshhold(Int_t t) { fSPDGFOThreshold = t; }
51 void SetV0Threshhold(Int_t aSide, Int_t cSide) { fV0AThreshold = aSide; fV0CThreshold = cSide; }
7a11141c 52 void SetFMDThreshold(Float_t low, Float_t hit) { fFMDLowCut = low; fFMDHitCut = hit; }
ff8c4f30 53
54 Int_t GetSPDGFOThreshhold() const { return fSPDGFOThreshold; }
55 Int_t GetV0AThreshold() const { return fV0AThreshold; }
56 Int_t GetV0CThreshold() const { return fV0CThreshold; }
7a11141c 57 Float_t GetFMDLowThreshold() const { return fFMDLowCut; }
58 Float_t GetFMDHitThreshold() const { return fFMDHitCut; }
907972ff 59
60 virtual Long64_t Merge(TCollection* list);
61 void WriteHistograms() const;
ff8c4f30 62
63 protected:
70fdd197 64 Bool_t IsL0InputFired(const AliESDEvent* aEsd, UInt_t input) const;
65 Bool_t IsL1InputFired(const AliESDEvent* aEsd, UInt_t input) const;
66 Bool_t IsL2InputFired(const AliESDEvent* aEsd, UInt_t input) const;
67 Bool_t IsInputFired(const AliESDEvent* aEsd, Char_t level, UInt_t input) const;
68
907972ff 69 Int_t SPDFiredChips(const AliESDEvent* aEsd) const;
ff8c4f30 70 Bool_t SPDGFOTrigger(const AliESDEvent* aEsd) const;
907972ff 71
72 Int_t V0BBTriggers(const AliESDEvent* aEsd, AliceSide side) const;
ff8c4f30 73 Bool_t V0Trigger(const AliESDEvent* aEsd, AliceSide side) const;
907972ff 74
ff8c4f30 75 Bool_t ZDCTrigger(const AliESDEvent* aEsd, AliceSide side) const;
907972ff 76
77 Int_t FMDHitCombinations(const AliESDEvent* aEsd, AliceSide side, Bool_t fillHistograms) const;
7a11141c 78 Bool_t FMDTrigger(const AliESDEvent* aEsd, AliceSide side) const;
ff8c4f30 79
80 Int_t fSPDGFOThreshold; // number of chips to accept a SPD GF0 trigger
81 Int_t fV0AThreshold; // threshold for number of BB triggers in V0A
82 Int_t fV0CThreshold; // threshold for number of BB triggers in V0C
83
7a11141c 84 Float_t fFMDLowCut; //
85 Float_t fFMDHitCut; //
907972ff 86
87 TH1* fHistSPD; // histograms that histogram the criterion the cut is applied on: fired chips
88 TH1* fHistV0A; // histograms that histogram the criterion the cut is applied on: bb triggers
89 TH1* fHistV0C; // histograms that histogram the criterion the cut is applied on: bb triggers
90 TH1* fHistZDC; // histograms that histogram the criterion the cut is applied on: fired bits (6 bins)
91 TH1* fHistFMDA; // histograms that histogram the criterion the cut is applied on: number of hit combination above threshold
92 TH1* fHistFMDC; // histograms that histogram the criterion the cut is applied on: number of hit combination above threshold
93 TH1* fHistFMDSingle; // histograms that histogram the criterion the cut is applied on: single mult value (more than one entry per event)
94 TH1* fHistFMDSum; // histograms that histogram the criterion the cut is applied on: summed mult value (more than one entry per event)
7a11141c 95
70fdd197 96 ClassDef(AliTriggerAnalysis, 1)
ff8c4f30 97
98 private:
70fdd197 99 AliTriggerAnalysis(const AliTriggerAnalysis&);
100 AliTriggerAnalysis& operator=(const AliTriggerAnalysis&);
ff8c4f30 101};
102
103#endif