Skip to content

Commit 17bd794

Browse files
Add EventWindowMarker so that we can build with latest Offline
1 parent e99219d commit 17bd794

4 files changed

Lines changed: 15 additions & 4 deletions

File tree

fcl/prolog.fcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ EventNtupleMaker : {
274274
RecoCountTag : "SelectReco"
275275
PBITag : "PBISim"
276276
PBTTag : "EWMProducer"
277+
EWMTag : "EWMProducer"
277278
PBTMCTag : "EWMProducer"
278279
CrvCoincidencesTag : "SelectReco:CrvCoincidenceClusterFinder"
279280
CrvCoincidenceMCsTag : "compressRecoMCs:CrvCoincidenceClusterMatchMC"

inc/CrvInfoHelper.hh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "Offline/CosmicRayShieldGeom/inc/CosmicRayShield.hh"
2222
#include "Offline/GeometryService/inc/GeomHandle.hh"
2323
#include "art/Framework/Principal/Handle.h"
24+
#include "Offline/DataProducts/inc/EventWindowMarker.hh"
2425

2526
namespace mu2e
2627
{
@@ -44,6 +45,7 @@ namespace mu2e
4445
void FillCrvPulseInfoCollections(
4546
art::Handle<CrvRecoPulseCollection> const& crvRecoPulses,
4647
art::Handle<CrvDigiMCCollection> const& crvDigiMCs,
48+
art::Handle<EventWindowMarker> const& ewmh,
4749
CrvPulseInfoRecoCollection &recoInfo, CrvHitInfoMCCollection &MCInfo);
4850

4951
void FillCrvDigiInfoCollections(

src/CrvInfoHelper.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ namespace mu2e
211211
void CrvInfoHelper::FillCrvPulseInfoCollections (
212212
art::Handle<CrvRecoPulseCollection> const& crvRecoPulses,
213213
art::Handle<CrvDigiMCCollection> const& crvDigiMCs,
214+
art::Handle<EventWindowMarker> const& ewmh,
214215
CrvPulseInfoRecoCollection &recoInfo, CrvHitInfoMCCollection &MCInfo){
215216
GeomHandle<DetectorSystem> tdet;
216217

@@ -248,7 +249,7 @@ namespace mu2e
248249
art::Ptr<SimParticle> mostLikelySimParticle;
249250
//for this reco pulse
250251
CrvMCHelper::GetInfoFromCrvRecoPulse(crvRecoPulse, crvDigiMCs, visibleEnergyDeposited,earliestHitTime, earliestHitPos, avgHitTime, avgHitPos,
251-
mostLikelySimParticle);
252+
mostLikelySimParticle, ewmh);
252253

253254
bool hasMCInfo = (mostLikelySimParticle.isNonnull()?true:false); //MC
254255
if(hasMCInfo)

src/EventNtupleMaker_module.cc

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ namespace mu2e {
140140
fhicl::Atom<art::InputTag> rctag{Name("RecoCountTag"), Comment("RecoCount"), art::InputTag()};
141141
fhicl::Atom<art::InputTag> PBITag{Name("PBITag"), Comment("Tag for ProtonBunchIntensity object") ,art::InputTag()};
142142
fhicl::Atom<art::InputTag> PBTTag{Name("PBTTag"), Comment("Tag for ProtonBunchTime object") ,art::InputTag()};
143+
fhicl::Atom<art::InputTag> EWMTag{Name("EWMTag"), Comment("Tag for EventWindowMarker object") ,art::InputTag()};
143144
fhicl::Atom<bool> filltrig{Name("FillTriggerInfo"),false};
144145
fhicl::Atom<std::string> trigProcessName{Name("TriggerProcessName"), Comment("Process name for Trigger")};
145146
fhicl::Atom<std::string> trigpathsuffix{Name("TriggerPathSuffix"), "_trigger"}; // all trigger paths have this in the name
@@ -213,7 +214,8 @@ namespace mu2e {
213214
// general event info branch
214215
EventInfo _einfo;
215216
EventInfoMC _einfomc;
216-
art::InputTag _recoCountTag, _PBITag, _PBTTag, _PBTMCTag;
217+
art::InputTag _recoCountTag, _PBITag, _PBTTag, _EWMTag, _PBTMCTag;
218+
art::Handle<mu2e::EventWindowMarker> _ewmh;
217219
// track control
218220
bool _hastrks;
219221
bool _hascrv;
@@ -347,6 +349,7 @@ namespace mu2e {
347349
_recoCountTag(conf().rctag()),
348350
_PBITag(conf().PBITag()),
349351
_PBTTag(conf().PBTTag()),
352+
_EWMTag(conf().EWMTag()),
350353
_PBTMCTag(conf().PBTMCTag()),
351354
_hastrks(conf().hastrks()),
352355
_hascrv(conf().hascrv()),
@@ -863,8 +866,8 @@ namespace mu2e {
863866
_crvRecoPulses, _crvSteps, _mcTrajectories,_crvcoincs, _crvcoincsmc,
864867
_crvsummary, _crvsummarymc, _crvcoincsmcplane, _crvPlaneY, _pph);
865868
if(_fillcrvpulses){
866-
_crvHelper.FillCrvPulseInfoCollections(_crvRecoPulses, _crvDigiMCs,
867-
_crvpulses, _crvpulsesmc);
869+
_crvHelper.FillCrvPulseInfoCollections(_crvRecoPulses, _crvDigiMCs, _ewmh,
870+
_crvpulses, _crvpulsesmc);
868871
}
869872
if(_fillcrvdigis){
870873
_crvHelper.FillCrvDigiInfoCollections(_crvRecoPulses, _crvDigis,
@@ -906,6 +909,10 @@ namespace mu2e {
906909
_einfo.pbterr = PBT.pbterr_;
907910
}
908911

912+
if (_EWMTag != "") {
913+
event.getByLabel(_EWMTag, _ewmh);
914+
}
915+
909916
if (_fillmc) {
910917
auto PBTMChandle = event.getValidHandle<mu2e::ProtonBunchTimeMC>(_PBTMCTag);
911918
auto PBTMC = *PBTMChandle;

0 commit comments

Comments
 (0)