LCOV - code coverage report
Current view: top level - ITS/ITSbase - AliITSPlaneEff.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 22 4.5 %
Date: 2016-06-14 17:26:59 Functions: 1 27 3.7 %

          Line data    Source code
       1             : #ifndef ALIITSPLANEEFF_H
       2             : #define ALIITSPLANEEFF_H
       3             : /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : 
       6             : #include <TString.h>
       7             : #include "AliPlaneEff.h"
       8             : 
       9             : class AliITSsegmentation;
      10             : class TF1;
      11             : class AliITSgeom;
      12             : class AliLog;
      13             : 
      14             : ////////////////////////////////////////////////////
      15             : //                                                //
      16             : // ITS virtual base class for Plane Efficiency    //
      17             : // Origin: Giuseppe.Bruno@ba.infn.it              //
      18             : //                                                //
      19             : ////////////////////////////////////////////////////
      20             : 
      21             : /* $Id$ */
      22             : 
      23             : class AliITSPlaneEff : public AliPlaneEff {
      24             :  public:
      25             :  
      26             :     AliITSPlaneEff();// Default constructor
      27             :     // Standard constructor
      28           0 :     virtual ~AliITSPlaneEff(){;};
      29             :     // copy constructor. See detector specific implementation.
      30             :     AliITSPlaneEff(const AliITSPlaneEff &source);
      31             :     // Assignment operator. See detector specific implementation.
      32             :     AliITSPlaneEff& operator=(const AliITSPlaneEff &source);
      33             :     // Simple way to add another class (i.e. statistics). 
      34             :     //AliITSPlaneEff& operator +=( const AliITSPlaneEff &){return *this};
      35             :     // Average Plane efficiency (including dead/noisy)
      36           0 :     Int_t   GetRunNumber() const {return fRunNumber;}
      37           0 :     void    SetRunNumber(Int_t n) {fRunNumber=n;}
      38             :     //
      39             :     Double_t PlaneEff(Int_t nfound,Int_t ntried) const;     
      40             :     Double_t ErrPlaneEff(Int_t nfound,Int_t ntried) const; 
      41             :     virtual void GetPlaneEff(Int_t nfound,Int_t ntried,Double_t &eff, Double_t &err) const
      42           0 :         {eff=PlaneEff(nfound,ntried); err=ErrPlaneEff(nfound,ntried); return;};
      43             :     //
      44             :     virtual Double_t PlaneEff(const UInt_t key) const=0;
      45             :     // Plane efficiency for active  detector (excluding dead/noisy channels)
      46             :     virtual Double_t LivePlaneEff(UInt_t) const
      47           0 :        {AliWarning("This method gives just a rough estimate of the live-Det Efficiency!"); 
      48           0 :         return -1.;};
      49             :     virtual Double_t ErrLivePlaneEff(UInt_t) const
      50           0 :        {AliError("This method must be implemented in a derived class"); return -1.;};
      51             :     // Compute the fraction of Live detector
      52             :     virtual Double_t GetFracLive(const UInt_t) const
      53           0 :        {AliError("This method must be implemented in a derived class"); return -1.;}; 
      54             :     // Compute the fraction of Bad (i.e. dead + noisy) detector 
      55             :     virtual Double_t GetFracBad(const UInt_t) const
      56           0 :        {AliError("This method must be implemented in a derived class"); return -1.;}; 
      57             :     // Update the Counting of the plane efficiency
      58             :     virtual Bool_t UpDatePlaneEff(const Bool_t, const UInt_t) 
      59           0 :        {AliError("This method must be implemented in a derived class"); return kFALSE;};
      60             :     // Estimate of the number of tracks needed for measuring efficiency within RelErr
      61             :     virtual Int_t GetNTracksForGivenEff(Double_t eff, Double_t RelErr) const;
      62             :     void SetDefaultStorage(const char* uri);
      63             :     // Write into the data base 
      64             :     virtual Bool_t WriteIntoCDB() const
      65           0 :        {AliError("This method must be implemented in a derived class"); return kFALSE;};
      66             :     virtual Bool_t ReadFromCDB()
      67           0 :        {AliError("This method must be implemented in a derived class"); return kFALSE;};
      68             :     virtual Bool_t AddFromCDB()
      69           0 :        {AliError("This method must be implemented in a derived class"); return kFALSE;};
      70             :     // method to locate a basic block from Detector Local coordinate 
      71             :     virtual UInt_t GetKeyFromDetLocCoord(Int_t, Int_t, Float_t, Float_t) const
      72           0 :       {AliError("This method must be implemented in a derived class"); return 999999;};
      73             :     virtual UInt_t Nblock() const // return the number of basic blocks
      74           0 :       {AliError("This method must be implemented in a derived class"); return 999999;};
      75             :     virtual Bool_t GetBlockBoundaries(const UInt_t,Float_t&,Float_t&,Float_t&,Float_t&) const
      76           0 :       {AliError("This method must be implemented in a derived class"); return kFALSE;};
      77             :   // Methods for dealing with auxiliary histograms
      78             :     // method to set on/off the creation/updates of histograms (Histos are created/destroyed)
      79             :     virtual void   SetCreateHistos(Bool_t)
      80           0 :       {AliError("This method must be implemented in a derived class"); return; }
      81           0 :     virtual Bool_t GetCreateHistos() const {return fHis;};
      82             :     virtual Bool_t FillHistos(UInt_t, Bool_t, Float_t*, Float_t*, Int_t*, Float_t*)
      83           0 :       {AliError("This method must be implemented in a derived class"); return kFALSE; }
      84             :     virtual Bool_t WriteHistosToFile(TString ,Option_t*)
      85           0 :       {AliError("This method must be implemented in a derived class"); return kFALSE; }
      86             :     virtual Bool_t ReadHistosFromFile(TString )
      87           0 :       {AliError("This method must be implemented in a derived class"); return kFALSE; }
      88             :     void InitCDB();
      89             : 
      90             :  protected:
      91             : 
      92             :     virtual void Copy(TObject &obj) const;
      93             :     void NotImplemented(const char *method) const {if(gDebug>0)
      94             :          Warning(method,"This method is not implemented for this sub-class");}
      95             :     Int_t       fRunNumber;     //! run number (to access CDB)
      96             :     TString     fCDBUri;        //! Uri of the default CDB storage
      97             :     Bool_t      fInitCDBCalled; //! flag to check if CDB storages are already initialized
      98             :     Bool_t      fHis;           //! if true, then histograms are created and filled 
      99             :    
     100             :  private:
     101             :     //Int_t*    fFound;         // number of associated clusters into a given block (e.g. SPD 1200 chip)
     102             :     //Int_t*    fTries;         // number of exspected  clusters into a given block (e.g. SPD 1200 chip)
     103             :     //Int_t     fRunNumber;     // run number (to access CDB)
     104             : 
     105         118 :     ClassDef(AliITSPlaneEff,2) // ITS Plane Efficiency virtual base class 
     106             : };
     107             : #endif

Generated by: LCOV version 1.11