PandaRoot
PndEmcFileCrystalCalibrator.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 #ifndef PNDEMCFILECRYSTALCALIBRATOR_HH
14 #define PNDEMCFILECRYSTALCALIBRATOR_HH
15 
16 //---------------------------------------------------------
17 // Description:
18 // File Calibrator for Emc Crystals.
19 //
20 // Christian Hammann
21 // 31.7.2012
22 
23 //---------------------------------------------------------
24 
26 #include "TString.h"
27 #include <map>
28 
35  public:
37  PndEmcFileCrystalCalibrator(const char *CalFileName);
38 
46  void SetCalibrationFile(const char *CalFileName);
47 
48  virtual Bool_t Init();
49 
51  virtual CalibrationStatus_t Calibrate(Double_t &Energy, Long_t detId, Int_t SignalNr = 1);
52 
53  private:
54  TString fCalFileName;
55  std::map<Long_t, Double_t> fCalibrationMap;
56  std::map<Long_t, Double_t> fGainMap;
57  std::map<Long_t, Double_t> fOverflowMap;
58  ClassDef(PndEmcFileCrystalCalibrator, 1);
59 };
60 #endif
Class to use a textfile for Calibration.
virtual CalibrationStatus_t Calibrate(Double_t &Energy, Long_t detId, Int_t SignalNr=1)
Apply CrystalCalibration to Energy of Crystal derId.
virtual Bool_t Init()
Init.
void SetCalibrationFile(const char *CalFileName)
Set calibration file.
Abstract interface for a emc calibrator.