PandaRoot
PndEmcHitsToWaveform.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 PndEmcHitsToWaveform. 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 // Copyright Information:
28 // Copyright (C) 1996 Imperial College
29 //----------------------------------------------------------------------
30 //#pragma once
31 #ifndef PndEmcHitsToWaveform_H
32 #define PndEmcHitsToWaveform_H
33 
34 #include <PndPersistencyTask.h>
35 #include "PndEmcWaveform.h"
36 #include "PndEmcTwoCoordIndex.h"
37 
38 // class PndEmcTwoCoordIndex;
39 // class PndEmcWaveform;
40 class PndEmcMapper;
41 
42 class TClonesArray;
43 class PndEmcDigiPar;
44 class PndEmcGeoPar;
47 
53  public:
54  // Constructors
55  PndEmcHitsToWaveform(Int_t verbose = 0, Bool_t storewaves = kTRUE);
56  // Destructor
57  virtual ~PndEmcHitsToWaveform();
58 
59  virtual InitStatus Init();
60  virtual void Exec(Option_t *opt);
61 
62  // PndEmcWaveform * AddWaveform(Int_t detId,Int_t hitIndex,Int_t numOfSamples);
63  PndEmcWaveform *AddWaveform(Int_t detId, Int_t hitIndex, Int_t numOfSamples, Double_t timeStamp, Double_t sampleRate, Int_t MCTrackID);
64 
65  void SetStorageOfData(Bool_t val); // Method to specify whether waveforms are stored or not.
66 
67  void RunTimeBased() { fTimeOrderedWaveform = kTRUE; }
68 
69  void FinishTask();
70 
71  protected:
73  virtual void SetParContainers();
74 
75  private:
76  // don't allow copying (-Weffc++)
77  PndEmcHitsToWaveform(const PndEmcHitsToWaveform &); // no implementation
78  PndEmcHitsToWaveform &operator=(const PndEmcHitsToWaveform &); // no implementation
79 
80  private:
82  TClonesArray *fHitArray;
83 
85  TClonesArray *fWaveformArray;
86  PndEmcWaveformWriteoutBuffer *fDataBuffer;
87  Bool_t fTimeOrderedWaveform;
88 
89  Double_t fOneBitResolution;
90  Double_t fOneBitResolutionBW;
91  Double_t fOneBitResolutionPMT;
92  Double_t fOneBitResolutionFWD;
93 
94  Int_t fNBits;
95  Double_t fDetectedPhotonsPerMeV;
96  Double_t fDetectedPhotonsPerMeV_PMT;
97  Double_t fNPhotoElectronsPerMeVAPDBarrel;
98  Double_t fNPhotoElectronsPerMeVAPDBWD;
99  Double_t fNPhotoElectronsPerMeVVPT;
100  Double_t fNPhotoElectronsPerMeVPMT;
101  Double_t fSensitiveAreaAPD; // mm^2
102  Double_t fSensitiveAreaVPT; // mm^2
103  Double_t fQuantumEfficiencyAPD;
104  Double_t fQuantumEfficiencyVPT;
105  Double_t fQuantumEfficiencyPMT;
106  Double_t fExcessNoiseFactorAPD;
107  Double_t fExcessNoiseFactorVPT;
108  Double_t fExcessNoiseFactorPMT;
109  Double_t fIncoherent_elec_noise_width_GeV_APD; // GeV
110  Double_t fIncoherent_elec_noise_width_GeV_VPT; // GeV
111  Double_t fEnergyRange; // GeV
112  Double_t fEnergyRangeBW; // GeV
113  Double_t fFirstSamplePhase;
114  Int_t fNumber_of_samples_in_waveform;
115  Int_t fNumber_of_samples_in_waveform_pmt;
116  Int_t fNumber_of_samples_in_waveform_fwd;
117  Double_t fASIC_Shaping_int_time; // s
118  Double_t fPMT_Shaping_int_time; // s
119  Double_t fPMT_Shaping_diff_time; // s
120  Double_t fFWD_Shaping_int_time; // s
121  Double_t fFWD_time_constant; // s
122  Double_t fCrystal_time_constant; // s
123  Double_t fShashlyk_time_constant; // s
124  Double_t fShashlykSamplingFactor;
125  Double_t fSampleRate;
126  Double_t fSampleRate_PMT;
127  Double_t fSampleRate_FWD;
128  Int_t fUse_shaped_noise;
129  Int_t fUse_photon_statistic;
130  Int_t fNoiseAllChannels;
131  Int_t fMapVersion;
132 
133  Double_t fFirstADCBinTime;
134 
135  Double_t fGevPeakAnalogue;
136  Double_t fGevPeakAnalogue_PMT;
137  Double_t fGevPeakAnalogue_FWD;
138 
139  PndEmcDigiPar *fDigiPar;
140  PndEmcGeoPar *fGeoPar;
143  Int_t fVerbose;
144 
145  // counters for task
146  Int_t HowManyHit;
147  Int_t nWaveformProduced;
148  Int_t HowManyEventPileup;
149 
150  // pulse shapes
151  PndEmcAbsPulseshape *pulseshape1;
152  PndEmcAbsPulseshape *pulseshape2;
153  PndEmcAbsPulseshape *pulseshape3;
154 
155  ClassDef(PndEmcHitsToWaveform, 2);
156 };
157 
158 #endif
Takes list of PndEmcHits and creates PndEmcWaveform.
PndEmcHitsToWaveform(Int_t verbose=0, Bool_t storewaves=kTRUE)
PndEmcWaveform * AddWaveform(Int_t detId, Int_t hitIndex, Int_t numOfSamples, Double_t timeStamp, Double_t sampleRate, Int_t MCTrackID)
Emc geometry mapper.
Definition: PndEmcMapper.h:34
virtual InitStatus Init()
virtual void Exec(Option_t *opt)
void SetStorageOfData(Bool_t val)
parameter set of Emc digitisation
Definition: PndEmcDigiPar.h:24
represents a simulated waveform in an emc crystal
virtual ~PndEmcHitsToWaveform()
pulseshape interface
virtual void SetParContainers()