]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSDigitizer.h
Coverity 18557 solved by non-implemented private copy constructor and assignment...
[u/mrichter/AliRoot.git] / PHOS / AliPHOSDigitizer.h
index 89d133f4d26459a55df406115e51b2cfd56f41ce..68ca72d89b85e3d7cda16f25ad00a60767115165 100644 (file)
 
 /* $Id$ */
 
+/* History of cvs commits:
+ *
+ * $Log$
+ * Revision 1.37  2007/10/10 09:05:10  schutz
+ * Changing name QualAss to QA
+ *
+ * Revision 1.36  2007/09/30 17:08:20  schutz
+ * Introducing the notion of QA data acquisition cycle (needed by online)
+ *
+ * Revision 1.35  2007/08/07 14:12:03  kharlov
+ * Quality assurance added (Yves Schutz)
+ *
+ * Revision 1.34  2006/04/29 20:25:30  hristov
+ * Decalibration is implemented (Yu.Kharlov)
+ *
+ * Revision 1.33  2005/05/28 14:19:04  schutz
+ * Compilation warnings fixed by T.P.
+ *
+ */
+
 //_________________________________________________________________________
 //  Task Class for making SDigits in PHOS      
+// Class performs digitization of Summable digits (in the PHOS case this is just
+// sum of contributions of all primary particles into given cell). 
+// In addition it performs mixing of summable digits from different events.
 //                  
 //*-- Author: Dmitri Peressounko(SUBATECH & KI)
 
 
 // --- ROOT system ---
-#include "TTask.h"
-#include "TObjString.h"
+//#include "TObjString.h"
+class TArrayI ;
+class TClonesArray ; 
+
 // --- Standard library ---
 
 // --- AliRoot header files ---
+#include "AliDigitizer.h"
+#include "AliConfig.h"
+#include "AliPHOSPulseGenerator.h"
+class AliDigitizationInput ;
+class AliPHOSCalibData ; 
 
-class AliPHOSSDigitizer ;
-
-class AliPHOSDigitizer: public TTask {
+class AliPHOSDigitizer: public AliDigitizer {
 
 public:
   AliPHOSDigitizer() ;          // ctor
-  AliPHOSDigitizer(char *HeaderFile,char * SDigitsBrancheFile = 0) ; 
+  AliPHOSDigitizer(TString alirunFileNameFile, TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ; 
+  AliPHOSDigitizer(const AliPHOSDigitizer & dtizer) ;
+  AliPHOSDigitizer(AliDigitizationInput * digInput) ;
   virtual ~AliPHOSDigitizer() ;       
-  Bool_t  Combinator() ;                         // makes all desirable combination sig+Bg
-  void    Exec(Option_t *option);                // Does the job
-  void    Digitize(Option_t *option);            // Digitizes SDigits stored in fSDigits
-  Float_t GetPinNoise()     const { return fPinNoise;}
-  Float_t GetEMCThreshold() const { return fEMCDigitThreshold;}
-  Float_t GetCPVNoise()     const { return fCPVNoise ;}
-  Float_t GetCPVThreshold() const { return fCPVDigitThreshold ;}
-  Float_t GetPPSDNoise()    const { return fPPSDNoise ;}
-  Float_t GetPPSDThreshold()const { return fPPSDDigitThreshold ;}
-  void    MixWith(char* HeaderFile, Int_t isOutFile = 1, char* SDigitsFile =0) ; // Add another one file to mix
-  void    Print(Option_t* option) ;
-  void    SetPinNoise(Float_t PinNoise )         {fPinNoise = PinNoise;}
-  void    SetEMCThreshold(Float_t EMCThreshold)  {fEMCDigitThreshold = EMCThreshold;}
-  void    SetCPVNoise(Float_t CPVNoise)          {fCPVNoise = CPVNoise;}
-  void    SetCPVThreshold(Float_t CPVThreshold)  {fCPVDigitThreshold= CPVThreshold;}
-  void    SetPPSDNoise(Float_t PPSDNoise)        {fPPSDNoise = PPSDNoise;}
-  void    SetPPSDThreshold(Float_t PPSDThreshold){fPPSDDigitThreshold = PPSDThreshold;}
 
+  void    Digitize(Int_t event) ;            // Make Digits from SDigits 
+  void    Digitize(Option_t *option);                  // Supervising method
+
+  void   SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; }
+
+  //General
+  Int_t   GetDigitsInRun()  const { return fDigitsInRun ;}  
+
+  void    Print(const Option_t * = "")const ;
 private:
-  void   Init(Int_t isOutFile);                   
-  Bool_t ReadSDigits() ;            // Read sdigits for particular events
-  void   WriteDigits() ;            // Writes Digits for particular event
+  AliPHOSDigitizer & operator = (const AliPHOSDigitizer & /*rvalue*/)  {
+    return *this ; 
+  }
+  
+private:
+
+  virtual Bool_t Init() ; 
+  void    InitParameters() ; 
+  void    PrintDigits(Option_t * option) ;
+  void    Unload() ; 
+  void    WriteDigits() ;                     // Writes Digits for the current event
+  Float_t TimeOfNoise(void) const;            // Calculate time signal generated by noise
+
+  Float_t TimeResolution(Float_t energy) ;    //TOF resolution
+
+  //Calculate the time of crossing of the threshold by front edge
+  //  Float_t FrontEdgeTime(TClonesArray * ticks) const ; 
+  //Calculate digitized signal with gived ADC parameters
+  Float_t Calibrate(Float_t amp, Int_t absId) ;
+  Float_t CalibrateT(Float_t time, Int_t absId) ;
+  void    Decalibrate(AliPHOSDigit * digit);
+  Int_t   DigitizeCPV(Float_t charge, Int_t absId) ;
 
 private:
-  TClonesArray * fSDigitsFiles ;    // Names of sdigits branches
-  TClonesArray * fHeaderFiles ;     // Names of files with headers to merge
-  TString        fDigitsFile ;      // Name of the Digits Branch  
-  Int_t          fOutFileNumber ;   // Number of the header file into which Digits are written
-  TClonesArray * fSDigits ;         // ! Lists of SDigits 
-  TClonesArray * fDigits ;          // ! Final list of digits
-  AliPHOSSDigitizer * fSDigitizer ; // ! SDigitizer to extarct some digitizing parameters
-  Int_t   fNinputs ;                // Number of input files
-  Bool_t  fInitialized ;            // if background file already read?
-  TArrayI * fIevent ;               // events to read at the next ReadSDigits() call
-  TArrayI * fIeventMax ;            // Maximal number of events in each input file
-
-  Float_t fPinNoise ;               // Electronics noise in EMC
-  Float_t fEMCDigitThreshold  ;     // Threshold for storing digits in EMC
-  Float_t fCPVNoise ;               // Noise in CPV
-  Float_t fCPVDigitThreshold  ;     // Threshold for storing digits in CPV
-  Float_t fPPSDNoise ;              // Noise in PPSD
-  Float_t fPPSDDigitThreshold ;     // Threshold for storing digits in PPSD
-
-
-  ClassDef(AliPHOSDigitizer,1)  // description 
+
+  Bool_t  fDefaultInit;             //! Says if the task was created by defaut ctor (only parameters are initialized)
+  Int_t   fDigitsInRun ;            //! Total number of digits in one run
+  Bool_t  fInit ;                   //! To avoid overwriting existing files
+
+  Int_t   fInput ;                  // Number of files to merge
+  TString * fInputFileNames ;       //[fInput] List of file names to merge 
+  TString * fEventNames ;           //[fInput] List of event names to merge
+
+  Int_t   fEmcCrystals ;            // Number of EMC crystalls in the given geometry
+
+  TString fEventFolderName;         // skowron: name of EFN to read data from in stand alone mode
+  Int_t   fFirstEvent;              // first event to process
+  Int_t   fLastEvent;               // last  event to process 
+  AliPHOSCalibData* fcdb;           //! Calibration parameters DB
+
+  Int_t fEventCounter ;             //! counts the events processed
+
+  AliPHOSPulseGenerator *fPulse;    //! Pulse shape generator
+  Int_t *fADCValuesLG;              //! Array of low-gain ALTRO samples
+  Int_t *fADCValuesHG;              //! Array of high-gain ALTRO samples
+  
+  ClassDef(AliPHOSDigitizer,5)  // description 
 
 };