Skip to content

Move PMTBeamSignal data product from icaruscode to sbnobj #832

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
69 changes: 0 additions & 69 deletions icaruscode/IcarusObj/PMTBeamSignal.h

This file was deleted.

2 changes: 1 addition & 1 deletion icaruscode/IcarusObj/classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "icaruscode/IcarusObj/CRTTPCMatchingInfo.h"
#include "icaruscode/IcarusObj/OpDetWaveformMeta.h"
#include "icaruscode/IcarusObj/PMTWaveformTimeCorrection.h"
#include "icaruscode/IcarusObj/PMTBeamSignal.h"

#include "icaruscode/IcarusObj/Hit.h"
//#include "icaruscode/IcarusObj/CRTPMTMatching.h"

Expand Down
6 changes: 0 additions & 6 deletions icaruscode/IcarusObj/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@
<class name="std::vector<icarus::timing::PMTWaveformTimeCorrection>"/>
<class name="art::Wrapper<std::vector<icarus::timing::PMTWaveformTimeCorrection> >"/>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- icarus::timing::PMTBeamSignal -->
<class name="art::Wrapper<vector<icarus::timing::PMTBeamSignal> >"/>
<class name="icarus::timing::PMTBeamSignal"/>
<class name="vector<icarus::timing::PMTBeamSignal>"/>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- LArSoft object associations that are missing from LArSoft -->

Expand Down
24 changes: 12 additions & 12 deletions icaruscode/PMT/OpReco/ICARUSBeamStructureAna_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include "sbnobj/Common/Trigger/ExtraTriggerInfo.h"
#include "icaruscode/CRT/CRTUtils/CRTPMTMatchingUtils.h"
#include "sbnobj/Common/CRT/CRTPMTMatching.hh"
#include "icaruscode/IcarusObj/PMTBeamSignal.h"
#include "sbnobj/Common/PMT/Data/PMTBeamSignal.hh"

// ROOT libraries
#include "TTree.h"
Expand Down Expand Up @@ -156,7 +156,7 @@ class opana::ICARUSBeamStructureAna : public art::EDAnalyzer
std::vector<int> m_crtregion;

// RWM times
std::vector<icarus::timing::PMTBeamSignal> fRWMTimes;
std::vector<sbn::timing::PMTBeamSignal> fRWMTimes;
};

// --------------------------------------------------------------------------
Expand Down Expand Up @@ -289,9 +289,9 @@ void opana::ICARUSBeamStructureAna::analyze(art::Event const &e)
// ----
// RWM times

fRWMTimes = e.getProduct<std::vector<icarus::timing::PMTBeamSignal>>(fRWMLabel);
fRWMTimes = e.getProduct<std::vector<sbn::timing::PMTBeamSignal>>(fRWMLabel);
if (fRWMTimes.empty())
mf::LogTrace("ICARUSBeamStructureAna") << "Data product std::vector<icarus::timing::PMTBeamSignal> for '" << fRWMLabel.label()
mf::LogTrace("ICARUSBeamStructureAna") << "Data product std::vector<sbn::timing::PMTBeamSignal> for '" << fRWMLabel.label()
<< "' is empty in " << m_gate_name << " event!";

// ----
Expand Down Expand Up @@ -420,11 +420,11 @@ void opana::ICARUSBeamStructureAna::analyze(art::Event const &e)
m_hit_rise_time_rwm.push_back(getRWMRelativeTime(ch, risemap[ch]));
m_hit_pe.push_back(pemap[ch]);
}

// get the flash interaction time w.r.t. RWM
// this is currently the mean between the first ophits on opposite walls
m_flash_time_rwm = getFlashBunchTime(m_channel_id, m_hit_rise_time_rwm);

fOpFlashTrees[iFlashLabel]->Fill();

clear();
Expand Down Expand Up @@ -461,7 +461,7 @@ double opana::ICARUSBeamStructureAna::getRWMRelativeTime(int channel, double t)
{

if (fRWMTimes.empty())
return icarus::timing::NoTime;
return sbn::timing::NoTime;

auto rwm = fRWMTimes.at(channel);
if (!rwm.isValid())
Expand All @@ -470,7 +470,7 @@ double opana::ICARUSBeamStructureAna::getRWMRelativeTime(int channel, double t)
<< "(Crate " << rwm.crate << ", Board " << rwm.digitizerLabel
<< ", SpecialChannel " << rwm.specialChannel << ")"
<< " in event " << m_event << " gate " << m_gate_name;
return icarus::timing::NoTime;
return sbn::timing::NoTime;
}

double rwm_trigger = rwm.startTime; // rwm time w.r.t. trigger time [us]
Expand All @@ -486,9 +486,9 @@ double opana::ICARUSBeamStructureAna::getFlashBunchTime(std::vector<int> channel
double tfirst_right = std::numeric_limits<double>::max();

// if no RWM info available, all pmt_start_time_rwm are invalid
// return icarus::timing::NoTime as well for the flash
// return sbn::timing::NoTime as well for the flash
if (fRWMTimes.empty())
return icarus::timing::NoTime;
return sbn::timing::NoTime;

int nleft = 0;
int nright = 0;
Expand All @@ -501,9 +501,9 @@ double opana::ICARUSBeamStructureAna::getFlashBunchTime(std::vector<int> channel

// if any RWM copy is missing (therefore missing for an entire PMT crate),
// it might not be possible to use the first hits (they might not have a RMW time)
// so return icarus::timing::NoTime as in other bad cases
// so return sbn::timing::NoTime as in other bad cases
if (!fRWMTimes[i].isValid())
return icarus::timing::NoTime;
return sbn::timing::NoTime;

// count hits separetely on the two walls
if (side == 0)
Expand Down
22 changes: 11 additions & 11 deletions icaruscode/PMT/OpReco/ICARUSFlashAssAna_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include "lardataobj/Simulation/BeamGateInfo.h"
#include "lardataobj/RawData/TriggerData.h"
#include "sbnobj/Common/Trigger/ExtraTriggerInfo.h"
#include "icaruscode/IcarusObj/PMTBeamSignal.h"
#include "sbnobj/Common/PMT/Data/PMTBeamSignal.hh"
#include "sbnobj/ICARUS/PMT/Data/WaveformBaseline.h"

#include "TTree.h"
Expand Down Expand Up @@ -102,7 +102,7 @@ class opana::ICARUSFlashAssAna : public art::EDAnalyzer

fhicl::Atom<art::InputTag> RWMLabel{
Name("RWMLabel"),
Comment("Tag for the RWM std::vector<icarus::timing::PMTBeamSignal> data product")};
Comment("Tag for the RWM std::vector<sbn::timing::PMTBeamSignal> data product")};

fhicl::Atom<float> PEOpHitThreshold{
Name("PEOpHitThreshold"),
Expand Down Expand Up @@ -251,7 +251,7 @@ class opana::ICARUSFlashAssAna : public art::EDAnalyzer

geo::GeometryCore const* fGeom;
geo::WireReadoutGeom const* fChannelMapAlg;
std::vector<icarus::timing::PMTBeamSignal> fRWMTimes;
std::vector<sbn::timing::PMTBeamSignal> fRWMTimes;
};

// ----------------------------------------------------------------------------
Expand Down Expand Up @@ -485,7 +485,7 @@ float opana::ICARUSFlashAssAna::getRWMRelativeTime(int channel, float t)
{

if (fRWMTimes.empty())
return icarus::timing::NoTime;
return sbn::timing::NoTime;

auto rwm = fRWMTimes.at(channel);
if (!rwm.isValid())
Expand All @@ -494,7 +494,7 @@ float opana::ICARUSFlashAssAna::getRWMRelativeTime(int channel, float t)
<< "(Crate " << rwm.crate << ", Board " << rwm.digitizerLabel
<< ", SpecialChannel " << rwm.specialChannel << ")"
<< " in event " << m_event << " gate " << m_gate_name;
return icarus::timing::NoTime;
return sbn::timing::NoTime;
}

float rwm_trigger = rwm.startTime; // rwm time w.r.t. trigger time [us]
Expand All @@ -511,9 +511,9 @@ float opana::ICARUSFlashAssAna::getFlashBunchTime(std::vector<double> pmt_start_
float tfirst_right = std::numeric_limits<float>::max();

// if no RWM info available, all pmt_start_time_rwm are invalid
// return icarus::timing::NoTime as well for the flash
// return sbn::timing::NoTime as well for the flash
if (fRWMTimes.empty())
return icarus::timing::NoTime;
return sbn::timing::NoTime;

int nleft = 0;
int nright = 0;
Expand All @@ -530,9 +530,9 @@ float opana::ICARUSFlashAssAna::getFlashBunchTime(std::vector<double> pmt_start_

// if any RWM copy is missing (therefore missing for an entire PMT crate),
// it might not be possible to use the first hits (they might not have a RMW time)
// so return icarus::timing::NoTime as in other bad cases
// so return sbn::timing::NoTime as in other bad cases
if (!fRWMTimes[i].isValid())
return icarus::timing::NoTime;
return sbn::timing::NoTime;

// count hits separetely on the two walls
if (side == 0)
Expand Down Expand Up @@ -768,9 +768,9 @@ void opana::ICARUSFlashAssAna::analyze(art::Event const &e)
if (!fRWMLabel.empty())
{

fRWMTimes = e.getProduct<std::vector<icarus::timing::PMTBeamSignal>>(fRWMLabel);
fRWMTimes = e.getProduct<std::vector<sbn::timing::PMTBeamSignal>>(fRWMLabel);
if (fRWMTimes.empty())
mf::LogTrace("ICARUSFlashAssAna") << "Data product std::vector<icarus::timing::PMTBeamSignal> for '"
mf::LogTrace("ICARUSFlashAssAna") << "Data product std::vector<sbn::timing::PMTBeamSignal> for '"
<< fRWMLabel.label() << "' is empty in " << m_gate_name << " event!";
}

Expand Down
Loading