]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONDigitizerV3.h
Update rawdata format for trigger (Christian)
[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///
92aeef15 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
4ce497c4 19#ifndef ROOT_TStopwatch
20# include "TStopwatch.h"
21#endif
22
92aeef15 23class AliMUONCalibrationData;
24class AliMUONData;
25class AliMUONDigit;
4ce497c4 26class AliMUONTriggerEfficiencyCells;
92aeef15 27class TClonesArray;
4ce497c4 28class TF1;
92aeef15 29class TString;
30
31class AliMUONDigitizerV3 : public AliDigitizer
32{
33public:
34 enum ETriggerCodeVersion
35 {
36 kTriggerDecision=-1,
37 kTriggerElectronics
38 };
39
40 AliMUONDigitizerV3(AliRunDigitizer* manager=0,
4ce497c4 41 ETriggerCodeVersion=kTriggerDecision,
42 Bool_t useTriggerEfficiency=kFALSE,
43 Bool_t generateNoisyDigits=kTRUE);
92aeef15 44 virtual ~AliMUONDigitizerV3();
45
46 virtual void Exec(Option_t* opt="");
47
48 virtual Bool_t Init();
49
50private:
51
4ce497c4 52 AliMUONDigitizerV3(const AliMUONDigitizerV3& other);
53 AliMUONDigitizerV3& operator=(const AliMUONDigitizerV3& other);
54
92aeef15 55 void AddOrUpdateDigit(TClonesArray& array,
56 const AliMUONDigit& digit);
57
58 void ApplyResponse();
59
4ce497c4 60 void ApplyResponseToTrackerDigit(AliMUONDigit& digit, Bool_t addNoise);
61 void ApplyResponseToTriggerDigit(AliMUONDigit& digit, AliMUONData* data);
92aeef15 62
4ce497c4 63private:
85fec35d 64 AliMUONDigit* FindCorrespondingDigit(AliMUONDigit& digit,AliMUONData* data) const;
4ce497c4 65
66 Int_t FindDigitIndex(TClonesArray& array, const AliMUONDigit& digit) const;
67
68 void GenerateNoisyDigits();
69 void GenerateNoisyDigitsForOneCathode(Int_t detElemId, Int_t cathode);
92aeef15 70
71 AliMUONData* GetDataAccess(const TString& folderName);
72
73 Bool_t MergeDigits(const AliMUONDigit& src, AliMUONDigit& srcAndDest);
74
05314992 75 void MergeWithSDigits(AliMUONData& outputData, const AliMUONData& inputData,
76 Int_t mask);
92aeef15 77
78private:
829425a5 79 Bool_t fIsInitialized; ///< are we initialized ?
80 AliMUONData* fOutputData; //!< pointer to access digits
81 AliMUONCalibrationData* fCalibrationData; //!< pointer to access calib parameters
82 TTask* fTriggerProcessor; ///< pointer to the trigger part of the job
83 ETriggerCodeVersion fTriggerCodeVersion; ///< which version of trigger job
84 Bool_t fUseTriggerEfficiency; ///< whether or not we should apply trigger efficiency
85 AliMUONTriggerEfficiencyCells* fTriggerEfficiency; ///< trigger efficiency map
86 mutable TStopwatch fFindDigitIndexTimer; //!< counting time spent in FindDigitIndex
87 TStopwatch fGenerateNoisyDigitsTimer; //!< counting time spent in GenerateNoisyDigits()
88 TStopwatch fExecTimer; //!< couting time spent in Exec()
89 TF1* fNoiseFunction; //!< function to randomly get signal above n*sigma_ped
90 Bool_t fGenerateNoisyDigits; //!< whether or not we should generate noise-only digits for tracker
91 static const Double_t fgkNSigmas; ///< \brief number of sigmas above ped to use
92 /// for noise-only digit generation and zero-suppression
4ce497c4 93
94 ClassDef(AliMUONDigitizerV3,3) // MUON Digitizer V3-3
92aeef15 95};
96
97#endif