133 _TTRHBuilderToken(esConsumes()),
138 _multiplicityMapTokens(),
150 std::vector<edm::ParameterSet> seedCollectionConfigs =
151 iConfig.getParameter<std::vector<edm::ParameterSet>>(
"seedCollections");
153 for (std::vector<edm::ParameterSet>::const_iterator scps = seedCollectionConfigs.begin();
154 scps != seedCollectionConfigs.end();
156 _seedcollTokens.push_back(consumes<TrajectorySeedCollection>(scps->getParameter<
edm::InputTag>(
"src")));
157 _seedbins.push_back(scps->getUntrackedParameter<
unsigned int>(
"nBins", 1000));
158 _seedmax.push_back(scps->getUntrackedParameter<
double>(
"maxValue", 100000.));
160 if (scps->exists(
"trackFilter")) {
161 _seedfilters.push_back(
162 FromTrackRefSeedFilter(consumesCollector(), scps->getParameter<
edm::ParameterSet>(
"trackFilter")));
164 _seedfilters.push_back(FromTrackRefSeedFilter());
168 std::vector<edm::ParameterSet> correlationConfigs =
169 iConfig.getParameter<std::vector<edm::ParameterSet>>(
"multiplicityCorrelations");
171 for (std::vector<edm::ParameterSet>::const_iterator ps = correlationConfigs.begin(); ps != correlationConfigs.end();
173 _multiplicityMapTokens.push_back(
174 consumes<std::map<unsigned int, int>>(ps->getParameter<
edm::InputTag>(
"multiplicityMap")));
175 _labels.push_back(ps->getParameter<
std::string>(
"detLabel"));
176 _selections.push_back(ps->getParameter<
unsigned int>(
"detSelection"));
177 _binsmult.push_back(ps->getParameter<
unsigned int>(
"nBins"));
178 _binseta.push_back(ps->getParameter<
unsigned int>(
"nBinsEta"));
179 _maxs.push_back(ps->getParameter<
double>(
"maxValue"));
184 std::vector<unsigned int>::const_iterator nseedbins = _seedbins.begin();
185 std::vector<double>::const_iterator seedmax = _seedmax.begin();
186 std::vector<FromTrackRefSeedFilter>::const_iterator
filter = _seedfilters.begin();
188 for (std::vector<edm::ParameterSet>::const_iterator scps = seedCollectionConfigs.begin();
189 scps != seedCollectionConfigs.end();
190 ++scps, ++nseedbins, ++seedmax, ++
filter) {
195 _hseedmult.push_back(tfserv->
make<TH1F>(
196 hname.c_str(), htitle.c_str(), *nseedbins + 1, 0.5 - *seedmax / (*nseedbins), *seedmax + 0.5));
197 _hseedmult[_hseedmult.size() - 1]->GetXaxis()->SetTitle(
"seeds");
198 _hseedmult[_hseedmult.size() - 1]->GetYaxis()->SetTitle(
"events");
201 htitle = extendedlabel +
std::string(
" seed pseudorapidity");
202 _hseedeta.push_back(tfserv->
make<TH1F>(hname.c_str(), htitle.c_str(), 80, -4., 4.));
203 _hseedeta[_hseedeta.size() - 1]->GetXaxis()->SetTitle(
"#eta");
204 _hseedeta[_hseedeta.size() - 1]->GetYaxis()->SetTitle(
"seeds");
207 htitle = extendedlabel +
std::string(
" seed phi vs pseudorapidity");
208 _hseedphieta.push_back(tfserv->
make<TH2F>(hname.c_str(), htitle.c_str(), 80, -4., 4., 80, -
M_PI,
M_PI));
209 _hseedphieta[_hseedphieta.size() - 1]->GetXaxis()->SetTitle(
"#eta");
210 _hseedphieta[_hseedphieta.size() - 1]->GetYaxis()->SetTitle(
"#phi");
212 _hseedmult2D.push_back(std::vector<TH2F*>());
213 _hseedeta2D.push_back(std::vector<TH2F*>());
216 htitle = extendedlabel +
std::string(
" seed SiPixelRecHit multiplicity");
217 _hpixelrhmult.push_back(tfserv->
make<TH1F>(hname.c_str(), htitle.c_str(), 5, -.5, 4.5));
218 _hpixelrhmult[_hpixelrhmult.size() - 1]->GetXaxis()->SetTitle(
"NRecHits");
219 _hpixelrhmult[_hpixelrhmult.size() - 1]->GetYaxis()->SetTitle(
"seeds");
221 hname = extendedlabel +
std::string(
"_bpixleneta");
222 htitle = extendedlabel +
std::string(
" seed BPIX cluster length vs pseudorapidity");
223 _hbpixclusleneta.push_back(tfserv->
make<TH2F>(hname.c_str(), htitle.c_str(), 80, -4., 4., 40, -0.5, 39.5));
224 _hbpixclusleneta[_hbpixclusleneta.size() - 1]->GetXaxis()->SetTitle(
"#eta");
225 _hbpixclusleneta[_hbpixclusleneta.size() - 1]->GetYaxis()->SetTitle(
"length");
227 hname = extendedlabel +
std::string(
"_fpixleneta");
228 htitle = extendedlabel +
std::string(
" seed FPIX cluster length vs pseudorapidity");
229 _hfpixclusleneta.push_back(tfserv->
make<TH2F>(hname.c_str(), htitle.c_str(), 80, -4., 4., 40, -0.5, 39.5));
230 _hfpixclusleneta[_hfpixclusleneta.size() - 1]->GetXaxis()->SetTitle(
"#eta");
231 _hfpixclusleneta[_hfpixclusleneta.size() - 1]->GetYaxis()->SetTitle(
"length");
233 hname = extendedlabel +
std::string(
"_bpixlenangle");
234 htitle = extendedlabel +
std::string(
" seed BPIX cluster length vs track projection");
235 _hbpixcluslenangle.push_back(tfserv->
make<TH2F>(hname.c_str(), htitle.c_str(), 200, -1., 1., 40, -0.5, 39.5));
236 _hbpixcluslenangle[_hbpixcluslenangle.size() - 1]->GetXaxis()->SetTitle(
"projection");
237 _hbpixcluslenangle[_hbpixcluslenangle.size() - 1]->GetYaxis()->SetTitle(
"length");
239 hname = extendedlabel +
std::string(
"_fpixlenangle");
240 htitle = extendedlabel +
std::string(
" seed FPIX cluster length vs track projection");
241 _hfpixcluslenangle.push_back(tfserv->
make<TH2F>(hname.c_str(), htitle.c_str(), 200, -1., 1., 40, -0.5, 39.5));
242 _hfpixcluslenangle[_hfpixcluslenangle.size() - 1]->GetXaxis()->SetTitle(
"projection");
243 _hfpixcluslenangle[_hfpixcluslenangle.size() - 1]->GetYaxis()->SetTitle(
"length");
245 for (
unsigned int i = 0;
i < _multiplicityMapTokens.size(); ++
i) {
248 std::string htitle2D = extendedlabel +
" seeds multiplicity";
250 htitle2D += _labels[
i];
252 _hseedmult2D[_hseedmult2D.size() - 1].push_back(tfserv->
make<TH2F>(hname2D.c_str(),
258 0.5 - *seedmax / (*nseedbins),
260 _hseedmult2D[_hseedmult2D.size() - 1][_hseedmult2D[_hseedmult2D.size() - 1].size() - 1]->GetXaxis()->SetTitle(
262 _hseedmult2D[_hseedmult2D.size() - 1][_hseedmult2D[_hseedmult2D.size() - 1].size() - 1]->GetYaxis()->SetTitle(
265 hname2D = extendedlabel + _labels[
i];
267 htitle2D = extendedlabel +
" seeds pseudorapidity";
269 htitle2D += _labels[
i];
271 _hseedeta2D[_hseedeta2D.size() - 1].push_back(
272 tfserv->
make<TH2F>(hname2D.c_str(), htitle2D.c_str(), _binseta[
i], 0., _maxs[
i], 80, -4., 4.));
273 _hseedeta2D[_hseedeta2D.size() - 1][_hseedeta2D[_hseedeta2D.size() - 1].size() - 1]->GetXaxis()->SetTitle(
"hits");
274 _hseedeta2D[_hseedeta2D.size() - 1][_hseedeta2D[_hseedeta2D.size() - 1].size() - 1]->GetYaxis()->SetTitle(
"#eta");
301 std::map<unsigned int, int>::const_iterator
mult = mults->find(
_selections[
i]);
303 if (
mult != mults->end()) {
304 tmpmult[
i] =
mult->second;
321 std::vector<TH1F*>::iterator histomult =
_hseedmult.begin();
322 std::vector<std::vector<TH2F*>>::iterator histomult2D =
_hseedmult2D.begin();
323 std::vector<TH1F*>::iterator histoeta =
_hseedeta.begin();
324 std::vector<TH2F*>::iterator histophieta =
_hseedphieta.begin();
325 std::vector<std::vector<TH2F*>>::iterator histoeta2D =
_hseedeta2D.begin();
326 std::vector<TH1F*>::iterator hpixelrhmult =
_hpixelrhmult.begin();
368 unsigned int nseeds = 0;
369 unsigned int iseed = 0;
379 double eta =
state.globalMomentum().eta();
380 double phi =
state.globalMomentum().phi();
382 (*histoeta)->Fill(
eta);
383 (*histophieta)->Fill(
eta,
phi);
387 (*histoeta2D)[
i]->Fill(tmpmult[
i],
eta);
391 for (
auto const&
hit :
seed->recHits()) {
402 (*histobpixleneta)->Fill(
eta, sphit->
cluster()->sizeY());
407 (*histobpixlenangle)->Fill(normdx, sphit->
cluster()->sizeY());
411 (*histofpixleneta)->Fill(
eta, sphit->
cluster()->sizeX());
416 (*histofpixlenangle)->Fill(normdy, sphit->
cluster()->sizeX());
424 (*hpixelrhmult)->Fill(npixelrh);
427 (*histomult)->Fill(nseeds);
431 (*histomult2D)[
i]->Fill(tmpmult[
i], nseeds);
437 : m_suffix(
""), m_passthrough(
true), m_trackcollToken(), m_seltrackrefcollToken(), m_tracks(), m_seltrackrefs() {}
441 : m_suffix(iConfig.getParameter<
std::
string>(
"suffix")),
442 m_passthrough(
false),
444 m_seltrackrefcollToken(
452 if (!m_passthrough) {
453 iEvent.getByToken(m_trackcollToken, m_tracks);
454 iEvent.getByToken(m_seltrackrefcollToken, m_seltrackrefs);
470 if (trkref == *seltrkref)