]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ANALYSIS/AliTriggerAnalysis.h
updating physics selection for heavy-ion data
[u/mrichter/AliRoot.git] / ANALYSIS / AliTriggerAnalysis.h
index d48fdc9ab810216770f6e4e9e69b883ca1bdd855..aaa9066b109980683de7519d9d41f76a9ece356b 100644 (file)
 //-------------------------------------------------------------------------
 
 class AliESDEvent;
-class TH1;
-class TH2;
+class AliESDtrackCuts;
+class TH1F;
+class TH2F;
 class TCollection;
 class TMap;
 
 class AliTriggerAnalysis : public TObject
 {
   public:
-    enum Trigger { kAcceptAll = 1, kMB1 = 2, kMB2, kMB3, kSPDGFO, kSPDGFOBits, kV0A, kV0C, kV0ABG, kV0CBG, kZDC, kZDCA, kZDCC, kFMDA, kFMDC, kFPANY, kStartOfFlags = 0x0100, kOfflineFlag = 0x8000 }; // MB1, MB2, MB3 definition from ALICE-INT-2005-025
+    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
     enum AliceSide { kASide = 1, kCSide, kCentralBarrel };
-    enum V0Decision { kV0Invalid = -1, kV0Empty = 0, kV0BB, kV0BG };
+    enum V0Decision { kV0Invalid = -1, kV0Empty = 0, kV0BB, kV0BG, kV0Fake };
     
     AliTriggerAnalysis();
     virtual ~AliTriggerAnalysis();
@@ -48,23 +49,28 @@ class AliTriggerAnalysis : public TObject
     Bool_t IsTriggerClassFired(const AliESDEvent* aEsd, const Char_t* tclass) const;
     
     // some "raw" trigger functions
-    Int_t SPDFiredChips(const AliESDEvent* aEsd, Int_t origin, Bool_t fillHists = kFALSE);
+    Int_t SPDFiredChips(const AliESDEvent* aEsd, Int_t origin, Bool_t fillHists = kFALSE, Int_t layer = 0);
     Bool_t SPDGFOTrigger(const AliESDEvent* aEsd, Int_t origin);
-    V0Decision V0Trigger(const AliESDEvent* aEsd, AliceSide side, Bool_t fillHists = kFALSE);
+    V0Decision V0Trigger(const AliESDEvent* aEsd, AliceSide side, Bool_t online, Bool_t fillHists = kFALSE);
     Bool_t ZDCTrigger(const AliESDEvent* aEsd, AliceSide side) const;
     Bool_t FMDTrigger(const AliESDEvent* aEsd, AliceSide side);
-    
+    Int_t SSDClusters(const AliESDEvent* aEsd);
     static const char* GetTriggerName(Trigger trigger);
     
     void FillHistograms(const AliESDEvent* aEsd);
     void FillTriggerClasses(const AliESDEvent* aEsd);
     
     void SetSPDGFOThreshhold(Int_t t) { fSPDGFOThreshold = t; }
+    void SetSPDGFOEfficiency(TH1F* hist) { fSPDGFOEfficiency = hist; }
     void SetV0TimeOffset(Float_t offset) { fV0TimeOffset = offset; }
+    void SetV0AdcThr(Float_t thr) { fV0AdcThr = thr; }
+    void SetV0HwPars(Float_t thr, Float_t winLow, Float_t winHigh) { fV0HwAdcThr = thr; fV0HwWinLow = winLow; fV0HwWinHigh = winHigh; }
     void SetFMDThreshold(Float_t low, Float_t hit) { fFMDLowCut = low; fFMDHitCut = hit; }
-    
+    void SetDoFMD(Bool_t flag = kTRUE) {fDoFMD = flag;}
+
     Int_t GetSPDGFOThreshhold() const { return fSPDGFOThreshold; }
     Float_t GetV0TimeOffset() const { return fV0TimeOffset; }
+    Float_t GetV0AdcThr()     const { return fV0AdcThr; }
     Float_t GetFMDLowThreshold() const { return fFMDLowCut; }
     Float_t GetFMDHitThreshold() const { return fFMDHitCut; }
     
@@ -72,6 +78,8 @@ class AliTriggerAnalysis : public TObject
     void SaveHistograms() const;
     
     void PrintTriggerClasses() const;
+    void SetESDTrackCuts(AliESDtrackCuts* cuts) { fEsdTrackCuts = cuts;}
+    AliESDtrackCuts* GetESDTrackCuts() const  {return fEsdTrackCuts;}
 
   protected:
     Bool_t IsL0InputFired(const AliESDEvent* aEsd, UInt_t input) const;
@@ -79,32 +87,40 @@ class AliTriggerAnalysis : public TObject
     Bool_t IsL2InputFired(const AliESDEvent* aEsd, UInt_t input) const;
     Bool_t IsInputFired(const AliESDEvent* aEsd, Char_t level, UInt_t input) const;
     
-    Float_t V0CorrectLeadingTime(Int_t i, Float_t time, Float_t adc) const;
+    Float_t V0CorrectLeadingTime(Int_t i, Float_t time, Float_t adc, Int_t runNumber) const;
     Float_t V0LeadingTimeWeight(Float_t adc) const;
     
     Int_t FMDHitCombinations(const AliESDEvent* aEsd, AliceSide side, Bool_t fillHists = kFALSE);
 
     Int_t fSPDGFOThreshold;         // number of chips to accept a SPD GF0 trigger
+    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)
+    
     Float_t fV0TimeOffset;          // time offset applied to the times read from the V0 (in ns)
+    Float_t fV0AdcThr;              // thresholds applied on V0 ADC data
+    Float_t fV0HwAdcThr;            // online V0 trigger - thresholds applied on ADC data 
+    Float_t fV0HwWinLow;            // online V0 trigger - lower edge of time window
+    Float_t fV0HwWinHigh;           // online V0 trigger - upper edge of time window
+
+    Bool_t  fDoFMD;                 // If false, skips the FMD (physics selection runs much faster)
     Float_t fFMDLowCut;                    // 
     Float_t fFMDHitCut;                    // 
     
-    TH2* fHistBitsSPD;        // offline trigger bits (calculated from clusters) vs hardware trigger bits
-    TH1* fHistFiredBitsSPD;   // fired hardware bits
-    TH1* fHistV0A;            // histograms that histogram the criterion the cut is applied on: bb triggers
-    TH1* fHistV0C;            // histograms that histogram the criterion the cut is applied on: bb triggers
-    TH1* fHistZDC;            // histograms that histogram the criterion the cut is applied on: fired bits (6 bins)
-    TH1* fHistFMDA;           // histograms that histogram the criterion the cut is applied on: number of hit combination above threshold
-    TH1* fHistFMDC;           // histograms that histogram the criterion the cut is applied on: number of hit combination above threshold
-    TH1* fHistFMDSingle;      // histograms that histogram the criterion the cut is applied on: single mult value (more than one entry per event)
-    TH1* fHistFMDSum;         // histograms that histogram the criterion the cut is applied on: summed mult value (more than one entry per event)
+    TH2F* fHistBitsSPD;        // offline trigger bits (calculated from clusters) vs hardware trigger bits
+    TH1F* fHistFiredBitsSPD;   // fired hardware bits
+    TH1F* fHistV0A;            // histograms that histogram the criterion the cut is applied on: bb triggers
+    TH1F* fHistV0C;            // histograms that histogram the criterion the cut is applied on: bb triggers
+    TH1F* fHistZDC;            // histograms that histogram the criterion the cut is applied on: fired bits (6 bins)
+    TH1F* fHistFMDA;           // histograms that histogram the criterion the cut is applied on: number of hit combination above threshold
+    TH1F* fHistFMDC;           // histograms that histogram the criterion the cut is applied on: number of hit combination above threshold
+    TH1F* fHistFMDSingle;      // histograms that histogram the criterion the cut is applied on: single mult value (more than one entry per event)
+    TH1F* fHistFMDSum;         // histograms that histogram the criterion the cut is applied on: summed mult value (more than one entry per event)
     
     TMap* fTriggerClasses;    // counts the active trigger classes (uses the full string)
     
     Bool_t fMC;              // flag if MC is analyzed
+    AliESDtrackCuts* fEsdTrackCuts;  //Track Cuts to select ESD tracks
 
-    ClassDef(AliTriggerAnalysis, 6)
+    ClassDef(AliTriggerAnalysis, 11)
     
   private:
     AliTriggerAnalysis(const AliTriggerAnalysis&);