]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/AliFMDDigitizer.h
Fix for null fMCevent pointer
[u/mrichter/AliRoot.git] / FMD / AliFMDDigitizer.h
index 60f0c9205e83809cb53d7182d5d19bbe5a2934bb..08e972f2378610e6131b872b69e31363e5cddd90 100644 (file)
@@ -5,21 +5,32 @@
  *
  * See cxx source for full Copyright notice                               
  */
-#ifndef ALIDIGITIZER_H
-# include <AliDigitizer.h>
-#endif
-#ifndef ALIRUNDIGITIZER_H
-# include <AliRunDigitizer.h>
-#endif
-#ifndef ALIFMDEdepMAP_H
-# include "AliFMDEdepMap.h"
-#endif
-#ifndef __UTILITY__
-# include <utility>
+// Classses to make SDigits into Digits 
+//    
+//    Digits consists of
+//    - Detector #
+//    - Ring ID                                             
+//    - Sector #     
+//    - Strip #
+//    - ADC count in this channel                                  
+//
+//    Summable digits consists of      
+//    - Detector #
+//    - Ring ID                                             
+//    - Sector #     
+//    - Strip #
+//    - Total energy deposited in the strip
+//    - ADC count in this channel                                  
+//
+/** @file    AliFMDDigitizer.h
+    @author  Christian Holm Christensen <cholm@nbi.dk>
+    @date    Mon Mar 27 12:38:26 2006
+    @brief   FMD Digitizers declaration
+    @ingroup FMD_sim
+*/
+#ifndef ALIFMDBASEDIGITIZER_H
+# include <AliFMDBaseDigitizer.h>
 #endif
-// #ifndef ROOT_TArrayF
-// # include <TArrayF.h>
-// #endif
 
 //====================================================================
 class TClonesArray;
@@ -29,106 +40,56 @@ class AliRunLoader;
 class AliFMDDigit;
 
 
-//====================================================================
-class AliFMDBaseDigitizer : public AliDigitizer 
-{
-public:
-  AliFMDBaseDigitizer();
-  AliFMDBaseDigitizer(AliRunDigitizer * manager);
-  AliFMDBaseDigitizer(const Char_t* name, const Char_t* title);
-  virtual ~AliFMDBaseDigitizer();
-   
-  // Do the main work
-  virtual Bool_t Init();
-
-  // Extra member functions 
-  void     SetShapingTime(Float_t t=10) { fShapingTime = t;  }  
-  Float_t  GetShapingTime()      const { return fShapingTime; }
-protected:
-  virtual void     SumContributions(AliFMD* fmd);
-  virtual void     DigitizeHits(AliFMD* fmd) const;
-  virtual void     ConvertToCount(Float_t   edep, 
-                                 Float_t   last,
-                                 UShort_t  detector, 
-                                 Char_t    ring, 
-                                 UShort_t  sector, 
-                                 UShort_t  strip,
-                                 TArrayI&  counts) const;
-  virtual UShort_t MakePedestal(UShort_t  detector, 
-                               Char_t    ring, 
-                               UShort_t  sector, 
-                               UShort_t  strip) const;
-  virtual void     AddNoise(TArrayI&) const {}
-  virtual void     AddDigit(AliFMD*  /* fmd      */,
-                           UShort_t /* detector */, 
-                           Char_t   /* ring     */,
-                           UShort_t /* sector   */, 
-                           UShort_t /* strip    */, 
-                           Float_t  /* edep     */, 
-                           UShort_t /* count1   */, 
-                           Short_t  /* count2   */, 
-                           Short_t  /* count3   */) const {}
-
-  AliRunLoader* fRunLoader;       // Run loader
-  AliFMDEdepMap fEdep;             // Cache of Energy from hits 
-  Float_t       fShapingTime;      // Shaping profile parameter
-  
-  AliFMDBaseDigitizer(const AliFMDBaseDigitizer& o) 
-    : AliDigitizer(o) {}
-  AliFMDBaseDigitizer& operator=(const AliFMDBaseDigitizer&) { return *this; }
-  ClassDef(AliFMDBaseDigitizer,1) // Base class for FMD digitizers
-};
 
 //====================================================================
+/** 
+ * @class AliFMDDigitizer
+ * @brief Concrete digitizer to make digits from hits.  See also
+ * AliFMDBaseDigitizer documentation.  
+ *
+ * @ingroup FMD_sim
+ */
 class AliFMDDigitizer : public AliFMDBaseDigitizer 
 {
 public:
-  AliFMDDigitizer();
-  AliFMDDigitizer(AliRunDigitizer * manager);
+  /** 
+   * CTOR 
+   */
+  AliFMDDigitizer() : AliFMDBaseDigitizer() {}
+  /** 
+   * CTOR 
+   *
+   * @param input Input of digitization 
+   */
+  AliFMDDigitizer(AliDigitizationInput * digInput)
+    : AliFMDBaseDigitizer(digInput) {}
+  /** 
+   * DTOR 
+   */
   virtual ~AliFMDDigitizer() {}
-  virtual void  Exec(Option_t* option=0);
+  /** 
+   * Initialise 
+   */
+  virtual Bool_t Init();
+  /** 
+   * Execute this digitizer.  
+   * This member function will be called once per event by the passed
+   * AliDigitizationInput* digInput object. 
+   *
+   * @param options Not used 
+   */
+  virtual void Digitize(Option_t* option="");
 protected:
-  virtual void     AddDigit(AliFMD*  fmd,
-                           UShort_t detector, 
-                           Char_t   ring,
-                           UShort_t sector, 
-                           UShort_t strip, 
-                           Float_t  edep, 
-                           UShort_t count1, 
-                           Short_t  count2, 
-                           Short_t  count3) const;
-  virtual UShort_t MakePedestal(UShort_t  detector, 
-                               Char_t    ring, 
-                               UShort_t  sector, 
-                               UShort_t  strip) const;
-  virtual void     CheckDigit(AliFMDDigit*    digit,
-                             UShort_t        nhits,
-                             const TArrayI&  counts);
+  /** 
+   * Sum contributions from SDigits 
+   *
+   * @param sdigitsBranch Branch of SDigit data 
+   */
+  void SumContributions(TBranch* sdigitsBranch);
+  
   ClassDef(AliFMDDigitizer,1) // Make Digits from Hits
 };
 
-//====================================================================
-class AliFMDSDigitizer : public AliFMDBaseDigitizer 
-{
-public:
-  AliFMDSDigitizer();
-  AliFMDSDigitizer(const Char_t* headerFile, const Char_t* sdigFile="");
-  virtual ~AliFMDSDigitizer();
-  virtual void  Exec(Option_t* option=0);
-protected:
-  virtual void     AddDigit(AliFMD*  fmd,
-                           UShort_t detector, 
-                           Char_t   ring,
-                           UShort_t sector, 
-                           UShort_t strip, 
-                           Float_t  edep, 
-                           UShort_t count1, 
-                           Short_t  count2, 
-                           Short_t  count3) const;
-  ClassDef(AliFMDSDigitizer,0) // Make Summable Digits from Hits
-};
-
-
 
 #endif
 //____________________________________________________________________