CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
CTPPSPixelClusterProducer Class Reference

#include <CTPPSPixelClusterProducer.h>

Inheritance diagram for CTPPSPixelClusterProducer:
edm::stream::EDProducer<>

Public Member Functions

 CTPPSPixelClusterProducer (const edm::ParameterSet &param)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~CTPPSPixelClusterProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

void run (const edm::DetSetVector< CTPPSPixelDigi > &input, edm::DetSetVector< CTPPSPixelCluster > &output, const CTPPSPixelAnalysisMask *mask)
 

Private Attributes

RPixDetClusterizer clusterizer_
 
edm::ParameterSet param_
 
edm::InputTag src_
 
CTPPSPixelGainCalibrationDBService theGainCalibrationDB
 
edm::ESGetToken< CTPPSPixelAnalysisMask, CTPPSPixelAnalysisMaskRcdtokenCTPPSPixelAnalysisMask_
 
edm::EDGetTokenT< edm::DetSetVector< CTPPSPixelDigi > > tokenCTPPSPixelDigi_
 
int verbosity_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Definition at line 40 of file CTPPSPixelClusterProducer.h.

Constructor & Destructor Documentation

◆ CTPPSPixelClusterProducer()

CTPPSPixelClusterProducer::CTPPSPixelClusterProducer ( const edm::ParameterSet param)
explicit

Definition at line 5 of file CTPPSPixelClusterProducer.cc.

5  : param_(conf), clusterizer_(conf) {
6  src_ = conf.getParameter<std::string>("label");
7  verbosity_ = conf.getUntrackedParameter<int>("RPixVerbosity");
8 
9  tokenCTPPSPixelDigi_ = consumes<edm::DetSetVector<CTPPSPixelDigi> >(edm::InputTag(src_));
10  tokenCTPPSPixelAnalysisMask_ = esConsumes<CTPPSPixelAnalysisMask, CTPPSPixelAnalysisMaskRcd>();
11 
12  produces<edm::DetSetVector<CTPPSPixelCluster> >();
13 }

References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HLT_FULL_cff::InputTag, src_, AlCaHLTBitMon_QueryRunRegistry::string, tokenCTPPSPixelAnalysisMask_, tokenCTPPSPixelDigi_, and verbosity_.

◆ ~CTPPSPixelClusterProducer()

CTPPSPixelClusterProducer::~CTPPSPixelClusterProducer ( )
override

Definition at line 15 of file CTPPSPixelClusterProducer.cc.

15 {}

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 17 of file CTPPSPixelClusterProducer.cc.

17  {
19  desc.addUntracked<int>("RPixVerbosity", 0);
20  desc.add<std::string>("label", "ctppsPixelDigis");
21  desc.add<int>("SeedADCThreshold", 2);
22  desc.add<int>("ADCThreshold", 2);
23  desc.add<double>("ElectronADCGain", 135.0);
24  desc.add<int>("VCaltoElectronGain", 50);
25  desc.add<int>("VCaltoElectronOffset", -411);
26  desc.add<bool>("doSingleCalibration", false);
27  descriptions.add("ctppsPixelClusters", desc);
28 }

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ produce()

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

get inputs

Definition at line 30 of file CTPPSPixelClusterProducer.cc.

30  {
33  iEvent.getByToken(tokenCTPPSPixelDigi_, rpd);
34 
35  // get analysis mask to mask channels
37 
38  if (!rpd->empty())
40 
42 
43  // run clusterisation
44  if (!rpd->empty()) {
45  // get calibration DB
47  run(*rpd, output, aMask.product());
48  }
49  // write output
50  iEvent.put(std::make_unique<edm::DetSetVector<CTPPSPixelCluster> >(output));
51 }

References CTPPSPixelGainCalibrationDBService::getDB(), edm::EventSetup::getHandle(), iEvent, convertSQLitetoXML_cfg::output, edm::ESHandle< T >::product(), run(), theGainCalibrationDB, tokenCTPPSPixelAnalysisMask_, and tokenCTPPSPixelDigi_.

◆ run()

void CTPPSPixelClusterProducer::run ( const edm::DetSetVector< CTPPSPixelDigi > &  input,
edm::DetSetVector< CTPPSPixelCluster > &  output,
const CTPPSPixelAnalysisMask mask 
)
private

Definition at line 53 of file CTPPSPixelClusterProducer.cc.

55  {
56  for (const auto &ds_digi : input) {
57  edm::DetSet<CTPPSPixelCluster> &ds_cluster = output.find_or_insert(ds_digi.id);
58  clusterizer_.buildClusters(ds_digi.id, ds_digi.data, ds_cluster.data, theGainCalibrationDB.getCalibs(), mask);
59 
60  if (verbosity_) {
61  unsigned int cluN = 0;
62  for (std::vector<CTPPSPixelCluster>::iterator iit = ds_cluster.data.begin(); iit != ds_cluster.data.end();
63  iit++) {
64  edm::LogInfo("CTPPSPixelClusterProducer") << "Cluster " << ++cluN << " avg row " << (*iit).avg_row()
65  << " avg col " << (*iit).avg_col() << " ADC.size " << (*iit).size();
66  }
67  }
68  }
69 }

References RPixDetClusterizer::buildClusters(), clusterizer_, edm::DetSet< T >::data, CTPPSPixelGainCalibrationDBService::getCalibs(), input, convertSQLitetoXML_cfg::output, theGainCalibrationDB, and verbosity_.

Referenced by produce().

Member Data Documentation

◆ clusterizer_

RPixDetClusterizer CTPPSPixelClusterProducer::clusterizer_
private

Definition at line 60 of file CTPPSPixelClusterProducer.h.

Referenced by run().

◆ param_

edm::ParameterSet CTPPSPixelClusterProducer::param_
private

Definition at line 53 of file CTPPSPixelClusterProducer.h.

◆ src_

edm::InputTag CTPPSPixelClusterProducer::src_
private

Definition at line 56 of file CTPPSPixelClusterProducer.h.

Referenced by CTPPSPixelClusterProducer().

◆ theGainCalibrationDB

CTPPSPixelGainCalibrationDBService CTPPSPixelClusterProducer::theGainCalibrationDB
private

Definition at line 66 of file CTPPSPixelClusterProducer.h.

Referenced by produce(), and run().

◆ tokenCTPPSPixelAnalysisMask_

edm::ESGetToken<CTPPSPixelAnalysisMask, CTPPSPixelAnalysisMaskRcd> CTPPSPixelClusterProducer::tokenCTPPSPixelAnalysisMask_
private

Definition at line 58 of file CTPPSPixelClusterProducer.h.

Referenced by CTPPSPixelClusterProducer(), and produce().

◆ tokenCTPPSPixelDigi_

edm::EDGetTokenT<edm::DetSetVector<CTPPSPixelDigi> > CTPPSPixelClusterProducer::tokenCTPPSPixelDigi_
private

Definition at line 57 of file CTPPSPixelClusterProducer.h.

Referenced by CTPPSPixelClusterProducer(), and produce().

◆ verbosity_

int CTPPSPixelClusterProducer::verbosity_
private

Definition at line 54 of file CTPPSPixelClusterProducer.h.

Referenced by CTPPSPixelClusterProducer(), and run().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
edm::DetSetVector
Definition: DetSetVector.h:61
input
static const std::string input
Definition: EdmProvDump.cc:48
edm::DetSet
Definition: DetSet.h:23
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
CTPPSPixelClusterProducer::theGainCalibrationDB
CTPPSPixelGainCalibrationDBService theGainCalibrationDB
Definition: CTPPSPixelClusterProducer.h:66
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89353
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
RPixDetClusterizer::buildClusters
void buildClusters(unsigned int detId, const std::vector< CTPPSPixelDigi > &digi, std::vector< CTPPSPixelCluster > &clusters, const CTPPSPixelGainCalibrations *pcalibration, const CTPPSPixelAnalysisMask *mask)
Definition: RPixDetClusterizer.cc:25
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edm::Handle
Definition: AssociativeIterator.h:50
CTPPSPixelClusterProducer::tokenCTPPSPixelDigi_
edm::EDGetTokenT< edm::DetSetVector< CTPPSPixelDigi > > tokenCTPPSPixelDigi_
Definition: CTPPSPixelClusterProducer.h:57
CTPPSPixelGainCalibrationDBService::getCalibs
const CTPPSPixelGainCalibrations * getCalibs() const
Definition: CTPPSPixelGainCalibrationDBService.h:28
CTPPSPixelClusterProducer::src_
edm::InputTag src_
Definition: CTPPSPixelClusterProducer.h:56
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
CTPPSPixelClusterProducer::tokenCTPPSPixelAnalysisMask_
edm::ESGetToken< CTPPSPixelAnalysisMask, CTPPSPixelAnalysisMaskRcd > tokenCTPPSPixelAnalysisMask_
Definition: CTPPSPixelClusterProducer.h:58
CTPPSPixelGainCalibrationDBService::getDB
virtual void getDB(const edm::Event &e, const edm::EventSetup &c)
Definition: CTPPSPixelGainCalibrationDBService.cc:25
edm::ESHandle
Definition: DTSurvey.h:22
CTPPSPixelClusterProducer::run
void run(const edm::DetSetVector< CTPPSPixelDigi > &input, edm::DetSetVector< CTPPSPixelCluster > &output, const CTPPSPixelAnalysisMask *mask)
Definition: CTPPSPixelClusterProducer.cc:53
CTPPSPixelClusterProducer::verbosity_
int verbosity_
Definition: CTPPSPixelClusterProducer.h:54
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:148
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
CTPPSPixelClusterProducer::clusterizer_
RPixDetClusterizer clusterizer_
Definition: CTPPSPixelClusterProducer.h:60
edm::DetSet::data
collection_type data
Definition: DetSet.h:80
CTPPSPixelClusterProducer::param_
edm::ParameterSet param_
Definition: CTPPSPixelClusterProducer.h:53