]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALRawUtils.h
Corrected detector name (Mario)
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALRawUtils.h
index 5ca6da96fd9188b1db28241baff9b72f2ba87104..ce2cc4fb56b4e5ed4bc2a87b90c27553e20b1813 100644 (file)
 class TGraph;
 class TF1;
 class AliRawReader;
+class AliEMCALGeometry;
 
 class AliEMCALRawUtils : public TObject {
  public:
   AliEMCALRawUtils();
   virtual ~AliEMCALRawUtils();
 
-  void Digits2Raw(AliAltroMapping **mapping = NULL);
-  void Raw2Digits(AliRawReader *reader,TClonesArray *digitsArr, AliAltroMapping **mapping = NULL);
+  AliEMCALRawUtils(const AliEMCALRawUtils& rawUtils);  //copy ctor
+  AliEMCALRawUtils& operator =(const AliEMCALRawUtils& rawUtils);
+
+  void Digits2Raw();
+  void Raw2Digits(AliRawReader *reader,TClonesArray *digitsArr);
+
   void AddDigit(TClonesArray *digitsArr, Int_t id, Int_t lowGain, Int_t amp, Float_t time);
 
   // Signal shape parameters
-  Double_t GetRawFormatHighLowGainFactor() const {return fHighLowGainFactor ;}
-  static Int_t GetRawFormatOrder() { return fgOrder ; }   
+  Double_t GetRawFormatHighLowGainFactor() const { return fHighLowGainFactor ;}
+  Int_t GetRawFormatOrder()                const { return fOrder ; }   
+  Double_t GetRawFormatTau()               const { return fTau ; }    
+  Int_t GetNoiseThreshold()                const { return fNoiseThreshold; }
+  Int_t GetNPedSamples()                   const { return fNPedSamples; }
+
+  void SetRawFormatHighLowGainFactor(Double_t val) {fHighLowGainFactor=val;}
+  void SetRawFormatOrder(Int_t val)                {fOrder=val; }   
+  void SetRawFormatTau(Double_t val)               {fTau=val; }    
+  void SetNoiseThreshold(Int_t val)                {fNoiseThreshold=val; }
+  void SetNPedSamples(Int_t val)                   {fNPedSamples=val; }
+  
   static Int_t GetRawFormatTimeBins() { return fgkTimeBins ; }    
   static Double_t GetRawFormatTimeMax() { return fgkTimeBins*fgTimeBinWidth; }   
   static Double_t GetRawFormatTimeBinWidth() { return fgTimeBinWidth; }   
-  Double_t GetRawFormatTau() const { return fgTau ; }    
+  static Double_t GetRawFormatTimeBin() 
+  { return GetRawFormatTimeMax() / GetRawFormatTimeBins(); }   
   Double_t GetRawFormatTimeTrigger() const { return fgTimeTrigger ; }
   Int_t GetRawFormatThreshold() const { return fgThreshold ; }       
   Int_t GetRawFormatDDLPerSuperModule() const { return fgDDLPerSuperModule ; } 
@@ -66,20 +82,31 @@ class AliEMCALRawUtils : public TObject {
   static Double_t RawResponseFunction(Double_t *x, Double_t *par); 
   Bool_t   RawSampledResponse(Double_t dtime, Double_t damp, Int_t * adcH, Int_t * adcL) const;  
 
-  ClassDef(AliEMCALRawUtils,1)
 
  private:
   Double_t fHighLowGainFactor ;         // high to low gain factor for the raw RO signal
-  static Int_t fgOrder ;                // order of the gamma function for the RO signal
-  static Double_t fgTau ;                // tau parameter of gamma function for the RO signal
-  static Double_t fgTimeTrigger ;       // time of the trigger for the RO signal 
+  Int_t fOrder ;                        // order of the gamma function for the RO signal
+  Double_t fTau ;                       // tau parameter of gamma function for the RO signal
+  Int_t fNoiseThreshold;                // threshold to consider signal or noise
+  Int_t fNPedSamples;                   // number of samples to use in pedestal calculation
 
+  static const Int_t fgkOverflowCut = 950;  // cut to discriminate overflowed channels
   static const Int_t fgkTimeBins = 256 ; // number of sampling bins of the raw RO signal  
+  static const Int_t fgkRawSignalOverflow = 0x3FF; // maximum signal (10 bits)
+
+  static Double_t fgTimeTrigger ;       // time of the trigger for the RO signal 
   static Double_t fgTimeBinWidth;       // maximum sampled time of the raw RO signal                             
   static Int_t fgThreshold;             // threshold
   static Int_t fgDDLPerSuperModule;     // number of DDL per SuperModule
+  static Int_t fgPedestalValue;         // pedestal value for Digits2Raw
+  static Double_t fgFEENoise;           // electronics noise in ADC units
+
+  AliEMCALGeometry* fGeom;         //geometry
+  AliAltroMapping*  fMapping[2];   //only two for now
 
   TString fOption;                      //! option passed from Reconstructor
+
+  ClassDef(AliEMCALRawUtils,3)          // utilities for raw signal fitting
 };
 
 #endif