Skip to content

Commit 4d02813

Browse files
Merge branch 'develop' into feature/CAF_fcl_for_MeVPRTL
2 parents d985b7e + b081746 commit 4d02813

36 files changed

Lines changed: 316 additions & 234 deletions

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
cmake_minimum_required(VERSION 3.20 FATAL_ERROR)
1717

18-
set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.14.00)
18+
set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.14.02)
1919
find_package(cetmodules REQUIRED)
2020
project(sbndcode LANGUAGES CXX)
2121

sbndcode/Calibration/configurations/calibration_database_PDS_TagSets_sbnd.fcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ BEGIN_PROLOG
1010

1111
# For SBND 2025 Fall production
1212
PDS_CalibrationTags_Nov2025: {
13-
PMTCalibrationDatabaseTag: "v2r1"
14-
DatabaseTimeStamp: 1763157679000000000
13+
PMTCalibrationDatabaseTag: "v3r1"
14+
DatabaseTimeStamp: 1765487620000000000
1515
}
1616

1717
END_PROLOG

sbndcode/Decoders/PMT/SBNDPMTDecoder_module.cc

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ sbndaq::SBNDPMTDecoder::SBNDPMTDecoder(fhicl::ParameterSet const& p)
195195

196196
produces< std::vector<int> >("MonPulses");
197197
produces< std::vector<int> >("MonPulseSizes");
198+
produces<int>("pairsOverThreshold");
198199
}
199200

200201
void sbndaq::SBNDPMTDecoder::produce(art::Event& evt)
@@ -278,6 +279,9 @@ void sbndaq::SBNDPMTDecoder::produce(art::Event& evt)
278279
auto sizesPtr = std::make_unique<std::vector<int>>();
279280
evt.put(std::move(flatPtr), "MonPulses");
280281
evt.put(std::move(sizesPtr), "MonPulseSizes");
282+
283+
auto pairFlag = std::make_unique<int>(-1);
284+
evt.put(std::move(pairFlag), "pairsOverThreshold");
281285
return;
282286
}
283287

@@ -623,30 +627,27 @@ void sbndaq::SBNDPMTDecoder::produce(art::Event& evt)
623627
std::vector<int> pulseSizes;
624628
MonPulsesFlat.clear();
625629
pulseSizes.clear();
626-
int TotalFlash = pmtwvfmVec->size()/((int)fn_caenboards*PMTPerBoard); // pmtwvfmVec = waveHandle ???
630+
int pmt_caenboards = (int)fn_caenboards-1;
631+
int TotalFlash = pmtwvfmVec->size()/(pmt_caenboards*PMTPerBoard);
632+
633+
int numPairsOverThreshold = 0;
627634
for (int FlashCounter=0; FlashCounter<TotalFlash; FlashCounter++)
628635
{
629636
int WaveIndex = FlashCounter*PMTPerBoard;
630637
int WaveformSize = (*pmtwvfmVec)[WaveIndex].size();
638+
int pairThisFlash = 0;
631639
std::vector<int> *MonPulse = new std::vector<int>(WaveformSize);
632-
fTriggerService->ConstructMonPulse(*pmtwvfmVec, fmon_threshold, MonPulse, FlashCounter);
640+
fTriggerService->ConstructMonPulse(*pmtwvfmVec, fmon_threshold, MonPulse, FlashCounter, &pairThisFlash);
633641
//MonPulsesAll.push_back(std::move(MonPulse));
634642
MonPulsesFlat.insert(MonPulsesFlat.end(), (*MonPulse).begin(), (*MonPulse).end());
635643
pulseSizes.push_back(MonPulse->size());
644+
numPairsOverThreshold = numPairsOverThreshold + pairThisFlash;
636645
delete MonPulse;
637646
}
638647
// make ptrs
639648
auto flatPtr = std::make_unique<std::vector<int>>(std::move(MonPulsesFlat));
640649
auto sizesPtr = std::make_unique<std::vector<int>>(std::move(pulseSizes));
641-
642-
/*std::unique_ptr< std::vector< std::vector<int> > > MonPulsesPtr(std::make_unique< std::vector< std::vector<int> > > ());
643-
for (auto &pulse : MonPulsesAll) {
644-
MonPulsesPtr->reserve(MonPulsesPtr->size() + pulse.size());
645-
std::move(pulse.begin(), pulse.end(), std::back_inserter(*MonPulsesPtr));
646-
}
647-
// clean up the vector
648-
for (unsigned i = 0; i < MonPulsesAll.size(); i++) MonPulsesAll[i] = std::vector<int>();
649-
*/
650+
auto pairFlag = std::make_unique<int>(numPairsOverThreshold);
650651

651652
board_frag_v.clear();
652653

@@ -663,6 +664,7 @@ void sbndaq::SBNDPMTDecoder::produce(art::Event& evt)
663664

664665
evt.put(std::move(flatPtr), "MonPulses");
665666
evt.put(std::move(sizesPtr), "MonPulseSizes");
667+
evt.put(std::move(pairFlag), "pairsOverThreshold");
666668
}
667669

668670
void sbndaq::SBNDPMTDecoder::get_fragments(artdaq::Fragment & frag, std::vector<std::vector<artdaq::Fragment>> & board_frag_v){

sbndcode/Decoders/PMT/pmtdecoder.fcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pmtdecoder:
4848
hist_evt: 1 # the # of the event used to generate the histograms, 1st event by default
4949

5050
# trigger configurable
51-
mon_threshold: 15 # ADC channel value threshold to add 1 to the trigger response MON pulse
51+
mon_threshold: 50 # ADC channel value threshold to add 1 to the trigger response MON pulse
5252

5353
# for when the fragIDs are mapped to the old configuration or you need to hardcode fragids...
5454
## to use this, must set `fragid_offset` to 0!!!

sbndcode/Decoders/PMT/run_pmtdecoder.fcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ services: {
1111
MonWidth: 12
1212
TotalCAENBoards: 8
1313
PMTPerBoard: 15
14-
Baseline: 14250
14+
Baseline: 14250 #Run 1: 14250, Run 2: 14257
1515
MC: false
1616
}
1717
}

sbndcode/JobConfigurations/base/detsim_drops.fcl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ detsim_drops: [ @sequence::g4_drops
2525
, "drop sim::SimEnergyDeposits_ionandscintout__*"
2626
, "drop sim::SimEnergyDeposits_ionandscint_*_*"
2727
, "drop sim::SimEnergyDeposits_largeant_*_*"
28-
, "keep sim::SimEnergyDeposits_ionandscint_priorSCE_*"]
28+
, "keep sim::SimEnergyDeposits_ionandscint_priorSCE_*"
29+
, "drop raw::OpDetWaveforms_opdaq_*_*"]
2930

3031
END_PROLOG
3132

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Description: an override for the default SBND MPV/MPR generator that
2+
# adds kaons (charged and neutral), lambdas, and the neutral sigma
3+
# baryon to the MPV generator.
4+
# Author: mueller@fnal.gov
5+
6+
#include "run_mpvmpr_sbnd.fcl"
7+
8+
physics.producers.generator.ParticleParameter.PDGCode : [[-11,11,-13,13], [111] , [211,-211], [2212] , [22] , [310] , [321,-321] , [3212,3122] ]
9+
physics.producers.generator.ParticleParameter.MinMulti : [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ]
10+
physics.producers.generator.ParticleParameter.MaxMulti : [ 1 , 2 , 2 , 4 , 2 , 1 , 1 , 1 ]
11+
physics.producers.generator.ParticleParameter.ProbWeight : [ 3 , 1 , 1 , 3 , 1 , 1 , 1 , 1 ]
12+
physics.producers.generator.ParticleParameter.KERange : [ [0.0,3.0] , [0.0,1.0] , [0.0,1.0] , [0.0,1.0] , [0.0,1.0] , [0.0,1.5] , [0.0,1.5] , [0.0,0.7] ]
13+
14+
outputs.out1.fileName: "prodmpvmpr_exotics_sbnd_%p-%tc.root"

sbndcode/JobConfigurations/standard/reco/config/workflow_reco1.fcl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,11 @@ sbnd_reco1_producers.gaushit.CalDataModuleLabel:
8383
sbnd_reco1_producers.fasthit.DigitModuleLabel: "simtpc2d:daq"
8484
sbnd_reco1_producers.gaushitTruthMatch.HitParticleAssociations.HitModuleLabel: "gaushit"
8585
sbnd_reco1_producers.specialblipgaushit.CalDataModuleLabel: "simtpc2d:gauss"
86-
sbnd_reco1_producers.specialblipgaushit.MinHitHeightPlane0: 8
87-
sbnd_reco1_producers.specialblipgaushit.MinHitHeightPlane1: 15
88-
sbnd_reco1_producers.specialblipgaushit.MinHitHeightPlane2: 5
89-
sbnd_reco1_producers.blipgaushitTruthMatch.HitParticleAssociations.HitModuleLabel: "specialblipgaushit"
86+
sbnd_reco1_producers.specialblipgaushit.HitFinderToolVec.CandidateHitsPlane0.MinHitHeight: 8
87+
sbnd_reco1_producers.specialblipgaushit.HitFinderToolVec.CandidateHitsPlane1.MinHitHeight: 20
88+
sbnd_reco1_producers.specialblipgaushit.HitFinderToolVec.CandidateHitsPlane2.MinHitHeight: 5
89+
sbnd_reco1_producers.blipgaushitTruthMatch.HitParticleAssociations.HitModuleLabel: "specialblipgaushit"
90+
sbnd_reco1_producers.blipgaushitTruthMatch.HitParticleAssociations.HitModuleLabelVec: ["specialblipgaushit"]
9091
sbnd_reco1_filters: {
9192
#filter events based on the number of reconstructed hits (avoids overly messy data events)
9293
numberofhitsfilter: @local::sbnd_numberofhitsfilter

sbndcode/JobConfigurations/standard/reco/config/workflow_reco2.fcl

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ sbnd_reco2_producers:{
5353
### SCE-aware pandora:
5454
pandoraSCE: @local::scecorrection
5555
pandoraSCETrack: @local::sbnd_pandoraTrackCreation
56+
blipPandoraSCE: @local::scecorrection
57+
blipPandoraSCETrack:@local::sbnd_pandoraTrackCreation
5658
pandoraSCEShower: @local::sbnd_sce_incremental_pandoraModularShowerCreation
5759
pandoraSCEShowerSBN: @local::sbnd_sce_sbn_pandoraModularShowerCreation
5860

@@ -77,8 +79,8 @@ sbnd_reco2_producers:{
7779
fmatchoparaSCE: @local::sbnd_simple_flashmatch_opara_sce
7880
opt0finder: @local::sbnd_opt0_finder_one_to_many
7981
opt0finderSCE: @local::sbnd_opt0_finder_one_to_many
80-
tpcpmtbarycentermatching: @local::TPCPMTBarycenterMatchProducer
81-
tpcpmtbarycentermatchingSCE: @local::TPCPMTBarycenterMatchProducerSCE
82+
tpcpmtbarycentermatching: @local::TPCPMTBarycenterMatchProducerMC
83+
tpcpmtbarycentermatchingSCE: @local::TPCPMTBarycenterMatchProducerSCEMC
8284

8385
### Uncalibrated calorimetry producer for calibration caloskimmer
8486
caloskimCalorimetry: @local::caloskim_calorimetry
@@ -192,10 +194,15 @@ sbnd_reco2_producers.opt0finderSCE.CaloProducer: "pandoraSCECalo"
192194
sbnd_reco2_producers.pandoraSCE.T0Labels: []
193195
sbnd_reco2_producers.pandoraSCE.T0LabelsCorrectT0: []
194196
sbnd_reco2_producers.pandoraSCE.CorrectNoT0Tag: true
197+
sbnd_reco2_producers.blipPandoraSCE.T0Labels: []
198+
sbnd_reco2_producers.blipPandoraSCE.T0LabelsCorrectT0: []
199+
sbnd_reco2_producers.blipPandoraSCE.CorrectNoT0Tag: true
195200
# point track/shower creation to the SCE pandora
196201
sbnd_reco2_producers.pandoraSCETrack.PFParticleLabel: "pandoraSCE"
197202
sbnd_reco2_producers.pandoraSCEShower.PFParticleLabel: "pandoraSCE"
198203
sbnd_reco2_producers.pandoraSCEShowerSBN.PFParticleLabel: "pandoraSCE"
204+
sbnd_reco2_producers.blipPandoraSCETrack.PFParticleLabel: "blipPandoraSCE"
205+
199206

200207
sbnd_reco2_producers.crtspacepointmatchingSCE.TPCTrackModuleLabel: "pandoraSCETrack"
201208
sbnd_reco2_producers.crtspacepointmatchingSCE.PFPModuleLabel: "pandoraSCE"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#Nominal configuration uses dnn (ind) + trad (col) for hit finding.
2+
#Blip requires trad (all) for hit finding.
3+
#This fcl configures everything to use the nominal config (dnn + trad)
4+
5+
#include "reco2_data.fcl"
6+
physics.producers.blipreco.BlipAlg.HitProducer: "gaushit"
7+
physics.analyzers.blipana.BlipAlg.HitProducer: "gaushit"
8+
physics.producers.blipreco.BlipAlg.TrkProducer: "pandoraSCETrack"
9+
physics.analyzers.blipana.BlipAlg.TrkProducer: "pandoraSCETrack"
10+
physics.reco2: [ pandora, pandoraTrack, pandoraShower, pandoraShowerSBN, pandoraCaloData, pandoraPidData, pandoraLikePidData, cvn, opt0finder, crtveto, crtspacepointmatching, crttrackmatching, tpcpmtbarycentermatching, pandoraSCE, pandoraSCETrack, pandoraSCEShower, pandoraSCEShowerSBN, pandoraSCECaloData, pandoraSCEPidData, pandoraSCELikePidData, cvnSCE, opt0finderSCE, tpcpmtbarycentermatchingSCE, crtspacepointmatchingSCE, crttrackmatchingSCE, caloskimCalorimetry, blipreco, lightpropagationcorrectionSCE, frameshift]

0 commit comments

Comments
 (0)