Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
3c0a6d6
first pass at official RWM extraction
mvicenzi Mar 15, 2024
47cedd5
add fhicl file
mvicenzi Mar 15, 2024
fd04971
first attempt at data product
mvicenzi Mar 15, 2024
ba196e3
fix default debug flag
mvicenzi Mar 15, 2024
482e407
some improvements, new data products
mvicenzi Mar 15, 2024
801d523
fix typo
mvicenzi Mar 16, 2024
725b0e4
Merge branch 'develop' into feature/mvicenzi_rwm
mvicenzi Mar 21, 2024
dd75911
removing hardcoded mapping
mvicenzi Mar 21, 2024
8363015
check beam gate type, skip offbeam events
mvicenzi Mar 26, 2024
6052cd1
fix switch logic
mvicenzi Mar 26, 2024
5bc735a
reworked data product, simplified code w/ support functions
mvicenzi May 2, 2024
e4f874e
force different trees for different wfs instances
mvicenzi May 2, 2024
bf36de6
preliminary rwm info for calib ntuples
mvicenzi May 6, 2024
c54d871
vast update of ICARUSFlassAssAna: new RWM variables, optional wavefor…
mvicenzi Jul 21, 2024
5d32430
add analyzer, default fcl configs, fixes
mvicenzi Jul 23, 2024
fdfb1fa
some restructuring, fcl updates
mvicenzi Jul 24, 2024
834b07a
forgot daqCRT...
mvicenzi Jul 24, 2024
ab063f0
fix bugs, edge cases
mvicenzi Jul 25, 2024
529cb66
add to PMT stage0 path
mvicenzi Jul 25, 2024
156c925
fix code + fcl to run smoothly on MC files
mvicenzi Aug 13, 2024
1f7dba8
change module label from beam to beamTiming
mvicenzi Sep 25, 2024
1386b6a
adjust formatting and indentation to 2 spaces
mvicenzi Sep 25, 2024
51526b0
include cstddef, use std::size_t
mvicenzi Sep 25, 2024
9991354
add more info in comments
mvicenzi Sep 25, 2024
d257a3c
remove PMTBeamSignal constructors
mvicenzi Sep 25, 2024
0f471bc
update icarus::timing::NoTime value
mvicenzi Sep 25, 2024
b40bb52
Update icaruscode/Timing/PMTBeamSignalsExtractor_module.cc
mvicenzi Sep 30, 2024
fef1ed5
Update icaruscode/Timing/PMTBeamSignalsExtractor_module.cc
mvicenzi Sep 30, 2024
0462c1a
Update icaruscode/Timing/PMTBeamSignalsExtractor_module.cc
mvicenzi Sep 30, 2024
8193092
Update icaruscode/Timing/PMTBeamSignalsExtractor_module.cc
mvicenzi Sep 30, 2024
141f654
Update icaruscode/Timing/PMTBeamSignalsExtractor_module.cc
mvicenzi Sep 30, 2024
ec95395
Update icaruscode/Timing/CMakeLists.txt
mvicenzi Sep 30, 2024
b750cd6
Update icaruscode/Timing/PMTBeamSignalsExtractor_module.cc
mvicenzi Sep 30, 2024
f86ac9c
Update icaruscode/Timing/PMTBeamSignalsExtractor_module.cc
mvicenzi Sep 30, 2024
b91cdc3
Update icaruscode/Timing/PMTBeamSignalsExtractor_module.cc
mvicenzi Sep 30, 2024
c4e5070
Update icaruscode/Timing/PMTBeamSignalsExtractor_module.cc
mvicenzi Sep 30, 2024
e95fe59
Update icaruscode/Timing/PMTBeamSignalsExtractor_module.cc
mvicenzi Sep 30, 2024
1973812
Update icaruscode/Timing/PMTBeamSignalsExtractor_module.cc
mvicenzi Sep 30, 2024
efb8796
Update icaruscode/Timing/PMTBeamSignalsExtractor_module.cc
mvicenzi Sep 30, 2024
c66a1ca
change ttree lookup
mvicenzi Sep 30, 2024
b7aba88
update comments, remove tfs from class members
mvicenzi Sep 30, 2024
fb881ae
initialization changes, use of beginRun, move to static function, con…
mvicenzi Sep 30, 2024
ae099a3
remove beamType, doxygen header
mvicenzi Sep 30, 2024
6d1ce5c
remove use of detTiming for times
mvicenzi Sep 30, 2024
b46c5ae
updating CMakeList.txt
mvicenzi Sep 30, 2024
016b1d0
change labels to const, update to debug tree
mvicenzi Sep 30, 2024
17312c2
adding sampling tick as variable
mvicenzi Sep 30, 2024
378a77d
avoid copies at all costs...
mvicenzi Sep 30, 2024
af99a3c
prevent selecting negative bins
mvicenzi Sep 30, 2024
b387b30
char witchcraft
mvicenzi Sep 30, 2024
806e3a9
pre-allocating size to avoid dynamic resizing
mvicenzi Sep 30, 2024
50c80ee
fix segfault
mvicenzi Oct 1, 2024
ab70fc7
change default to NoTime for missing signal
mvicenzi Oct 3, 2024
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
5 changes: 5 additions & 0 deletions fcl/reco/Definitions/stage0_icarus_defs.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "recowire_icarus.fcl"
#include "hitfindermodules_icarus.fcl"
#include "timing_icarus.fcl"
#include "timing_beam.fcl"
#include "icarus_ophitfinder.fcl"
#include "icarus_flashfinder.fcl"
#include "trigger_emulation_icarus.fcl"
Expand Down Expand Up @@ -115,6 +116,9 @@ icarus_stage0_producers:

daqPMTonbeam: @local::copyPMTonBeam

### Beam timing
beamTiming: @local::icarus_beam_signal_extractor

### Purity monitoring
purityana0: { module_type: "ICARUSPurityDQM" }
purityana1: { module_type: "ICARUSPurityDQM" }
Expand Down Expand Up @@ -243,6 +247,7 @@ icarus_stage0_PMT: [ triggerconfig,
daqTrigger,
pmtconfig,
daqPMT,
beamTiming,
pmtconfigbaselines,
pmtthr,
pmtbaselines,
Expand Down
7 changes: 6 additions & 1 deletion fcl/reco/Stage1/Run2/stage1_run2_icarus_MC.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ physics.producers: {
physics.reco: [
@sequence::icarus_reco_Gauss_CryoE ,
@sequence::icarus_reco_Gauss_CryoW ,
@sequence::icarus_reco_fm,
@sequence::icarus_reco_fm,
@sequence::icarus_tpcpmtbarycentermatch,
caloskimCalorimetryCryoE, caloskimCalorimetryCryoW,
mcassociationsGausCryoE, mcassociationsGausCryoW
Expand Down Expand Up @@ -82,6 +82,11 @@ physics.analyzers.caloskimW.RawDigitproducers: ["MCDecodeTPCROI:PHYSCRATEDATATPC
physics.producers.mcassociationsGausCryoE.HitParticleAssociations.HitModuleLabelVec: ["cluster3DCryoE"]
physics.producers.mcassociationsGausCryoW.HitParticleAssociations.HitModuleLabelVec: ["cluster3DCryoW"]

# Remove missing products in MC
physics.analyzers.simpleLightAna.TriggerLabel: ""
physics.analyzers.simpleLightAna.RWMLabel: ""
physics.analyzers.simpleLightAna.OpDetWaveformLabels: ["opdaq"]

services.message.destinations :
{
STDCOUT:
Expand Down
69 changes: 69 additions & 0 deletions icaruscode/IcarusObj/PMTBeamSignal.h
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For sake of complication: have you considered an "error" data field?
If the waveform goes from baseline to flat top in a single sample, then that error is 2 ns (/√12 if you want to be precise...), but if your algorithm can rely on more samples it could be more precise than that, and maybe you would want to store how it went.

Data fields can be added at the end of a class with almost no side effect, so it's not a now-or-never thing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally it would be a good idea, but currently I don't see how we would use this information downstream.
Maybe as a way to choose which copy of the time to elevate to global status?

This is something to keep in mind when we will revisit the time extraction from the rising edge of the signal (which is currently using a very naive algorithm).

Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/**
* @file icaruscode/IcarusObj/PMTBeamSignal.h
* @brief Holds the event-by-event RWM or EW times
* @author Matteo Vicenzi (mvicenzi@bnl.gov)
* @date March 14 2024
*/

#ifndef ICARUSCODE_ICARUSOBJ_PMTBEAMSIGNAL_H
#define ICARUSCODE_ICARUSOBJ_PMTBEAMSIGNAL_H

// C/C++ standard libraries
#include <limits>
#include <string>
#include <cstddef>

namespace icarus::timing
{

/// Special value to denote no special channel information.
static constexpr auto NoChannel = std::numeric_limits<unsigned int>::max();
/// Special value to denote no time channel information.
static constexpr double NoTime = std::numeric_limits<double>::max();
// Special value to denote no sample information.
static constexpr std::size_t NoSample = 0;

/**
* @brief Beam time as seen by a PMT readout board.
*
* This could either be an early warning (EW) or a resistive wall monitor (RWM) time.
* These signals are delivered via fibers and digitized in special PMT channels.
*
* Both the time in @ref DetectorClocksElectronicsTime "electronics time scale"
* and time time relative to the hardware trigger are included.
*
* The information in this object may be missing: its validity should
* always be checked in advance with `isValid()`.
*/

struct PMTBeamSignal
{

/// Special channel this time was extracted from.
/// These are defined in `CAEN_V1730_setup_icarus.fcl`.
unsigned int specialChannel = NoChannel;

/// Board on which the special channel is on (e.g: WW-TOP-A).
/// Should match the same format as `icarusDB::PMTChannelInfo_t::digitizerLabel`.
std::string digitizerLabel = "";

/// Crate this time applies to (e.g.: WW-TOP).
/// Corresponds to the first part of `digitizerLabel`.
std::string crate = "";

/// Sample within the waveform where the reference signal is found.
std::size_t sample = NoSample;

/// Start time in electronics time [us].
double startTimeAbs = NoTime;

/// Start time relative to trigger time [us].
double startTime = NoTime;

/// Returns whether the time is valid.
bool isValid() const { return (sample != NoSample); }
};

} // namespace icarus::timing

#endif // ICARUSCODE_ICARUSOBJ_PMTBEAMSIGNAL_H
8 changes: 5 additions & 3 deletions icaruscode/PMT/OpReco/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ cet_build_plugin(ICARUSOpHitFinder art::module


set( MODULE_LIBRARIES
icarusalg::Utilities
icarusalg::Utilities
sbnobj::Common_Trigger
larcorealg::Geometry
icaruscode::Decode_DataProducts
larcorealg::Geometry
larcore::Geometry_Geometry_service
lardataobj::RecoBase
lardataobj::Simulation
Expand Down Expand Up @@ -48,7 +49,7 @@ set( MODULE_LIBRARIES
ROOT::Gdml
ROOT::FFTW
ROOT::Core
ROOT::Tree
ROOT::Tree
)
cet_build_plugin(FakeFlash art::module LIBRARIES ${MODULE_LIBRARIES})
cet_build_plugin(FakePhotoS art::module LIBRARIES ${MODULE_LIBRARIES})
Expand All @@ -61,6 +62,7 @@ cet_build_plugin(ICARUSOpHitAna art::module LIBRARIES ${MODULE_LIBRARIES})
cet_build_plugin(ICARUSOpHitTuple art::module LIBRARIES ${MODULE_LIBRARIES})
cet_build_plugin(ICARUSParticleAna art::module LIBRARIES ${MODULE_LIBRARIES})
cet_build_plugin(TPCPMTBarycenterMatchProducer art::module LIBRARIES ${MODULE_LIBRARIES})
cet_build_plugin(ICARUSBeamStructureAna art::module LIBRARIES ${MODULE_LIBRARIES})


install_headers()
Expand Down
Loading