CMS 3D CMS Logo

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

#include <HcalSimpleReconstructor.h>

Inheritance diagram for HcalSimpleReconstructor:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

virtual void beginRun (edm::Run const &r, edm::EventSetup const &es) overridefinal
 
virtual void endRun (edm::Run const &r, edm::EventSetup const &es) overridefinal
 
 HcalSimpleReconstructor (const edm::ParameterSet &ps)
 
virtual void produce (edm::Event &e, const edm::EventSetup &c) overridefinal
 
virtual ~HcalSimpleReconstructor ()
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

template<class DIGICOLL , class RECHITCOLL >
void process (edm::Event &e, const edm::EventSetup &c, const edm::EDGetTokenT< DIGICOLL > &tok)
 
void processUpgrade (edm::Event &e, const edm::EventSetup &c)
 

Private Attributes

DetId::Detector det_
 
bool dropZSmarkedPassed_
 
int firstSample_
 
bool HFQIE10_
 
edm::InputTag inputLabel_
 
HcalRecoParamsparamTS
 
HcalSimpleRecAlgo reco_
 
int samplesToAdd_
 
int subdet_
 
HcalOtherSubdetector subdetOther_
 
HcalTopologytheTopology
 
edm::EDGetTokenT
< HcalCalibDigiCollection
tok_calib_
 
edm::EDGetTokenT
< HBHEDigiCollection
tok_hbhe_
 
edm::EDGetTokenT
< HBHEUpgradeDigiCollection
tok_hbheUp_
 
edm::EDGetTokenT
< HFDigiCollection
tok_hf_
 
edm::EDGetTokenT
< QIE10DigiCollection
tok_hfQIE10_
 
edm::EDGetTokenT
< HFUpgradeDigiCollection
tok_hfUp_
 
edm::EDGetTokenT
< HODigiCollection
tok_ho_
 
bool tsFromDB_
 
bool upgradeHBHE_
 
bool upgradeHF_
 

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, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Author
J. Mans - Minnesota
E. Garcia - CSU Based on HcalSimpleReconstructor.h by J. Mans

Definition at line 26 of file HcalSimpleReconstructor.h.

Constructor & Destructor Documentation

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

Definition at line 16 of file HcalSimpleReconstructor.cc.

References gather_cfg::cout, edm::ParameterSet::getParameter(), HcalBarrel, HcalForward, HcalOuter, HFQIE10_, inputLabel_, reco_, HcalSimpleRecAlgo::setMeth3Params(), AlCaHLTBitMon_QueryRunRegistry::string, subdet_, tok_calib_, tok_hbhe_, tok_hbheUp_, tok_hf_, tok_hfQIE10_, tok_hfUp_, tok_ho_, upgradeHBHE_, and upgradeHF_.

16  :
17  reco_(conf.getParameter<bool>("correctForTimeslew"),
18  conf.getParameter<bool>("correctForPhaseContainment"),conf.getParameter<double>("correctionPhaseNS")),
20  inputLabel_(conf.getParameter<edm::InputTag>("digiLabel")),
21  dropZSmarkedPassed_(conf.getParameter<bool>("dropZSmarkedPassed")),
22  firstSample_(conf.getParameter<int>("firstSample")),
23  samplesToAdd_(conf.getParameter<int>("samplesToAdd")),
24  tsFromDB_(conf.getParameter<bool>("tsFromDB")),
25  upgradeHBHE_(false),
26  upgradeHF_(false),
27  HFQIE10_(false),
28  paramTS(0),
29  theTopology(0)
30 {
31  // Intitialize "method 3"
33  conf.getParameter<int> ("pedestalSubtractionType"),
34  conf.getParameter<double> ("pedestalUpperLimit"),
35  conf.getParameter<int> ("timeSlewParsType"),
36  conf.getParameter<std::vector<double> >("timeSlewPars"),
37  conf.getParameter<double> ("respCorrM3")
38  );
39 
40  // register for data access
41  tok_hbheUp_ = consumes<HBHEUpgradeDigiCollection>(inputLabel_);
42  tok_hfUp_ = consumes<HFUpgradeDigiCollection>(inputLabel_);
43  tok_hfQIE10_ = consumes<QIE10DigiCollection>(inputLabel_);
44 
45  tok_hbhe_ = consumes<HBHEDigiCollection>(inputLabel_);
46  tok_hf_ = consumes<HFDigiCollection>(inputLabel_);
47  tok_ho_ = consumes<HODigiCollection>(inputLabel_);
48  tok_calib_ = consumes<HcalCalibDigiCollection>(inputLabel_);
49 
50  std::string subd=conf.getParameter<std::string>("Subdetector");
51  if(!strcasecmp(subd.c_str(),"upgradeHBHE")) {
52  upgradeHBHE_ = true;
53  produces<HBHERecHitCollection>();
54  }
55  else if (!strcasecmp(subd.c_str(),"upgradeHF")) {
56  upgradeHF_ = true;
57  produces<HFRecHitCollection>();
58  }
59  else if (!strcasecmp(subd.c_str(),"HFQIE10")) {
60  HFQIE10_ = true;
61  produces<HFRecHitCollection>();
62  }
63  else if (!strcasecmp(subd.c_str(),"HO")) {
65  produces<HORecHitCollection>();
66  }
67  else if (!strcasecmp(subd.c_str(),"HBHE")) {
68  if( !upgradeHBHE_) {
70  produces<HBHERecHitCollection>();
71  }
72  }
73  else if (!strcasecmp(subd.c_str(),"HF")) {
74  if( !upgradeHF_) {
76  produces<HFRecHitCollection>();
77  }
78  }
79  else {
80  std::cout << "HcalSimpleReconstructor is not associated with a specific subdetector!" << std::endl;
81  }
82 
83 }
void setMeth3Params(int iPedSubMethod, float iPedSubThreshold, int iTimeSlewParsType, std::vector< double > iTimeSlewPars, double irespCorrM3)
edm::EDGetTokenT< HBHEUpgradeDigiCollection > tok_hbheUp_
edm::EDGetTokenT< QIE10DigiCollection > tok_hfQIE10_
edm::EDGetTokenT< HFUpgradeDigiCollection > tok_hfUp_
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_
edm::EDGetTokenT< HFDigiCollection > tok_hf_
edm::EDGetTokenT< HODigiCollection > tok_ho_
tuple cout
Definition: gather_cfg.py:145
edm::EDGetTokenT< HcalCalibDigiCollection > tok_calib_
HcalSimpleReconstructor::~HcalSimpleReconstructor ( )
virtual

Definition at line 96 of file HcalSimpleReconstructor.cc.

References paramTS, and theTopology.

96  {
97  delete paramTS;
98  delete theTopology;
99 }

Member Function Documentation

void HcalSimpleReconstructor::beginRun ( edm::Run const &  r,
edm::EventSetup const &  es 
)
finaloverridevirtual

Reimplemented from edm::stream::EDProducerBase.

Definition at line 101 of file HcalSimpleReconstructor.cc.

References HcalSimpleRecAlgo::beginRun(), edm::EventSetup::get(), AlCaHLTBitMon_ParallelJobs::p, paramTS, edm::ESHandle< class >::product(), reco_, HcalCondObjectContainerBase::setTopo(), theTopology, and tsFromDB_.

101  {
102  if(tsFromDB_) {
104  es.get<HcalRecoParamsRcd>().get(p);
105  paramTS = new HcalRecoParams(*p.product());
106 
108  es.get<HcalRecNumberingRecord>().get(htopo);
109  theTopology=new HcalTopology(*htopo);
111 
112  }
113  reco_.beginRun(es);
114 }
void beginRun(edm::EventSetup const &es)
T const * product() const
Definition: ESHandle.h:86
void setTopo(const HcalTopology *topo)
void HcalSimpleReconstructor::endRun ( edm::Run const &  r,
edm::EventSetup const &  es 
)
finaloverridevirtual

Reimplemented from edm::stream::EDProducerBase.

Definition at line 116 of file HcalSimpleReconstructor.cc.

References HcalSimpleRecAlgo::endRun(), paramTS, reco_, and tsFromDB_.

116  {
117  if(tsFromDB_ && paramTS) {
118  delete paramTS;
119  paramTS = 0;
120  reco_.endRun();
121  }
122 }
void HcalSimpleReconstructor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 85 of file HcalSimpleReconstructor.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), and edm::ParameterSetDescription::setAllowAnything().

85  {
87  desc.setAllowAnything();
88  desc.add<int>("pedestalSubtractionType", 1);
89  desc.add<double>("pedestalUpperLimit", 2.7);
90  desc.add<int>("timeSlewParsType",3);
91  desc.add<std::vector<double>>("timeSlewPars", { 12.2999, -2.19142, 0, 12.2999, -2.19142, 0, 12.2999, -2.19142, 0 });
92  desc.add<double>("respCorrM3", 0.95);
93  descriptions.add("simpleHbhereco",desc);
94 }
void setAllowAnything()
allow any parameter label/value pairs
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
template<class DIGICOLL , class RECHITCOLL >
void HcalSimpleReconstructor::process ( edm::Event e,
const edm::EventSetup c,
const edm::EDGetTokenT< DIGICOLL > &  tok 
)
private

Definition at line 126 of file HcalSimpleReconstructor.cc.

References dropZSmarkedPassed_, plotBeamSpotDB::first, HcalRecoParam::firstSample(), firstSample_, edm::EventSetup::get(), edm::Event::getByToken(), HcalCondObjectContainer< Item >::getValues(), i, paramTS, edm::Event::put(), DetId::rawId(), reco_, HcalSimpleRecAlgo::reconstruct(), HcalRecoParam::samplesToAdd(), samplesToAdd_, and tsFromDB_.

Referenced by ConfigBuilder.ConfigBuilder::addExtraStream(), ConfigBuilder.ConfigBuilder::completeInputCommand(), ConfigBuilder.ConfigBuilder::doNotInlineEventContent(), ConfigBuilder.ConfigBuilder.PrintAllModules::leave(), ConfigBuilder.ConfigBuilder::prepare_HLT(), ConfigBuilder.ConfigBuilder::prepare_LHE(), ConfigBuilder.ConfigBuilder::prepare_PATFILTER(), ConfigBuilder.ConfigBuilder::prepare_VALIDATION(), ConfigBuilder.ConfigBuilder::renameHLTprocessInSequence(), ConfigBuilder.ConfigBuilder::renameInputTagsInSequence(), and ConfigBuilder.ConfigBuilder::scheduleSequence().

127 {
128  // get conditions
129  edm::ESHandle<HcalDbService> conditions;
130  eventSetup.get<HcalDbRecord>().get(conditions);
131 
133  e.getByToken(tok,digi);
134 
135  // create empty output
136  std::auto_ptr<RECHITCOLL> rec(new RECHITCOLL);
137  rec->reserve(digi->size());
138  // run the algorithm
139  int first = firstSample_;
140  int toadd = samplesToAdd_;
141  typename DIGICOLL::const_iterator i;
142  for (i=digi->begin(); i!=digi->end(); i++) {
143  HcalDetId cell = i->id();
144  DetId detcell=(DetId)cell;
145  // rof 27.03.09: drop ZS marked and passed digis:
147  if (i->zsMarkAndPass()) continue;
148 
149  const HcalCalibrations& calibrations=conditions->getHcalCalibrations(cell);
150  const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell);
151  const HcalQIEShape* shape = conditions->getHcalShape (channelCoder);
152  HcalCoderDb coder (*channelCoder, *shape);
153 
154  //>>> firstSample & samplesToAdd
155  if(tsFromDB_) {
156  const HcalRecoParam* param_ts = paramTS->getValues(detcell.rawId());
157  first = param_ts->firstSample();
158  toadd = param_ts->samplesToAdd();
159  }
160  rec->push_back(reco_.reconstruct(*i,first,toadd,coder,calibrations));
161  }
162  // return result
163  e.put(rec);
164 }
unsigned int firstSample() const
Definition: HcalRecoParam.h:32
int i
Definition: DBlmapReader.cc:9
HBHERecHit reconstruct(const HBHEDataFrame &digi, int first, int toadd, const HcalCoder &coder, const HcalCalibrations &calibs) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
const Item * getValues(DetId fId, bool throwOnFail=true) const
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:121
unsigned int samplesToAdd() const
Definition: HcalRecoParam.h:33
Definition: DetId.h:18
void HcalSimpleReconstructor::processUpgrade ( edm::Event e,
const edm::EventSetup c 
)
private

Definition at line 167 of file HcalSimpleReconstructor.cc.

References dropZSmarkedPassed_, plotBeamSpotDB::first, HcalRecoParam::firstSample(), firstSample_, edm::EventSetup::get(), edm::Event::getByToken(), HcalCondObjectContainer< Item >::getValues(), HFQIE10_, i, paramTS, edm::Event::put(), DetId::rawId(), reco_, HcalSimpleRecAlgo::reconstructHBHEUpgrade(), HcalSimpleRecAlgo::reconstructHFUpgrade(), HcalSimpleRecAlgo::reconstructQIE10(), HcalRecoParam::samplesToAdd(), samplesToAdd_, tok_hbheUp_, tok_hfQIE10_, tok_hfUp_, tsFromDB_, upgradeHBHE_, upgradeHF_, and QIE10DataFrame::zsMarkAndPass().

Referenced by produce().

168 {
169  // get conditions
170  edm::ESHandle<HcalDbService> conditions;
171  eventSetup.get<HcalDbRecord>().get(conditions);
172 
173  if(upgradeHBHE_){
174 
176  e.getByToken(tok_hbheUp_, digi);
177 
178  // create empty output
179  std::auto_ptr<HBHERecHitCollection> rec(new HBHERecHitCollection);
180  rec->reserve(digi->size());
181 
182  // run the algorithm
183  int first = firstSample_;
184  int toadd = samplesToAdd_;
186  for (i=digi->begin(); i!=digi->end(); i++) {
187  HcalDetId cell = i->id();
188  DetId detcell=(DetId)cell;
189  // rof 27.03.09: drop ZS marked and passed digis:
191  if (i->zsMarkAndPass()) continue;
192 
193  const HcalCalibrations& calibrations=conditions->getHcalCalibrations(cell);
194  const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell);
195  const HcalQIEShape* shape = conditions->getHcalShape (channelCoder);
196  HcalCoderDb coder (*channelCoder, *shape);
197 
198  //>>> firstSample & samplesToAdd
199  if(tsFromDB_) {
200  const HcalRecoParam* param_ts = paramTS->getValues(detcell.rawId());
201  first = param_ts->firstSample();
202  toadd = param_ts->samplesToAdd();
203  }
204  rec->push_back(reco_.reconstructHBHEUpgrade(*i,first,toadd,coder,calibrations));
205 
206  }
207 
208  e.put(rec); // put results
209  }// End of upgradeHBHE
210 
211  if(upgradeHF_){
212 
214  e.getByToken(tok_hfUp_, digi);
215 
216  // create empty output
217  std::auto_ptr<HFRecHitCollection> rec(new HFRecHitCollection);
218  rec->reserve(digi->size());
219 
220  // run the algorithm
221  int first = firstSample_;
222  int toadd = samplesToAdd_;
224  for (i=digi->begin(); i!=digi->end(); i++) {
225  HcalDetId cell = i->id();
226  DetId detcell=(DetId)cell;
227  // rof 27.03.09: drop ZS marked and passed digis:
229  if (i->zsMarkAndPass()) continue;
230 
231  const HcalCalibrations& calibrations=conditions->getHcalCalibrations(cell);
232  const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell);
233  const HcalQIEShape* shape = conditions->getHcalShape (channelCoder);
234  HcalCoderDb coder (*channelCoder, *shape);
235 
236  //>>> firstSample & samplesToAdd
237  if(tsFromDB_) {
238  const HcalRecoParam* param_ts = paramTS->getValues(detcell.rawId());
239  first = param_ts->firstSample();
240  toadd = param_ts->samplesToAdd();
241  }
242  rec->push_back(reco_.reconstructHFUpgrade(*i,first,toadd,coder,calibrations));
243 
244  }
245  e.put(rec); // put results
246  }// End of upgradeHF
247 
248  if(HFQIE10_){
249 
251  e.getByToken(tok_hfQIE10_, digi);
252 
253  // create empty output
254  std::auto_ptr<HFRecHitCollection> rec(new HFRecHitCollection);
255  rec->reserve(digi->size());
256 
257  // run the algorithm
258  int first = firstSample_;
259  int toadd = samplesToAdd_;
260  for (QIE10DigiCollection::const_iterator i=digi->begin(); i!=digi->end(); i++) {
261  HcalDetId cell = i->id();
262  DetId detcell=(DetId)cell;
263 
264  //make dataframe
265  QIE10DataFrame frame(*i);
266 
267  // rof 27.03.09: drop ZS marked and passed digis:
268  if (dropZSmarkedPassed_){
269  if (frame.zsMarkAndPass()) continue;
270  }
271 
272  const HcalCalibrations& calibrations=conditions->getHcalCalibrations(cell);
273  const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell);
274  const HcalQIEShape* shape = conditions->getHcalShape (channelCoder);
275  HcalCoderDb coder (*channelCoder, *shape);
276 
277  //>>> firstSample & samplesToAdd
278  if(tsFromDB_) {
279  const HcalRecoParam* param_ts = paramTS->getValues(detcell.rawId());
280  first = param_ts->firstSample();
281  toadd = param_ts->samplesToAdd();
282  }
283  rec->push_back(reco_.reconstructQIE10(frame,first,toadd,coder,calibrations));
284 
285  }
286  e.put(rec); // put results
287  }// End of upgradeHF
288 
289 }
unsigned int firstSample() const
Definition: HcalRecoParam.h:32
int i
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< HBHEUpgradeDigiCollection > tok_hbheUp_
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
edm::EDGetTokenT< QIE10DigiCollection > tok_hfQIE10_
std::vector< HcalUpgradeDataFrame >::const_iterator const_iterator
const Item * getValues(DetId fId, bool throwOnFail=true) const
edm::EDGetTokenT< HFUpgradeDigiCollection > tok_hfUp_
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:121
HFRecHit reconstructHFUpgrade(const HcalUpgradeDataFrame &digi, int first, int toadd, const HcalCoder &coder, const HcalCalibrations &calibs) const
unsigned int samplesToAdd() const
Definition: HcalRecoParam.h:33
Definition: DetId.h:18
HFRecHit reconstructQIE10(const QIE10DataFrame &digi, int first, int toadd, const HcalCoder &coder, const HcalCalibrations &calibs) const
HBHERecHit reconstructHBHEUpgrade(const HcalUpgradeDataFrame &digi, int first, int toadd, const HcalCoder &coder, const HcalCalibrations &calibs) const
void HcalSimpleReconstructor::produce ( edm::Event e,
const edm::EventSetup c 
)
finaloverridevirtual

Implements edm::stream::EDProducerBase.

Definition at line 293 of file HcalSimpleReconstructor.cc.

References det_, alignCSCRings::e, DetId::Hcal, HcalBarrel, HcalCalibration, HcalEndcap, HcalForward, HcalOther, HcalOuter, HFQIE10_, edm::EventBase::isRealData(), processUpgrade(), reco_, edm::Event::run(), HcalSimpleRecAlgo::setForData(), subdet_, subdetOther_, tok_calib_, tok_hbhe_, tok_hf_, tok_ho_, upgradeHBHE_, and upgradeHF_.

294 {
295  // HACK related to HB- corrections
296  if(e.isRealData()) reco_.setForData(e.run());
297 
298  // What to produce, better to avoid the same subdet Upgrade and regular
299  // rechits "clashes"
300  if(upgradeHBHE_ || upgradeHF_ || HFQIE10_) {
301  processUpgrade(e, eventSetup);
302  } else if (det_==DetId::Hcal) {
304  process<HBHEDigiCollection, HBHERecHitCollection>(e, eventSetup, tok_hbhe_);
305  } else if (subdet_==HcalForward && !upgradeHF_) {
306  process<HFDigiCollection, HFRecHitCollection>(e, eventSetup, tok_hf_);
307  } else if (subdet_==HcalOuter) {
308  process<HODigiCollection, HORecHitCollection>(e, eventSetup, tok_ho_);
309  } else if (subdet_==HcalOther && subdetOther_==HcalCalibration) {
310  process<HcalCalibDigiCollection, HcalCalibRecHitCollection>(e, eventSetup, tok_calib_);
311  }
312  }
313 }
bool isRealData() const
Definition: EventBase.h:63
HcalOtherSubdetector subdetOther_
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_
RunNumber_t run() const
Definition: Event.h:93
edm::EDGetTokenT< HFDigiCollection > tok_hf_
edm::EDGetTokenT< HODigiCollection > tok_ho_
void setForData(int runnum)
void processUpgrade(edm::Event &e, const edm::EventSetup &c)
edm::EDGetTokenT< HcalCalibDigiCollection > tok_calib_

Member Data Documentation

DetId::Detector HcalSimpleReconstructor::det_
private

Definition at line 40 of file HcalSimpleReconstructor.h.

Referenced by produce().

bool HcalSimpleReconstructor::dropZSmarkedPassed_
private

Definition at line 53 of file HcalSimpleReconstructor.h.

Referenced by process(), and processUpgrade().

int HcalSimpleReconstructor::firstSample_
private

Definition at line 57 of file HcalSimpleReconstructor.h.

Referenced by process(), and processUpgrade().

bool HcalSimpleReconstructor::HFQIE10_
private

Definition at line 62 of file HcalSimpleReconstructor.h.

Referenced by HcalSimpleReconstructor(), processUpgrade(), and produce().

edm::InputTag HcalSimpleReconstructor::inputLabel_
private

Definition at line 43 of file HcalSimpleReconstructor.h.

Referenced by HcalSimpleReconstructor().

HcalRecoParams* HcalSimpleReconstructor::paramTS
private
HcalSimpleRecAlgo HcalSimpleReconstructor::reco_
private
int HcalSimpleReconstructor::samplesToAdd_
private

Definition at line 58 of file HcalSimpleReconstructor.h.

Referenced by process(), and processUpgrade().

int HcalSimpleReconstructor::subdet_
private

Definition at line 41 of file HcalSimpleReconstructor.h.

Referenced by HcalSimpleReconstructor(), and produce().

HcalOtherSubdetector HcalSimpleReconstructor::subdetOther_
private

Definition at line 42 of file HcalSimpleReconstructor.h.

Referenced by produce().

HcalTopology* HcalSimpleReconstructor::theTopology
private

Definition at line 65 of file HcalSimpleReconstructor.h.

Referenced by beginRun(), and ~HcalSimpleReconstructor().

edm::EDGetTokenT<HcalCalibDigiCollection> HcalSimpleReconstructor::tok_calib_
private

Definition at line 51 of file HcalSimpleReconstructor.h.

Referenced by HcalSimpleReconstructor(), and produce().

edm::EDGetTokenT<HBHEDigiCollection> HcalSimpleReconstructor::tok_hbhe_
private

Definition at line 48 of file HcalSimpleReconstructor.h.

Referenced by HcalSimpleReconstructor(), and produce().

edm::EDGetTokenT<HBHEUpgradeDigiCollection> HcalSimpleReconstructor::tok_hbheUp_
private

Definition at line 45 of file HcalSimpleReconstructor.h.

Referenced by HcalSimpleReconstructor(), and processUpgrade().

edm::EDGetTokenT<HFDigiCollection> HcalSimpleReconstructor::tok_hf_
private

Definition at line 49 of file HcalSimpleReconstructor.h.

Referenced by HcalSimpleReconstructor(), and produce().

edm::EDGetTokenT<QIE10DigiCollection> HcalSimpleReconstructor::tok_hfQIE10_
private

Definition at line 47 of file HcalSimpleReconstructor.h.

Referenced by HcalSimpleReconstructor(), and processUpgrade().

edm::EDGetTokenT<HFUpgradeDigiCollection> HcalSimpleReconstructor::tok_hfUp_
private

Definition at line 46 of file HcalSimpleReconstructor.h.

Referenced by HcalSimpleReconstructor(), and processUpgrade().

edm::EDGetTokenT<HODigiCollection> HcalSimpleReconstructor::tok_ho_
private

Definition at line 50 of file HcalSimpleReconstructor.h.

Referenced by HcalSimpleReconstructor(), and produce().

bool HcalSimpleReconstructor::tsFromDB_
private

Definition at line 59 of file HcalSimpleReconstructor.h.

Referenced by beginRun(), endRun(), process(), and processUpgrade().

bool HcalSimpleReconstructor::upgradeHBHE_
private

Definition at line 60 of file HcalSimpleReconstructor.h.

Referenced by HcalSimpleReconstructor(), processUpgrade(), and produce().

bool HcalSimpleReconstructor::upgradeHF_
private

Definition at line 61 of file HcalSimpleReconstructor.h.

Referenced by HcalSimpleReconstructor(), processUpgrade(), and produce().