CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
SiStripRecHitConverter Class Reference

#include <SiStripRecHitConverter.h>

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

Public Member Functions

void produce (edm::Event &, const edm::EventSetup &) override
 
 SiStripRecHitConverter (const edm::ParameterSet &)
 
- 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 Attributes

edm::EDGetTokenT
< edmNew::DetSetVector
< SiStripCluster > > 
clusterProducer
 
bool doMatching
 
std::string matchedRecHitsTag
 
SiStripRecHitConverterAlgorithm recHitConverterAlgorithm
 
std::string rphiRecHitsTag
 
std::string stereoRecHitsTag
 

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 SiStripRecHitConverter.h.

Constructor & Destructor Documentation

SiStripRecHitConverter::SiStripRecHitConverter ( const edm::ParameterSet conf)
explicit

Definition at line 8 of file SiStripRecHitConverter.cc.

References clusterProducer, doMatching, edm::ParameterSet::getParameter(), matchedRecHitsTag, rphiRecHitsTag, and stereoRecHitsTag.

9  : recHitConverterAlgorithm(conf, consumesCollector()),
10  matchedRecHitsTag(conf.getParameter<std::string>("matchedRecHits")),
11  rphiRecHitsTag(conf.getParameter<std::string>("rphiRecHits")),
12  stereoRecHitsTag(conf.getParameter<std::string>("stereoRecHits")),
13  doMatching(conf.getParameter<bool>("doMatching")) {
15  consumes<edmNew::DetSetVector<SiStripCluster> >(conf.getParameter<edm::InputTag>("ClusterProducer"));
16 
17  produces<SiStripRecHit2DCollection>(rphiRecHitsTag);
18  produces<SiStripRecHit2DCollection>(stereoRecHitsTag);
19  if (doMatching) {
20  produces<SiStripMatchedRecHit2DCollection>(matchedRecHitsTag);
21  produces<SiStripRecHit2DCollection>(rphiRecHitsTag + "Unmatched");
22  produces<SiStripRecHit2DCollection>(stereoRecHitsTag + "Unmatched");
23  }
24 }
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusterProducer
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
SiStripRecHitConverterAlgorithm recHitConverterAlgorithm

Member Function Documentation

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

Definition at line 26 of file SiStripRecHitConverter.cc.

References edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addOptionalUntracked(), edm::ConfigurationDescriptions::addWithDefaultLabel(), submitPVResolutionJobs::desc, SiStripRecHitConverterAlgorithm::fillPSetDescription(), HLT_FULL_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

26  {
28  desc.add<edm::InputTag>("ClusterProducer", edm::InputTag("siStripClusters"));
29  desc.add<std::string>("rphiRecHits", "rphiRecHit");
30  desc.add<std::string>("stereoRecHits", "stereoRecHit");
31  desc.add<std::string>("matchedRecHits", "matchedRecHit");
32 
34 
35  // unused? could be removed after parameter gets removed from HLT menu?
36  desc.addOptionalUntracked<int>("VerbosityLevel");
37 
38  descriptions.addWithDefaultLabel(desc);
39 }
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
ParameterDescriptionBase * addOptionalUntracked(U const &iLabel, T const &value)
static void fillPSetDescription(edm::ParameterSetDescription &desc)
void SiStripRecHitConverter::produce ( edm::Event e,
const edm::EventSetup es 
)
override

Definition at line 41 of file SiStripRecHitConverter.cc.

References clusterProducer, HLT_FULL_cff::clusters, doMatching, edm::Event::getByToken(), SiStripRecHitConverterAlgorithm::initialize(), LogDebug, SiStripRecHitConverterAlgorithm::products::matched, matchedRecHitsTag, eostools::move(), convertSQLitetoXML_cfg::output, edm::Event::put(), recHitConverterAlgorithm, SiStripRecHitConverterAlgorithm::products::rphi, rphiRecHitsTag, SiStripRecHitConverterAlgorithm::products::rphiUnmatched, SiStripRecHitConverterAlgorithm::run(), SiStripRecHitConverterAlgorithm::products::shrink_to_fit(), SiStripRecHitConverterAlgorithm::products::stereo, stereoRecHitsTag, and SiStripRecHitConverterAlgorithm::products::stereoUnmatched.

41  {
43 
45  e.getByToken(clusterProducer, clusters);
47  recHitConverterAlgorithm.run(clusters, output);
48  output.shrink_to_fit();
49  LogDebug("SiStripRecHitConverter") << "found\n"
50  << output.rphi->dataSize() << " clusters in mono detectors\n"
51  << output.stereo->dataSize() << " clusters in partners stereo detectors\n";
52 
53  e.put(std::move(output.rphi), rphiRecHitsTag);
55  if (doMatching) {
57  e.put(std::move(output.rphiUnmatched), rphiRecHitsTag + "Unmatched");
58  e.put(std::move(output.stereoUnmatched), stereoRecHitsTag + "Unmatched");
59  }
60 }
std::unique_ptr< SiStripMatchedRecHit2DCollection > matched
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
void run(edm::Handle< edmNew::DetSetVector< SiStripCluster > > input, products &output)
std::unique_ptr< SiStripRecHit2DCollection > rphi
std::unique_ptr< SiStripRecHit2DCollection > stereo
def move
Definition: eostools.py:511
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusterProducer
std::unique_ptr< SiStripRecHit2DCollection > stereoUnmatched
std::unique_ptr< SiStripRecHit2DCollection > rphiUnmatched
SiStripRecHitConverterAlgorithm recHitConverterAlgorithm
#define LogDebug(id)

Member Data Documentation

edm::EDGetTokenT<edmNew::DetSetVector<SiStripCluster> > SiStripRecHitConverter::clusterProducer
private

Definition at line 18 of file SiStripRecHitConverter.h.

Referenced by produce(), and SiStripRecHitConverter().

bool SiStripRecHitConverter::doMatching
private

Definition at line 19 of file SiStripRecHitConverter.h.

Referenced by produce(), and SiStripRecHitConverter().

std::string SiStripRecHitConverter::matchedRecHitsTag
private

Definition at line 17 of file SiStripRecHitConverter.h.

Referenced by produce(), and SiStripRecHitConverter().

SiStripRecHitConverterAlgorithm SiStripRecHitConverter::recHitConverterAlgorithm
private

Definition at line 16 of file SiStripRecHitConverter.h.

Referenced by produce().

std::string SiStripRecHitConverter::rphiRecHitsTag
private

Definition at line 17 of file SiStripRecHitConverter.h.

Referenced by produce(), and SiStripRecHitConverter().

std::string SiStripRecHitConverter::stereoRecHitsTag
private

Definition at line 17 of file SiStripRecHitConverter.h.

Referenced by produce(), and SiStripRecHitConverter().