SND@LHC Software
Loading...
Searching...
No Matches
ecalClusterCalibration.cxx
Go to the documentation of this file.
2
3#include "FairRootManager.h"
4
5#include "TFormula.h"
6
7#include <iostream>
8#include <fstream>
9#include <list>
10
11using namespace std;
12
15 : FairTask("EcalClusterCalibration", 0)
16{
17 Int_t i;
18
19 for(i=0;i<10;i++)
21}
22
24ecalClusterCalibration::ecalClusterCalibration(const char* name, Int_t iVerbose)
25 : FairTask(name, iVerbose)
26{
27 Int_t i;
28
29 for(i=0;i<10;i++)
31}
32
34Double_t ecalClusterCalibration::Calibrate(Int_t celltype, Double_t energy)
35{
36 if (fStraightCalibration[celltype]==NULL)
37 {
38 Error("Calibrate", "No straight calibration for celltype %d.", celltype);
39 return -1111;
40 }
41 return fStraightCalibration[celltype]->Eval(energy);
42}
43
45Double_t ecalClusterCalibration::Calibrate(Int_t celltype, Double_t energy, Double_t theta)
46{
47 if (fCalibration[celltype]==NULL)
48 {
49 Error("Calibrate", "No calibration for celltype %d.", celltype);
50 return -1111;
51 }
52 return fCalibration[celltype]->Eval(energy, theta);
53}
54
57{
58 FairRootManager* manager=FairRootManager::Instance();
59 if (!manager)
60 {
61 Fatal("Init()", "Can't find IOManager.");
62 return kFATAL;
63 }
64
65 manager->Register(GetName(), "ECAL", this, kFALSE);
66
67 return kSUCCESS;
68}
69
71void ecalClusterCalibration::Exec(Option_t* option)
72{
73 ;
74}
75
86
virtual void Exec(Option_t *option)
Double_t Calibrate(Int_t celltype, Double_t energy)
ClassImp(ecalContFact) ecalContFact