]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSDigitizer.h
Cosmetic changes, and a new function AliL3Hough::ProcessPatchIter.
[u/mrichter/AliRoot.git] / PHOS / AliPHOSDigitizer.h
CommitLineData
990119d6 1#ifndef ALIPHOSDigitizer_H
2#define ALIPHOSDigitizer_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8//_________________________________________________________________________
9// Task Class for making SDigits in PHOS
baef0810 10// Class performs digitization of Summable digits (in the PHOS case this is just
11// sum of contributions of all primary particles into given cell).
12// In addition it performs mixing of summable digits from different events.
990119d6 13//
14//*-- Author: Dmitri Peressounko(SUBATECH & KI)
15
16
17// --- ROOT system ---
eb6c38ee 18#include "TObjString.h"
8cb3533f 19class TArrayI ;
fb43c866 20class TClonesArray ;
21
990119d6 22// --- Standard library ---
23
24// --- AliRoot header files ---
3f81a70b 25#include "AliDigitizer.h"
990119d6 26class AliPHOSSDigitizer ;
3f81a70b 27class AliRunDigitizer ;
8cb3533f 28
93aeb834 29class AliPHOSDigitizer: public AliDigitizer {
990119d6 30
31public:
32 AliPHOSDigitizer() ; // ctor
3f81a70b 33 AliPHOSDigitizer(const char *headerFile, const char * name = "Default") ;
34 AliPHOSDigitizer(AliRunDigitizer * ard) ;
35 AliPHOSDigitizer(const AliPHOSDigitizer & dtizer)
36 {( (AliPHOSDigitizer &)dtizer ).Copy(*this) ;}
990119d6 37 virtual ~AliPHOSDigitizer() ;
8cb3533f 38
7b7c1533 39 void Digitize(const Int_t event) ; // Make Digits from SDigits
3758d9fc 40 void Exec(Option_t *option); // Supervising method
8cb3533f 41
3758d9fc 42 //CPV parameters
7b7c1533 43 const Float_t GetCPVNoise() const { return fCPVNoise ;}
44 const Float_t GetCPVThreshold() const { return fCPVDigitThreshold ;}
3758d9fc 45 const Float_t GetCPVchannel() const { return fADCchanelCpv; }
46 const Float_t GetCPVpedestal() const { return fADCpedestalCpv; }
47
48 void SetCPVNoise(Float_t CPVNoise) {fCPVNoise = CPVNoise;}
49 void SetCPVThreshold(Float_t CPVThreshold) {fCPVDigitThreshold= CPVThreshold;}
50 void SetNCPVchannels(Int_t n) { fNADCcpv = n; }
51 void SetCPVchannel(Float_t width) { fADCchanelCpv = width; }
52 void SetCPVpedestal(Float_t ped) { fADCpedestalCpv = ped; }
53
54
55 //EMC parameters
7b7c1533 56 const Float_t GetEMCThreshold() const { return fEMCDigitThreshold;}
3758d9fc 57 const Float_t GetEMCchannel() const { return fADCchanelEmc; }
58 const Float_t GetEMCpedestal() const { return fADCpedestalEmc; }
7b7c1533 59 const Float_t GetPinNoise() const { return fPinNoise;}
9688c1dd 60 const Float_t GetTimeResolution() const { return fTimeResolution ; }
7b7c1533 61
3758d9fc 62 void SetEMCThreshold(Float_t EMCThreshold) {fEMCDigitThreshold = EMCThreshold;}
63 void SetPinNoise(Float_t PinNoise ) {fPinNoise = PinNoise;}
64 void SetNEMCchannels(Int_t n) { fNADCemc = n; }
65 void SetEMCchannel(Float_t width) { fADCchanelEmc = width; }
66 void SetEMCpedestal(Float_t ped) { fADCpedestalEmc = ped ; }
67
68 //General
69 const Int_t GetDigitsInRun() const { return fDigitsInRun ;}
9bd3caba 70 const TString GetHitsFileName() const { return fHitsFileName ; }
71 const TString GetSDigitsFileName() const { return fSDigitsFileName ; }
3758d9fc 72
7b7c1533 73 void MixWith(const char* HeaderFile) ; // Add another one file to mix
3f81a70b 74 void Print(Option_t* option)const ;
8cb3533f 75 void Reset() ; //restarts starts event processing from 0 event(s)
64c73770 76 void SetSplitFile(const TString splitFileName = "PHOS.Digits.root") ;
8cb3533f 77 void SetSDigitsBranch(const char* file) ;
78
baef0810 79 AliPHOSDigitizer & operator = (const AliPHOSDigitizer & rvalue) {
80 // assignement operator requested by coding convention but not needed
81 abort() ;
82 return *this ;
83 }
84
990119d6 85private:
3758d9fc 86
3f81a70b 87 Bool_t Init() ;
8d0f3f77 88 void InitParameters() ;
8cb3533f 89 void PrintDigits(Option_t * option) ;
7b7c1533 90 void WriteDigits(Int_t evt) ; // Writes Digits for particular event
9688c1dd 91 Float_t TimeOfNoise(void) ; // Calculate time signal generated by noise
9688c1dd 92 //Calculate the time of crossing of the threshold by front edge
3758d9fc 93 Float_t FrontEdgeTime(TClonesArray * ticks) ;
94 //Calculate digitized signal with gived ADC parameters
95 Int_t DigitizeEnergy(Float_t energy, Int_t absId) ;
990119d6 96
3758d9fc 97private:
8cb3533f 98
9bd3caba 99 TString fHitsFileName ; // file name that contains the original hits
100 TString fSDigitsFileName ; // file name that contains the original SDigits
92f521a9 101 Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
9688c1dd 102 Int_t fEmcCrystals ; // Number of EMC crystalls in the given geometry
3758d9fc 103
990119d6 104 Float_t fPinNoise ; // Electronics noise in EMC
105 Float_t fEMCDigitThreshold ; // Threshold for storing digits in EMC
3758d9fc 106
990119d6 107 Float_t fCPVNoise ; // Noise in CPV
108 Float_t fCPVDigitThreshold ; // Threshold for storing digits in CPV
3758d9fc 109
3f81a70b 110 Int_t fDigitsInRun ; //! Total number of digits in one run
990119d6 111
9688c1dd 112 Float_t fTimeResolution ; // Time resolution of FEE electronics
9688c1dd 113 Float_t fTimeThreshold ; // Threshold to start timing for given crystall
114 Float_t fTimeSignalLength ; // Length of the timing signal
115
3758d9fc 116 Float_t fADCchanelEmc ; // width of one ADC channel in GeV
117 Float_t fADCpedestalEmc ; //
118 Int_t fNADCemc ; // number of channels in EMC ADC
119
120 Float_t fADCchanelCpv ; // width of one ADC channel in CPV 'popugais'
121 Float_t fADCpedestalCpv ; //
122 Int_t fNADCcpv ; // number of channels in CPV ADC
64c73770 123 TFile * fSplitFile ; //! file in which Digits will eventually be stored
9688c1dd 124
990119d6 125
126 ClassDef(AliPHOSDigitizer,1) // description
127
128};
129
130
131#endif // AliPHOSDigitizer_H