]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFDigitizer.h
Fixing coding violations
[u/mrichter/AliRoot.git] / TOF / AliTOFDigitizer.h
index 1b2fb82644d8f097805185a4d9e7bac5be92c838..8c7bf191c67a1aba130c452737117fe422b93e1e 100644 (file)
@@ -1,55 +1,60 @@
-#ifndef ALITOFDigitizer_H
-#define ALITOFDigitizer_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+#ifndef ALITOFDIGITIZER_H
+#define ALITOFDIGITIZER_H
+
+/* Copyright(c) 1998-2000, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
-//_________________________________________________________________________
-//  Task Class for making Digits in TOF
-//  Comment:
-//
-// -- Author: F. Pierella (Bologna University) pierella@bo.infn.it
+//_______________________________________________________________________________//
+//                                                                               //
+//  Task Class for making Digits in TOF                                          //
+// Class performs digitization of Summable digits (in the TOF case this is just  //
+// sum of contributions of all signals into a given pad).                        //
+// In addition it performs mixing of summable digits from different events.      //
+//                                                                               //
+// -- Author: Fabrizio Pierella (Bologna University)
+//                                                                               //
+//_______________________________________________________________________________//
 
+/* $Id$ */
 
-#include "TTask.h"
-#include "TString.h"
+#include "AliDigitizer.h"
 
-class AliTOFDigitizer: public TTask {
+class AliRunDigitizer;
+class AliTOFHitMap;
+class AliTOFSDigit;
+class AliTOFcalib;
 
-public:
-  AliTOFDigitizer() ;          // ctor
-  AliTOFDigitizer(const char* HeaderFile,const char* digitsTitle = 0) ; 
-  virtual ~AliTOFDigitizer() ; // dtor
-  virtual void  Exec(Option_t* option); 
+class AliTOFDigitizer : public AliDigitizer {
+ public:
   
-  Float_t  GetTimeRes() const {return fTimeRes;}
-  Float_t  GetChrgRes() const {return fChrgRes;}
-  char*    GetDigitsBranch()const{return (char*) fDigitsTitle.Data();}  
-
-  virtual void Print(Option_t* option) const ;
-
-  void     SetTimeRes(Float_t timeRes)  {fTimeRes = timeRes ;}
-  void     SetChrgRes(Float_t chrgRes)  {fChrgRes = chrgRes ;}
-  void     SetDigitsBranch(const char* title ) ;
-
-  Bool_t   operator == (const AliTOFDigitizer & sd) const ;
-
-private:
-  void     Init() ;
-  void     PrintDigits(Option_t* option) ;
-
-private:
-  Float_t fTimeRes;                // Time Resolution
-  Float_t fChrgRes;                // ADC parameter
-  Int_t   fNevents ;               // Number of events to digitize
-  TString fDigitsTitle ;           // title of Digits branch
-  TString fHeadersFile ;           // input file
-  Bool_t  fIsInitialized ;         // kTRUE if Digitizer is initialized
-  TClonesArray* fDigits ;          // list of Digits
-  TClonesArray* fHits ;            // list of Hits
-
-
-  ClassDef(AliTOFDigitizer,1)  // Task Class for making Digits in TOF
-
-};
-
-#endif // AliTOFDigitizer_H
+  AliTOFDigitizer();
+  AliTOFDigitizer(AliRunDigitizer * manager);
+  virtual ~AliTOFDigitizer();
+  AliTOFDigitizer(const AliTOFDigitizer &source); // copy constructor
+  AliTOFDigitizer& operator=(const AliTOFDigitizer &source); // ass. op.
+  
+  // Do the main work
+  void Exec(Option_t* option=0) ;
+  TClonesArray* SDigits() const {return fSDigitsArray;}
+  void ReadSDigit(Int_t inputFile);
+  void CreateDigits();
+  void InitDecalibration() const;
+  void DecalibrateTOFSignal();
+  
+ private:
+  void CollectSDigit(AliTOFSDigit * sdigit) ;
+  Int_t PutNoise(Int_t /*charge*/)const {return 0;}; // not yet
+                                                    // implemented
+                                                    // due to the low
+                                                    // noise expected
+                                                    // level
+  TClonesArray *fDigits;       //! array with digits
+  TClonesArray *fSDigitsArray; //! List of summable digits; used as a
+                              //container for all sdigits to be
+                              //merged
+  AliTOFHitMap *fhitMap ;      //! hit map used to perform the merging
+  AliTOFcalib * fCalib;        //! calibration object
+  
+  ClassDef(AliTOFDigitizer,2)  // TOF/Merging/Digitization
+};    
+#endif