]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSDigitizer.h
Scripts for PHOS alignment
[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
702ab87e 8/* History of cvs commits:
9 *
10 * $Log$
11 */
12
990119d6 13//_________________________________________________________________________
14// Task Class for making SDigits in PHOS
baef0810 15// Class performs digitization of Summable digits (in the PHOS case this is just
16// sum of contributions of all primary particles into given cell).
17// In addition it performs mixing of summable digits from different events.
990119d6 18//
19//*-- Author: Dmitri Peressounko(SUBATECH & KI)
20
21
22// --- ROOT system ---
e957fea8 23//#include "TObjString.h"
8cb3533f 24class TArrayI ;
fb43c866 25class TClonesArray ;
26
990119d6 27// --- Standard library ---
28
29// --- AliRoot header files ---
3f81a70b 30#include "AliDigitizer.h"
990119d6 31class AliPHOSSDigitizer ;
3f81a70b 32class AliRunDigitizer ;
8cb3533f 33
93aeb834 34class AliPHOSDigitizer: public AliDigitizer {
990119d6 35
36public:
37 AliPHOSDigitizer() ; // ctor
e191bb57 38 AliPHOSDigitizer(TString alirunFileNameFile, TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ;
88cb7938 39 AliPHOSDigitizer(const AliPHOSDigitizer & dtizer) ;
40 AliPHOSDigitizer(AliRunDigitizer * manager) ;
990119d6 41 virtual ~AliPHOSDigitizer() ;
8cb3533f 42
fc7e2f43 43 void Digitize(Int_t event) ; // Make Digits from SDigits
3758d9fc 44 void Exec(Option_t *option); // Supervising method
8cb3533f 45
3758d9fc 46 //CPV parameters
fc7e2f43 47 Float_t GetCPVNoise() const { return fCPVNoise ;}
48 Float_t GetCPVThreshold() const { return fCPVDigitThreshold ;}
49 Float_t GetCPVchannel() const { return fADCchanelCpv; }
50 Float_t GetCPVpedestal() const { return fADCpedestalCpv; }
3758d9fc 51
52 void SetCPVNoise(Float_t CPVNoise) {fCPVNoise = CPVNoise;}
53 void SetCPVThreshold(Float_t CPVThreshold) {fCPVDigitThreshold= CPVThreshold;}
54 void SetNCPVchannels(Int_t n) { fNADCcpv = n; }
55 void SetCPVchannel(Float_t width) { fADCchanelCpv = width; }
56 void SetCPVpedestal(Float_t ped) { fADCpedestalCpv = ped; }
57
58
59 //EMC parameters
fc7e2f43 60 Float_t GetEMCThreshold() const { return fEMCDigitThreshold;}
61 Float_t GetEMCchannel() const { return fADCchanelEmc; }
62 Float_t GetEMCpedestal() const { return fADCpedestalEmc; }
63 Float_t GetPinNoise() const { return fPinNoise;}
64 Float_t GetTimeResolution() const { return fTimeResolution ; }
7b7c1533 65
3758d9fc 66 void SetEMCThreshold(Float_t EMCThreshold) {fEMCDigitThreshold = EMCThreshold;}
67 void SetPinNoise(Float_t PinNoise ) {fPinNoise = PinNoise;}
68 void SetNEMCchannels(Int_t n) { fNADCemc = n; }
69 void SetEMCchannel(Float_t width) { fADCchanelEmc = width; }
70 void SetEMCpedestal(Float_t ped) { fADCpedestalEmc = ped ; }
88cb7938 71 void SetEventFolderName(TString name) { fEventFolderName = name ; }
fbf811ec 72 void SetTimeResolution(Float_t res){ fTimeResolution = res ; }
212d1c0f 73 void SetEventRange(Int_t first=0, Int_t last=-1) {fFirstEvent=first; fLastEvent=last; }
3758d9fc 74
75 //General
fc7e2f43 76 Int_t GetDigitsInRun() const { return fDigitsInRun ;}
77 void MixWith(TString alirunFileName,
e191bb57 78 TString eventFolderName = AliConfig::GetDefaultEventFolderName()) ; // Add another one file to mix
702ab87e 79
80 void Print(const Option_t * = "")const ;
548f0134 81
8c140292 82 AliPHOSDigitizer & operator = (const AliPHOSDigitizer & /*rvalue*/) {
baef0810 83 // assignement operator requested by coding convention but not needed
f1611b7c 84 Fatal("operator =", "not implemented") ;
baef0810 85 return *this ;
86 }
87
990119d6 88private:
3758d9fc 89
88cb7938 90 virtual Bool_t Init() ;
8d0f3f77 91 void InitParameters() ;
8cb3533f 92 void PrintDigits(Option_t * option) ;
88cb7938 93 void Unload() ;
90cceaf6 94 void WriteDigits() ; // Writes Digits for the current event
0bc3b8ed 95 Float_t TimeOfNoise(void) const; // Calculate time signal generated by noise
88cb7938 96
9688c1dd 97 //Calculate the time of crossing of the threshold by front edge
0bc3b8ed 98 Float_t FrontEdgeTime(TClonesArray * ticks) const ;
3758d9fc 99 //Calculate digitized signal with gived ADC parameters
100 Int_t DigitizeEnergy(Float_t energy, Int_t absId) ;
990119d6 101
3758d9fc 102private:
8cb3533f 103
92f521a9 104 Bool_t fDefaultInit; //! Says if the task was created by defaut ctor (only parameters are initialized)
88cb7938 105 Int_t fDigitsInRun ; //! Total number of digits in one run
106 Bool_t fInit ; //! To avoid overwriting existing files
107
108 Int_t fInput ; // Number of files to merge
109 TString * fInputFileNames ; //[fInput] List of file names to merge
110 TString * fEventNames ; //[fInput] List of event names to merge
548f0134 111
9688c1dd 112 Int_t fEmcCrystals ; // Number of EMC crystalls in the given geometry
3758d9fc 113
990119d6 114 Float_t fPinNoise ; // Electronics noise in EMC
115 Float_t fEMCDigitThreshold ; // Threshold for storing digits in EMC
3758d9fc 116
990119d6 117 Float_t fCPVNoise ; // Noise in CPV
118 Float_t fCPVDigitThreshold ; // Threshold for storing digits in CPV
3758d9fc 119
990119d6 120
9688c1dd 121 Float_t fTimeResolution ; // Time resolution of FEE electronics
9688c1dd 122 Float_t fTimeThreshold ; // Threshold to start timing for given crystall
123 Float_t fTimeSignalLength ; // Length of the timing signal
124
3758d9fc 125 Float_t fADCchanelEmc ; // width of one ADC channel in GeV
0bc3b8ed 126 Float_t fADCpedestalEmc ; // value of the EMC ADC pedestal
3758d9fc 127 Int_t fNADCemc ; // number of channels in EMC ADC
128
0bc3b8ed 129 Float_t fADCchanelCpv ; // width of one ADC channel in CPV units
130 Float_t fADCpedestalCpv ; // value of the CPV ADC pedestal in CPV units
3758d9fc 131 Int_t fNADCcpv ; // number of channels in CPV ADC
fbf811ec 132
88cb7938 133 TString fEventFolderName; // skowron: name of EFN to read data from in stand alone mode
212d1c0f 134 Int_t fFirstEvent; // first event to process
135 Int_t fLastEvent; // last event to process
136
137 ClassDef(AliPHOSDigitizer,3) // description
990119d6 138
139};
140
141
142#endif // AliPHOSDigitizer_H