LCOV - code coverage report
Current view: top level - MUON/MUONbase - AliMUONRealDigit.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 16 23 69.6 %
Date: 2016-06-14 17:26:59 Functions: 17 29 58.6 %

          Line data    Source code
       1             : #ifndef ALIMUONREALDIGIT_H
       2             : #define ALIMUONREALDIGIT_H
       3             : 
       4             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       5             : * See cxx source for full Copyright notice                               */
       6             : 
       7             : // $Id$
       8             : 
       9             : /// \ingroup base
      10             : /// \class AliMUONRealDigit
      11             : /// \brief Implementation of AliMUONVDigit for real (i.e. not simulated) digits
      12             : /// 
      13             : // author Laurent Aphecetche
      14             : 
      15             : #ifndef ALIMUONVDIGIT_H
      16             : #  include "AliMUONVDigit.h"
      17             : #endif
      18             : 
      19      828112 : class AliMUONRealDigit : public AliMUONVDigit
      20             : {
      21             : public:
      22             :   AliMUONRealDigit();
      23             :   AliMUONRealDigit(Int_t detElemId, Int_t manuId, Int_t manuChannel, Int_t cathode);
      24             :   virtual ~AliMUONRealDigit();
      25             :   
      26             :   /// Return the detection element this digit belongs to
      27     1637222 :   virtual Int_t DetElemId() const { return AliMUONVDigit::DetElemId(GetUniqueID()); }
      28             :   virtual Int_t PadX() const;
      29             :   virtual Int_t PadY() const;
      30             :   /// Return the cathode this digit belongs to
      31     1314788 :   virtual Int_t Cathode() const { return AliMUONVDigit::Cathode(GetUniqueID()); }
      32             :   
      33             :   /// Charge (should be non zero if calibrated)
      34      289428 :   virtual Float_t Charge() const { return fCharge; }
      35             :   
      36             :   /// ADC value (it is the real raw adc value, not pedestal subtracted)
      37        1416 :   virtual Int_t ADC() const { return fADC; }
      38             :   
      39             :   /// Return the manu chip this digit belongs to
      40     1029234 :   virtual Int_t ManuId() const  { return AliMUONVDigit::ManuId(GetUniqueID()); }
      41             :   /// Return the manu channel this digits is connected to
      42     1029234 :   virtual Int_t ManuChannel() const  { return AliMUONVDigit::ManuChannel(GetUniqueID()); }
      43             :   
      44             :   /// Whether this digit's charge has saturated the electronics
      45        1324 :   virtual Bool_t IsSaturated() const { return TestBit(kSaturated); }
      46             :   /// Set the saturation status
      47         708 :   virtual void Saturated(Bool_t saturated=kTRUE) { SetBit(kSaturated,saturated); }
      48             :   
      49             :   /// We have no idea whether a real digit is noise only or not ;-)
      50           0 :   virtual Bool_t IsNoiseOnly() const { return kFALSE; }
      51             :   
      52             :   /// Again, this is for simulation only
      53           0 :   virtual Bool_t IsEfficiencyApplied() const { return kFALSE; }
      54             :   
      55             :   /// Whether this digit is calibrated or not
      56        1416 :   virtual Bool_t IsCalibrated() const { return TestBit(kCalibrated); }
      57             :   /// Set the calibration status
      58         708 :   virtual void Calibrated(Bool_t value) { SetBit(kCalibrated,value); }
      59             :   
      60             :   /// Whether this digit has its charge already in fC
      61           0 :   virtual Bool_t IsChargeInFC() const { return TestBit(kChargeInFC); }
      62             :   /// Set the charge unit value
      63         708 :   virtual void ChargeInFC(Bool_t value=kTRUE) { SetBit(kChargeInFC,value); }
      64             : 
      65             :   /// Whether this digit is part of a cluster or something else
      66           0 :   virtual Bool_t IsUsed() const { return TestBit(kUsed); }
      67             :   /// Set the used status
      68           0 :   virtual void Used(Bool_t value) { SetBit(kUsed,value); }
      69             :   
      70             :   /// The status map (i.e. the status of the neighbours) of this digit
      71           0 :   virtual UInt_t StatusMap() const { return fStatusMap; }
      72             :   /// Set the status map value
      73        1416 :   virtual void SetStatusMap(UInt_t statusMap) { fStatusMap = statusMap; }
      74             :   
      75             :   /// Set the ADC value (should be between 0 and 4095)
      76        1416 :   virtual void SetADC(Int_t adc) { fADC = adc; }
      77             :   virtual void SetPadXY(Int_t padx, Int_t pady);
      78             :   /// Set the charge
      79      414056 :   virtual void SetCharge(Float_t q) { fCharge=q; }
      80             :   
      81             :   virtual Bool_t MergeWith(const AliMUONVDigit& other);
      82             :   
      83             :   /// No, this digit is not a Monte-Carlo one, sorry.
      84           0 :   virtual Bool_t HasMCInformation() const { return kFALSE; }
      85             :   
      86             : private:
      87             :   Float_t fCharge; ///< Charge on pad  
      88             :   UInt_t fPadXY; ///< Pad number along x and Y (packed)
      89             :   Int_t fADC; ///< Raw ADC value
      90             :   UInt_t fStatusMap; ///< Neighbouring pad status (whether ped, gains, hv were ok or not)
      91             :   
      92             :   /// Various statuses of the digit
      93             :   enum EStatusBit 
      94             :   {
      95             :     kSaturated = BIT(20),  ///< to indicate that manas amplifier has saturated 
      96             :     kUsed = BIT(21),       ///< whether the digit is used (e.g. in a cluster)
      97             :     kCalibrated = BIT(22),  ///< whether the digit has been calibrated or not 
      98             :     kChargeInFC = BIT(23)   ///< whether the digit has a charge in fC or not
      99             :   };
     100             :   
     101          18 :   ClassDef(AliMUONRealDigit,2) // Implementation of AliMUONVDigit
     102             : };
     103             : 
     104             : #endif

Generated by: LCOV version 1.11