]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONDigitizerV3.h
In AliMUONPedestal:
[u/mrichter/AliRoot.git] / MUON / AliMUONDigitizerV3.h
CommitLineData
92aeef15 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
05314992 8/// \brief Digitizer (from SDigit to Digit), performing digit de-calibration.
9///
78649106 10// Author Laurent Aphecetche
92aeef15 11
12#ifndef ALIMUONDIGITIZERV3_H
13#define ALIMUONDIGITIZERV3_H
14
15#ifndef ALIDIGITIZER_H
16#include "AliDigitizer.h"
17#endif
18
d5315275 19#include "TArrayI.h"
20
92aeef15 21class AliMUONCalibrationData;
40e382ae 22class AliMUONVDigit;
ad26d4f6 23class AliMUONLogger;
92aeef15 24class TClonesArray;
4ce497c4 25class TF1;
92aeef15 26class TString;
40e382ae 27class AliMUONVDigitStore;
28class AliLoader;
29class AliMUONVTriggerStore;
30class AliMUONTriggerElectronics;
b74ca120 31class AliMUONVCalibParam;
05315e71 32class AliMUONRecoParam;
d5315275 33class AliMUONTriggerChamberEfficiency;
34class AliMUONTriggerUtilities;
92aeef15 35
36class AliMUONDigitizerV3 : public AliDigitizer
37{
38public:
f21fc003 39 AliMUONDigitizerV3(AliDigitizationInput* digInput=0,
8c0b5e70 40 Int_t generateNoisyDigits=1);
5c083cba 41
92aeef15 42 virtual ~AliMUONDigitizerV3();
43
f21fc003 44 virtual void Digitize(Option_t* opt="");
92aeef15 45
46 virtual Bool_t Init();
47
b74ca120 48 static Int_t DecalibrateTrackerDigit(const AliMUONVCalibParam& pedestals,
dbd649c1 49 const AliMUONVCalibParam* gains,
b74ca120 50 Int_t channel,
51 Float_t charge,
ec9acc85 52 Bool_t addNoise=kFALSE,
05315e71 53 Bool_t noiseOnly=kFALSE,
54 const TString& calibrationMode="NOGAIN");
b74ca120 55
05315e71 56 /// Set calibration (and recoparam) data
57 void SetCalibrationData(AliMUONCalibrationData* calibrationData, AliMUONRecoParam* recoParam);
5c083cba 58
59 /// Set the number of sigmas for pedestal cut
60 static void SetNSigmas(Double_t nsigmas=4.0) { fgNSigmas = nsigmas; }
61
92aeef15 62private:
71a2d3aa 63 /// Not implemented
4ce497c4 64 AliMUONDigitizerV3(const AliMUONDigitizerV3& other);
71a2d3aa 65 /// Not implemented
4ce497c4 66 AliMUONDigitizerV3& operator=(const AliMUONDigitizerV3& other);
92aeef15 67
40e382ae 68 void ApplyResponse(const AliMUONVDigitStore& store, AliMUONVDigitStore& filteredStore);
92aeef15 69
40e382ae 70 void ApplyResponseToTrackerDigit(AliMUONVDigit& digit, Bool_t addNoise);
d5315275 71 void ApplyResponseToTriggerDigit(AliMUONVDigit& digit);
92aeef15 72
40e382ae 73 AliLoader* GetLoader(const TString& foldername);
4ce497c4 74
40e382ae 75private:
92aeef15 76
40e382ae 77 void GenerateNoisyDigits(AliMUONVDigitStore& digitStore);
78 void GenerateNoisyDigitsForOneCathode(AliMUONVDigitStore& digitStore,
79 Int_t detElemId, Int_t cathode);
8c0b5e70 80 void GenerateNoisyDigitsForTrigger(AliMUONVDigitStore& digitStore);
92aeef15 81
40e382ae 82 void MergeWithSDigits(AliMUONVDigitStore*& digitStore,
83 const AliMUONVDigitStore& input,
05314992 84 Int_t mask);
92aeef15 85
ec9acc85 86 static TF1* NoiseFunction();
87
ca8c8223 88 void CreateInputDigitStores();
d5315275 89
90 void BuildTriggerStatusMap();
91 Int_t GetArrayIndex(Int_t cathode, Int_t trigCh, Int_t localCircuit);
9ec6a948 92
92aeef15 93private:
829425a5 94 Bool_t fIsInitialized; ///< are we initialized ?
829425a5 95 AliMUONCalibrationData* fCalibrationData; //!< pointer to access calib parameters
40e382ae 96 AliMUONTriggerElectronics* fTriggerProcessor; ///< pointer to the trigger part of the job
8c0b5e70 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)
5c083cba 99 static Double_t fgNSigmas; ///< \brief number of sigmas above ped to use
829425a5 100 /// for noise-only digit generation and zero-suppression
ba26b670 101 AliMUONLogger* fLogger; //!< to keep track of messages
40e382ae 102 AliMUONVTriggerStore* fTriggerStore; //!< trigger objects
103 AliMUONVDigitStore* fDigitStore; //!< temporary digits
104 AliMUONVDigitStore* fOutputDigitStore; //!< digits we'll output to disk
ca8c8223 105 TObjArray* fInputDigitStores; //!< input digit stores (one per input file
05315e71 106 AliMUONRecoParam* fRecoParam; //!< reco params (to know how to decalibrate) (not owner)
d5315275 107 AliMUONTriggerChamberEfficiency* fTriggerEfficiency; //!< trigger efficiency map
108 AliMUONTriggerUtilities* fTriggerUtilities; //!< Trigger utilities for masks
109 TArrayI fEfficiencyResponse; //!< Local board efficiency response
9ec6a948 110
05315e71 111 ClassDef(AliMUONDigitizerV3,11) // MUON Digitizer V3-11
92aeef15 112};
113
114#endif