]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONDigitizerV3.h
Intrinsic chamber efficiency calculation performed during reconstruction (Diego)
[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                      Int_t generateNoisyDigits=1);
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   void GenerateNoisyDigitsForTrigger(AliMUONVDigitStore& digitStore);
68
69   void MergeWithSDigits(AliMUONVDigitStore*& digitStore,
70                         const AliMUONVDigitStore& input,
71                         Int_t mask);
72   
73 private:
74   Bool_t fIsInitialized; ///< are we initialized ?
75   AliMUONCalibrationData* fCalibrationData; //!< pointer to access calib parameters
76   AliMUONTriggerElectronics* fTriggerProcessor; ///< pointer to the trigger part of the job
77   AliMUONTriggerEfficiencyCells* fTriggerEfficiency; ///< trigger efficiency map  
78   TStopwatch fGenerateNoisyDigitsTimer; //!< counting time spent in GenerateNoisyDigits()
79   TStopwatch fExecTimer; //!< couting time spent in Exec()  
80   TF1* fNoiseFunction; //!< function to randomly get signal above n*sigma_ped
81   TF1* fNoiseFunctionTrig; //!< function to get noise disribution on trig. chambers
82   Int_t fGenerateNoisyDigits; //!< whether or not we should generate noise-only digits for tracker (1) and trigger (2)
83   static const Double_t fgkNSigmas; ///< \brief number of sigmas above ped to use 
84   /// for noise-only digit generation and zero-suppression
85   AliMUONLogger* fLogger; //!< to keep track of messages
86   AliMUONVTriggerStore* fTriggerStore; //!< trigger objects
87   AliMUONVDigitStore* fDigitStore; //!< temporary digits
88   AliMUONVDigitStore* fOutputDigitStore; //!< digits we'll output to disk
89   
90   ClassDef(AliMUONDigitizerV3,5) // MUON Digitizer V3-5
91 };
92
93 #endif