- Disentangle masks effect from trigger chamber efficiency estimation.
[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;
d5315275 32class AliMUONTriggerChamberEfficiency;
33class AliMUONTriggerUtilities;
92aeef15 34
35class AliMUONDigitizerV3 : public AliDigitizer
36{
37public:
92aeef15 38 AliMUONDigitizerV3(AliRunDigitizer* manager=0,
8c0b5e70 39 Int_t generateNoisyDigits=1);
5c083cba 40
92aeef15 41 virtual ~AliMUONDigitizerV3();
42
43 virtual void Exec(Option_t* opt="");
44
45 virtual Bool_t Init();
46
b74ca120 47 static Int_t DecalibrateTrackerDigit(const AliMUONVCalibParam& pedestals,
48 const AliMUONVCalibParam& gains,
49 Int_t channel,
50 Float_t charge,
ec9acc85 51 Bool_t addNoise=kFALSE,
52 Bool_t noiseOnly=kFALSE);
b74ca120 53
9ec6a948 54 /// Set calibration data
b89ac3d6 55 void SetCalibrationData(AliMUONCalibrationData* calibrationData)
92c23b09 56 {fCalibrationData = calibrationData;}
5c083cba 57
58 /// Set the number of sigmas for pedestal cut
59 static void SetNSigmas(Double_t nsigmas=4.0) { fgNSigmas = nsigmas; }
60
92aeef15 61private:
71a2d3aa 62 /// Not implemented
4ce497c4 63 AliMUONDigitizerV3(const AliMUONDigitizerV3& other);
71a2d3aa 64 /// Not implemented
4ce497c4 65 AliMUONDigitizerV3& operator=(const AliMUONDigitizerV3& other);
92aeef15 66
40e382ae 67 void ApplyResponse(const AliMUONVDigitStore& store, AliMUONVDigitStore& filteredStore);
92aeef15 68
40e382ae 69 void ApplyResponseToTrackerDigit(AliMUONVDigit& digit, Bool_t addNoise);
d5315275 70 void ApplyResponseToTriggerDigit(AliMUONVDigit& digit);
92aeef15 71
40e382ae 72 AliLoader* GetLoader(const TString& foldername);
4ce497c4 73
40e382ae 74private:
92aeef15 75
40e382ae 76 void GenerateNoisyDigits(AliMUONVDigitStore& digitStore);
77 void GenerateNoisyDigitsForOneCathode(AliMUONVDigitStore& digitStore,
78 Int_t detElemId, Int_t cathode);
8c0b5e70 79 void GenerateNoisyDigitsForTrigger(AliMUONVDigitStore& digitStore);
92aeef15 80
40e382ae 81 void MergeWithSDigits(AliMUONVDigitStore*& digitStore,
82 const AliMUONVDigitStore& input,
05314992 83 Int_t mask);
92aeef15 84
ec9acc85 85 static TF1* NoiseFunction();
86
ca8c8223 87 void CreateInputDigitStores();
d5315275 88
89 void BuildTriggerStatusMap();
90 Int_t GetArrayIndex(Int_t cathode, Int_t trigCh, Int_t localCircuit);
9ec6a948 91
92aeef15 92private:
829425a5 93 Bool_t fIsInitialized; ///< are we initialized ?
829425a5 94 AliMUONCalibrationData* fCalibrationData; //!< pointer to access calib parameters
40e382ae 95 AliMUONTriggerElectronics* fTriggerProcessor; ///< pointer to the trigger part of the job
8c0b5e70 96 TF1* fNoiseFunctionTrig; //!< function to get noise disribution on trig. chambers
97 Int_t fGenerateNoisyDigits; //!< whether or not we should generate noise-only digits for tracker (1) and trigger (2)
5c083cba 98 static Double_t fgNSigmas; ///< \brief number of sigmas above ped to use
829425a5 99 /// for noise-only digit generation and zero-suppression
ba26b670 100 AliMUONLogger* fLogger; //!< to keep track of messages
40e382ae 101 AliMUONVTriggerStore* fTriggerStore; //!< trigger objects
102 AliMUONVDigitStore* fDigitStore; //!< temporary digits
103 AliMUONVDigitStore* fOutputDigitStore; //!< digits we'll output to disk
ca8c8223 104 TObjArray* fInputDigitStores; //!< input digit stores (one per input file
d5315275 105 AliMUONTriggerChamberEfficiency* fTriggerEfficiency; //!< trigger efficiency map
106 AliMUONTriggerUtilities* fTriggerUtilities; //!< Trigger utilities for masks
107 TArrayI fEfficiencyResponse; //!< Local board efficiency response
9ec6a948 108
ca8c8223 109 ClassDef(AliMUONDigitizerV3,10) // MUON Digitizer V3-9
92aeef15 110};
111
112#endif