![]() |
![]() |
#include <ZdcHitReconstructor.h>
Public Member Functions | |
virtual void | produce (edm::Event &e, const edm::EventSetup &c) |
ZdcHitReconstructor (const edm::ParameterSet &ps) | |
virtual | ~ZdcHitReconstructor () |
Private Attributes | |
bool | correctTiming_ |
DetId::Detector | det_ |
bool | dropZSmarkedPassed_ |
HBHEStatusBitSetter * | hbheFlagSetter_ |
HBHETimeProfileStatusBitSetter * | hbheHSCPFlagSetter_ |
HBHETimingShapedFlagSetter * | hbheTimingShapedFlagSetter_ |
HcalHFStatusBitFromDigis * | hfdigibit_ |
HcalHFStatusBitFromRecHits * | hfrechitbit_ |
HFTimingTrustFlag * | HFTimingTrustFlagSetter_ |
edm::InputTag | inputLabel_ |
ZdcSimpleRecAlgo | reco_ |
HcalADCSaturationFlag * | saturationFlagSetter_ |
bool | setHSCPFlags_ |
bool | setNoiseFlags_ |
bool | setSaturationFlags_ |
bool | setTimingTrustFlags_ |
int | subdet_ |
HcalOtherSubdetector | subdetOther_ |
ZdcHitReconstructor::ZdcHitReconstructor | ( | const edm::ParameterSet & | ps | ) | [explicit] |
Definition at line 21 of file ZdcHitReconstructor.cc.
References DetId::Calo, gather_cfg::cout, det_, edm::ParameterSet::getParameter(), HcalCalibration, HcalOther, saturationFlagSetter_, setSaturationFlags_, 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")), correctTiming_(conf.getParameter<bool>("correctTiming")), setNoiseFlags_(conf.getParameter<bool>("setNoiseFlags")), setHSCPFlags_(conf.getParameter<bool>("setHSCPFlags")), setSaturationFlags_(conf.getParameter<bool>("setSaturationFlags")), setTimingTrustFlags_(conf.getParameter<bool>("setTimingTrustFlags")), dropZSmarkedPassed_(conf.getParameter<bool>("dropZSmarkedPassed")) { std::string subd=conf.getParameter<std::string>("Subdetector"); if (setSaturationFlags_) { const edm::ParameterSet& pssat = conf.getParameter<edm::ParameterSet>("saturationParameters"); saturationFlagSetter_ = new HcalADCSaturationFlag(pssat.getParameter<int>("maxADCvalue")); } 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 << "ZdcHitReconstructor is not associated with a specific subdetector!" << std::endl; } }
ZdcHitReconstructor::~ZdcHitReconstructor | ( | ) | [virtual] |
Definition at line 59 of file ZdcHitReconstructor.cc.
{; }
void ZdcHitReconstructor::produce | ( | edm::Event & | e, |
const edm::EventSetup & | c | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 62 of file ZdcHitReconstructor.cc.
References DetId::Calo, det_, HcalSeverityLevelComputer::dropChannel(), dropZSmarkedPassed_, edm::EventSetup::get(), edm::Event::getByLabel(), HcalChannelStatus::getValue(), HcalCondObjectContainer< Item >::getValues(), i, inputLabel_, L1TEmulatorMonitor_cff::p, edm::ESHandle< T >::product(), edm::Event::put(), DetId::rawId(), reco_, ZdcSimpleRecAlgo::reconstruct(), saturationFlagSetter_, HcalADCSaturationFlag::setSaturationFlag(), setSaturationFlags_, subdet_, and HcalZDCDetId::SubdetectorId.
{ // get conditions edm::ESHandle<HcalDbService> conditions; eventSetup.get<HcalDbRecord>().get(conditions); const HcalQIEShape* shape = conditions->getHcalShape (); // this one is generic edm::ESHandle<HcalChannelQuality> p; eventSetup.get<HcalChannelQualityRcd>().get(p); HcalChannelQuality* myqual = new HcalChannelQuality(*p.product()); edm::ESHandle<HcalSeverityLevelComputer> mycomputer; eventSetup.get<HcalSeverityLevelComputerRcd>().get(mycomputer); const HcalSeverityLevelComputer* mySeverity = mycomputer.product(); 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(); DetId detcell=(DetId)cell; // check on cells to be ignored and dropped: (rof,20.Feb.09) const HcalChannelStatus* mydigistatus=myqual->getValues(detcell.rawId()); if (mySeverity->dropChannel(mydigistatus->getValue() ) ) continue; 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)); (rec->back()).setFlags(0); if (setSaturationFlags_) saturationFlagSetter_->setSaturationFlag(rec->back(),*i); } // return result e.put(rec); } // else if (det_==DetId::Calo...) delete myqual; } // void HcalHitReconstructor::produce(...)
bool ZdcHitReconstructor::correctTiming_ [private] |
Definition at line 52 of file ZdcHitReconstructor.h.
DetId::Detector ZdcHitReconstructor::det_ [private] |
Definition at line 47 of file ZdcHitReconstructor.h.
Referenced by produce(), and ZdcHitReconstructor().
bool ZdcHitReconstructor::dropZSmarkedPassed_ [private] |
Definition at line 58 of file ZdcHitReconstructor.h.
Referenced by produce().
Definition at line 41 of file ZdcHitReconstructor.h.
Definition at line 42 of file ZdcHitReconstructor.h.
Definition at line 43 of file ZdcHitReconstructor.h.
Definition at line 45 of file ZdcHitReconstructor.h.
Definition at line 44 of file ZdcHitReconstructor.h.
Definition at line 40 of file ZdcHitReconstructor.h.
Definition at line 50 of file ZdcHitReconstructor.h.
Referenced by produce().
ZdcSimpleRecAlgo ZdcHitReconstructor::reco_ [private] |
Definition at line 38 of file ZdcHitReconstructor.h.
Referenced by produce().
Definition at line 39 of file ZdcHitReconstructor.h.
Referenced by produce(), and ZdcHitReconstructor().
bool ZdcHitReconstructor::setHSCPFlags_ [private] |
Definition at line 54 of file ZdcHitReconstructor.h.
bool ZdcHitReconstructor::setNoiseFlags_ [private] |
Definition at line 53 of file ZdcHitReconstructor.h.
bool ZdcHitReconstructor::setSaturationFlags_ [private] |
Definition at line 55 of file ZdcHitReconstructor.h.
Referenced by produce(), and ZdcHitReconstructor().
bool ZdcHitReconstructor::setTimingTrustFlags_ [private] |
Definition at line 56 of file ZdcHitReconstructor.h.
int ZdcHitReconstructor::subdet_ [private] |
Definition at line 48 of file ZdcHitReconstructor.h.
Referenced by produce(), and ZdcHitReconstructor().
Definition at line 49 of file ZdcHitReconstructor.h.
Referenced by ZdcHitReconstructor().