]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliEMCAL.h
Modification needed to include PHOS in the global trigger framework
[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$ */
7
8//_________________________________________________________________________
9// Base Class for EMCAL
10//
11//*-- Author: Yves Schutz (SUBATECH)
12
2012850d 13// --- ROOT system ---
05a92d59 14
2012850d 15class TString ;
05a92d59 16class TTask ;
17class TFolder ;
f51151a0 18class TRandom ;
2d5d9e60 19class TGraph;
20class TF1;
2012850d 21
22// --- AliRoot header files ---
2d5d9e60 23class AliRawReader;
2012850d 24#include "AliDetector.h"
8367ce9a 25#include "AliEMCALGeometry.h"
b4215a15 26#include "AliEMCALTrigger.h"
27
2012850d 28class AliEMCAL : public AliDetector {
29
30 public:
b4215a15 31
b13bbe81 32 AliEMCAL();
2012850d 33 AliEMCAL(const char* name, const char* title="");
39200c71 34 AliEMCAL(const AliEMCAL& emcal) : AliDetector(emcal) {
2012850d 35 // cpy ctor: no implementation yet
36 // requested by the Coding Convention
9859bfc0 37 Fatal("cpy ctor", "not implemented") ;
2012850d 38 }
39 virtual ~AliEMCAL() ;
5dee926e 40 virtual void AddHit(Int_t, Int_t*, Float_t *) {
d64c959b 41 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 42 }
5dee926e 43 virtual void Copy(TObject & emcal) const
44 { Copy(dynamic_cast<AliEMCAL&>(emcal)); }
45 virtual void Copy(AliEMCAL & emcal) const;
8367ce9a 46 virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
f51151a0 47 virtual void CreateMaterials() ;
905263da 48 // virtual void
f51151a0 49 virtual void Digits2Raw();
b4215a15 50
4800667c 51 using AliDetector::Raw2Digits;
2d5d9e60 52 virtual void Raw2Digits(AliRawReader *reader);
b4215a15 53
fdebddeb 54 virtual void FinishRun() {}
8367ce9a 55 virtual AliEMCALGeometry * GetGeometry() const
b4215a15 56 {return AliEMCALGeometry::GetInstance(GetTitle(),"") ; }
8367ce9a 57 virtual void Hits2SDigits();
fdebddeb 58 virtual Int_t IsVersion(void) const = 0 ;
b4215a15 59
60 virtual AliTriggerDetector* CreateTriggerDetector() const
61 { return new AliEMCALTrigger(); }
62
56088960 63 // Raw Read Out
64 Double_t GetRawFormatCapa() const { return fgCapa ; }
65 Double_t GetRawFormatHighCharge() const { return fHighCharge ; }
66 Double_t GetRawFormatHighGain() const { return fHighGain ; }
67 Double_t GetRawFormatHighLowGainFactor() const { return fHighLowGainFactor ; }
68 Double_t GetRawFormatLowCharge() const { return ( fHighCharge * fHighLowGainFactor ) ; }
69 Double_t GetRawFormatLowGain() const { return ( fHighGain / fHighLowGainFactor ) ; }
70 Int_t GetRawFormatLowGainOffset() const { return fLowGainOffset ; }
71 Int_t GetRawFormatOrder() const { return fgOrder ; }
046ae904 72 Int_t GetRawFormatTimeBins() const { return fkTimeBins ; }
56088960 73 Double_t GetRawFormatTimeMax() const { return fgTimeMax ; }
74 Double_t GetRawFormatTimePeak() const { return fgTimePeak ; }
2d5d9e60 75 Double_t GetRawFormatTimeTrigger() const { return fgTimeTrigger ; }
76 Int_t GetRawFormatDDLOffset() const { return fgDDLOffset ; }
77 Int_t GetRawFormatThreshold() const { return fgThreshold ; }
78 Int_t GetRawFormatChannelsPerDDL() const { return fgChannelsPerDDL ; }
56088960 79 static Double_t RawResponseFunctionMax(Double_t charge, Double_t gain) ;
80 //
8367ce9a 81 virtual AliLoader* MakeLoader(const char* topfoldername);
fdebddeb 82 virtual const TString Version() const {return TString(" ") ; }
9c0a4862 83 AliEMCAL & operator = (const AliEMCAL & /*rvalue*/) {
d64c959b 84 Fatal("operator =", "not implemented") ; return *this ; }
1963b290 85
2012850d 86protected:
56088960 87
fac5662b 88 static Double_t RawResponseFunction(Double_t *x, Double_t *par) ;
56088960 89 Bool_t RawSampledResponse(const Double_t dtime, const Double_t damp, Int_t * adcH, Int_t * adcL) const ;
2d5d9e60 90 void FitRaw(Bool_t lowGainFlag, TGraph * gLowGain, TGraph * gHighGain, TF1* signalF, Double_t & energy, Double_t & time) ;
f51151a0 91
f51151a0 92 Int_t fBirkC0; // constants for Birk's Law implementation
93 Double_t fBirkC1; // constants for Birk's Law implementation
94 Double_t fBirkC2; // constants for Birk's Law implementation
1963b290 95
56088960 96 static Double_t fgCapa ; // capacitor of the preamplifier for the raw RO signal
97 Double_t fHighCharge ; // high charge (to convert energy to charge) for the raw RO signal
98 Double_t fHighGain ; // high gain for the raw RO signal
99 Double_t fHighLowGainFactor ; // high to low gain factor for the raw RO signal
100 Int_t fLowGainOffset ; // to separate high from low gain in the DDL
101 static Int_t fgOrder ; // order of the gamma function for the RO signal
102 static const Int_t fkTimeBins = 256 ; // number of sampling bins of the raw RO signal
103 static Double_t fgTimeMax ; // maximum sampled time of the raw RO signal
104 static Double_t fgTimePeak ; // peaking time of the raw RO signal
105 static Double_t fgTimeTrigger ; // time of the trigger for the RO signal
2d5d9e60 106 static Int_t fgDDLOffset;
107 static Int_t fgThreshold;
108 static Int_t fgChannelsPerDDL;
2012850d 109
56088960 110 ClassDef(AliEMCAL,9) // Electromagnetic calorimeter (base class)
111
112 } ;
2012850d 113
114#endif // ALIEMCAL_H