PandaRoot
PndEmcWaveformToCalibratedDigi.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 //----------------------------------------------------------------------
14 // File and Version Information:
15 // $Id: Exp $
16 //
17 // Description:
18 // Class PndEmcWaveformToCalibratedDigi. Module to take the hit list for the
19 // calorimeter and make ADC waveforms from them.
20 //
21 // Software developed for the BaBar Detector at the SLAC B-Factory.
22 // Adapted for the PANDA experiment at GSI
23 //
24 // Author List:
25 // Phil Strother Original Author
26 // Dima Melnichuk - adaption for PANDA
27 //
28 // Copyright Information:
29 // Copyright (C) 1996 Imperial College
30 //
31 //----------------------------------------------------------------------
32 //#pragma once
33 #ifndef PndEmcWaveformToCalibratedDigi_H
34 #define PndEmcWaveformToCalibratedDigi_H
35 
36 #include <PndPersistencyTask.h>
37 #include <string>
38 #include <map>
39 #include "TString.h"
40 //#include <vector>
41 
42 class PndEmcHit;
44 class PndEmcWaveform;
45 
46 class TClonesArray;
47 class PndEmcDigiPar;
48 class PndEmcRecoPar;
49 class PndEmcAbsPSA;
51 
58 {
59 
60 public:
61 
62  // Constructors
63 
64  PndEmcWaveformToCalibratedDigi(Int_t verbose=0, Bool_t storedigis=kTRUE);
65 
66  // Destructor
67 
69 
71  virtual InitStatus Init();
72 
73  void SetCalibrationFile(const char* calibrationfilename){fCalibrationFileName = calibrationfilename;};
74 
76  virtual void Exec(Option_t* opt);
77 
78  void SetStorageOfData(Bool_t val); // Method to specify whether digis are stored or not.
79 
80 private:
81  void ReadCalibrationFile();
83  TClonesArray* fWaveformArray;
84 
86  TClonesArray* fDigiArray;
87 
88  Double_t fSampleRate;
89  Double_t fSampleRate_PMT;
90  Double_t fEnergyDigiThreshold;
91  Double_t fASIC_Shaping_int_time; //s
92  Double_t fPMT_Shaping_int_time; //s
93  Double_t fPMT_Shaping_diff_time; //s
94  Double_t fCrystal_time_constant; //s
95  Double_t fShashlyk_time_constant; //s
96  Int_t fNumber_of_samples_in_waveform;
97  Int_t fNumber_of_samples_in_waveform_pmt;
98 
99  //std::string fDigiPosMethod;// "surface" or "depth"
100  TString fDigiPosMethod;
101  Double_t fEmcDigiRescaleFactor;
102  Double_t fEmcDigiPositionDepthPWO;
103  Double_t fEmcDigiPositionDepthShashlyk;
104 
105  PndEmcAbsPulseshape* fPulseshape;
106  PndEmcAbsPulseshape* fPulseshape_pmt;
107  PndEmcAbsPSA *psaAlgorithm;
108  PndEmcAbsPSA *psaAlgorithm_pmt;
109  PndEmcAbsPSA *psaAlgorithm_proto192;
110 
111  PndEmcDigiPar* fDigiPar;
112  PndEmcRecoPar* fRecoPar;
114  virtual void SetParContainers();
115 
117  Int_t fVerbose;
118 
119  Bool_t fStoreDigis;
120 
121  Double_t fWfNormalisation; // Waveform normalisation constant
122  Double_t fWfNormalisation_pmt;
123  Double_t fWfNormalisation_proto192;
124 
125  std::map<Int_t,Double_t> fCalibrationMap;
126  TString fCalibrationFileName;
127 
128  ClassDef(PndEmcWaveformToCalibratedDigi,2);
129 
130 
131 };
132 
133 #endif
134 
135 
136 
137 
138 
stores crystal index coordinates (x,y) or (theta,phi)
virtual void Exec(Option_t *opt)
void SetCalibrationFile(const char *calibrationfilename)
PndEmcWaveformToCalibratedDigi(Int_t verbose=0, Bool_t storedigis=kTRUE)
virtual InitStatus Init()
parameter set of Emc digitisation
Definition: PndEmcDigiPar.h:24
void SetStorageOfData(Bool_t val)
represents a simulated waveform in an emc crystal
Baseclass for pulseshapeanalysis ( featureextraction )
Definition: PndEmcAbsPSA.h:33
represents the deposited energy of one emc crystal from simulation
Definition: PndEmcHit.h:40
pulseshape interface
Parameter set for Emc Reco.
Definition: PndEmcRecoPar.h:25
Module to take the hit list for the calorimeter and make ADC waveforms from them. ...