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");
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);
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< CutInfo > cutInfo_
PFClusterTimeSelector(const edm::ParameterSet &)
~PFClusterTimeSelector() override
void beginRun(const edm::Run &run, const edm::EventSetup &es) override
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
std::vector< PFCluster > PFClusterCollection
collection of PFCluster objects
edm::EDGetTokenT< reco::PFClusterCollection > clusters_