Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions duneopdet/OpticalDetector/AlgoSSPLeadingEdge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace pmtana {
}

//---------------------------------------------------------------------------
bool AlgoSSPLeadingEdge::RecoPulse( const pmtana::Waveform_t& wf,
bool AlgoSSPLeadingEdge::RecoPulse( const raw::OpDetWaveform& wf,
const pmtana::PedestalMean_t& ped_mean,
const pmtana::PedestalSigma_t& ped_rms )
{
Expand Down Expand Up @@ -141,4 +141,4 @@ namespace pmtana {

}

}
}
4 changes: 3 additions & 1 deletion duneopdet/OpticalDetector/AlgoSSPLeadingEdge.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#define AlgoSSPLeadingEdge_H 1

#include "fhiclcpp/ParameterSet.h"
#include "lardataobj/RawData/OpDetWaveform.h"
#include "larana/OpticalDetector/OpHitFinder/PMTPulseRecoBase.h"
#include <vector>

Expand All @@ -34,9 +35,10 @@ namespace pmtana {
void Reset();
protected:

bool RecoPulse( const pmtana::Waveform_t&,
bool RecoPulse( const raw::OpDetWaveform&,
const pmtana::PedestalMean_t&,
const pmtana::PedestalSigma_t& );


// A variable holder for a user-defined absolute ADC threshold value
double _adc_thres;
Expand Down
1 change: 1 addition & 0 deletions duneopdet/OpticalDetector/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ art_make( BASENAME_ONLY ALLOW_UNDERSCORES
dunecore::DuneObj
lardataalg::DetectorInfo
lardataobj::RecoBase
lardataobj::RawData
lardata::headers
larana::OpticalDetector
larana::OpticalDetector_OpHitFinder
Expand Down
7 changes: 4 additions & 3 deletions duneopdet/OpticalDetector/OpDetDigitizerDUNEDP_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -849,15 +849,16 @@ namespace opdet {

//---------------------------------------------------------------------------
std::map< size_t, std::vector< short > > OpDetDigitizerDUNEDP::
SplitWaveform(std::vector< short > const& waveform,
SplitWaveform(std::vector< short > const& waveform_short,
const FocusList& fls)
{

std::map< size_t, std::vector< short > > mapTickWaveform;

::pmtana::PedestalMean_t ped_mean (waveform.size(),0);
::pmtana::PedestalSigma_t ped_sigma(waveform.size(),0);
::pmtana::PedestalMean_t ped_mean (waveform_short.size(),0);
::pmtana::PedestalSigma_t ped_sigma(waveform_short.size(),0);

raw::OpDetWaveform waveform(-99999., 0,std::vector<short unsigned int> (waveform_short.begin(), waveform_short.end()) );

fThreshAlg->Reconstruct(waveform,ped_mean,ped_sigma);

Expand Down
16 changes: 9 additions & 7 deletions duneopdet/OpticalDetector/OpDetDigitizerDUNE_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -469,17 +469,17 @@ namespace opdet {
// functions below take a begin()/end() pair.
const std::vector<double> sub(pdWaveforms[hardwareChannel].begin()+p.first,
pdWaveforms[hardwareChannel].begin()+p.second+1);

std::vector< short > waveformOfShorts = VectorOfDoublesToVectorOfShorts(sub);

unsigned int opChannel = wireReadout.OpChannel(opDet, hardwareChannel);
std::vector< short > _waveformOfShorts = VectorOfDoublesToVectorOfShorts(sub);
raw::OpDetWaveform waveformOfShorts(-99999., opChannel, std::vector<short unsigned int> (_waveformOfShorts.begin(), _waveformOfShorts.end()));

std::map< size_t, std::vector < short > > mapTickWaveform =
(!fFullWaveformOutput) ?
SplitWaveform(waveformOfShorts, fls[hardwareChannel]) :
std::map< size_t, std::vector< short > >{ std::make_pair(0,
waveformOfShorts) };

unsigned int opChannel = wireReadout.OpChannel(opDet, hardwareChannel);

for (auto const& pairTickWaveform : mapTickWaveform)
{
double timeStamp =
Expand Down Expand Up @@ -749,14 +749,16 @@ namespace opdet {

//---------------------------------------------------------------------------
std::map< size_t, std::vector< short > > OpDetDigitizerDUNE::
SplitWaveform(std::vector< short > const& waveform,
SplitWaveform(std::vector< short > const& waveform_short,
const FocusList& fls)
{

std::map< size_t, std::vector< short > > mapTickWaveform;

::pmtana::PedestalMean_t ped_mean (waveform.size(),0);
::pmtana::PedestalSigma_t ped_sigma(waveform.size(),0);
::pmtana::PedestalMean_t ped_mean (waveform_short.size(),0);
::pmtana::PedestalSigma_t ped_sigma(waveform_short.size(),0);

raw::OpDetWaveform waveform(-99999., 0,std::vector<short unsigned int> (waveform_short.begin(), waveform_short.end()) );

fThreshAlg->Reconstruct(waveform,ped_mean,ped_sigma);

Expand Down
8 changes: 5 additions & 3 deletions duneopdet/OpticalDetector/OpDetDigitizerProtoDUNE_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -729,14 +729,16 @@ namespace opdet {

//---------------------------------------------------------------------------
std::map< size_t, std::vector< short > > OpDetDigitizerProtoDUNE::
SplitWaveform(std::vector< short > const& waveform,
SplitWaveform(std::vector< short > const& waveform_short,
const FocusList& fls)
{

std::map< size_t, std::vector< short > > mapTickWaveform;

::pmtana::PedestalMean_t ped_mean (waveform.size(),0);
::pmtana::PedestalSigma_t ped_sigma(waveform.size(),0);
::pmtana::PedestalMean_t ped_mean (waveform_short.size(),0);
::pmtana::PedestalSigma_t ped_sigma(waveform_short.size(),0);

raw::OpDetWaveform waveform(-99999., 0,std::vector<short unsigned int> (waveform_short.begin(), waveform_short.end()) );

fThreshAlg->Reconstruct(waveform,ped_mean,ped_sigma);

Expand Down
4 changes: 3 additions & 1 deletion duneopdet/OpticalDetector/OpHitFinder/OpHitAlg_deco.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ namespace opdet {
short_deco_waveform.emplace_back(static_cast<short int>(scale*deco_waveform.SignalROI()[i_tick]));
}

pulseRecoMgr.Reconstruct(short_deco_waveform);
raw::OpDetWaveform short_deco_waveform_reconstruct(timeStamp, channel,std::vector<short unsigned int> (short_deco_waveform.begin(), short_deco_waveform.end()) );

pulseRecoMgr.Reconstruct(short_deco_waveform_reconstruct);

// Get the result
auto const& pulses = threshAlg.GetPulses();
Expand Down