#include <PFClusterTimeSelector.h>
Definition at line 18 of file PFClusterTimeSelector.h.
Definition at line 11 of file PFClusterTimeSelector.cc.
References TkAlMuonSelectors_cfi::cut, cutInfo_, L1TMuonDQMOffline_cfi::cuts, PFClusterTimeSelector::CutInfo::depth, PFClusterTimeSelector::CutInfo::endcap, edm::ParameterSet::getParameter(), info(), PFClusterTimeSelector::CutInfo::maxE, PFClusterTimeSelector::CutInfo::maxTime, PFClusterTimeSelector::CutInfo::minE, and PFClusterTimeSelector::CutInfo::minTime.
13 std::vector<edm::ParameterSet>
cuts = iConfig.
getParameter<std::vector<edm::ParameterSet> >(
"cuts");
14 for (
const auto&
cut : cuts) {
16 info.depth =
cut.getParameter<
double>(
"depth");
17 info.minE =
cut.getParameter<
double>(
"minEnergy");
18 info.maxE =
cut.getParameter<
double>(
"maxEnergy");
19 info.minTime =
cut.getParameter<
double>(
"minTime");
20 info.maxTime =
cut.getParameter<
double>(
"maxTime");
21 info.endcap =
cut.getParameter<
bool>(
"endcap");
25 produces<reco::PFClusterCollection>();
26 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 29 of file PFClusterTimeSelector.cc.
References bsc_activity_cfg::clusters, clusters_, cutInfo_, LEDCalibrationChannels::depth, PFLayer::ECAL_BARREL, PFLayer::ECAL_ENDCAP, HCALHighEnergyHPDFilter_cfi::energy, edm::Event::getByToken(), PFLayer::HCAL_BARREL1, PFLayer::HCAL_BARREL2, PFLayer::HCAL_ENDCAP, info(), eostools::move(), MillePedeFileConverter_cfg::out, edm::Event::put(), ntuplemaker::time, and ~PFClusterTimeSelector().
32 auto out = std::make_unique<reco::PFClusterCollection>();
33 auto outOOT = std::make_unique<reco::PFClusterCollection>();
35 for (
const auto& cluster : *clusters) {
36 const double energy = cluster.energy();
37 const double time = cluster.time();
38 const double depth = cluster.depth();
41 if (energy < info.minE || energy >
info.maxE)
43 if (depth < 0.9 * info.depth || depth > 1.1 *
info.depth)
50 if (time >
info.minTime && time <
info.maxTime)
51 out->push_back(cluster);
53 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 |