1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
7 /// \class AliMUONDigitizerV3
8 /// \brief Digitizer (from SDigit to Digit), performing digit de-calibration.
10 // Author Laurent Aphecetche
12 #ifndef ALIMUONDIGITIZERV3_H
13 #define ALIMUONDIGITIZERV3_H
15 #ifndef ALIDIGITIZER_H
16 #include "AliDigitizer.h"
21 class AliMUONCalibrationData;
27 class AliMUONVDigitStore;
29 class AliMUONVTriggerStore;
30 class AliMUONTriggerElectronics;
31 class AliMUONVCalibParam;
32 class AliMUONRecoParam;
33 class AliMUONTriggerChamberEfficiency;
34 class AliMUONTriggerUtilities;
36 class AliMUONDigitizerV3 : public AliDigitizer
39 AliMUONDigitizerV3(AliDigitizationInput* digInput=0,
40 Int_t generateNoisyDigits=1);
42 virtual ~AliMUONDigitizerV3();
44 virtual void Digitize(Option_t* opt="");
46 virtual Bool_t Init();
48 static Int_t DecalibrateTrackerDigit(const AliMUONVCalibParam& pedestals,
49 const AliMUONVCalibParam* gains,
52 Bool_t addNoise=kFALSE,
53 Bool_t noiseOnly=kFALSE,
54 const TString& calibrationMode="NOGAIN");
56 /// Set calibration (and recoparam) data
57 void SetCalibrationData(AliMUONCalibrationData* calibrationData, AliMUONRecoParam* recoParam);
59 /// Set the number of sigmas for pedestal cut
60 static void SetNSigmas(Double_t nsigmas=4.0) { fgNSigmas = nsigmas; }
64 AliMUONDigitizerV3(const AliMUONDigitizerV3& other);
66 AliMUONDigitizerV3& operator=(const AliMUONDigitizerV3& other);
68 void ApplyResponse(const AliMUONVDigitStore& store, AliMUONVDigitStore& filteredStore);
70 void ApplyResponseToTrackerDigit(AliMUONVDigit& digit, Bool_t addNoise);
71 void ApplyResponseToTriggerDigit(AliMUONVDigit& digit);
73 AliLoader* GetLoader(const TString& foldername);
77 void GenerateNoisyDigits(AliMUONVDigitStore& digitStore);
78 void GenerateNoisyDigitsForOneCathode(AliMUONVDigitStore& digitStore,
79 Int_t detElemId, Int_t cathode);
80 void GenerateNoisyDigitsForTrigger(AliMUONVDigitStore& digitStore);
82 void MergeWithSDigits(AliMUONVDigitStore*& digitStore,
83 const AliMUONVDigitStore& input,
86 static TF1* NoiseFunction();
88 void CreateInputDigitStores();
90 void BuildTriggerStatusMap();
91 Int_t GetArrayIndex(Int_t cathode, Int_t trigCh, Int_t localCircuit);
94 Bool_t fIsInitialized; ///< are we initialized ?
95 AliMUONCalibrationData* fCalibrationData; //!< pointer to access calib parameters
96 AliMUONTriggerElectronics* fTriggerProcessor; ///< pointer to the trigger part of the job
97 TF1* fNoiseFunctionTrig; //!< function to get noise disribution on trig. chambers
98 Int_t fGenerateNoisyDigits; //!< whether or not we should generate noise-only digits for tracker (1) and trigger (2)
99 static Double_t fgNSigmas; ///< \brief number of sigmas above ped to use
100 /// for noise-only digit generation and zero-suppression
101 AliMUONLogger* fLogger; //!< to keep track of messages
102 AliMUONVTriggerStore* fTriggerStore; //!< trigger objects
103 AliMUONVDigitStore* fDigitStore; //!< temporary digits
104 AliMUONVDigitStore* fOutputDigitStore; //!< digits we'll output to disk
105 TObjArray* fInputDigitStores; //!< input digit stores (one per input file
106 AliMUONRecoParam* fRecoParam; //!< reco params (to know how to decalibrate) (not owner)
107 AliMUONTriggerChamberEfficiency* fTriggerEfficiency; //!< trigger efficiency map
108 AliMUONTriggerUtilities* fTriggerUtilities; //!< Trigger utilities for masks
109 TArrayI fEfficiencyResponse; //!< Local board efficiency response
111 ClassDef(AliMUONDigitizerV3,11) // MUON Digitizer V3-11