]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - EMCAL/AliEMCALRawUtils.h
Add the configuration for AD0
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALRawUtils.h
... / ...
CommitLineData
1// -*- mode: c++ -*-
2#ifndef ALIEMCALRAWUTILS_H
3#define ALIEMCALRAWUTILS_H
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7/* $Id$ */
8
9
10//_________________________________________________________________________
11// Utility Class for handling Raw data
12// Does all transitions from Digits to Raw and vice versa,
13// for simu and reconstruction
14//
15// Note: the current version is still simplified. Only
16// one raw signal per digit is generated; either high-gain or low-gain
17// Need to add concurrent high and low-gain info in the future
18// No pedestal is added to the raw signal.
19//
20//*-- Author: Marco van Leeuwen (LBL)
21//
22#include "TObject.h" // for ROOT types
23#include <TString.h>
24
25
26class AliAnalysisManager;
27class AliCaloRawStreamV3;
28class AliAltroMapping;
29class TGraph;
30class AliRawReader;
31class AliEMCALGeometry;
32class AliCaloCalibPedestal;
33class AliCaloRawAnalyzer;
34class AliEMCALTriggerRawDigitMaker;
35class AliEMCALTriggerData;
36
37#include "AliCaloConstants.h"
38
39class AliEMCALRawUtils : public TObject {
40
41public:
42
43 AliEMCALRawUtils(Algo::fitAlgorithm fitAlgo = Algo::kStandard);
44
45 virtual ~AliEMCALRawUtils();
46
47 void Digits2Raw();
48
49 void Raw2Digits(AliRawReader *reader, TClonesArray *digitsArr, const AliCaloCalibPedestal* pedbadmap,
50 TClonesArray *digitsTRG=0x0, AliEMCALTriggerData* trgData = 0x0);
51
52 void AddDigit(TClonesArray *digitsArr, Int_t id, Int_t lowGain, Float_t amp, Float_t time, Float_t chi2, Int_t ndf);
53
54 void TrimDigits(TClonesArray *digitsArr);
55
56 Int_t GetNoiseThreshold() const { return fNoiseThreshold; }
57 Int_t GetNPedSamples() const { return fNPedSamples; }
58 Bool_t GetRemoveBadChannels() const {return fRemoveBadChannels;}
59 Int_t GetFittingAlgorithm() const {return fFittingAlgorithm; }
60 Float_t GetTimeMax() const {return fTimeMax ;}
61 Float_t GetTimeMin() const {return fTimeMin ;}
62 Bool_t UseFALTRO() const {return fUseFALTRO; }
63
64 void SetNoiseThreshold(Int_t val) {fNoiseThreshold=val; }
65 void SetNPedSamples(Int_t val) {fNPedSamples=val; }
66 void SetRemoveBadChannels(Bool_t val) {fRemoveBadChannels=val; }
67 void SetFittingAlgorithm(Int_t val) ;
68 void SetTimeMin(Float_t t) {fTimeMin = t ;}
69 void SetTimeMax(Float_t t) {fTimeMax = t ;}
70 void SetFALTROUsage(Bool_t val) {fUseFALTRO=val; }
71
72 AliCaloRawAnalyzer *GetRawAnalyzer() const { return fRawAnalyzer;}
73
74 virtual Option_t* GetOption() const { return fOption.Data(); }
75 void SetOption(const Option_t* opt) { fOption = opt; }
76
77private:
78 AliEMCALRawUtils (const AliEMCALRawUtils& rawUtils); //copy ctor
79 AliEMCALRawUtils& operator =(const AliEMCALRawUtils& rawUtils);
80
81 Int_t fNoiseThreshold; // threshold to consider signal or noise
82 Int_t fNPedSamples; // number of samples to use in pedestal calculation
83 AliEMCALGeometry* fGeom; // geometry
84 AliAltroMapping* fMapping[4]; // only two for now
85 TString fOption; // option passed from Reconstructor
86 Bool_t fRemoveBadChannels; // select if bad channels are removed before fitting
87 Int_t fFittingAlgorithm; // select the fitting algorithm
88 Float_t fTimeMin; // minimum threshold for the time of the signal
89 Float_t fTimeMax; // maximum threshold for the time of the signal
90 Bool_t fUseFALTRO; // use FALTRO and pass it to the digits
91 AliCaloRawAnalyzer *fRawAnalyzer; // e.g. for sample selection for fits
92 AliEMCALTriggerRawDigitMaker* fTriggerRawDigitMaker; // trigger raw digit info
93
94 ClassDef(AliEMCALRawUtils,7) // utilities for raw signal fitting
95
96};
97
98#endif