#include <PFClusterTimeSelector.h>
Definition at line 18 of file PFClusterTimeSelector.h.
Definition at line 13 of file PFClusterTimeSelector.cc.
References TkAlMuonSelectors_cfi::cut, cutInfo_, egammaForCoreTracking_cff::cuts, PFClusterTimeSelector::CutInfo::depth, PFClusterTimeSelector::CutInfo::endcap, edm::ParameterSet::getParameter(), info(), PFClusterTimeSelector::CutInfo::maxE, PFClusterTimeSelector::CutInfo::maxTime, PFClusterTimeSelector::CutInfo::minE, and PFClusterTimeSelector::CutInfo::minTime.
17 std::vector<edm::ParameterSet>
cuts = iConfig.
getParameter<std::vector<edm::ParameterSet> >(
"cuts");
18 for (
const auto&
cut :cuts ) {
20 info.depth =
cut.getParameter<
double>(
"depth");
21 info.minE =
cut.getParameter<
double>(
"minEnergy");
22 info.maxE =
cut.getParameter<
double>(
"maxEnergy");
23 info.minTime =
cut.getParameter<
double>(
"minTime");
24 info.maxTime =
cut.getParameter<
double>(
"maxTime");
25 info.endcap =
cut.getParameter<
bool>(
"endcap");
30 produces<reco::PFClusterCollection>();
31 produces<reco::PFClusterCollection>(
"OOT");
T getParameter(std::string const &) const
std::vector< CutInfo > cutInfo_
edm::EDGetTokenT< reco::PFClusterCollection > clusters_
PFClusterTimeSelector::~PFClusterTimeSelector |
( |
| ) |
|
|
overridedefault |
Definition at line 35 of file PFClusterTimeSelector.cc.
References fastPrimaryVertexProducer_cfi::clusters, clusters_, cutInfo_, egammaForCoreTracking_cff::depth, PFLayer::ECAL_BARREL, PFLayer::ECAL_ENDCAP, edm::Event::getByToken(), PFLayer::HCAL_BARREL1, PFLayer::HCAL_BARREL2, PFLayer::HCAL_ENDCAP, info(), eostools::move(), MillePedeFileConverter_cfg::out, edm::Event::put(), protons_cff::time, and ~PFClusterTimeSelector().
40 auto out = std::make_unique<reco::PFClusterCollection>();
41 auto outOOT = std::make_unique<reco::PFClusterCollection>();
43 for(
const auto& cluster : *clusters ) {
44 const double energy = cluster.energy();
45 const double time = cluster.time();
46 const double depth = cluster.depth();
49 if (energy<info.minE || energy>
info.maxE)
51 if (depth<0.9*info.depth || depth>1.1*
info.depth)
57 if (time>
info.minTime && time<
info.maxTime)
58 out->push_back(cluster);
60 outOOT->push_back(cluster);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< CutInfo > cutInfo_
edm::EDGetTokenT< reco::PFClusterCollection > clusters_
std::vector<CutInfo> PFClusterTimeSelector::cutInfo_ |
|
protected |