]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/AliFMDBaseDigitizer.h
restore threshold getters after parameter dynamics update (fw v. >= A012)
[u/mrichter/AliRoot.git] / FMD / AliFMDBaseDigitizer.h
index 9ae35641bd9e5a55c24556e1500c5339e67f0f9c..0c9e85da50ea6097e8cefc97fe8d76997112e79a 100644 (file)
@@ -32,7 +32,7 @@
 # include <AliDigitizer.h>
 #endif
 #ifndef ALIRUNDIGITIZER_H
-# include <AliRunDigitizer.h>
+# include <AliDigitizationInput.h>
 #endif
 #ifndef ALIFMDEdepMAP_H
 # include "AliFMDEdepMap.h"
@@ -160,7 +160,7 @@ public:
   AliFMDBaseDigitizer();
   /** Normal CTOR 
       @param manager Manager of digitization */
-  AliFMDBaseDigitizer(AliRunDigitizer * manager);
+  AliFMDBaseDigitizer(AliDigitizationInput * digInp);
   /** Normal ctor 
       @param name Name 
       @param title Title */
@@ -170,7 +170,7 @@ public:
    
   /** Initialize */
   virtual Bool_t Init();
-
+  
   /** The response shape of the VA1 shaping circuit is approximently
       given by 
       @f[
@@ -184,15 +184,16 @@ public:
   void     SetShapingTime(Float_t B=10) { fShapingTime = B;  }  
   /** @return Get the shaping time */
   Float_t  GetShapingTime()      const { return fShapingTime; }
+  
+  void SetStoreTrackRefs(Bool_t store=kTRUE) { fStoreTrackRefs = store; }
+  Bool_t IsStoreTrackRefs() const { return fStoreTrackRefs; }
+    
 protected:
-  /** Sum energy deposited contributions from each hit in a cache
-      @param fmd Pointer to detector */
-  virtual void     SumContributions(AliFMD* fmd);
   /** For the stored energy contributions in the cache, convert the
       energy signal to ADC counts, and store the created digit in  
       the digits array
       @param fmd Pointer to detector */
-  virtual void     DigitizeHits(AliFMD* fmd) const;
+  virtual void     DigitizeHits() const;
   /** Convert the total energy deposited to a (set of) ADC count(s).
       See also the class description for more details. 
       @param edep     Total energy deposited in detector
@@ -221,36 +222,63 @@ protected:
                                UShort_t  strip) const;
   /** Add noise to each sample */
   virtual void     AddNoise(TArrayI&) const {}
+
+  /** Add edep contribution from (detector,ring,sector,strip) to cache */ 
+  virtual void AddContribution(UShort_t detector, 
+                              Char_t   ring, 
+                              UShort_t sector, 
+                              UShort_t strip, 
+                              Float_t  edep, 
+                              Bool_t   isPrimary,
+                              Int_t    nTrackno,
+                              Int_t*   tracknos);
   /** Add a digit to output */
-  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 void     AddDigit(UShort_t       detector, 
+                           Char_t         ring,
+                           UShort_t       sector, 
+                           UShort_t       strip, 
+                           Float_t        edep, 
+                           UShort_t       count1, 
+                           Short_t        count2, 
+                           Short_t        count3,
+                           Short_t        count4, 
+                           UShort_t       ntot, 
+                           UShort_t       nprim,
+                           const TArrayI& refs) const;
+  /** Make the output tree using the passed loader 
+      @param loader 
+      @return The generated tree. */
+  virtual TTree* MakeOutputTree(AliLoader* loader);
+  /** Store the data using the loader 
+      @param loader The loader */
+  virtual void StoreDigits(const AliLoader* loader);
 
-  AliRunLoader* fRunLoader;       //! Run loader
-  AliFMDEdepMap fEdep;             // Cache of Energy from hits 
-  Float_t       fShapingTime;      // Shaping profile parameter
+  AliFMD*         fFMD;              // Detector object 
+  AliRunLoader*   fRunLoader;       //! Run loader
+  AliFMDEdepMap   fEdep;             // Cache of Energy from hits 
+  Float_t         fShapingTime;      // Shaping profile parameter
+  Bool_t          fStoreTrackRefs;   // Wether to store track references
+  mutable Int_t   fIgnoredLabels;    //! Number of labels not assigned 
   
   /** Copy CTOR 
       @param o object to copy from  */
   AliFMDBaseDigitizer(const AliFMDBaseDigitizer& o) 
     : AliDigitizer(o),
+      fFMD(o.fFMD),
       fRunLoader(0),
-      fEdep(AliFMDMap::kMaxDetectors, 
-           AliFMDMap::kMaxRings, 
-           AliFMDMap::kMaxSectors, 
-           AliFMDMap::kMaxStrips),
-      fShapingTime(0)
+      fEdep(o.fEdep),
+      fShapingTime(o.fShapingTime),
+      fStoreTrackRefs(o.fStoreTrackRefs), 
+      fIgnoredLabels(o.fIgnoredLabels)
   {}
-  /** Assignment operator
-      @return Reference to this object */
-  AliFMDBaseDigitizer& operator=(const AliFMDBaseDigitizer&) { return *this; }
-  ClassDef(AliFMDBaseDigitizer,2) // Base class for FMD digitizers
+  /** 
+   * Assignment operator
+   * 
+   * @return Reference to this object 
+   */
+  AliFMDBaseDigitizer& operator=(const AliFMDBaseDigitizer& o);
+
+  ClassDef(AliFMDBaseDigitizer,5) // Base class for FMD digitizers
 };