47 std::vector<edm::ParameterSet> vpset;
51 pset.addParameter<
double>(
"depth", 1.0);
52 pset.addParameter<
double>(
"minEnergy", 0.0);
53 pset.addParameter<
double>(
"maxEnergy", 1.0);
54 pset.addParameter<
bool>(
"endcap",
false);
55 pset.addParameter<
double>(
"minTime", -12.);
56 pset.addParameter<
double>(
"maxTime", 12.);
57 vpset.emplace_back(
pset);
61 pset.addParameter<
double>(
"depth", 1.0);
62 pset.addParameter<
double>(
"minEnergy", 0.0);
63 pset.addParameter<
double>(
"maxEnergy", 1.0);
64 pset.addParameter<
bool>(
"endcap",
true);
65 pset.addParameter<
double>(
"minTime", -31.5);
66 pset.addParameter<
double>(
"maxTime", 31.5);
67 vpset.emplace_back(
pset);
71 pset.addParameter<
double>(
"depth", 1.0);
72 pset.addParameter<
double>(
"minEnergy", 1.0);
73 pset.addParameter<
double>(
"maxEnergy", 2.0);
74 pset.addParameter<
bool>(
"endcap",
false);
75 pset.addParameter<
double>(
"minTime", -6.);
76 pset.addParameter<
double>(
"maxTime", 6.);
77 vpset.emplace_back(
pset);
81 pset.addParameter<
double>(
"depth", 1.0);
82 pset.addParameter<
double>(
"minEnergy", 1.0);
83 pset.addParameter<
double>(
"maxEnergy", 2.0);
84 pset.addParameter<
bool>(
"endcap",
true);
85 pset.addParameter<
double>(
"minTime", -20.5);
86 pset.addParameter<
double>(
"maxTime", 20.5);
87 vpset.emplace_back(
pset);
91 pset.addParameter<
double>(
"depth", 1.0);
92 pset.addParameter<
double>(
"minEnergy", 2.0);
93 pset.addParameter<
double>(
"maxEnergy", 5.0);
94 pset.addParameter<
bool>(
"endcap",
false);
95 pset.addParameter<
double>(
"minTime", -4.);
96 pset.addParameter<
double>(
"maxTime", 4.);
97 vpset.emplace_back(
pset);
101 pset.addParameter<
double>(
"depth", 1.0);
102 pset.addParameter<
double>(
"minEnergy", 2.0);
103 pset.addParameter<
double>(
"maxEnergy", 5.0);
104 pset.addParameter<
bool>(
"endcap",
true);
105 pset.addParameter<
double>(
"minTime", -12.);
106 pset.addParameter<
double>(
"maxTime", 12.);
107 vpset.emplace_back(
pset);
111 pset.addParameter<
double>(
"depth", 1.0);
112 pset.addParameter<
double>(
"minEnergy", 5.0);
113 pset.addParameter<
double>(
"maxEnergy", 20.0);
114 pset.addParameter<
bool>(
"endcap",
false);
115 pset.addParameter<
double>(
"minTime", -4.);
116 pset.addParameter<
double>(
"maxTime", 4.);
117 vpset.emplace_back(
pset);
121 pset.addParameter<
double>(
"depth", 1.0);
122 pset.addParameter<
double>(
"minEnergy", 5.0);
123 pset.addParameter<
double>(
"maxEnergy", 20.0);
124 pset.addParameter<
bool>(
"endcap",
true);
125 pset.addParameter<
double>(
"minTime", -5.);
126 pset.addParameter<
double>(
"maxTime", 5.);
127 vpset.emplace_back(
pset);
131 pset.addParameter<
double>(
"depth", 1.0);
132 pset.addParameter<
double>(
"minEnergy", 20.0);
133 pset.addParameter<
double>(
"maxEnergy", 1e24);
134 pset.addParameter<
bool>(
"endcap",
false);
135 pset.addParameter<
double>(
"minTime", -4.);
136 pset.addParameter<
double>(
"maxTime", 4.);
137 vpset.emplace_back(
pset);
141 pset.addParameter<
double>(
"depth", 1.0);
142 pset.addParameter<
double>(
"minEnergy", 20.0);
143 pset.addParameter<
double>(
"maxEnergy", 1e24);
144 pset.addParameter<
bool>(
"endcap",
true);
145 pset.addParameter<
double>(
"minTime", -5.);
146 pset.addParameter<
double>(
"maxTime", 5.);
147 vpset.emplace_back(
pset);
150 psd.
add<
double>(
"depth", 1.0);
151 psd.
add<
double>(
"minEnergy", 0.0);
152 psd.
add<
double>(
"maxEnergy", 1e24);
153 psd.
add<
bool>(
"endcap",
false);
154 psd.
add<
double>(
"minTime", -50.);
155 psd.
add<
double>(
"maxTime", 50.);
156 desc.addVPSet(
"cuts", psd, vpset);
158 descriptions.
add(
"particleFlowClusterECALTimeSelected",
desc);
166 std::vector<edm::ParameterSet>
cuts = iConfig.
getParameter<std::vector<edm::ParameterSet> >(
"cuts");
169 info.depth =
cut.getParameter<
double>(
"depth");
170 info.minE =
cut.getParameter<
double>(
"minEnergy");
171 info.maxE =
cut.getParameter<
double>(
"maxEnergy");
172 info.minTime =
cut.getParameter<
double>(
"minTime");
173 info.maxTime =
cut.getParameter<
double>(
"maxTime");
174 info.endcap =
cut.getParameter<
bool>(
"endcap");
178 produces<reco::PFClusterCollection>();
179 produces<reco::PFClusterCollection>(
"OOT");
185 auto out = std::make_unique<reco::PFClusterCollection>();
186 auto outOOT = std::make_unique<reco::PFClusterCollection>();
188 for (
const auto& cluster : *
clusters) {
189 const double energy = cluster.energy();
190 const double time = cluster.time();
191 const double depth = cluster.depth();
194 if (energy < info.minE || energy >
info.maxE)
196 if (depth < 0.9 * info.depth || depth > 1.1 *
info.depth)
204 out->push_back(cluster);
206 outOOT->push_back(cluster);
T getParameter(std::string const &) 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
#define DEFINE_FWK_MODULE(type)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::vector< l1t::PFCluster > PFClusterCollection
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::EDGetTokenT< reco::PFClusterCollection > clusters_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)