PandaRoot
PndEmcSimCrystalCalibrator.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 PNDEMCSIMCRYSTALCALIBRATOR_HH
14 #define PNDEMCSIMCRYSTALCALIBRATOR_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:
36  PndEmcSimCrystalCalibrator(Int_t verbose = 0);
37 
46  virtual void SetCalibration(Int_t ModId, Double_t cal, Int_t SignalNr = 1, Double_t overflow = -1);
47 
56  virtual void CreateRandomCalibration(Double_t Sigma);
57  virtual Bool_t Init();
58 
60  virtual CalibrationStatus_t Calibrate(Double_t &Energy, Long_t DetId, Int_t SignalNr = 1);
61 
62  private:
63  Double_t fRandomCal;
64  Double_t fRandomSigma;
65  std::vector<std::map<Int_t, std::pair<Double_t, Double_t>>> fModuleCalibrationMaps; // sig nr, modId, calib, overflow
66  std::vector<std::map<Long_t, Double_t>> fCrystalCalibrationMaps; // sig nr, detId, rel. calib
67 
68  Int_t fVerbose;
69  ClassDef(PndEmcSimCrystalCalibrator, 2);
70 };
71 #endif
virtual Bool_t Init()
Init.
PndEmcSimCrystalCalibrator(Int_t verbose=0)
virtual void CreateRandomCalibration(Double_t Sigma)
Creates a random gaussion distributed calibration for all crystals Not implemented yet...
virtual void SetCalibration(Int_t ModId, Double_t cal, Int_t SignalNr=1, Double_t overflow=-1)
Set Calibration for a Module.
virtual CalibrationStatus_t Calibrate(Double_t &Energy, Long_t DetId, Int_t SignalNr=1)
Apply CrystalCalibration to Energy of Crystal derId.
Class to simulate a Calibration.
Abstract interface for a emc calibrator.