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

const int colsperroc = 80
 
int countEvt_
 
int countLumi_
 
edm::InputTag fPixelClusterLabel
 
const int nROCcolumns = 8
 
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelToken
 
const int rowsperroc = 52
 
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 34 of file AlcaPCCEventProducer.cc.

Constructor & Destructor Documentation

◆ AlcaPCCEventProducer()

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

Definition at line 58 of file AlcaPCCEventProducer.cc.

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

58  {
59  fPixelClusterLabel = iConfig.getParameter<edm::InputTag>("pixelClusterLabel");
60  trigstring_ = iConfig.getUntrackedParameter<std::string>("trigstring", "alcaPCCEvent");
61  produces<reco::PixelClusterCountsInEvent, edm::Transition::Event>(trigstring_);
62  pixelToken = consumes<edmNew::DetSetVector<SiPixelCluster> >(fPixelClusterLabel);
63 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelToken
edm::InputTag fPixelClusterLabel

◆ ~AlcaPCCEventProducer()

AlcaPCCEventProducer::~AlcaPCCEventProducer ( )
override

Definition at line 66 of file AlcaPCCEventProducer.cc.

66 {}

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 114 of file AlcaPCCEventProducer.cc.

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

114  {
115  edm::ParameterSetDescription evtParamDesc;
116  evtParamDesc.add<edm::InputTag>("pixelClusterLabel", edm::InputTag("siPixelClustersForLumi"));
117  evtParamDesc.addUntracked<std::string>("trigstring", "alcaPCCEvent");
118  descriptions.add("alcaPCCEventProducer", evtParamDesc);
119 }
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 69 of file AlcaPCCEventProducer.cc.

References nano_mu_digi_cff::bx, colsperroc, countEvt_, hcalRecHitTable_cff::detId, mps_fire::i, iEvent, submitPVResolutionJobs::key, mod(), eostools::move(), nROCcolumns, pixelToken, edm::Handle< T >::product(), rowsperroc, AlCaHLTBitMon_QueryRunRegistry::string, thePCCob, and trigstring_.

69  {
70  countEvt_++;
71  thePCCob = std::make_unique<reco::PixelClusterCountsInEvent>();
72 
73  unsigned int bx = iEvent.bunchCrossing();
74 
75  //Looping over the clusters and adding the counts up
77  iEvent.getByToken(pixelToken, hClusterColl);
78 
79  const edmNew::DetSetVector<SiPixelCluster>& clustColl = *(hClusterColl.product());
80  // ----------------------------------------------------------------------
81  // -- Clusters without tracks
82  for (auto const& mod : clustColl) {
83  if (mod.empty()) {
84  continue;
85  }
86  DetId detId = mod.id();
87 
88  // Iterate over Clusters in module to fill per ROC histogram
89  for (auto const& cluster : mod) {
90  for (int i = 0; i < cluster.size(); ++i) {
91  const auto pix = cluster.pixel(i);
92  // TODO: add roc threshold to config if(di.adc > fRocThreshold_) {
93  if (pix.adc > 0) {
94  int irow = pix.x / rowsperroc; /* constant column direction is along x-axis */
95  int icol = pix.y / colsperroc; /* constant row direction is along y-axis */
96  /* generate the folling roc index that is going to map with ROC id as
97  8 9 10 11 12 13 14 15
98  0 1 2 3 4 5 6 7 */
99  int key = icol + irow * nROCcolumns;
100  thePCCob->incrementRoc(((detId << 7) + key), 1);
101  }
102  }
103  }
104 
105  int nCluster = mod.size();
106  thePCCob->increment(detId(), nCluster);
107  thePCCob->setbxID(bx);
108  }
109 
111 }
T const * product() const
Definition: Handle.h:70
std::unique_ptr< reco::PixelClusterCountsInEvent > thePCCob
int iEvent
Definition: GenABIO.cc:224
key
prepare the HTCondor submission files and eventually submit them
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

◆ colsperroc

const int AlcaPCCEventProducer::colsperroc = 80
private

Definition at line 51 of file AlcaPCCEventProducer.cc.

Referenced by produce().

◆ countEvt_

int AlcaPCCEventProducer::countEvt_
private

Definition at line 47 of file AlcaPCCEventProducer.cc.

Referenced by produce().

◆ countLumi_

int AlcaPCCEventProducer::countLumi_
private

Definition at line 48 of file AlcaPCCEventProducer.cc.

◆ fPixelClusterLabel

edm::InputTag AlcaPCCEventProducer::fPixelClusterLabel
private

Definition at line 44 of file AlcaPCCEventProducer.cc.

Referenced by AlcaPCCEventProducer().

◆ nROCcolumns

const int AlcaPCCEventProducer::nROCcolumns = 8
private

Definition at line 52 of file AlcaPCCEventProducer.cc.

Referenced by produce().

◆ pixelToken

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

Definition at line 43 of file AlcaPCCEventProducer.cc.

Referenced by AlcaPCCEventProducer(), and produce().

◆ rowsperroc

const int AlcaPCCEventProducer::rowsperroc = 52
private

Definition at line 50 of file AlcaPCCEventProducer.cc.

Referenced by produce().

◆ thePCCob

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

Definition at line 54 of file AlcaPCCEventProducer.cc.

Referenced by produce().

◆ trigstring_

std::string AlcaPCCEventProducer::trigstring_
private

Definition at line 46 of file AlcaPCCEventProducer.cc.

Referenced by AlcaPCCEventProducer(), and produce().