]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONDigitizerV3.h
Rewritten using new VDigitStore, VDigit and VTriggerStore interfaces (Laurent)
[u/mrichter/AliRoot.git] / MUON / AliMUONDigitizerV3.h
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice                               */
3
4 // $Id$
5
6 /// \ingroup sim
7 /// \class AliMUONDigitizerV3
8 /// \brief Digitizer (from SDigit to Digit), performing digit de-calibration.
9 ///
10 //  Author Laurent Aphecetche
11
12 #ifndef ALIMUONDIGITIZERV3_H
13 #define ALIMUONDIGITIZERV3_H
14
15 #ifndef ALIDIGITIZER_H
16 #include "AliDigitizer.h"
17 #endif
18
19 #ifndef ROOT_TStopwatch
20 #  include "TStopwatch.h"
21 #endif
22
23 class AliMUONCalibrationData;
24 class AliMUONVDigit;
25 class AliMUONLogger;
26 class AliMUONTriggerEfficiencyCells;
27 class TClonesArray;
28 class TF1;
29 class TString;
30 class AliMUONVDigitStore;
31 class AliLoader;
32 class AliMUONVTriggerStore;
33 class AliMUONTriggerElectronics;
34
35 class AliMUONDigitizerV3 : public AliDigitizer
36 {
37 public:
38   AliMUONDigitizerV3(AliRunDigitizer* manager=0, 
39                      Bool_t generateNoisyDigits=kTRUE);
40   virtual ~AliMUONDigitizerV3();
41
42   virtual void Exec(Option_t* opt="");
43   
44   virtual Bool_t Init();
45
46 private:
47   /// Not implemented
48   AliMUONDigitizerV3(const AliMUONDigitizerV3& other);
49   /// Not implemented
50   AliMUONDigitizerV3& operator=(const AliMUONDigitizerV3& other);
51     
52   void ApplyResponse(const AliMUONVDigitStore& store, AliMUONVDigitStore& filteredStore);
53
54   void ApplyResponseToTrackerDigit(AliMUONVDigit& digit, Bool_t addNoise);
55   void ApplyResponseToTriggerDigit(const AliMUONVDigitStore& digitStore, AliMUONVDigit& digit);
56
57   AliLoader* GetLoader(const TString& foldername);
58   
59 private:  
60
61   AliMUONVDigit* FindCorrespondingDigit(const AliMUONVDigitStore& digitStore,
62                                        AliMUONVDigit& digit) const;
63
64   void GenerateNoisyDigits(AliMUONVDigitStore& digitStore);
65   void GenerateNoisyDigitsForOneCathode(AliMUONVDigitStore& digitStore, 
66                                         Int_t detElemId, Int_t cathode);
67
68   void MergeWithSDigits(AliMUONVDigitStore*& digitStore,
69                         const AliMUONVDigitStore& input,
70                         Int_t mask);
71   
72 private:
73   Bool_t fIsInitialized; ///< are we initialized ?
74   AliMUONCalibrationData* fCalibrationData; //!< pointer to access calib parameters
75   AliMUONTriggerElectronics* fTriggerProcessor; ///< pointer to the trigger part of the job
76   AliMUONTriggerEfficiencyCells* fTriggerEfficiency; ///< trigger efficiency map  
77   TStopwatch fGenerateNoisyDigitsTimer; //!< counting time spent in GenerateNoisyDigits()
78   TStopwatch fExecTimer; //!< couting time spent in Exec()  
79   TF1* fNoiseFunction; //!< function to randomly get signal above n*sigma_ped
80   Bool_t fGenerateNoisyDigits; //!< whether or not we should generate noise-only digits for tracker
81   static const Double_t fgkNSigmas; ///< \brief number of sigmas above ped to use 
82   /// for noise-only digit generation and zero-suppression
83   AliMUONLogger* fLogger; //!< to keep track of messages
84   AliMUONVTriggerStore* fTriggerStore; //!< trigger objects
85   AliMUONVDigitStore* fDigitStore; //!< temporary digits
86   AliMUONVDigitStore* fOutputDigitStore; //!< digits we'll output to disk
87   
88   ClassDef(AliMUONDigitizerV3,5) // MUON Digitizer V3-5
89 };
90
91 #endif