CMS 3D CMS Logo

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

#include <ZdcSimpleReconstructor.h>

Inheritance diagram for ZdcSimpleReconstructor:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

virtual void produce (edm::Event &e, const edm::EventSetup &c)
 
 ZdcSimpleReconstructor (const edm::ParameterSet &ps)
 
virtual ~ZdcSimpleReconstructor ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Attributes

DetId::Detector det_
 
bool dropZSmarkedPassed_
 
edm::InputTag inputLabel_
 
ZdcSimpleRecAlgo reco_
 
int subdet_
 
HcalOtherSubdetector subdetOther_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

Definition at line 21 of file ZdcSimpleReconstructor.h.

Constructor & Destructor Documentation

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

Definition at line 18 of file ZdcSimpleReconstructor.cc.

References DetId::Calo, gather_cfg::cout, det_, edm::ParameterSet::getParameter(), HcalCalibration, HcalOther, subdet_, HcalZDCDetId::SubdetectorId, and subdetOther_.

18  :
19  reco_(conf.getParameter<int>("firstSample"),conf.getParameter<int>("samplesToAdd"),conf.getParameter<bool>("correctForTimeslew"),
20  conf.getParameter<bool>("correctForPhaseContainment"),conf.getParameter<double>("correctionPhaseNS"),
21  conf.getParameter<int>("recoMethod")),
23  inputLabel_(conf.getParameter<edm::InputTag>("digiLabel")),
24  dropZSmarkedPassed_(conf.getParameter<bool>("dropZSmarkedPassed"))
25 {
26  std::string subd=conf.getParameter<std::string>("Subdetector");
27  if (!strcasecmp(subd.c_str(),"ZDC")) {
30  produces<ZDCRecHitCollection>();
31  } else if (!strcasecmp(subd.c_str(),"CALIB")) {
34  produces<HcalCalibRecHitCollection>();
35  } else {
36  std::cout << "ZdcSimpleReconstructor is not associated with a specific subdetector!" << std::endl;
37  }
38 
39 }
HcalOtherSubdetector subdetOther_
tuple conf
Definition: dbtoconf.py:185
static const int SubdetectorId
Definition: HcalZDCDetId.h:22
tuple cout
Definition: gather_cfg.py:41
ZdcSimpleReconstructor::~ZdcSimpleReconstructor ( )
virtual

Definition at line 41 of file ZdcSimpleReconstructor.cc.

41  {
42 }

Member Function Documentation

void ZdcSimpleReconstructor::produce ( edm::Event e,
const edm::EventSetup c 
)
virtual

Implements edm::EDProducer.

Definition at line 44 of file ZdcSimpleReconstructor.cc.

References DetId::Calo, det_, dropZSmarkedPassed_, edm::EventSetup::get(), edm::Event::getByLabel(), i, inputLabel_, edm::Event::put(), reco_, ZdcSimpleRecAlgo::reconstruct(), subdet_, and HcalZDCDetId::SubdetectorId.

45 {
46  // get conditions
48  eventSetup.get<HcalDbRecord>().get(conditions);
49  const HcalQIEShape* shape = conditions->getHcalShape (); // this one is generic
50 
53  e.getByLabel(inputLabel_,digi);
54 
55  // create empty output
56  std::auto_ptr<ZDCRecHitCollection> rec(new ZDCRecHitCollection);
57  rec->reserve(digi->size());
58  // run the algorithm
60  for (i=digi->begin(); i!=digi->end(); i++) {
61  HcalZDCDetId cell = i->id();
62  // rof 27.03.09: drop ZS marked and passed digis:
64  if (i->zsMarkAndPass()) continue;
65 
66  const HcalCalibrations& calibrations=conditions->getHcalCalibrations(cell);
67  const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell);
68  HcalCoderDb coder (*channelCoder, *shape);
69  rec->push_back(reco_.reconstruct(*i,coder,calibrations));
70  }
71  // return result
72  e.put(rec);
73  }
74 }
int i
Definition: DBlmapReader.cc:9
std::vector< T >::const_iterator const_iterator
ZDCRecHit reconstruct(const ZDCDataFrame &digi, const HcalCoder &coder, const HcalCalibrations &calibs) const
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:84
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:359
static const int SubdetectorId
Definition: HcalZDCDetId.h:22

Member Data Documentation

DetId::Detector ZdcSimpleReconstructor::det_
private

Definition at line 28 of file ZdcSimpleReconstructor.h.

Referenced by produce(), and ZdcSimpleReconstructor().

bool ZdcSimpleReconstructor::dropZSmarkedPassed_
private

Definition at line 33 of file ZdcSimpleReconstructor.h.

Referenced by produce().

edm::InputTag ZdcSimpleReconstructor::inputLabel_
private

Definition at line 31 of file ZdcSimpleReconstructor.h.

Referenced by produce().

ZdcSimpleRecAlgo ZdcSimpleReconstructor::reco_
private

Definition at line 27 of file ZdcSimpleReconstructor.h.

Referenced by produce().

int ZdcSimpleReconstructor::subdet_
private

Definition at line 29 of file ZdcSimpleReconstructor.h.

Referenced by produce(), and ZdcSimpleReconstructor().

HcalOtherSubdetector ZdcSimpleReconstructor::subdetOther_
private

Definition at line 30 of file ZdcSimpleReconstructor.h.

Referenced by ZdcSimpleReconstructor().