154 InputData inputData(
iEvent,
168 const list<TP>& vTPs = inputData.getTPs();
169 const list<Stub*>& vStubs = inputData.stubs();
180 map<string, list<const L1fittedTrack*>> mapFinalTracks;
187 auto htTTTracksForOutput = std::make_unique<TTTrackCollection>();
188 auto rzTTTracksForOutput = std::make_unique<TTTrackCollection>();
189 map<string, unique_ptr<TTTrackCollection>> allFitTTTracksForOutput;
191 auto fitTTTracksForOutput = std::make_unique<TTTrackCollection>();
192 allFitTTTracksForOutput[fitterName] =
std::move(fitTTTracksForOutput);
201 mSectors(iPhiSec, iEtaReg) = std::make_unique<Sector>(&
settings_, iPhiSec, iEtaReg);
202 Sector*
sector = mSectors(iPhiSec, iEtaReg).get();
204 mHtRphis(iPhiSec, iEtaReg) = std::make_unique<HTrphi>(
206 HTrphi* htRphi = mHtRphis(iPhiSec, iEtaReg).get();
210 for (Stub* stub : vStubs) {
218 bool inside =
sector->inside(stub);
222 const vector<bool> inEtaSubSecs =
sector->insideEtaSubSecs(stub);
229 htRphi->store(stub, inEtaSubSecs);
244 muxHT.exec(mHtRphis);
250 miniHTstage.exec(mHtRphis);
257 const Sector*
sector = mSectors(iPhiSec, iEtaReg).get();
260 const HTrphi* htRphi = mHtRphis(iPhiSec, iEtaReg).get();
261 const list<L1track2D>& vecTracksRphi = htRphi->trackCands2D();
264 mMake3Dtrks(iPhiSec, iEtaReg) = std::make_unique<Make3Dtracks>(
266 Make3Dtracks* make3Dtrk = mMake3Dtrks(iPhiSec, iEtaReg).get();
269 make3Dtrk->run(vecTracksRphi);
274 const list<L1track3D>& vecTrk3D_ht = make3Dtrk->trackCands3D(
false);
275 for (
const L1track3D& trk : vecTrk3D_ht) {
277 htTTTracksForOutput->push_back(htTTTrack);
281 const list<L1track3D>& vecTrk3D_rz = make3Dtrk->trackCands3D(
true);
282 for (
const L1track3D& trk : vecTrk3D_rz) {
284 rzTTTracksForOutput->push_back(rzTTTrack);
297 const Make3Dtracks* make3Dtrk = mMake3Dtrks(iPhiSec, iEtaReg).get();
303 const list<L1track3D>& vecTrk3D = make3Dtrk->trackCands3D(useRZfilt);
306 list<L1fittedTrack>& fitTrksInSec = mapmFitTrks(iPhiSec, iEtaReg)[fitterName];
309 for (
const L1track3D& trk : vecTrk3D) {
312 const vector<Stub*>& stubsOnTrk = trk.stubs();
313 for (Stub*
s : stubsOnTrk) {
321 if (fitTrk.accepted()) {
324 fitTrk.digitizeTrack(fitterName);
326 fitTrksInSec.push_back(fitTrk);
336 DupFitTrkKiller killDupFitTrks(&
settings_);
343 const list<L1fittedTrack>& fitTrksInSec = mapmFitTrks(iPhiSec, iEtaReg)[fitterName];
346 list<const L1fittedTrack*> filteredFitTrksInSec = killDupFitTrks.filter(fitTrksInSec);
349 for (
const L1fittedTrack* fitTrk : filteredFitTrksInSec) {
352 allFitTTTracksForOutput[fitterName]->push_back(fitTTTrack);
356 mapFinalTracks[fitterName].insert(
357 mapFinalTracks[fitterName].
end(), filteredFitTrksInSec.begin(), filteredFitTrksInSec.end());
364 PrintL1trk() <<
"INPUT #TPs = " << vTPs.size() <<
" #STUBs = " << vStubs.size();
365 unsigned int numHTtracks = 0;
368 const Make3Dtracks* make3Dtrk = mMake3Dtrks(iPhiSec, iEtaReg).get();
369 numHTtracks += make3Dtrk->trackCands3D(
false).size();
372 PrintL1trk() <<
"Number of tracks after HT = " << numHTtracks;
373 for (
const auto&
p : mapFinalTracks) {
374 const string& fitName =
p.first;
375 const list<const L1fittedTrack*> fittedTracks =
p.second;
376 PrintL1trk() <<
"Number of tracks after " << fitName <<
" track helix fit = " << fittedTracks.size();
381 for (Stub* stub : vStubs) {
383 stub->setDigitizeWarningsOn(
false);
387 hists_.
fill(inputData, mSectors, mHtRphis, mMake3Dtrks, mapFinalTracks);
bool enableDigitize() const
HTrphi::ErrorMonitor & htRphiErrMon_
std::unique_ptr< DegradeBend > degradeBend_
const TrackerTopology * trackerTopology_
unsigned int numEtaRegions() const
std::map< std::string, std::unique_ptr< TrackFitGeneric > > fitterWorkerMap_
edm::EDGetTokenT< TrackingParticleCollection > tpToken_
edm::EDGetTokenT< TTClusterAssMap > clusterTruthToken_
edm::EDGetTokenT< TTStubAssMap > stubTruthToken_
std::vector< std::string > trackFitters_
const TrackerGeometry * trackerGeometry_
bool enableOutputIntermediateTTTracks() const
Class to store the L1 Track Trigger tracks.
std::list< TrackerModule > listTrackerModule_
unsigned int muxOutputsHT() const
bool isHTRPhiEtaRegWhitelisted(unsigned const iEtaReg) const
StubWindowSuggest & stubWindowSuggest_
edm::EDGetTokenT< TTStubDetSetVec > stubToken_
unsigned int numPhiSectors() const
virtual void fill(const InputData &inputData, const Array2D< std::unique_ptr< Sector >> &mSectors, const Array2D< std::unique_ptr< HTrphi >> &mHtPhis, const Array2D< std::unique_ptr< Make3Dtracks >> &mGet3Dtrks, const std::map< std::string, std::list< const L1fittedTrack *>> &mapFinalTracks)
edm::EDGetTokenT< reco::GenJetCollection > genJetToken_
std::vector< std::string > useRZfilter_