ProvidedPedestalAdditionService.h
Go to the documentation of this file.
1 // ProvidedPedestalAdditionService.h
2 
3 // David Adams
4 // December 2015
5 //
6 // Pedestal additon service that obtains pedestals and their
7 // RMS values from a pedestal service.
8 // Pedestal noise is assigned using independent random Gaussian values
9 // for each tick with sigma = NoiseScale*RMS
10 // Parameters:
11 // NoiseScale - The above noise scale. (<= 0 for no pedestal noise).
12 // RandomSeed - Overrides NuRandomService if set nonzero.
13 // LogLevel - (0=none, 1=init only, ...)
14 
15 #ifndef ProvidedPedestalAdditionService_H
16 #define ProvidedPedestalAdditionService_H
17 
20 
21 class TH1;
22 namespace CLHEP {
23 class HepRandomEngine;
24 }
25 namespace lariov {
26 class DetPedestalProvider;
27 }
28 
30 
31 public:
32 
34 
36 
37  // Add pedestals and pedestal noise to a signal array.
38  int addPedestal(Channel chan, AdcSignalVector& sigs, float& ped, float& pedrms) const;
39 
40  // Print parameters.
41  virtual std::ostream& print(std::ostream& out =std::cout, std::string prefix ="") const;
42 
43 private:
44 
45  // Configuration.
46  float m_NoiseScale;
49 
50  TH1* m_PedNoiseHist; ///< Histogram of pedestal noise counts
51 
52  CLHEP::HepRandomEngine* m_pran;
53 
55 
56 };
57 
59 
60 #endif
61 
std::string string
Definition: nybbler.cc:12
TH1 * m_PedNoiseHist
Histogram of pedestal noise counts.
DECLARE_ART_SERVICE_INTERFACE_IMPL(MySharedService, art::test::MyServiceInterface, SHARED) DEFINE_ART_SERVICE_INTERFACE_IMPL(MySharedService
const lariov::DetPedestalProvider & m_PedestalProvider
Filters for channels, events, etc.
std::vector< AdcSignal > AdcSignalVector
Definition: AdcTypes.h:22