]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONDigitizer.h
Make calibration default wise, remove the switch (Laurent & Christian)
[u/mrichter/AliRoot.git] / MUON / AliMUONDigitizer.h
index 32458513bafa49c7c5dc74daafca8f2ffb55e0a4..8bc8e91f57eb6a0d7784a7c400aeab88fc330216 100644 (file)
@@ -4,16 +4,24 @@
  * See cxx source for full Copyright notice                               */
 
 /* $Id$ */
+// Revision of includes 07/05/2004
+
+/// \ingroup sim
+/// \class AliMUONDigitizer
+/// \brief Class for MUON merging/digitization
+
 #include "AliDigitizer.h"
-#include "AliRunLoader.h"
-#include "AliMUONLoader.h"
-#include "AliMUONTransientDigit.h"
-#include "AliMUON.h"
-#include "AliMUONData.h"
+#include "AliMUONDigit.h"
 
 class AliRunDigitizer;
+class AliRunLoader;
 class AliMUONHitMapA1;
+class AliMUON;
+class AliMUONData;
+class AliMUONLoader;
+class AliMUONTransientDigit;
 
+static const Int_t kMAXTRACKS=10;
 
 class AliMUONDigitizer : public AliDigitizer
 {
@@ -38,21 +46,11 @@ public:
        // Override the TTask Exec method.
        virtual void Exec(Option_t* option = 0);
 
-       Int_t GetDebug() const {return fDebug;}       // Get debug level.
-       void SetDebug(Int_t level){fDebug = level;}   // Set debug level.    
-
 protected:
-        AliMUONDigitizer(const AliMUONDigitizer& rhs);
-        AliMUONDigitizer& operator=(const AliMUONDigitizer& rhs);
-
-
-       // Parses the option string given to the Exec method.
-       virtual void ParseOptions(Option_t* options);
-
        /* Digitizers inheriting from AliMUONDigitizer should implement this abstract method 
           so that TransientDigit objects are generated and put onto the fTDList.
           The method would be implemented as some loop over the input stream. The data can be
-          fetched from the muondata pointer. To add to the fTDList once should use code similar
+          fetched from the fMUONData pointer. To add to the fTDList once should use code similar
           to the following:
           
             TObject* source_object;  // Assume the object from which the transient digit
@@ -68,11 +66,11 @@ protected:
             AddOrUpdateTransientDigit(td);  // Adds to the fTDList preventing duplicates.
         */
        virtual void GenerateTransientDigits() = 0;
-       
+
        // Loops over the fTDList of transient digits to write them to the output stream.
        virtual void CreateDigits();
 
-       /* Inheriting digitizers should implement this method to prepare the muondata
+       /* Inheriting digitizers should implement this method to prepare the fMUONData
           object before GenerateTransientDigits() is called. 
           If the initialization was successful then kTRUE should be returned otherwise
           kFALSE should be returned. 
@@ -84,17 +82,17 @@ protected:
         */
        virtual void CleanupInputData(AliMUONLoader* muonloader) = 0;
 
-       /* Inheriting digitizers should implement this method to prepare the muondata
+       /* Inheriting digitizers should implement this method to prepare the fMUONData
           object before CreateDigits() is called.
           If the initialization was successful then kTRUE should be returned otherwise
           kFALSE should be returned. 
         */
        virtual Bool_t InitOutputData(AliMUONLoader* muonloader) = 0;
 
-       /* When all the data is added to the muondata object and the trees need to be
+       /* When all the data is added to the fMUONData object and the trees need to be
           filled then this method is called by CreateDigits(). 
           Thus code like
-              muondata->Fill("D")
+              fMUONData->Fill("D")
           should go into this method.
         */
        virtual void FillOutputData() = 0;
@@ -113,7 +111,7 @@ protected:
        /* Should be overridden by inheriting digitizers such that this method adds the digits
           to the correct tree. 
         */
-       virtual void AddDigit(Int_t chamber, Int_t tracks[kMAXTRACKS], Int_t charges[kMAXTRACKS], Int_t digits[6]) = 0;
+       virtual void AddDigit(Int_t chamber, Int_t tracks[kMAXTRACKS], Int_t charges[kMAXTRACKS], Int_t digits[7]) = 0;
 
        /* Should be called by GenerateTransientDigits() when a new transient digit is generated
           form a source object from the input stream. The source object could be an AliMUONHit
@@ -122,12 +120,12 @@ protected:
        virtual void OnCreateTransientDigit(AliMUONTransientDigit* /*digit*/, TObject* /*source_object*/);
 
        /* Called by AddDigit(AliMUONTransientDigit*, Int_t) when transient digit is added to the 
-          muondata object ready for writing to the data trees.
+          fMUONData object ready for writing to the data trees.
         */ 
        virtual void OnWriteTransientDigit(AliMUONTransientDigit* digit);
        
        // Wrapper method for AddDigit(Int_t, Int_t[kMAXTRACKS], Int_t[kMAXTRACKS], Int_t[6])
-       void AddDigit(AliMUONTransientDigit* td, Int_t response_charge);
+       void AddDigit(AliMUONTransientDigit* td, Int_t responseCharge, Int_t digitindex);
 
        // Creates a new fTDList object, and creates and fills the fHitMap arrays.
        // Note: this method assumes the array pointers are NULL when calling this method.
@@ -159,23 +157,34 @@ protected:
        Bool_t ExistTransientDigit(AliMUONTransientDigit * mTD); 
 
        // Sorts the 3 most significant tracks.    
-       void SortTracks(Int_t *tracks, Int_t *charges, Int_t ntr);
-
-
-       AliRunLoader* runloader;        //! Global run loader.
-       AliMUONLoader* gime;            //! MUON specific loader.
-       AliMUON* pMUON;                 //! Pointer to MUON module.
-       AliMUONData* muondata;          //! muon data interface
+       void SortTracks(Int_t *tracks, Int_t *charges, Int_t ntr) const;
+
+       // trigger purpose
+       virtual void CreateTrigger() = 0;
+       virtual void CleanupTriggerArrays() = 0;
+       virtual void FillTriggerOutput() = 0;
+       virtual void AddDigitTrigger(
+                       Int_t chamber, Int_t tracks[kMAXTRACKS],
+                       Int_t charges[kMAXTRACKS], Int_t digits[6],
+                       Int_t digitindex ) = 0;
+
+       AliRunLoader* fRunLoader;         //!< Global run loader.
+       AliMUONLoader* fGime;             //!< MUON specific loader.
+       AliMUON* fMUON;                   //!< Pointer to MUON module.
+       AliMUONData* fMUONData;           //!< muon data interface
+
+       AliMUONHitMapA1 **fHitMap;    //!< pointer to array of pointers to hitmaps
+       TObjArray *fTDList;           //!< list of AliMUONTransientDigits
+       Int_t fTDCounter;             //!< nr. of AliMUONTransientDigit
+       Int_t fMask;                  //!< mask dependent on input file
+       Bool_t fSignal;               //!< kTRUE if signal file is processed 
+       Int_t fSegmentation;          //!< segmentation type 1=old, 2=new;
+       Int_t fNDetElemId[1500];      //!< detection element number array 
 
-       AliMUONHitMapA1 **fHitMap;      //! pointer to array of pointers to hitmaps
-       TObjArray *fTDList;             //! list of AliMUONTransientDigits
-       Int_t fTDCounter;               //! nr. of AliMUONTransientDigit
-       Int_t fMask;                    //! mask dependent on input file
-       Bool_t fSignal;                 //! kTRUE if signal file is processed 
 
 private:
-
-       Int_t fDebug;                   //! Debug level.
+        AliMUONDigitizer(const AliMUONDigitizer& rhs);
+        AliMUONDigitizer& operator=(const AliMUONDigitizer& rhs);
 
        ClassDef(AliMUONDigitizer, 1)   // MUON merging/digitization
 };