X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FAliMUONDigitizerV3.h;h=bad43a58a7ae74cfb75581bb03162e81a80d443b;hb=618aa277a12e2b49094cf1898bc880f0325d09c4;hp=905fb00853b01b046a8f6c47ca823ab33790f371;hpb=92aeef15c5e34c435b75574eb5864b9c99012e49;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUONDigitizerV3.h b/MUON/AliMUONDigitizerV3.h index 905fb00853b..bad43a58a7a 100644 --- a/MUON/AliMUONDigitizerV3.h +++ b/MUON/AliMUONDigitizerV3.h @@ -5,10 +5,9 @@ /// \ingroup sim /// \class AliMUONDigitizerV3 -/// \brief New digitizer, not deriving from MUONDigitizer and doing -/// decalibration of digits -/// -/// \author Laurent Aphecetche +/// \brief Digitizer (from SDigit to Digit), performing digit de-calibration. +/// +// Author Laurent Aphecetche #ifndef ALIMUONDIGITIZERV3_H #define ALIMUONDIGITIZERV3_H @@ -18,55 +17,81 @@ #endif class AliMUONCalibrationData; -class AliMUONData; -class AliMUONDigit; +class AliMUONVDigit; +class AliMUONLogger; class TClonesArray; +class TF1; class TString; +class AliMUONVDigitStore; +class AliLoader; +class AliMUONVTriggerStore; +class AliMUONTriggerElectronics; +class AliMUONVCalibParam; class AliMUONDigitizerV3 : public AliDigitizer { public: - enum ETriggerCodeVersion - { - kTriggerDecision=-1, - kTriggerElectronics - }; - AliMUONDigitizerV3(AliRunDigitizer* manager=0, - ETriggerCodeVersion=kTriggerDecision); + Int_t generateNoisyDigits=1); virtual ~AliMUONDigitizerV3(); virtual void Exec(Option_t* opt=""); virtual Bool_t Init(); + static Int_t DecalibrateTrackerDigit(const AliMUONVCalibParam& pedestals, + const AliMUONVCalibParam& gains, + Int_t channel, + Float_t charge, + Bool_t addNoise=kFALSE, + Bool_t noiseOnly=kFALSE); + + /// Set calibration data + void SetCalibrationData(AliMUONCalibrationData* calibrationData) + {fCalibrationData = calibrationData;} + private: + /// Not implemented + AliMUONDigitizerV3(const AliMUONDigitizerV3& other); + /// Not implemented + AliMUONDigitizerV3& operator=(const AliMUONDigitizerV3& other); - void AddOrUpdateDigit(TClonesArray& array, - const AliMUONDigit& digit); - - void ApplyResponse(); + void ApplyResponse(const AliMUONVDigitStore& store, AliMUONVDigitStore& filteredStore); - void ApplyResponseToDigit(AliMUONDigit& digit); + void ApplyResponseToTrackerDigit(AliMUONVDigit& digit, Bool_t addNoise); - Int_t FindDigitIndex(TClonesArray& array, const AliMUONDigit& digit); - - AliMUONData* GetDataAccess(const TString& folderName); + AliLoader* GetLoader(const TString& foldername); + +private: - Bool_t MergeDigits(const AliMUONDigit& src, AliMUONDigit& srcAndDest); + void GenerateNoisyDigits(AliMUONVDigitStore& digitStore); + void GenerateNoisyDigitsForOneCathode(AliMUONVDigitStore& digitStore, + Int_t detElemId, Int_t cathode); + void GenerateNoisyDigitsForTrigger(AliMUONVDigitStore& digitStore); - void MergeWithSDigits(AliMUONData& outputData, const AliMUONData& inputData); + void MergeWithSDigits(AliMUONVDigitStore*& digitStore, + const AliMUONVDigitStore& input, + Int_t mask); + static TF1* NoiseFunction(); + + void CreateInputDigitStore(); + private: - Int_t fZeroSuppression; - Int_t fSaturation; - Bool_t fIsInitialized; - AliMUONData* fOutputData; //! - AliMUONCalibrationData* fCalibrationData; //! - TTask* fTriggerProcessor; - ETriggerCodeVersion fTriggerCodeVersion; + Bool_t fIsInitialized; ///< are we initialized ? + AliMUONCalibrationData* fCalibrationData; //!< pointer to access calib parameters + AliMUONTriggerElectronics* fTriggerProcessor; ///< pointer to the trigger part of the job + TF1* fNoiseFunctionTrig; //!< function to get noise disribution on trig. chambers + Int_t fGenerateNoisyDigits; //!< whether or not we should generate noise-only digits for tracker (1) and trigger (2) + static const Double_t fgkNSigmas; ///< \brief number of sigmas above ped to use + /// for noise-only digit generation and zero-suppression + AliMUONLogger* fLogger; //!< to keep track of messages + AliMUONVTriggerStore* fTriggerStore; //!< trigger objects + AliMUONVDigitStore* fDigitStore; //!< temporary digits + AliMUONVDigitStore* fOutputDigitStore; //!< digits we'll output to disk + AliMUONVDigitStore* fInputDigitStore; //!< input digit store - ClassDef(AliMUONDigitizerV3,1) // + ClassDef(AliMUONDigitizerV3,8) // MUON Digitizer V3-8 }; #endif