LCOV - code coverage report
Current view: top level - STEER/STEERBase - AliTRDPIDParams.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 3 10 30.0 %
Date: 2016-06-14 17:26:59 Functions: 3 24 12.5 %

          Line data    Source code
       1             : /**************************************************************************
       2             : * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       3             : *                                                                        *
       4             : * Author: The ALICE Off-line Project.                                    *
       5             : * Contributors are mentioned in the code where appropriate.              *
       6             : *                                                                        *
       7             : * Permission to use, copy, modify and distribute this software and its   *
       8             : * documentation strictly for non-commercial purposes is hereby granted   *
       9             : * without fee, provided that the above copyright notice appears in all   *
      10             : * copies and that both the copyright notice and this permission notice   *
      11             : * appear in the supporting documentation. The authors make no claims     *
      12             : * about the suitability of this software for any purpose. It is          *
      13             : * provided "as is" without express or implied warranty.                  *
      14             : **************************************************************************/
      15             : //
      16             : // Container for TRD thresholds stored in the OADB
      17             : //
      18             : #ifndef ALITRDPIDPARAMS_H
      19             : #define ALITRDPIDPARAMS_H
      20             : 
      21             : #ifndef ROOT_TNamed
      22             : #include <TNamed.h>
      23             : #endif
      24             : 
      25             : class TList;
      26             : class TSortedList;
      27             : 
      28             : class AliTRDPIDParams : public TNamed{
      29             :   public:
      30             :     AliTRDPIDParams();
      31             :     AliTRDPIDParams(const char *name);
      32             :     AliTRDPIDParams(const AliTRDPIDParams &);
      33             :     virtual ~AliTRDPIDParams();
      34             :     virtual void Print(Option_t *) const;
      35             : 
      36             :     void AddCentralityClass(Double_t minCentrality, Double_t maxCentrality);
      37             :     Bool_t GetThresholdParameters(Int_t ntracklets, Double_t efficiency, Double_t *params, Double_t centrality = -1) const;
      38             :     void SetThresholdParameters(Int_t ntracklets, Double_t effMin, Double_t effMax, Double_t *params, Double_t centrality = -1);
      39             : 
      40             :   /* private: */
      41             :     class AliTRDPIDThresholds : public TObject{
      42             :     public:
      43             :       AliTRDPIDThresholds();
      44             :       AliTRDPIDThresholds(Int_t nTracklets, Double_t effMin, Double_t effMax, Double_t *params = NULL);
      45             :       AliTRDPIDThresholds(Int_t nTracklets, Double_t eff, Double_t *params = NULL);
      46             :       AliTRDPIDThresholds(const AliTRDPIDThresholds &);
      47             :       AliTRDPIDThresholds &operator=(const AliTRDPIDThresholds &);
      48           0 :       virtual ~AliTRDPIDThresholds() {}
      49             : 
      50           0 :       Int_t GetNTracklets() const { return fNTracklets; }
      51           0 :       Double_t GetElectronEfficiency(Int_t step = 0) const { if(step == 0) return fEfficiency[0]; else return fEfficiency[1]; }
      52           0 :       const Double_t *GetThresholdParams() const { return fParams; }
      53             : 
      54           0 :       virtual Bool_t IsSortable() const { return kTRUE; }
      55             :       virtual Int_t Compare(const TObject *ref) const;
      56             :       virtual Bool_t IsEqual(const TObject *ref) const;
      57             : 
      58             :     private:
      59             :       Int_t fNTracklets;          //
      60             :       Double_t fEfficiency[2];    //
      61             :       Double_t fParams[4];        //
      62             : 
      63             :       // #if ROOT_VERSION_CODE < ROOT_VERSION(5,99,0)
      64             :       // Private - cannot be streamed 
      65         176 :       ClassDef(AliTRDPIDThresholds, 1);
      66             :       // #endif
      67             :     };
      68             : 
      69             :     class AliTRDPIDCentrality : public TObject{
      70             :     public:
      71             :        AliTRDPIDCentrality();
      72             :        AliTRDPIDCentrality(Double_t minCentrality, Double_t maxCentrality);
      73             :        AliTRDPIDCentrality(const AliTRDPIDCentrality &ref);
      74             :        AliTRDPIDCentrality &operator=(const AliTRDPIDCentrality &ref);
      75             :        virtual ~AliTRDPIDCentrality();
      76             : 
      77           0 :        Double_t GetMinCentrality() const { return fMinCentrality; };
      78           0 :        Double_t GetMaxCentrality() const { return fMaxCentrality; };
      79             :         
      80             :        void SetThresholdParameters(Int_t ntracklets, Double_t effMin, Double_t effMax, Double_t *params);
      81             :        Bool_t GetThresholdParameters(Int_t ntracklets, Double_t efficiency, Double_t *params) const;
      82             :        void Print(Option_t *) const;
      83             :     private: 
      84             :        TSortedList *fEntries;       //
      85             :        Double_t fMinCentrality;     //
      86             :        Double_t fMaxCentrality;     //
      87             : 
      88             :        // #if ROOT_VERSION_CODE < ROOT_VERSION(5,99,0)
      89             :        // Private - cannot be streamed
      90         176 :        ClassDef(AliTRDPIDCentrality, 1);
      91             :        // #endif
      92             :     };
      93             :   private:
      94             : 
      95             :     AliTRDPIDCentrality *FindCentrality(Double_t centrality) const;
      96             :     AliTRDPIDParams &operator=(const AliTRDPIDParams &);
      97             :     static const Double_t kVerySmall;
      98             :     TList *fEntries; //
      99             : 
     100             : 
     101         176 :     ClassDef(AliTRDPIDParams, 2);
     102             : };
     103             : #endif
     104             : 
     105             : 

Generated by: LCOV version 1.11