#include <ZdcSimpleReconstructor.h>
Public Member Functions | |
virtual void | produce (edm::Event &e, const edm::EventSetup &c) |
ZdcSimpleReconstructor (const edm::ParameterSet &ps) | |
virtual | ~ZdcSimpleReconstructor () |
Private Attributes | |
DetId::Detector | det_ |
bool | dropZSmarkedPassed_ |
edm::InputTag | inputLabel_ |
ZdcSimpleRecAlgo | reco_ |
int | subdet_ |
HcalOtherSubdetector | subdetOther_ |
Definition at line 21 of file ZdcSimpleReconstructor.h.
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_.
: reco_(conf.getParameter<int>("firstSample"),conf.getParameter<int>("samplesToAdd"),conf.getParameter<bool>("correctForTimeslew"), conf.getParameter<bool>("correctForPhaseContainment"),conf.getParameter<double>("correctionPhaseNS"), conf.getParameter<int>("recoMethod")), det_(DetId::Hcal), inputLabel_(conf.getParameter<edm::InputTag>("digiLabel")), dropZSmarkedPassed_(conf.getParameter<bool>("dropZSmarkedPassed")) { std::string subd=conf.getParameter<std::string>("Subdetector"); if (!strcasecmp(subd.c_str(),"ZDC")) { det_=DetId::Calo; subdet_=HcalZDCDetId::SubdetectorId; produces<ZDCRecHitCollection>(); } else if (!strcasecmp(subd.c_str(),"CALIB")) { subdet_=HcalOther; subdetOther_=HcalCalibration; produces<HcalCalibRecHitCollection>(); } else { std::cout << "ZdcSimpleReconstructor is not associated with a specific subdetector!" << std::endl; } }
ZdcSimpleReconstructor::~ZdcSimpleReconstructor | ( | ) | [virtual] |
Definition at line 41 of file ZdcSimpleReconstructor.cc.
{ }
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.
{ // get conditions edm::ESHandle<HcalDbService> conditions; eventSetup.get<HcalDbRecord>().get(conditions); const HcalQIEShape* shape = conditions->getHcalShape (); // this one is generic if (det_==DetId::Calo && subdet_==HcalZDCDetId::SubdetectorId) { edm::Handle<ZDCDigiCollection> digi; e.getByLabel(inputLabel_,digi); // create empty output std::auto_ptr<ZDCRecHitCollection> rec(new ZDCRecHitCollection); rec->reserve(digi->size()); // run the algorithm ZDCDigiCollection::const_iterator i; for (i=digi->begin(); i!=digi->end(); i++) { HcalZDCDetId cell = i->id(); // rof 27.03.09: drop ZS marked and passed digis: if (dropZSmarkedPassed_) if (i->zsMarkAndPass()) continue; const HcalCalibrations& calibrations=conditions->getHcalCalibrations(cell); const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell); HcalCoderDb coder (*channelCoder, *shape); rec->push_back(reco_.reconstruct(*i,coder,calibrations)); } // return result e.put(rec); } }
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().
Definition at line 31 of file ZdcSimpleReconstructor.h.
Referenced by produce().
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().
Definition at line 30 of file ZdcSimpleReconstructor.h.
Referenced by ZdcSimpleReconstructor().