CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
MaskedMeasurementTrackerEventProducer Class Referencefinal
Inheritance diagram for MaskedMeasurementTrackerEventProducer:
edm::stream::EDProducer<>

Public Member Functions

 MaskedMeasurementTrackerEventProducer (const edm::ParameterSet &iConfig)
 
 ~MaskedMeasurementTrackerEventProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Types

typedef edm::ContainerMask< edmNew::DetSetVector< Phase2TrackerCluster1D > > Phase2OTMask
 
typedef edm::ContainerMask< edmNew::DetSetVector< SiPixelCluster > > PixelMask
 
typedef edm::ContainerMask< edmNew::DetSetVector< SiStripCluster > > StripMask
 

Private Member Functions

void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

edm::EDGetTokenT< Phase2OTMaskmaskPhase2OTs_
 
edm::EDGetTokenT< PixelMaskmaskPixels_
 
edm::EDGetTokenT< StripMaskmaskStrips_
 
bool phase2skipClusters_
 
bool skipClusters_
 
edm::EDGetTokenT< MeasurementTrackerEventsrc_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 8 of file MaskedMeasurementTrackerEventProducer.cc.

Member Typedef Documentation

◆ Phase2OTMask

Definition at line 18 of file MaskedMeasurementTrackerEventProducer.cc.

◆ PixelMask

Definition at line 17 of file MaskedMeasurementTrackerEventProducer.cc.

◆ StripMask

Definition at line 16 of file MaskedMeasurementTrackerEventProducer.cc.

Constructor & Destructor Documentation

◆ MaskedMeasurementTrackerEventProducer()

MaskedMeasurementTrackerEventProducer::MaskedMeasurementTrackerEventProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 30 of file MaskedMeasurementTrackerEventProducer.cc.

References HLT_2023v12_cff::clustersToSkip, edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), maskPhase2OTs_, maskPixels_, maskStrips_, HLT_2023v12_cff::phase2clustersToSkip, phase2skipClusters_, and skipClusters_.

31  : src_(consumes<MeasurementTrackerEvent>(iConfig.getParameter<edm::InputTag>("src"))),
32  skipClusters_(false),
33  phase2skipClusters_(false) {
34  //FIXME:temporary solution in order to use this class for both phase0/1 and phase2
35  if (iConfig.existsAs<edm::InputTag>("clustersToSkip")) {
36  skipClusters_ = true;
37  edm::InputTag clustersToSkip = iConfig.getParameter<edm::InputTag>("clustersToSkip");
38  maskPixels_ = consumes<PixelMask>(clustersToSkip);
39  maskStrips_ = consumes<StripMask>(clustersToSkip);
40  }
41  if (iConfig.existsAs<edm::InputTag>("phase2clustersToSkip")) {
42  phase2skipClusters_ = true;
43  edm::InputTag phase2clustersToSkip = iConfig.getParameter<edm::InputTag>("phase2clustersToSkip");
44  maskPixels_ = consumes<PixelMask>(phase2clustersToSkip);
45  maskPhase2OTs_ = consumes<Phase2OTMask>(phase2clustersToSkip);
46  }
47  produces<MeasurementTrackerEvent>();
48 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< MeasurementTrackerEvent > src_
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:171

◆ ~MaskedMeasurementTrackerEventProducer()

MaskedMeasurementTrackerEventProducer::~MaskedMeasurementTrackerEventProducer ( )
inlineoverride

Definition at line 11 of file MaskedMeasurementTrackerEventProducer.cc.

11 {}

Member Function Documentation

◆ produce()

void MaskedMeasurementTrackerEventProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 50 of file MaskedMeasurementTrackerEventProducer.cc.

References iEvent, maskPhase2OTs_, maskPixels_, maskStrips_, eostools::move(), MillePedeFileConverter_cfg::out, phase2skipClusters_, skipClusters_, and src_.

50  {
52  iEvent.getByToken(src_, mte);
53 
54  // prepare output
55  std::unique_ptr<MeasurementTrackerEvent> out;
56 
57  if (skipClusters_) {
58  edm::Handle<PixelMask> maskPixels;
59  iEvent.getByToken(maskPixels_, maskPixels);
60  edm::Handle<StripMask> maskStrips;
61  iEvent.getByToken(maskStrips_, maskStrips);
62 
63  out = std::make_unique<MeasurementTrackerEvent>(*mte, *maskStrips, *maskPixels);
64 
65  } else if (phase2skipClusters_) {
66  edm::Handle<PixelMask> maskPixels;
67  iEvent.getByToken(maskPixels_, maskPixels);
68  edm::Handle<Phase2OTMask> maskPhase2OTs;
69  iEvent.getByToken(maskPhase2OTs_, maskPhase2OTs);
70 
71  out = std::make_unique<MeasurementTrackerEvent>(*mte, *maskPixels, *maskPhase2OTs);
72  }
73 
74  // put into event
75  iEvent.put(std::move(out));
76 }
edm::EDGetTokenT< MeasurementTrackerEvent > src_
int iEvent
Definition: GenABIO.cc:224
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ maskPhase2OTs_

edm::EDGetTokenT<Phase2OTMask> MaskedMeasurementTrackerEventProducer::maskPhase2OTs_
private

◆ maskPixels_

edm::EDGetTokenT<PixelMask> MaskedMeasurementTrackerEventProducer::maskPixels_
private

◆ maskStrips_

edm::EDGetTokenT<StripMask> MaskedMeasurementTrackerEventProducer::maskStrips_
private

◆ phase2skipClusters_

bool MaskedMeasurementTrackerEventProducer::phase2skipClusters_
private

◆ skipClusters_

bool MaskedMeasurementTrackerEventProducer::skipClusters_
private

◆ src_

edm::EDGetTokenT<MeasurementTrackerEvent> MaskedMeasurementTrackerEventProducer::src_
private

Definition at line 20 of file MaskedMeasurementTrackerEventProducer.cc.

Referenced by produce().