]>
Commit | Line | Data |
---|---|---|
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 | class AliMUONCalibrationData; | |
20 | class AliMUONVDigit; | |
21 | class AliMUONLogger; | |
22 | class TClonesArray; | |
23 | class TF1; | |
24 | class TString; | |
25 | class AliMUONVDigitStore; | |
26 | class AliLoader; | |
27 | class AliMUONVTriggerStore; | |
28 | class AliMUONTriggerElectronics; | |
29 | class AliMUONVCalibParam; | |
30 | ||
31 | class AliMUONDigitizerV3 : public AliDigitizer | |
32 | { | |
33 | public: | |
34 | AliMUONDigitizerV3(AliRunDigitizer* manager=0, | |
35 | Int_t generateNoisyDigits=1); | |
36 | ||
37 | virtual ~AliMUONDigitizerV3(); | |
38 | ||
39 | virtual void Exec(Option_t* opt=""); | |
40 | ||
41 | virtual Bool_t Init(); | |
42 | ||
43 | static Int_t DecalibrateTrackerDigit(const AliMUONVCalibParam& pedestals, | |
44 | const AliMUONVCalibParam& gains, | |
45 | Int_t channel, | |
46 | Float_t charge, | |
47 | Bool_t addNoise=kFALSE, | |
48 | Bool_t noiseOnly=kFALSE); | |
49 | ||
50 | /// Set calibration data | |
51 | void SetCalibrationData(AliMUONCalibrationData* calibrationData) | |
52 | {fCalibrationData = calibrationData;} | |
53 | ||
54 | /// Set the number of sigmas for pedestal cut | |
55 | static void SetNSigmas(Double_t nsigmas=4.0) { fgNSigmas = nsigmas; } | |
56 | ||
57 | private: | |
58 | /// Not implemented | |
59 | AliMUONDigitizerV3(const AliMUONDigitizerV3& other); | |
60 | /// Not implemented | |
61 | AliMUONDigitizerV3& operator=(const AliMUONDigitizerV3& other); | |
62 | ||
63 | void ApplyResponse(const AliMUONVDigitStore& store, AliMUONVDigitStore& filteredStore); | |
64 | ||
65 | void ApplyResponseToTrackerDigit(AliMUONVDigit& digit, Bool_t addNoise); | |
66 | ||
67 | AliLoader* GetLoader(const TString& foldername); | |
68 | ||
69 | private: | |
70 | ||
71 | void GenerateNoisyDigits(AliMUONVDigitStore& digitStore); | |
72 | void GenerateNoisyDigitsForOneCathode(AliMUONVDigitStore& digitStore, | |
73 | Int_t detElemId, Int_t cathode); | |
74 | void GenerateNoisyDigitsForTrigger(AliMUONVDigitStore& digitStore); | |
75 | ||
76 | void MergeWithSDigits(AliMUONVDigitStore*& digitStore, | |
77 | const AliMUONVDigitStore& input, | |
78 | Int_t mask); | |
79 | ||
80 | static TF1* NoiseFunction(); | |
81 | ||
82 | void CreateInputDigitStores(); | |
83 | ||
84 | private: | |
85 | Bool_t fIsInitialized; ///< are we initialized ? | |
86 | AliMUONCalibrationData* fCalibrationData; //!< pointer to access calib parameters | |
87 | AliMUONTriggerElectronics* fTriggerProcessor; ///< pointer to the trigger part of the job | |
88 | TF1* fNoiseFunctionTrig; //!< function to get noise disribution on trig. chambers | |
89 | Int_t fGenerateNoisyDigits; //!< whether or not we should generate noise-only digits for tracker (1) and trigger (2) | |
90 | static Double_t fgNSigmas; ///< \brief number of sigmas above ped to use | |
91 | /// for noise-only digit generation and zero-suppression | |
92 | AliMUONLogger* fLogger; //!< to keep track of messages | |
93 | AliMUONVTriggerStore* fTriggerStore; //!< trigger objects | |
94 | AliMUONVDigitStore* fDigitStore; //!< temporary digits | |
95 | AliMUONVDigitStore* fOutputDigitStore; //!< digits we'll output to disk | |
96 | TObjArray* fInputDigitStores; //!< input digit stores (one per input file | |
97 | ||
98 | ClassDef(AliMUONDigitizerV3,10) // MUON Digitizer V3-9 | |
99 | }; | |
100 | ||
101 | #endif |