All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
opHitFinderSBND.hh
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // Class: opHitFinderSBND
3 // Module Type: producer
4 // File: opHitFinderSBND_module.cc
5 //
6 // This module produces an OpHit object for light analysis
7 // Created by L. Paulucci and F. Marinho
8 ////////////////////////////////////////////////////////////////////////
9 
10 #include "canvas/Utilities/InputTag.h"
11 #include "fhiclcpp/ParameterSet.h"
12 #include "messagefacility/MessageLogger/MessageLogger.h"
13 #include "canvas/Utilities/Exception.h"
14 #include "canvas/Utilities/InputTag.h"
15 
20 //#include "larana/OpticalDetector/OpHitFinder/OpHitAlg.h"
21 //#include "lardataobj/Simulation/BeamGateInfo.h"
22 
30 //#include "larsim/MCCheater/PhotonBackTracker.h"
31 
32 #include <memory>
33 #include "TMath.h"
34 #include "TH1D.h"
35 #include "TRandom3.h"
36 #include "TF1.h"
37 
38 #include "sbndcode/OpDetSim/sbndPDMapAlg.h"
39 
40 namespace opdet{
41 
43  public:
44  opHitFinderSBND(fhicl::ParameterSet const & p, const detinfo::DetectorClocks *timeService);
45 
46  std::vector<recob::OpHit> MakeHits(const std::vector<raw::OpDetWaveform> &waveforms);
47 
48  opdet::sbndPDMapAlg map; //map for photon detector types
49 
50  private:
51 
52  // Declare member data here.
53  std::string fInputModuleName;
54  // art::ServiceHandle<cheat::PhotonBackTracker> pbt;
55  double fSampling; //in GHz
56  double fBaselineSample; //in ticks
57  double fUseDenoising;
60  double fSaturation; //in number of p.e.
61  double fArea1pePMT; //area of 1 pe in ADC*ns for PMTs
62  double fArea1peSiPM; //area of 1 pe in ADC*ns for Arapucas
63  int fThresholdPMT; //in ADC
64  int fThresholdArapuca; //in ADC
65  int fEvNumber;
66  int fChNumber;
67  //int fSize;
68  //int fTimePMT; //Start time of PMT signal
69  //int fTimeMax; //Time of maximum (minimum) PMT signal
70  TH1D* wvfHist; //processed waveform histogram
71  //TH1D* wvfHistPrint; //processed waveform histogram
72  void subtractBaseline(TH1D* hist, std::string pdtype, double& rms);
73  bool findPeak(TH1D* h, size_t& time, double& Area, double rms, double& amplitude, std::string type);
74  void denoise(TH1D* h);
75  void TV1D_denoise(float* input, float*& output, const int width, const float lambda);
76  std::stringstream histname;
77  };
78 
79 }
bool findPeak(TH1D *h, size_t &time, double &Area, double rms, double &amplitude, std::string type)
double lambda(double a, double b, double c)
pdgs p
Definition: selectors.fcl:22
opdet::sbndPDMapAlg map
while getopts h
Simulation objects for optical detectors.
Service to provide microboone-specific signal shaping for simulation (convolution) and reconstruction...
std::vector< recob::OpHit > MakeHits(const std::vector< raw::OpDetWaveform > &waveforms)
void subtractBaseline(TH1D *hist, std::string pdtype, double &rms)
opHitFinderSBND(fhicl::ParameterSet const &p, const detinfo::DetectorClocks *timeService)
Class used for the conversion of times between different formats and references.
void TV1D_denoise(float *input, float *&output, const int width, const float lambda)
BEGIN_PROLOG sequence::SlidingWindowTriggerPatternsOppositeWindows END_PROLOG simSlidingORM6O6 effSlidingORW output
object containing MC truth information necessary for making RawDigits and doing back tracking ...
std::stringstream histname
Tools and modules for checking out the basics of the Monte Carlo.
art framework interface to geometry description