CMS 3D CMS Logo

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

#include <HGCalUncalibRecHitProducer.h>

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

Public Member Functions

 HGCalUncalibRecHitProducer (const edm::ParameterSet &ps)
 
void produce (edm::Event &evt, const edm::EventSetup &es) override
 
 ~HGCalUncalibRecHitProducer () 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 Attributes

const edm::ESGetToken< HGCalGeometry, IdealGeometryRecordee_geometry_token_
 
const edm::EDGetTokenT< HGCalDigiCollectioneeDigiCollection_
 
const std::string eeHitCollection_
 
const edm::ESGetToken< HGCalGeometry, IdealGeometryRecordheb_geometry_token_
 
const edm::EDGetTokenT< HGCalDigiCollectionhebDigiCollection_
 
const std::string hebHitCollection_
 
const edm::ESGetToken< HGCalGeometry, IdealGeometryRecordhef_geometry_token_
 
const edm::EDGetTokenT< HGCalDigiCollectionhefDigiCollection_
 
const std::string hefHitCollection_
 
const edm::ESGetToken< HGCalGeometry, IdealGeometryRecordhfnose_geometry_token_
 
const edm::EDGetTokenT< HGCalDigiCollectionhfnoseDigiCollection_
 
const std::string hfnoseHitCollection_
 
std::unique_ptr< HGCalUncalibRecHitWorkerBaseClassworker_
 

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 15 of file HGCalUncalibRecHitProducer.h.

Constructor & Destructor Documentation

◆ HGCalUncalibRecHitProducer()

HGCalUncalibRecHitProducer::HGCalUncalibRecHitProducer ( const edm::ParameterSet ps)
explicit

Definition at line 12 of file HGCalUncalibRecHitProducer.cc.

References get, edm::ParameterSet::getParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

13  : eeDigiCollection_(consumes<HGCalDigiCollection>(ps.getParameter<edm::InputTag>("HGCEEdigiCollection"))),
14  hefDigiCollection_(consumes<HGCalDigiCollection>(ps.getParameter<edm::InputTag>("HGCHEFdigiCollection"))),
15  hebDigiCollection_(consumes<HGCalDigiCollection>(ps.getParameter<edm::InputTag>("HGCHEBdigiCollection"))),
16  hfnoseDigiCollection_(consumes<HGCalDigiCollection>(ps.getParameter<edm::InputTag>("HGCHFNosedigiCollection"))),
17  ee_geometry_token_(esConsumes(edm::ESInputTag("", "HGCalEESensitive"))),
18  hef_geometry_token_(esConsumes(edm::ESInputTag("", "HGCalHESiliconSensitive"))),
19  heb_geometry_token_(esConsumes(edm::ESInputTag("", "HGCalHEScintillatorSensitive"))),
20  hfnose_geometry_token_(esConsumes(edm::ESInputTag("", "HGCalHFNoseSensitive"))),
21  eeHitCollection_(ps.getParameter<std::string>("HGCEEhitCollection")),
22  hefHitCollection_(ps.getParameter<std::string>("HGCHEFhitCollection")),
23  hebHitCollection_(ps.getParameter<std::string>("HGCHEBhitCollection")),
24  hfnoseHitCollection_(ps.getParameter<std::string>("HGCHFNosehitCollection")),
26  ps.getParameter<std::string>("algo"), ps, consumesCollector(), ps.getParameter<bool>("computeLocalTime"))} {
27  produces<HGCeeUncalibratedRecHitCollection>(eeHitCollection_);
28  produces<HGChefUncalibratedRecHitCollection>(hefHitCollection_);
29  produces<HGChebUncalibratedRecHitCollection>(hebHitCollection_);
30  produces<HGChfnoseUncalibratedRecHitCollection>(hfnoseHitCollection_);
31 }
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
const edm::EDGetTokenT< HGCalDigiCollection > eeDigiCollection_
const edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > hfnose_geometry_token_
const edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > ee_geometry_token_
const edm::EDGetTokenT< HGCalDigiCollection > hebDigiCollection_
const edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > heb_geometry_token_
const edm::EDGetTokenT< HGCalDigiCollection > hefDigiCollection_
std::unique_ptr< HGCalUncalibRecHitWorkerBaseClass > worker_
#define get
const edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > hef_geometry_token_
const edm::EDGetTokenT< HGCalDigiCollection > hfnoseDigiCollection_

◆ ~HGCalUncalibRecHitProducer()

HGCalUncalibRecHitProducer::~HGCalUncalibRecHitProducer ( )
override

Definition at line 33 of file HGCalUncalibRecHitProducer.cc.

33 {}

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 72 of file HGCalUncalibRecHitProducer.cc.

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

72  {
73  // HGCalUncalibRecHit
75  desc.add<edm::InputTag>("HGCEEdigiCollection", edm::InputTag("hgcalDigis", "EE"));
76  desc.add<std::string>("HGCEEhitCollection", "HGCEEUncalibRecHits");
77  desc.add<edm::InputTag>("HGCHEFdigiCollection", edm::InputTag("hgcalDigis", "HEfront"));
78  desc.add<std::string>("HGCHEFhitCollection", "HGCHEFUncalibRecHits");
79  desc.add<edm::InputTag>("HGCHEBdigiCollection", edm::InputTag("hgcalDigis", "HEback"));
80  desc.add<std::string>("HGCHEBhitCollection", "HGCHEBUncalibRecHits");
81  desc.add<edm::InputTag>("HGCHFNosedigiCollection", edm::InputTag("hfnoseDigis", "HFNose"));
82  desc.add<std::string>("HGCHFNosehitCollection", "HGCHFNoseUncalibRecHits");
83  edm::ParameterSetDescription HGCEEConfigPSet;
84  HGCEEConfigPSet.add<bool>("isSiFE", true);
85  HGCEEConfigPSet.add<unsigned int>("adcNbits", 10);
86  HGCEEConfigPSet.add<double>("adcSaturation", 100);
87  HGCEEConfigPSet.add<unsigned int>("tdcNbits", 12);
88  HGCEEConfigPSet.add<double>("tdcSaturation", 10000);
89  HGCEEConfigPSet.add<double>("tdcOnset", 60);
90  HGCEEConfigPSet.add<double>("toaLSB_ns", 0.0244);
91  HGCEEConfigPSet.add<double>("tofDelay", -9);
92  HGCEEConfigPSet.add<std::vector<double>>("fCPerMIP",
93  {
94  1.25,
95  2.57,
96  3.88,
97  });
98  desc.add<edm::ParameterSetDescription>("HGCEEConfig", HGCEEConfigPSet);
99  edm::ParameterSetDescription HGCHEFConfigPSet;
100  HGCHEFConfigPSet.add<bool>("isSiFE", true);
101  HGCHEFConfigPSet.add<unsigned int>("adcNbits", 10);
102  HGCHEFConfigPSet.add<double>("adcSaturation", 100);
103  HGCHEFConfigPSet.add<unsigned int>("tdcNbits", 12);
104  HGCHEFConfigPSet.add<double>("tdcSaturation", 10000);
105  HGCHEFConfigPSet.add<double>("tdcOnset", 60);
106  HGCHEFConfigPSet.add<double>("toaLSB_ns", 0.0244);
107  HGCHEFConfigPSet.add<double>("tofDelay", -11);
108  HGCHEFConfigPSet.add<std::vector<double>>("fCPerMIP",
109  {
110  1.25,
111  2.57,
112  3.88,
113  });
114  desc.add<edm::ParameterSetDescription>("HGCHEFConfig", HGCHEFConfigPSet);
115  edm::ParameterSetDescription HGCHEBConfigPSet;
116  HGCHEBConfigPSet.add<bool>("isSiFE", true);
117  HGCHEBConfigPSet.add<unsigned int>("adcNbits", 10);
118  HGCHEBConfigPSet.add<double>("adcSaturation", 68.75);
119  HGCHEBConfigPSet.add<unsigned int>("tdcNbits", 12);
120  HGCHEBConfigPSet.add<double>("tdcSaturation", 1000);
121  HGCHEBConfigPSet.add<double>("tdcOnset", 55);
122  HGCHEBConfigPSet.add<double>("toaLSB_ns", 0.0244);
123  HGCHEBConfigPSet.add<double>("tofDelay", -14);
124  HGCHEBConfigPSet.add<std::vector<double>>("fCPerMIP",
125  {
126  1.0,
127  1.0,
128  1.0,
129  });
130  desc.add<edm::ParameterSetDescription>("HGCHEBConfig", HGCHEBConfigPSet);
131  edm::ParameterSetDescription HGCHFNoseConfigPSet;
132  HGCHFNoseConfigPSet.add<bool>("isSiFE", false);
133  HGCHFNoseConfigPSet.add<unsigned int>("adcNbits", 10);
134  HGCHFNoseConfigPSet.add<double>("adcSaturation", 100);
135  HGCHFNoseConfigPSet.add<unsigned int>("tdcNbits", 12);
136  HGCHFNoseConfigPSet.add<double>("tdcSaturation", 10000);
137  HGCHFNoseConfigPSet.add<double>("tdcOnset", 60);
138  HGCHFNoseConfigPSet.add<double>("toaLSB_ns", 0.0244);
139  HGCHFNoseConfigPSet.add<double>("tofDelay", -33);
140  HGCHFNoseConfigPSet.add<std::vector<double>>("fCPerMIP",
141  {
142  1.25,
143  2.57,
144  3.88,
145  });
146  desc.add<edm::ParameterSetDescription>("HGCHFNoseConfig", HGCHFNoseConfigPSet);
147  desc.add<std::string>("algo", "HGCalUncalibRecHitWorkerWeights");
148  desc.add<bool>("computeLocalTime", false);
149  descriptions.add("HGCalUncalibRecHitProducer", desc);
150 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ produce()

void HGCalUncalibRecHitProducer::produce ( edm::Event evt,
const edm::EventSetup es 
)
override

Definition at line 35 of file HGCalUncalibRecHitProducer.cc.

References ee_geometry_token_, eeDigiCollection_, eeHitCollection_, edm::EventSetup::getHandle(), edm::Event::getHandle(), heb_geometry_token_, hebDigiCollection_, hebHitCollection_, hef_geometry_token_, hefDigiCollection_, hefHitCollection_, hfnose_geometry_token_, hfnoseDigiCollection_, hfnoseHitCollection_, eostools::move(), edm::Event::put(), and worker_.

35  {
36  using namespace edm;
37 
38  // prepare output
39  auto eeUncalibRechits = std::make_unique<HGCeeUncalibratedRecHitCollection>();
40  auto hefUncalibRechits = std::make_unique<HGChefUncalibratedRecHitCollection>();
41  auto hebUncalibRechits = std::make_unique<HGChebUncalibratedRecHitCollection>();
42  auto hfnoseUncalibRechits = std::make_unique<HGChfnoseUncalibratedRecHitCollection>();
43 
44  // loop over HGCEE digis
45  const auto& pHGCEEDigis = evt.getHandle(eeDigiCollection_);
46  if (pHGCEEDigis.isValid())
47  worker_->runHGCEE(es.getHandle(ee_geometry_token_), *pHGCEEDigis, *eeUncalibRechits);
48 
49  // loop over HGCHEsil digis
50  const auto& pHGCHEFDigis = evt.getHandle(hefDigiCollection_);
51  if (pHGCHEFDigis.isValid())
52  worker_->runHGCHEsil(es.getHandle(hef_geometry_token_), *pHGCHEFDigis, *hefUncalibRechits);
53 
54  // loop over HGCHEscint digis
55  const auto& pHGCHEBDigis = evt.getHandle(hebDigiCollection_);
56  if (pHGCHEBDigis.isValid())
57  worker_->runHGCHEscint(es.getHandle(heb_geometry_token_), *pHGCHEBDigis, *hebUncalibRechits);
58 
59  // loop over HFNose digis
60  const auto& pHGCHFNoseDigis = evt.getHandle(hfnoseDigiCollection_);
61  if (pHGCHFNoseDigis.isValid())
62  worker_->runHGCHFNose(es.getHandle(hfnose_geometry_token_), *pHGCHFNoseDigis, *hfnoseUncalibRechits);
63 
64  // put the collection of recunstructed hits in the event
65  evt.put(std::move(eeUncalibRechits), eeHitCollection_);
66  evt.put(std::move(hefUncalibRechits), hefHitCollection_);
67  evt.put(std::move(hebUncalibRechits), hebHitCollection_);
68  if (pHGCHFNoseDigis.isValid())
69  evt.put(std::move(hfnoseUncalibRechits), hfnoseHitCollection_);
70 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
const edm::EDGetTokenT< HGCalDigiCollection > eeDigiCollection_
const edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > hfnose_geometry_token_
const edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > ee_geometry_token_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
const edm::EDGetTokenT< HGCalDigiCollection > hebDigiCollection_
const edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > heb_geometry_token_
const edm::EDGetTokenT< HGCalDigiCollection > hefDigiCollection_
std::unique_ptr< HGCalUncalibRecHitWorkerBaseClass > worker_
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
Definition: Event.h:550
HLT enums.
const edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > hef_geometry_token_
def move(src, dest)
Definition: eostools.py:511
const edm::EDGetTokenT< HGCalDigiCollection > hfnoseDigiCollection_

Member Data Documentation

◆ ee_geometry_token_

const edm::ESGetToken<HGCalGeometry, IdealGeometryRecord> HGCalUncalibRecHitProducer::ee_geometry_token_
private

Definition at line 28 of file HGCalUncalibRecHitProducer.h.

Referenced by produce().

◆ eeDigiCollection_

const edm::EDGetTokenT<HGCalDigiCollection> HGCalUncalibRecHitProducer::eeDigiCollection_
private

Definition at line 23 of file HGCalUncalibRecHitProducer.h.

Referenced by produce().

◆ eeHitCollection_

const std::string HGCalUncalibRecHitProducer::eeHitCollection_
private

Definition at line 33 of file HGCalUncalibRecHitProducer.h.

Referenced by produce().

◆ heb_geometry_token_

const edm::ESGetToken<HGCalGeometry, IdealGeometryRecord> HGCalUncalibRecHitProducer::heb_geometry_token_
private

Definition at line 30 of file HGCalUncalibRecHitProducer.h.

Referenced by produce().

◆ hebDigiCollection_

const edm::EDGetTokenT<HGCalDigiCollection> HGCalUncalibRecHitProducer::hebDigiCollection_
private

Definition at line 25 of file HGCalUncalibRecHitProducer.h.

Referenced by produce().

◆ hebHitCollection_

const std::string HGCalUncalibRecHitProducer::hebHitCollection_
private

Definition at line 35 of file HGCalUncalibRecHitProducer.h.

Referenced by produce().

◆ hef_geometry_token_

const edm::ESGetToken<HGCalGeometry, IdealGeometryRecord> HGCalUncalibRecHitProducer::hef_geometry_token_
private

Definition at line 29 of file HGCalUncalibRecHitProducer.h.

Referenced by produce().

◆ hefDigiCollection_

const edm::EDGetTokenT<HGCalDigiCollection> HGCalUncalibRecHitProducer::hefDigiCollection_
private

Definition at line 24 of file HGCalUncalibRecHitProducer.h.

Referenced by produce().

◆ hefHitCollection_

const std::string HGCalUncalibRecHitProducer::hefHitCollection_
private

Definition at line 34 of file HGCalUncalibRecHitProducer.h.

Referenced by produce().

◆ hfnose_geometry_token_

const edm::ESGetToken<HGCalGeometry, IdealGeometryRecord> HGCalUncalibRecHitProducer::hfnose_geometry_token_
private

Definition at line 31 of file HGCalUncalibRecHitProducer.h.

Referenced by produce().

◆ hfnoseDigiCollection_

const edm::EDGetTokenT<HGCalDigiCollection> HGCalUncalibRecHitProducer::hfnoseDigiCollection_
private

Definition at line 26 of file HGCalUncalibRecHitProducer.h.

Referenced by produce().

◆ hfnoseHitCollection_

const std::string HGCalUncalibRecHitProducer::hfnoseHitCollection_
private

Definition at line 36 of file HGCalUncalibRecHitProducer.h.

Referenced by produce().

◆ worker_

std::unique_ptr<HGCalUncalibRecHitWorkerBaseClass> HGCalUncalibRecHitProducer::worker_
private

Definition at line 38 of file HGCalUncalibRecHitProducer.h.

Referenced by produce().