]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliEMCAL.h
Changed operator+ to make sure that fTimeR is time of earliest hit
[u/mrichter/AliRoot.git] / EMCAL / AliEMCAL.h
CommitLineData
2012850d 1#ifndef ALIEMCAL_H
2#define ALIEMCAL_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
2576b1b8 7/* History of cvs commits:
8 *
9 * $Log$
23ef18ac 10 * Revision 1.42 2007/02/24 20:42:35 pavlinov
11 * fixed error of Geant3 parameters initialisation
12 *
91e5f344 13 * Revision 1.41 2007/02/05 10:43:25 hristov
14 * Changes for correct initialization of Geant4 (Mihaela)
15 *
7235aed2 16 * Revision 1.40 2006/12/05 17:19:26 gustavo
17 * Updated AliEMCAL::Digits2Raw, reads first provisional RCU mapping files to make Raw data with new AliCaloAltroMapping and AliCaloRawStream
18 *
2576b1b8 19 *
20 */
2012850d 21//_________________________________________________________________________
22// Base Class for EMCAL
14ce0a6e 23// holds all geant information of
24// materials, etc.
2012850d 25//
23ef18ac 26//*-- Author: Yves Schutz (SUBATECH)
2012850d 27
2012850d 28// --- ROOT system ---
05a92d59 29
2012850d 30class TString ;
05a92d59 31class TTask ;
32class TFolder ;
f51151a0 33class TRandom ;
2d5d9e60 34class TGraph;
35class TF1;
23ef18ac 36class AliEMCALGeometry;
2012850d 37
38// --- AliRoot header files ---
2d5d9e60 39class AliRawReader;
2012850d 40#include "AliDetector.h"
8367ce9a 41#include "AliEMCALGeometry.h"
0631a867 42#include "AliEMCALTrigger.h"
b4215a15 43
2012850d 44class AliEMCAL : public AliDetector {
45
46 public:
b4215a15 47
b13bbe81 48 AliEMCAL();
2012850d 49 AliEMCAL(const char* name, const char* title="");
0a4cb131 50
2012850d 51 virtual ~AliEMCAL() ;
5dee926e 52 virtual void AddHit(Int_t, Int_t*, Float_t *) {
d64c959b 53 Fatal("AddHit(Int_t, Int_t*, Float_t *", "not to be used: use AddHit( Int_t shunt, Int_t primary, Int_t track,Int_t id, Float_t *hits )") ;
b13bbe81 54 }
8367ce9a 55 virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
f51151a0 56 virtual void CreateMaterials() ;
57 virtual void Digits2Raw();
b4215a15 58
4800667c 59 using AliDetector::Raw2Digits;
2d5d9e60 60 virtual void Raw2Digits(AliRawReader *reader);
b4215a15 61
fdebddeb 62 virtual void FinishRun() {}
8367ce9a 63 virtual AliEMCALGeometry * GetGeometry() const
b4215a15 64 {return AliEMCALGeometry::GetInstance(GetTitle(),"") ; }
8367ce9a 65 virtual void Hits2SDigits();
91e5f344 66 // virtual void Init();
fdebddeb 67 virtual Int_t IsVersion(void) const = 0 ;
b4215a15 68
69 virtual AliTriggerDetector* CreateTriggerDetector() const
70 { return new AliEMCALTrigger(); }
0a4cb131 71
56088960 72 // Raw Read Out
73 Double_t GetRawFormatCapa() const { return fgCapa ; }
74 Double_t GetRawFormatHighCharge() const { return fHighCharge ; }
75 Double_t GetRawFormatHighGain() const { return fHighGain ; }
76 Double_t GetRawFormatHighLowGainFactor() const { return fHighLowGainFactor ; }
77 Double_t GetRawFormatLowCharge() const { return ( fHighCharge * fHighLowGainFactor ) ; }
78 Double_t GetRawFormatLowGain() const { return ( fHighGain / fHighLowGainFactor ) ; }
79 Int_t GetRawFormatLowGainOffset() const { return fLowGainOffset ; }
80 Int_t GetRawFormatOrder() const { return fgOrder ; }
14ce0a6e 81 Int_t GetRawFormatTimeBins() const { return fgkTimeBins ; }
56088960 82 Double_t GetRawFormatTimeMax() const { return fgTimeMax ; }
83 Double_t GetRawFormatTimePeak() const { return fgTimePeak ; }
2d5d9e60 84 Double_t GetRawFormatTimeTrigger() const { return fgTimeTrigger ; }
2d5d9e60 85 Int_t GetRawFormatThreshold() const { return fgThreshold ; }
2576b1b8 86 Int_t GetRawFormatDDLPerSuperModule() const { return fgDDLPerSuperModule ; }
56088960 87 static Double_t RawResponseFunctionMax(Double_t charge, Double_t gain) ;
03ecfe88 88 Bool_t RawSampledResponse(Double_t dtime, Double_t damp, Int_t * adcH, Int_t * adcL) const ;
56088960 89 //
8367ce9a 90 virtual AliLoader* MakeLoader(const char* topfoldername);
fdebddeb 91 virtual const TString Version() const {return TString(" ") ; }
1963b290 92
2012850d 93protected:
56088960 94
fac5662b 95 static Double_t RawResponseFunction(Double_t *x, Double_t *par) ;
2d5d9e60 96 void FitRaw(Bool_t lowGainFlag, TGraph * gLowGain, TGraph * gHighGain, TF1* signalF, Double_t & energy, Double_t & time) ;
f51151a0 97
7235aed2 98 void InitConstants(); //initializes some params
91e5f344 99 void DefineMediumParameters(); // define tracking medium parameters
0a4cb131 100
f51151a0 101 Int_t fBirkC0; // constants for Birk's Law implementation
102 Double_t fBirkC1; // constants for Birk's Law implementation
103 Double_t fBirkC2; // constants for Birk's Law implementation
1963b290 104
56088960 105 static Double_t fgCapa ; // capacitor of the preamplifier for the raw RO signal
106 Double_t fHighCharge ; // high charge (to convert energy to charge) for the raw RO signal
107 Double_t fHighGain ; // high gain for the raw RO signal
108 Double_t fHighLowGainFactor ; // high to low gain factor for the raw RO signal
109 Int_t fLowGainOffset ; // to separate high from low gain in the DDL
110 static Int_t fgOrder ; // order of the gamma function for the RO signal
14ce0a6e 111 static const Int_t fgkTimeBins = 256 ; // number of sampling bins of the raw RO signal
56088960 112 static Double_t fgTimeMax ; // maximum sampled time of the raw RO signal
113 static Double_t fgTimePeak ; // peaking time of the raw RO signal
114 static Double_t fgTimeTrigger ; // time of the trigger for the RO signal
14ce0a6e 115 static Int_t fgThreshold; // threshold
23ef18ac 116 static Int_t fgDDLPerSuperModule; // number of DDL per SuperModule
2576b1b8 117
23ef18ac 118 AliEMCALGeometry* fGeometry; //!
119
2576b1b8 120private:
e939a978 121 AliEMCAL(const AliEMCAL& emcal);
122 AliEMCAL & operator = (const AliEMCAL & /*rvalue*/);
123
56088960 124 ClassDef(AliEMCAL,9) // Electromagnetic calorimeter (base class)
125
126 } ;
2012850d 127
128#endif // ALIEMCAL_H