133 LogTrace(
"l1tOmtfEventPrint") <<
"\nDataROOTDumper2::observeEventEnd matchingResults.size() " 134 << matchingResults.size() << std::endl;
146 <<
"\nDataROOTDumper2::observeEventEnd matchingResults.size() " << matchingResults.size() << std::endl;
148 for (
auto& matchingResult : matchingResults) {
149 edm::LogVerbatim(
"l1tOmtfEventPrint") <<
"matchingResult: genPt " << matchingResult.genPt;
150 if (matchingResult.procMuon)
151 edm::LogVerbatim(
"l1tOmtfEventPrint") <<
" procMuon.PtConstr " << matchingResult.procMuon->getPtConstr();
155 edm::LogVerbatim(
"l1tOmtfEventPrint") <<
"dropping the event!!!\n" << std::endl;
159 for (
auto& matchingResult : matchingResults) {
162 if (matchingResult.trackingParticle) {
163 auto trackingParticle = matchingResult.trackingParticle;
174 if (trackingParticle->parentVertex().isNonnull()) {
182 LogTrace(
"l1tOmtfEventPrint") <<
"DataROOTDumper2::observeEventEnd trackingParticle: eventId " 183 << trackingParticle->eventId().event() <<
" pdgId " << std::setw(3)
184 << trackingParticle->pdgId() <<
" trackId " 185 << trackingParticle->g4Tracks().at(0).trackId() <<
" pt " << std::setw(9)
186 << trackingParticle->pt()
187 <<
" eta " << std::setw(9) << trackingParticle->momentum().eta() <<
" phi " 188 << std::setw(9) << trackingParticle->momentum().phi() << std::endl;
196 }
else if (matchingResult.simTrack) {
197 auto simTrack = matchingResult.simTrack;
208 if (!
simTrack->noVertex() && matchingResult.simVertex) {
218 LogTrace(
"l1tOmtfEventPrint") <<
"DataROOTDumper2::observeEventEnd simTrack: eventId " 219 <<
simTrack->eventId().event() <<
" pdgId " << std::setw(3)
221 <<
" pt " << std::setw(9)
223 <<
" eta " << std::setw(9) <<
simTrack->momentum().eta() <<
" phi " << std::setw(9)
224 <<
simTrack->momentum().phi() << std::endl;
267 auto& gpResult = (procMuon->getGpResultUnconstr().getPdfSumUnconstr() > procMuon->getGpResultConstr().getPdfSum())
268 ? procMuon->getGpResultUnconstr()
269 : procMuon->getGpResultConstr();
276 for (
unsigned int iLogicLayer = 0; iLogicLayer < gpResult.getStubResults().size(); ++iLogicLayer) {
277 auto& stubResult = gpResult.getStubResults()[iLogicLayer];
284 if (stubResult.getMuonStub()) {
286 hit.layer = iLogicLayer;
287 hit.quality = stubResult.getMuonStub()->qualityHw;
288 hit.eta = stubResult.getMuonStub()->etaHw;
289 hit.valid = stubResult.getValid();
291 int hitPhi = stubResult.getMuonStub()->phiHw;
293 int phiRefHit = gpResult.getStubResults()[refLayerLogicNum].getMuonStub()->phiHw;
296 hitPhi = stubResult.getMuonStub()->phiBHw;
301 hit.phiDist = hitPhi - phiRefHit;
319 hit.
z = cscId.chamber() % 2;
326 LogTrace(
"l1tOmtfEventPrint") <<
"DataROOTDumper2::observeEventEnd adding omtfCand : " << std::endl;
327 auto finalCandidate = matchingResult.muonCand;
328 LogTrace(
"l1tOmtfEventPrint") <<
" hwPt " << finalCandidate->hwPt() <<
" hwSign " << finalCandidate->hwSign()
329 <<
" hwQual " << finalCandidate->hwQual() <<
" hwEta " << std::setw(4)
330 << finalCandidate->hwEta() << std::setw(4) <<
" hwPhi " << finalCandidate->hwPhi()
331 <<
" eta " << std::setw(9) << (finalCandidate->hwEta() * 0.010875)
332 <<
" isKilled " << procMuon->isKilled() <<
" tRefLayer " << procMuon->getRefLayer()
333 <<
" RefHitNumber " << procMuon->getRefHitNumber() << std::endl;
336 if (matchingResult.muonCand && matchingResult.procMuon->getPtConstr() > 0 &&
337 matchingResult.muonCand->hwQual() >= 1) {
345 if (matchingResult.muonCand->trackFinderType() ==
l1t::omtf_neg) {
349 addOmtfCand(matchingResult.procMuon);
353 for (
auto& killedCand : matchingResult.procMuon->getKilledMuons()) {
356 if (killedCand->isKilled() ==
false) {
357 edm::LogVerbatim(
"l1tOmtfEventPrint") <<
" killedCand->isKilled() == false !!!!!!!!";
359 addOmtfCand(killedCand);
364 LogTrace(
"l1tOmtfEventPrint") <<
"DataROOTDumper2::observeEventEnd no matching omtfCand" << std::endl;
Log< level::Info, true > LogVerbatim
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
CandidateSimMuonMatcher * candidateSimMuonMatcher
virtual double hwEtaToEta(int hwEta) const
center of eta bin
unsigned int omtfFiredLayers
double hwUPtToGev(int hwPt) const override
Abs< T >::type abs(const T &t)
const std::vector< int > & getRefToLogicNumber() const
double hwPtToGev(int hwPt) const override
uGMT pt scale conversion
std::vector< MatchingResult > getMatchingResults()
std::vector< unsigned long > hits
std::shared_ptr< AlgoMuon > AlgoMuonPtr
const OMTFConfiguration * omtfConfig
bool isBendingLayer(unsigned int iLayer) const override