CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
AlcaPCCEventProducer Class Reference
Inheritance diagram for AlcaPCCEventProducer:
edm::stream::EDProducer<>

Public Member Functions

 AlcaPCCEventProducer (const edm::ParameterSet &)
 
 ~AlcaPCCEventProducer () 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
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

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

Private Attributes

int countEvt_
 
int countLumi_
 
edm::InputTag fPixelClusterLabel
 
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelToken
 
std::unique_ptr< reco::PixelClusterCountsInEventthePCCob
 
std::string trigstring_
 

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


class: AlcaPCCEventProducer.cc

authors: Sam Higginbotham (shigg.nosp@m.inb@.nosp@m.cern..nosp@m.ch), Chris Palmer (capal.nosp@m.mer@.nosp@m.cern..nosp@m.ch), Attila Radl (attil.nosp@m.a.ra.nosp@m.dl@ce.nosp@m.rn.c.nosp@m.h)


Definition at line 32 of file AlcaPCCEventProducer.cc.

Constructor & Destructor Documentation

◆ AlcaPCCEventProducer()

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

Definition at line 52 of file AlcaPCCEventProducer.cc.

References fPixelClusterLabel, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), pixelToken, AlCaHLTBitMon_QueryRunRegistry::string, and trigstring_.

52  {
53  fPixelClusterLabel = iConfig.getParameter<edm::InputTag>("pixelClusterLabel");
54  trigstring_ = iConfig.getUntrackedParameter<std::string>("trigstring", "alcaPCCEvent");
55  produces<reco::PixelClusterCountsInEvent, edm::Transition::Event>(trigstring_);
56  pixelToken = consumes<edmNew::DetSetVector<SiPixelCluster> >(fPixelClusterLabel);
57 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelToken
edm::InputTag fPixelClusterLabel

◆ ~AlcaPCCEventProducer()

AlcaPCCEventProducer::~AlcaPCCEventProducer ( )
override

Definition at line 60 of file AlcaPCCEventProducer.cc.

60 {}

Member Function Documentation

◆ fillDescriptions()

void AlcaPCCEventProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 99 of file AlcaPCCEventProducer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), HLT_2022v15_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

99  {
100  edm::ParameterSetDescription evtParamDesc;
101  evtParamDesc.add<edm::InputTag>("pixelClusterLabel", edm::InputTag("siPixelClustersForLumi"));
102  evtParamDesc.addUntracked<std::string>("trigstring", "alcaPCCEvent");
103  descriptions.add("alcaPCCEventProducer", evtParamDesc);
104 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ produce()

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

Definition at line 63 of file AlcaPCCEventProducer.cc.

References simKBmtfDigis_cfi::bx, countEvt_, iEvent, mod(), eostools::move(), pixelToken, edm::Handle< T >::product(), AlCaHLTBitMon_QueryRunRegistry::string, thePCCob, and trigstring_.

63  {
64  countEvt_++;
65  thePCCob = std::make_unique<reco::PixelClusterCountsInEvent>();
66 
67  unsigned int bx = iEvent.bunchCrossing();
68 
69  //Looping over the clusters and adding the counts up
71  iEvent.getByToken(pixelToken, hClusterColl);
72 
73  const edmNew::DetSetVector<SiPixelCluster>& clustColl = *(hClusterColl.product());
74  // ----------------------------------------------------------------------
75  // -- Clusters without tracks
76  for (auto const& mod : clustColl) {
77  if (mod.empty()) {
78  continue;
79  }
80  DetId detId = mod.id();
81 
82  //--The following will be used when we make a theshold for the clusters.
83  //--Keeping this for features that may be implemented later.
84  // -- clusters on this det
85  //edmNew::DetSet<SiPixelCluster>::const_iterator di;
86  //int nClusterCount=0;
87  //for (di = mod.begin(); di != mod.end(); ++di) {
88  // nClusterCount++;
89  //}
90  int nCluster = mod.size();
91  thePCCob->increment(detId(), nCluster);
92  thePCCob->setbxID(bx);
93  }
94 
96 }
T const * product() const
Definition: Handle.h:70
std::unique_ptr< reco::PixelClusterCountsInEvent > thePCCob
int iEvent
Definition: GenABIO.cc:224
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelToken
Definition: DetId.h:17
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ countEvt_

int AlcaPCCEventProducer::countEvt_
private

Definition at line 45 of file AlcaPCCEventProducer.cc.

Referenced by produce().

◆ countLumi_

int AlcaPCCEventProducer::countLumi_
private

Definition at line 46 of file AlcaPCCEventProducer.cc.

◆ fPixelClusterLabel

edm::InputTag AlcaPCCEventProducer::fPixelClusterLabel
private

Definition at line 42 of file AlcaPCCEventProducer.cc.

Referenced by AlcaPCCEventProducer().

◆ pixelToken

edm::EDGetTokenT<edmNew::DetSetVector<SiPixelCluster> > AlcaPCCEventProducer::pixelToken
private

Definition at line 41 of file AlcaPCCEventProducer.cc.

Referenced by AlcaPCCEventProducer(), and produce().

◆ thePCCob

std::unique_ptr<reco::PixelClusterCountsInEvent> AlcaPCCEventProducer::thePCCob
private

Definition at line 48 of file AlcaPCCEventProducer.cc.

Referenced by produce().

◆ trigstring_

std::string AlcaPCCEventProducer::trigstring_
private

Definition at line 44 of file AlcaPCCEventProducer.cc.

Referenced by AlcaPCCEventProducer(), and produce().