#include <HcalNoiseInfoProducer.h>
Definition at line 38 of file HcalNoiseInfoProducer.h.
HcalNoiseInfoProducer::HcalNoiseInfoProducer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 33 of file HcalNoiseInfoProducer.cc.
References caloTowerCollName_, digiCollName_, fillCaloTowers_, fillDigis_, fillRecHits_, fillTracks_, edm::ParameterSet::getParameter(), HcalAcceptSeverityLevel_, maxCaloTowerIEta_, maxProblemRBXs_, maxTrackEta_, minHighHitE_, minLowHitE_, minRecHitE_, minTrackPt_, recHitCollName_, and trackCollName_.
: algo_(iConfig) { // set the parameters fillDigis_ = iConfig.getParameter<bool>("fillDigis"); fillRecHits_ = iConfig.getParameter<bool>("fillRecHits"); fillCaloTowers_ = iConfig.getParameter<bool>("fillCaloTowers"); fillTracks_ = iConfig.getParameter<bool>("fillTracks"); maxProblemRBXs_ = iConfig.getParameter<int>("maxProblemRBXs"); maxCaloTowerIEta_ = iConfig.getParameter<int>("maxCaloTowerIEta"); maxTrackEta_ = iConfig.getParameter<double>("maxTrackEta"); minTrackPt_ = iConfig.getParameter<double>("minTrackPt"); digiCollName_ = iConfig.getParameter<std::string>("digiCollName"); recHitCollName_ = iConfig.getParameter<std::string>("recHitCollName"); caloTowerCollName_ = iConfig.getParameter<std::string>("caloTowerCollName"); trackCollName_ = iConfig.getParameter<std::string>("trackCollName"); minRecHitE_ = iConfig.getParameter<double>("minRecHitE"); minLowHitE_ = iConfig.getParameter<double>("minLowHitE"); minHighHitE_ = iConfig.getParameter<double>("minHighHitE"); HcalAcceptSeverityLevel_ = iConfig.getParameter<uint32_t>("HcalAcceptSeverityLevel"); // if digis are filled, then rechits must also be filled if(fillDigis_ && !fillRecHits_) { fillRecHits_=true; edm::LogWarning("HCalNoiseInfoProducer") << " forcing fillRecHits to be true if fillDigis is true.\n"; } // we produce a vector of HcalNoiseRBXs produces<HcalNoiseRBXCollection>(); // we also produce a noise summary produces<HcalNoiseSummary>(); }
HcalNoiseInfoProducer::~HcalNoiseInfoProducer | ( | ) |
Definition at line 71 of file HcalNoiseInfoProducer.cc.
{ }
void HcalNoiseInfoProducer::beginJob | ( | void | ) | [private, virtual] |
Reimplemented from edm::EDProducer.
Definition at line 148 of file HcalNoiseInfoProducer.cc.
{
return;
}
void HcalNoiseInfoProducer::beginRun | ( | edm::Run & | , |
const edm::EventSetup & | |||
) | [private, virtual] |
Reimplemented from edm::EDProducer.
Definition at line 164 of file HcalNoiseInfoProducer.cc.
{
return;
}
void HcalNoiseInfoProducer::endJob | ( | void | ) | [private, virtual] |
Reimplemented from edm::EDProducer.
Definition at line 155 of file HcalNoiseInfoProducer.cc.
{
return;
}
void HcalNoiseInfoProducer::endRun | ( | edm::Run & | , |
const edm::EventSetup & | |||
) | [private, virtual] |
Reimplemented from edm::EDProducer.
Definition at line 171 of file HcalNoiseInfoProducer.cc.
{
return;
}
void HcalNoiseInfoProducer::fillcalotwrs | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup, | ||
HcalNoiseRBXArray & | array, | ||
HcalNoiseSummary & | summary | ||
) | const [private] |
Definition at line 430 of file HcalNoiseInfoProducer.cc.
References caloTowerCollName_, CaloTower::emEnergy(), HcalNoiseSummary::emenergy_, Exception, reco::HcalNoiseRBXArray::findHPD(), edm::Event::getByLabel(), CaloTower::hadEnergy(), HcalNoiseSummary::hadenergy_, patZpeak::handle, CaloTower::ietaAbs(), edm::HandleBase::isValid(), maxCaloTowerIEta_, and edm::errors::ProductNotFound.
Referenced by produce().
{ // get the calotowers edm::Handle<CaloTowerCollection> handle; iEvent.getByLabel(caloTowerCollName_, handle); if(!handle.isValid()) { throw edm::Exception(edm::errors::ProductNotFound) << " could not find CaloTowerCollection named " << caloTowerCollName_ << "\n."; return; } summary.emenergy_ = summary.hadenergy_ = 0.0; // loop over all of the calotower information for(CaloTowerCollection::const_iterator it = handle->begin(); it!=handle->end(); ++it) { const CaloTower& twr=(*it); // create a persistent reference to the tower edm::Ref<CaloTowerCollection> myRef(handle, it-handle->begin()); // get all of the hpd's that are pointed to by the calotower std::vector<std::vector<HcalNoiseHPD>::iterator> hpditervec; array.findHPD(twr, hpditervec); // loop over the hpd's and add the reference to the RefVectors for(std::vector<std::vector<HcalNoiseHPD>::iterator>::iterator it=hpditervec.begin(); it!=hpditervec.end(); ++it) (*it)->calotowers_.push_back(myRef); // skip over anything with |ieta|>maxCaloTowerIEta if(twr.ietaAbs()>maxCaloTowerIEta_) { summary.emenergy_ += twr.emEnergy(); summary.hadenergy_ += twr.hadEnergy(); } } return; }
void HcalNoiseInfoProducer::filldigis | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup, | ||
HcalNoiseRBXArray & | array | ||
) | const [private] |
Definition at line 265 of file HcalNoiseInfoProducer.cc.
References ecalMGPA::adc(), HcalCoderDb::adc2fC(), reco::HcalNoiseRBX::allCharge_, edm::RefVector< C, T, F >::begin(), reco::HcalNoiseHPD::big5Charge_, reco::HcalNoiseHPD::bigCharge_, cmsDriverOptions::counter, digiCollName_, HcalSeverityLevelComputer::dropChannel(), edm::RefVector< C, T, F >::end(), Exception, reco::HcalNoiseRBXArray::findHPD(), reco::HcalNoiseRBXArray::findRBX(), edm::EventSetup::get(), edm::Event::getByLabel(), HcalChannelStatus::getValue(), HcalCondObjectContainer< Item >::getValues(), patZpeak::handle, HBHEDataFrame::id(), edm::HandleBase::isValid(), reco::HcalNoiseHPD::maxZeros_, HcalCalibrations::pedestal(), edm::ESHandle< T >::product(), edm::errors::ProductNotFound, DetId::rawId(), reco::HcalNoiseHPD::rechits_, CaloSamples::size(), reco::HcalNoiseHPD::totalZeros_, and HBHEDataFrame::zsMarkAndPass().
Referenced by produce().
{ // get the conditions and channel quality edm::ESHandle<HcalDbService> conditions; iSetup.get<HcalDbRecord>().get(conditions); const HcalQIEShape* shape = conditions->getHcalShape(); edm::ESHandle<HcalChannelQuality> qualhandle; iSetup.get<HcalChannelQualityRcd>().get(qualhandle); const HcalChannelQuality* myqual = qualhandle.product(); edm::ESHandle<HcalSeverityLevelComputer> mycomputer; iSetup.get<HcalSeverityLevelComputerRcd>().get(mycomputer); const HcalSeverityLevelComputer* mySeverity = mycomputer.product(); // get the digis edm::Handle<HBHEDigiCollection> handle; iEvent.getByLabel(digiCollName_, handle); if(!handle.isValid()) { throw edm::Exception(edm::errors::ProductNotFound) << " could not find HBHEDigiCollection named " << digiCollName_ << "\n."; return; } // loop over all of the digi information for(HBHEDigiCollection::const_iterator it=handle->begin(); it!=handle->end(); ++it) { const HBHEDataFrame &digi=(*it); HcalDetId cell = digi.id(); DetId detcell=(DetId)cell; // check on cells to be ignored and dropped const HcalChannelStatus* mydigistatus=myqual->getValues(detcell.rawId()); if(mySeverity->dropChannel(mydigistatus->getValue())) continue; if(digi.zsMarkAndPass()) continue; // get the calibrations and coder const HcalCalibrations& calibrations=conditions->getHcalCalibrations(cell); const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell); HcalCoderDb coder (*channelCoder, *shape); // match the digi to an rbx and hpd HcalNoiseRBX &rbx=(*array.findRBX(digi)); HcalNoiseHPD &hpd=(*array.findHPD(digi)); // determine if the digi is one the highest energy hits in the HPD // this works because the rechits are sorted by energy (see fillrechits() below) bool isBig=false, isBig5=false, isRBX=false; int counter=0; edm::RefVector<HBHERecHitCollection> &rechits=hpd.rechits_; for(edm::RefVector<HBHERecHitCollection>::const_iterator rit=rechits.begin(); rit!=rechits.end(); ++rit, ++counter) { if((*rit)->id() == digi.id()) { if(counter==0) isBig=isBig5=true; // digi is also the highest energy rechit if(counter<5) isBig5=true; // digi is one of 5 highest energy rechits isRBX=true; } } // loop over each of the digi's time slices int totalzeros=0; CaloSamples tool; coder.adc2fC(digi,tool); for(int ts=0; ts<tool.size(); ++ts) { // count zero's if(digi[ts].adc()==0) { ++hpd.totalZeros_; ++totalzeros; } // get the fC's double corrfc = tool[ts]-calibrations.pedestal(digi[ts].capid()); // fill the relevant digi arrays if(isBig) hpd.bigCharge_[ts]+=corrfc; if(isBig5) hpd.big5Charge_[ts]+=corrfc; if(isRBX) rbx.allCharge_[ts]+=corrfc; } // record the maximum number of zero's found if(totalzeros>hpd.maxZeros_) hpd.maxZeros_=totalzeros; } return; }
void HcalNoiseInfoProducer::fillOtherSummaryVariables | ( | HcalNoiseSummary & | summary, |
const CommonHcalNoiseRBXData & | data | ||
) | const [private] |
Definition at line 178 of file HcalNoiseInfoProducer.cc.
References algo_, HcalNoiseSummary::cnthit10_, HcalNoiseSummary::cnthit25_, CommonHcalNoiseRBXData::e10ts(), CommonHcalNoiseRBXData::e2ts(), HcalNoiseSummary::filterstatus_, CommonHcalNoiseRBXData::highEHitTimeSqrd(), HcalNoiseSummary::hlnoisetwrs_, CommonHcalNoiseRBXData::HPDEMF(), join(), HcalNoiseSummary::loosenoisetwrs_, CommonHcalNoiseRBXData::lowEHitTimeSqrd(), HcalNoiseSummary::max10_, HcalNoiseSummary::max10GeVHitTime(), HcalNoiseSummary::max25_, HcalNoiseSummary::max25GeVHitTime(), HcalNoiseSummary::maxe10ts_, HcalNoiseSummary::maxE2Over10TS(), HcalNoiseSummary::maxe2ts_, CommonHcalNoiseRBXData::maxHighEHitTime(), HcalNoiseSummary::maxHPDHits(), HcalNoiseSummary::maxhpdhits_, HcalNoiseSummary::maxhpdhitsnoother_, HcalNoiseSummary::maxHPDNoOtherHits(), CommonHcalNoiseRBXData::maxLowEHitTime(), HcalNoiseSummary::maxRBXHits(), HcalNoiseSummary::maxrbxhits_, HcalNoiseSummary::maxZeros(), HcalNoiseSummary::maxzeros_, HcalNoiseSummary::min10_, HcalNoiseSummary::min10GeVHitTime(), HcalNoiseSummary::min25_, HcalNoiseSummary::min25GeVHitTime(), HcalNoiseSummary::mine10ts_, HcalNoiseSummary::minE2Over10TS(), HcalNoiseSummary::mine2ts_, CommonHcalNoiseRBXData::minHighEHitTime(), HcalNoiseSummary::minHPDEMF(), HcalNoiseSummary::minhpdemf_, CommonHcalNoiseRBXData::minLowEHitTime(), HcalNoiseSummary::minRBXEMF(), HcalNoiseSummary::minrbxemf_, CommonHcalNoiseRBXData::numHighEHits(), CommonHcalNoiseRBXData::numHPDHits(), CommonHcalNoiseRBXData::numHPDNoOtherHits(), CommonHcalNoiseRBXData::numLowEHits(), CommonHcalNoiseRBXData::numRBXHits(), CommonHcalNoiseRBXData::numZeros(), HcalNoiseAlgo::passEMFThreshold(), HcalNoiseAlgo::passHighLevelNoiseFilter(), HcalNoiseAlgo::passLooseHits(), HcalNoiseAlgo::passLooseNoiseFilter(), HcalNoiseAlgo::passLooseRatio(), HcalNoiseAlgo::passLooseTiming(), HcalNoiseAlgo::passLooseZeros(), HcalNoiseAlgo::passRatioThreshold(), HcalNoiseAlgo::passTightHits(), HcalNoiseAlgo::passTightNoiseFilter(), HcalNoiseAlgo::passTightRatio(), HcalNoiseAlgo::passTightTiming(), HcalNoiseAlgo::passTightZeros(), HcalNoiseAlgo::passZerosThreshold(), CommonHcalNoiseRBXData::ratio(), CommonHcalNoiseRBXData::RBXEMF(), CommonHcalNoiseRBXData::rbxTowers(), HcalNoiseSummary::rms10_, HcalNoiseSummary::rms25_, HcalNoiseSummary::tightnoisetwrs_, and CommonHcalNoiseRBXData::validRatio().
Referenced by produce().
{ // charge ratio if(algo_.passRatioThreshold(data) && data.validRatio()) { if(data.ratio()<summary.minE2Over10TS()) { summary.mine2ts_ = data.e2ts(); summary.mine10ts_ = data.e10ts(); } if(data.ratio()>summary.maxE2Over10TS()) { summary.maxe2ts_ = data.e2ts(); summary.maxe10ts_ = data.e10ts(); } } // ADC zeros if(algo_.passZerosThreshold(data)) { if(data.numZeros()>summary.maxZeros()) { summary.maxzeros_ = data.numZeros(); } } // hits count if(data.numHPDHits() > summary.maxHPDHits()) { summary.maxhpdhits_ = data.numHPDHits(); } if(data.numRBXHits() > summary.maxRBXHits()) { summary.maxrbxhits_ = data.numRBXHits(); } if(data.numHPDNoOtherHits() > summary.maxHPDNoOtherHits()) { summary.maxhpdhitsnoother_ = data.numHPDNoOtherHits(); } // hit timing if(data.minLowEHitTime()<summary.min10GeVHitTime()) { summary.min10_ = data.minLowEHitTime(); } if(data.maxLowEHitTime()>summary.max10GeVHitTime()) { summary.max10_ = data.maxLowEHitTime(); } summary.rms10_ += data.lowEHitTimeSqrd(); summary.cnthit10_ += data.numLowEHits(); if(data.minHighEHitTime()<summary.min25GeVHitTime()) { summary.min25_ = data.minHighEHitTime(); } if(data.maxHighEHitTime()>summary.max25GeVHitTime()) { summary.max25_ = data.maxHighEHitTime(); } summary.rms25_ += data.highEHitTimeSqrd(); summary.cnthit25_ += data.numHighEHits(); // EMF if(algo_.passEMFThreshold(data)) { if(summary.minHPDEMF() > data.HPDEMF()) { summary.minhpdemf_ = data.HPDEMF(); } if(summary.minRBXEMF() > data.RBXEMF()) { summary.minrbxemf_ = data.RBXEMF(); } } // summary flag if(!algo_.passLooseRatio(data)) summary.filterstatus_ |= 0x1; if(!algo_.passLooseHits(data)) summary.filterstatus_ |= 0x2; if(!algo_.passLooseZeros(data)) summary.filterstatus_ |= 0x4; if(!algo_.passLooseTiming(data)) summary.filterstatus_ |= 0x8; if(!algo_.passTightRatio(data)) summary.filterstatus_ |= 0x100; if(!algo_.passTightHits(data)) summary.filterstatus_ |= 0x200; if(!algo_.passTightZeros(data)) summary.filterstatus_ |= 0x400; if(!algo_.passTightTiming(data)) summary.filterstatus_ |= 0x800; if(!algo_.passHighLevelNoiseFilter(data)) summary.filterstatus_ |= 0x10000; // summary refvectors JoinCaloTowerRefVectorsWithoutDuplicates join; if(!algo_.passLooseNoiseFilter(data)) join(summary.loosenoisetwrs_, data.rbxTowers()); if(!algo_.passTightNoiseFilter(data)) join(summary.tightnoisetwrs_, data.rbxTowers()); if(!algo_.passHighLevelNoiseFilter(data)) join(summary.hlnoisetwrs_, data.rbxTowers()); return; }
void HcalNoiseInfoProducer::fillrechits | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup, | ||
HcalNoiseRBXArray & | array, | ||
HcalNoiseSummary & | summary | ||
) | const [private] |
Definition at line 352 of file HcalNoiseInfoProducer.cc.
References CaloRecHit::detid(), CaloRecHit::energy(), ExpressReco_HICollisions_FallBack::et, Exception, reco::HcalNoiseRBXArray::findHPD(), CaloRecHit::flags(), edm::EventSetup::get(), edm::Event::getByLabel(), CaloGeometry::getPosition(), HcalSeverityLevelComputer::getSeverityLevel(), HcalChannelStatus::getValue(), HcalCondObjectContainer< Item >::getValues(), patZpeak::handle, HcalCaloFlagLabels::HBHEIsolatedNoise, HcalAcceptSeverityLevel_, HBHERecHit::id(), HcalNoiseSummary::isolnoisee_, HcalNoiseSummary::isolnoiseet_, edm::HandleBase::isValid(), HcalNoiseSummary::nisolnoise_, edm::ESHandle< T >::product(), edm::errors::ProductNotFound, recHitCollName_, HcalSeverityLevelComputer::recoveredRecHit(), and reco::HcalNoiseHPD::refrechitset_.
Referenced by produce().
{ // get the HCAL channel status map edm::ESHandle<HcalChannelQuality> hcalChStatus; iSetup.get<HcalChannelQualityRcd>().get( hcalChStatus ); const HcalChannelQuality* dbHcalChStatus = hcalChStatus.product(); // get the severity level computer edm::ESHandle<HcalSeverityLevelComputer> hcalSevLvlComputerHndl; iSetup.get<HcalSeverityLevelComputerRcd>().get(hcalSevLvlComputerHndl); const HcalSeverityLevelComputer* hcalSevLvlComputer = hcalSevLvlComputerHndl.product(); // get the calo geometry edm::ESHandle<CaloGeometry> pG; iSetup.get<CaloGeometryRecord>().get(pG); const CaloGeometry* geo = pG.product(); // get the rechits edm::Handle<HBHERecHitCollection> handle; iEvent.getByLabel(recHitCollName_, handle); if(!handle.isValid()) { throw edm::Exception(edm::errors::ProductNotFound) << " could not find HBHERecHitCollection named " << recHitCollName_ << "\n."; return; } // loop over all of the rechit information for(HBHERecHitCollection::const_iterator it=handle->begin(); it!=handle->end(); ++it) { const HBHERecHit &rechit=(*it); // skip bad rechits (other than those flagged by the isolated noise algorithm) const DetId id = rechit.detid(); uint32_t recHitFlag = rechit.flags(); uint32_t noisebitset = (1 << HcalCaloFlagLabels::HBHEIsolatedNoise); recHitFlag = (recHitFlag & noisebitset) ? recHitFlag-noisebitset : recHitFlag; const uint32_t dbStatusFlag = dbHcalChStatus->getValues(id)->getValue(); int severityLevel = hcalSevLvlComputer->getSeverityLevel(id, recHitFlag, dbStatusFlag); bool isRecovered = hcalSevLvlComputer->recoveredRecHit(id, recHitFlag); if(severityLevel!=0 && !isRecovered && severityLevel>static_cast<int>(HcalAcceptSeverityLevel_)) continue; // if it was ID'd as isolated noise, update the summary object if(rechit.flags() & noisebitset) { ++summary.nisolnoise_; summary.isolnoisee_ += rechit.energy(); GlobalPoint gp = geo->getPosition(rechit.id()); double et = rechit.energy()*gp.perp()/gp.mag(); summary.isolnoiseet_ += et; } // find the hpd that the rechit is in HcalNoiseHPD& hpd=(*array.findHPD(rechit)); // create a persistent reference to the rechit edm::Ref<HBHERecHitCollection> myRef(handle, it-handle->begin()); // store it in a place so that it remains sorted by energy hpd.refrechitset_.insert(myRef); } // end loop over rechits // loop over all HPDs and transfer the information from refrechitset_ to rechits_; for(HcalNoiseRBXArray::iterator rbxit=array.begin(); rbxit!=array.end(); ++rbxit) { for(std::vector<HcalNoiseHPD>::iterator hpdit=rbxit->hpds_.begin(); hpdit!=rbxit->hpds_.end(); ++hpdit) { // loop over all of the entries in the set and add them to rechits_ for(std::set<edm::Ref<HBHERecHitCollection>, RefHBHERecHitEnergyComparison>::const_iterator it=hpdit->refrechitset_.begin(); it!=hpdit->refrechitset_.end(); ++it) { hpdit->rechits_.push_back(*it); } } } // now the rechits in all the HPDs are sorted by energy! return; }
void HcalNoiseInfoProducer::filltracks | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup, | ||
HcalNoiseSummary & | summary | ||
) | const [private] |
Definition at line 471 of file HcalNoiseInfoProducer.cc.
References reco::TrackBase::eta(), edm::Event::getByLabel(), patZpeak::handle, edm::HandleBase::isValid(), maxTrackEta_, minTrackPt_, reco::TrackBase::p(), reco::TrackBase::pt(), trackCollName_, and HcalNoiseSummary::trackenergy_.
Referenced by produce().
{ edm::Handle<reco::TrackCollection> handle; iEvent.getByLabel(trackCollName_, handle); // don't throw exception, just return quietly if(!handle.isValid()) { // throw edm::Exception(edm::errors::ProductNotFound) // << " could not find trackCollection named " << trackCollName_ << "\n."; return; } summary.trackenergy_=0.0; for(reco::TrackCollection::const_iterator iTrack = handle->begin(); iTrack!=handle->end(); ++iTrack) { reco::Track trk=*iTrack; if(trk.pt()<minTrackPt_ || fabs(trk.eta())>maxTrackEta_) continue; summary.trackenergy_ += trk.p(); } return; }
void HcalNoiseInfoProducer::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDProducer.
Definition at line 82 of file HcalNoiseInfoProducer.cc.
References algo_, runTheMatrix::data, CommonHcalNoiseRBXData::energy(), fillCaloTowers_, fillcalotwrs(), filldigis(), fillDigis_, fillOtherSummaryVariables(), fillrechits(), fillRecHits_, filltracks(), fillTracks_, HcalNoiseAlgo::isProblematic(), maxProblemRBXs_, minHighHitE_, minLowHitE_, minRecHitE_, HcalNoiseSummary::nproblemRBXs_, HcalNoiseAlgo::passHighLevelNoiseFilter(), HcalNoiseAlgo::passLooseNoiseFilter(), HcalNoiseAlgo::passTightNoiseFilter(), edm::Event::put(), and edmLumisInFiles::summary.
{ // this is what we're going to actually write to the EDM std::auto_ptr<HcalNoiseRBXCollection> result1(new HcalNoiseRBXCollection); std::auto_ptr<HcalNoiseSummary> result2(new HcalNoiseSummary); // define an empty HcalNoiseRBXArray that we're going to fill HcalNoiseRBXArray rbxarray; HcalNoiseSummary &summary=*result2; // fill them with the various components // digi assumes that rechit information is available if(fillRecHits_) fillrechits(iEvent, iSetup, rbxarray, summary); if(fillDigis_) filldigis(iEvent, iSetup, rbxarray); if(fillCaloTowers_) fillcalotwrs(iEvent, iSetup, rbxarray, summary); if(fillTracks_) filltracks(iEvent, iSetup, summary); // select those RBXs which are interesting // also look for the highest energy RBX HcalNoiseRBXArray::iterator maxit=rbxarray.begin(); double maxenergy=-999; bool maxwritten=false; for(HcalNoiseRBXArray::iterator rit = rbxarray.begin(); rit!=rbxarray.end(); ++rit) { HcalNoiseRBX &rbx=(*rit); CommonHcalNoiseRBXData data(rbx, minRecHitE_, minLowHitE_, minHighHitE_); // find the highest energy rbx if(data.energy()>maxenergy) { maxenergy=data.energy(); maxit=rit; maxwritten=false; } // find out if the rbx is problematic/noisy/etc. bool writerbx = algo_.isProblematic(data) || !algo_.passLooseNoiseFilter(data) || !algo_.passTightNoiseFilter(data) || !algo_.passHighLevelNoiseFilter(data); // fill variables in the summary object not filled elsewhere fillOtherSummaryVariables(summary, data); if(writerbx) { summary.nproblemRBXs_++; if(summary.nproblemRBXs_<=maxProblemRBXs_) { result1->push_back(rbx); if(maxit==rit) maxwritten=true; } } } // end loop over rbxs // if we still haven't written the maximum energy rbx, write it now if(!maxwritten) { HcalNoiseRBX &rbx=(*maxit); // add the RBX to the event result1->push_back(rbx); } // put the rbxcollection and summary into the EDM iEvent.put(result1); iEvent.put(result2); return; }
Definition at line 94 of file HcalNoiseInfoProducer.h.
Referenced by fillOtherSummaryVariables(), and produce().
std::string reco::HcalNoiseInfoProducer::caloTowerCollName_ [private] |
Definition at line 90 of file HcalNoiseInfoProducer.h.
Referenced by fillcalotwrs(), and HcalNoiseInfoProducer().
std::string reco::HcalNoiseInfoProducer::digiCollName_ [private] |
Definition at line 88 of file HcalNoiseInfoProducer.h.
Referenced by filldigis(), and HcalNoiseInfoProducer().
bool reco::HcalNoiseInfoProducer::fillCaloTowers_ [private] |
Definition at line 77 of file HcalNoiseInfoProducer.h.
Referenced by HcalNoiseInfoProducer(), and produce().
bool reco::HcalNoiseInfoProducer::fillDigis_ [private] |
Definition at line 75 of file HcalNoiseInfoProducer.h.
Referenced by HcalNoiseInfoProducer(), and produce().
bool reco::HcalNoiseInfoProducer::fillRecHits_ [private] |
Definition at line 76 of file HcalNoiseInfoProducer.h.
Referenced by HcalNoiseInfoProducer(), and produce().
bool reco::HcalNoiseInfoProducer::fillTracks_ [private] |
Definition at line 78 of file HcalNoiseInfoProducer.h.
Referenced by HcalNoiseInfoProducer(), and produce().
uint32_t reco::HcalNoiseInfoProducer::HcalAcceptSeverityLevel_ [private] |
Definition at line 96 of file HcalNoiseInfoProducer.h.
Referenced by fillrechits(), and HcalNoiseInfoProducer().
int reco::HcalNoiseInfoProducer::maxCaloTowerIEta_ [private] |
Definition at line 84 of file HcalNoiseInfoProducer.h.
Referenced by fillcalotwrs(), and HcalNoiseInfoProducer().
int reco::HcalNoiseInfoProducer::maxProblemRBXs_ [private] |
Definition at line 81 of file HcalNoiseInfoProducer.h.
Referenced by HcalNoiseInfoProducer(), and produce().
double reco::HcalNoiseInfoProducer::maxTrackEta_ [private] |
Definition at line 85 of file HcalNoiseInfoProducer.h.
Referenced by filltracks(), and HcalNoiseInfoProducer().
double reco::HcalNoiseInfoProducer::minHighHitE_ [private] |
Definition at line 93 of file HcalNoiseInfoProducer.h.
Referenced by HcalNoiseInfoProducer(), and produce().
double reco::HcalNoiseInfoProducer::minLowHitE_ [private] |
Definition at line 93 of file HcalNoiseInfoProducer.h.
Referenced by HcalNoiseInfoProducer(), and produce().
double reco::HcalNoiseInfoProducer::minRecHitE_ [private] |
Definition at line 93 of file HcalNoiseInfoProducer.h.
Referenced by HcalNoiseInfoProducer(), and produce().
double reco::HcalNoiseInfoProducer::minTrackPt_ [private] |
Definition at line 86 of file HcalNoiseInfoProducer.h.
Referenced by filltracks(), and HcalNoiseInfoProducer().
std::string reco::HcalNoiseInfoProducer::recHitCollName_ [private] |
Definition at line 89 of file HcalNoiseInfoProducer.h.
Referenced by fillrechits(), and HcalNoiseInfoProducer().
std::string reco::HcalNoiseInfoProducer::trackCollName_ [private] |
Definition at line 91 of file HcalNoiseInfoProducer.h.
Referenced by filltracks(), and HcalNoiseInfoProducer().