Skip to content

Commit

Permalink
OMTF emulator corresponding to the 2024 OMTF firmware
Browse files Browse the repository at this point in the history
Changes to the OMTF algorithm that were introduced in the firmware after
the previous OMTF emulator PR was merged.
Mainly fixes related to the triggering on displaced muons.

The firmware was deployed in the CMS on 19th March 2024.

extrapolFactorsFilename added to the simOmtfDigis_cfi.py
the simOmtfDigis_extrapolSimple_cfi.py is not needed now, so is deleted

added L1Trigger/L1TMuonOverlapPhase2/python/fakeOmtfParamsPhase2_cff.py

fix in GhostBusterPreferRefDt.cc customByRefLayer

GhostBusterPreferRefDt::select - added a condition preventing eta
overwriting in case the eta of the killed candidates is 121

OMTFProcessor<GoldenPatternType>::extrapolateDtPhiBFloatPoin and
OMTFProcessor<GoldenPatternType>::extrapolateDtPhiBFixedPoint -
extrFactor is now obtained from endcap stub r, and not eta.

OmtfAngleConverter::getGlobalEta - stub r is now taken from the pure
wire group, and not from the final_gp (global point) - matters for the
extrapolation logic

PatternGenerator::upadatePdfs() - deactivated (commented out) the
process of code for setting the meanDistPhi to 0 if it is already small,
as it seems it has no impact on the firmware occupancy

PatternOptimizerBase: control histograms simMuEta and candEta

OMTFProcessor<GoldenPatternType>::getFinalcandidatefix in setting hwPtw
when ptAssignment is used

in XDigiToStubsConverter::makeStubs, removed
  if (!dtPhDigis) return;
  if (!cscDigis) return;
  if (!rpcDigis) return;
This is not needed as the DigiToStubsConverters are added dynamically to
the vector digiToStubsConverters if given digis are configured to be
used (parameter dropXXPrimitives is false in the config). But it was
confusing: when the digi collection was not in the file, the job was
still running without reporting the missing collection.

PatternGenerator.cc - different DistPhiBitShift for phase-1 and phase-2

DataROOTDumper2.cc - rejecting events with more than one matchingResults
(to clean the date for the NN training)
cleanStubs - fasle, but filtering the matchingResults

DataROOTDumper2.cc - dropping events with more than one matchingResults

CandidateSimMuonMatcher.h
- added method matchSimple() that matches simTracks and OMTF cands
without propagation - it works well for the single muon samples. The
problem with propagation is that it does not work for low pt muons (pt <
~3GeV). Added flag usePropagation to switch between matchSimple() and
match() with propagation.
- added phi folding for delta phi in ghostBust() (but it looks like it
does not change the results)
- in match() (version for the SimTrack), the MatchingResult is added
also for the track for which the propagation failed.
The changes should be still added to the match() version for the
tracking particle.
- fixed CandidateSimMuonMatcher::atStation2 - propagation to the RB1in
culider

bug fixes in StubResult and GoldenPatternResult, change finalise11()

Omtf/AlgoMuon.h
bug fix in AlgoMuon::getPatternNum() - checking if goldenPaternUnconstr,
otherwise segmentation fault can be generated

StubResult.h
added method setPdfVal(), which is used in the
GoldenPatternResult::finalise11()

GoldenPatternResult.cc
GoldenPatternResult::finalise11() - added penalty -63 for the phiB
layers, if there was a hit but it does not fit the pdf
operator<< - bug fix - checking if the pResult.omtfConfig is nullptr -
this case occurs for the empty GoldenPatternResult

L1Trigger/L1TMuonOverlapPhase1/test/expert/omtf/runMuonOverlap_PatsWithExtrapolation_efficiencyAnalyser.py
- improved .py for running the emulator + analyzer
Fixes in DataROOTDumper2 and CandidateSimMuonMatcher

DataROOTDumper2 added flag usePropagation which if false turns on the
filter on matchingResults.size() > 1

CandidateSimMuonMatcher::match() - threshold updated to be good for
displaced muons in H2ll sample. There should be an automatic switch for
this threshold

added flags matchUsingPropagationInAnlyzer  and
matchUsingPropagationInDumper
fixes of the candidate hwPt and HwPtUnconstrained

Omtf/AlgoMuon.h - changed the value of getPtConstr and getPtUnconstr for
an empty candidate from -1 to 0 (as it is in the interface note)

OMTFConfiguration::etaBits2HwEta - added return 95 for bits ==
0b111111111, as it is like that tin the FW

OMTFProcessor<GoldenPatternType>::getFinalcandidates - hwPt is set to 1
if the constraint getPtConstr is 0 but getPtUnconstr > 0

L1Trigger/L1TMuonOverlapPhase1/src/Omtf/OMTFSorter.cc - bestGP is set to
the golden pattern number 0 if getPdfSum() == 0

L1TMuonOverlapPhase1/src/Omtf/OMTFProcessor.cc - setting the output
unconstrained pT to 1 when getPdfSumConstr.

OMTFProcessor<GoldenPatternType>::getFinalcandidates - fixing the
condition for the validity of the constrained pt

XMLEventWriter.cc - removed constraints in the number of events that can
be dumped to the xml
  • Loading branch information
Karol Bunkowski committed May 2, 2024
1 parent e2e3c52 commit 91d48db
Show file tree
Hide file tree
Showing 27 changed files with 543 additions and 248 deletions.
15 changes: 4 additions & 11 deletions L1Trigger/L1TMuonOverlapPhase1/interface/Omtf/AlgoMuon.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,18 @@ class AlgoMuon {
int getBx() const { return m_bx; }

//hardware pt
int getPtConstr() const {
//TODO maybe it should return 0 and not -1?
return goldenPaternConstr == nullptr ? -1 : goldenPaternConstr->key().thePt;
}
int getPtConstr() const { return goldenPaternConstr == nullptr ? 0 : goldenPaternConstr->key().thePt; }

//hardware upt, in the phase1 the upt scale unit is 1 GeV, while for the pt the unit is 0.5GeV
int getPtUnconstr() const {
//TODO maybe it should return 0 and not -1?
return goldenPaternUnconstr == nullptr ? -1 : (goldenPaternUnconstr->key().thePt - 1) / 2 + 1;
return goldenPaternUnconstr == nullptr ? 0 : (goldenPaternUnconstr->key().thePt - 1) / 2 + 1;
}

int getChargeConstr() const { return goldenPaternConstr == nullptr ? -1 : goldenPaternConstr->key().theCharge; }

int getPhiRHit() const { return gpResultConstr.getRefHitPhi(); }

unsigned int getPatternNum() const {
return (gpResultUnconstr.getPdfSumUnconstr() > gpResultConstr.getPdfSum() ? goldenPaternUnconstr->key().theNumber
: goldenPaternConstr->key().theNumber);
}
unsigned int getPatternNum() const;

unsigned int getPatternNumConstr() const {
return goldenPaternConstr == nullptr ? 0 : goldenPaternConstr->key().theNumber;
Expand All @@ -77,7 +70,7 @@ class AlgoMuon {
}

bool isValid() const {
return (getPtConstr() > 0) || (getPtUnconstr() > 0); //should this really be pt or quality ?? FIXME
return (getPtConstr() > 0) || (getPtUnconstr() > 0); //PtConstr == 0 denotes empty candidate
}

double getPdfSumConstr() const { return gpResultConstr.getPdfSum(); }
Expand Down
2 changes: 2 additions & 0 deletions L1Trigger/L1TMuonOverlapPhase1/interface/StubResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ class StubResult {

float getPdfVal() const { return pdfVal; }

void setPdfVal(float pdfVal) { this->pdfVal = pdfVal; }

bool getValid() const { return valid; }

void setValid(bool valid) { this->valid = valid; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,15 @@ class CandidateSimMuonMatcher : public IOMTFEmulationObserver {
const TrackingParticleCollection* trackingParticles,
std::function<bool(const TrackingParticle&)> const& simTrackFilter);

//matching without any propagation, just checking basic geometrical agreement between simMuon and candidates
//problem with propagation is the it does not work for low pt muons (pt < ~3GeV)
//which is not good for dumping the data for the NN training. So for that purpose it is better to use the matchSimple
std::vector<MatchingResult> matchSimple(std::vector<const l1t::RegionalMuonCand*>& muonCands,
AlgoMuons& ghostBustedProcMuons,
const edm::SimTrackContainer* simTracks,
const edm::SimVertexContainer* simVertices,
std::function<bool(const SimTrack&)> const& simTrackFilter);

std::vector<MatchingResult> getMatchingResults() { return matchingResults; }

private:
Expand All @@ -182,6 +191,8 @@ class CandidateSimMuonMatcher : public IOMTFEmulationObserver {

TH1D* deltaPhiPropCandMean = nullptr;
TH1D* deltaPhiPropCandStdDev = nullptr;

bool usePropagation = false;
};

#endif /* L1T_OmtfP1_TOOLS_MUONCANDIDATEMATCHER_H_ */
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ class DataROOTDumper2 : public EmulationObserverBase {
std::vector<TH2*> hitVsPt;

bool dumpKilledOmtfCands = false;

bool usePropagation = false;
};

#endif /* L1T_OmtfP1_TOOLS_DATAROOTDUMPER2_H_ */
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ class PatternOptimizerBase : public EmulationObserverBase {

TH1I* simMuPt = nullptr;
TH1I* simMuFoundByOmtfPt = nullptr;
TH1I* simMuEta = nullptr;

TH1I* candEta = nullptr;

TH1F* simMuPtSpectrum = nullptr;
TH2I* simMuPtVsDispl = nullptr;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import FWCore.ParameterSet.Config as cms

omtfParamsSource = cms.ESSource(
"EmptyESSource",
recordName = cms.string('L1TMuonOverlapParamsRcd'),
iovIsRunNotTime = cms.bool(True),
firstValid = cms.vuint32(1)
)

###OMTF ESProducer. Fills CondFormats from XML files.
omtfParams = cms.ESProducer(
"L1TMuonOverlapPhase1ParamsESProducer",
patternsXMLFiles = cms.VPSet(
#patterns used in the CMS from 19 March 2024
cms.PSet(patternsXMLFile = cms.FileInPath("L1Trigger/L1TMuon/data/omtf_config/Patterns_ExtraplMB1nadMB2SimplifiedFP_t17_classProb17_recalib2_minDP0_v3.xml")),
),
#corresponds to the algorithm version used in the CMS from 19 March 2024
configXMLFile = cms.FileInPath("L1Trigger/L1TMuon/data/omtf_config/hwToLogicLayer_0x0009.xml"),
)



1 change: 1 addition & 0 deletions L1Trigger/L1TMuonOverlapPhase1/python/simOmtfDigis_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@
bxMin = cms.int32(0),
bxMax = cms.int32(0),

extrapolFactorsFilename = cms.FileInPath("L1Trigger/L1TMuon/data/omtf_config/ExtrapolationFactors_simple.xml"),
)

This file was deleted.

8 changes: 0 additions & 8 deletions L1Trigger/L1TMuonOverlapPhase1/src/MuonStubMakerBase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ void DtDigiToStubsConverter::makeStubs(MuonStubPtrs2D& muonStubsInLayers,
int bxFrom,
int bxTo,
std::vector<std::unique_ptr<IOMTFEmulationObserver> >& observers) {
if (!dtPhDigis)
return;

for (const auto& digiIt : *dtPhDigis->getContainer()) {
DTChamberId detid(digiIt.whNum(), digiIt.stNum(), digiIt.scNum() + 1);

Expand Down Expand Up @@ -57,9 +54,6 @@ void CscDigiToStubsConverter::makeStubs(MuonStubPtrs2D& muonStubsInLayers,
int bxFrom,
int bxTo,
std::vector<std::unique_ptr<IOMTFEmulationObserver> >& observers) {
if (!cscDigis)
return;

auto chamber = cscDigis->begin();
auto chend = cscDigis->end();
for (; chamber != chend; ++chamber) {
Expand Down Expand Up @@ -87,8 +81,6 @@ void RpcDigiToStubsConverter::makeStubs(MuonStubPtrs2D& muonStubsInLayers,
int bxFrom,
int bxTo,
std::vector<std::unique_ptr<IOMTFEmulationObserver> >& observers) {
if (!rpcDigis)
return;
//LogTrace("l1tOmtfEventPrint") << __FUNCTION__ << ":" << __LINE__ <<" RPC HITS, processor : " << iProcessor<<" "<<std::endl;

const RPCDigiCollection& rpcDigiCollection = *rpcDigis;
Expand Down
8 changes: 8 additions & 0 deletions L1Trigger/L1TMuonOverlapPhase1/src/Omtf/AlgoMuon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ std::ostream &operator<<(std::ostream &out, const AlgoMuon &o) {

return out;
}

unsigned int AlgoMuon::getPatternNum() const {
if (goldenPaternUnconstr == nullptr)
return goldenPaternConstr->key().theNumber;

return (gpResultUnconstr.getPdfSumUnconstr() > gpResultConstr.getPdfSum() ? goldenPaternUnconstr->key().theNumber
: goldenPaternConstr->key().theNumber);
}
23 changes: 16 additions & 7 deletions L1Trigger/L1TMuonOverlapPhase1/src/Omtf/GhostBusterPreferRefDt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,11 @@ AlgoMuons GhostBusterPreferRefDt::select(AlgoMuons muonsIN, int charge) {
} else if (aRefLayerLogicNum == bRefLayerLogicNum && a->getPdfSum() > b->getPdfSum())
return false;
else if (aRefLayerLogicNum == bRefLayerLogicNum && a->getPdfSum() == b->getPdfSum() &&
a->getPatternNum() > b->getPatternNum())
a->getPatternNumConstr() >
b->getPatternNumConstr()) //should be rather getPatternNum(), but for FW getPatternNumConstr() is easier
return false;
else if (aRefLayerLogicNum == bRefLayerLogicNum && a->getPdfSum() == b->getPdfSum() &&
a->getPatternNum() == b->getPatternNum() && a->getRefHitNumber() < b->getRefHitNumber())
a->getPatternNumConstr() == b->getPatternNumConstr())
return false;
else
return true;
Expand All @@ -117,6 +118,11 @@ AlgoMuons GhostBusterPreferRefDt::select(AlgoMuons muonsIN, int charge) {
AlgoMuons refHitCleanCandsFixedEta;

for (unsigned int iMu1 = 0; iMu1 < muonsIN.size(); iMu1++) {
if (muonsIN[iMu1]->getPdfSumConstr() < -1) {
LogTrace("OMTFReconstruction") << *(muonsIN[iMu1]) << std::endl
<< muonsIN[iMu1]->getGpResultConstr() << std::endl
<< muonsIN[iMu1]->getGpResultUnconstr() << std::endl;
}
refHitCleanCandsFixedEta.emplace_back(new AlgoMuon(*(muonsIN[iMu1])));

if (omtfConfig->getStubEtaEncoding() == ProcConfigurationBase::StubEtaEncoding::bits)
Expand All @@ -140,12 +146,15 @@ AlgoMuons GhostBusterPreferRefDt::select(AlgoMuons muonsIN, int charge) {
refHitCleanCandsFixedEta[iMu1]->getKilledMuons().emplace_back(muIN2);

//for the DT stubs, if there is no eta, the middle of the chamber is set as the stub eta, i.e. 75, 79 or 92 respectively
//in this case the eta can be replaced by the eta from the killed algoMuon
//in this case the eta can be replaced by the eta from the killed algoMuon.
//Eta 121 is outside of the OMTF region, therefore all candidates with this eta have quality 0,
//so there is no sense to assign this eta to the candidates with eta 75, 79 or 92.
//The condition abs(muIN2->getEtaHw()) != 121 was added in the FW in 2024
//TODO add 95 meaning no DT segment was found, or don't use 95 in OmtfAngleConverter::getGlobalEta
if (omtfConfig->getRefToLogicNumber()[muIN1->getRefLayer()] <= 5 && (omtfConfig->fwVersion() >= 6) &&
((abs(muIN1->getEtaHw()) == 75 || abs(muIN1->getEtaHw()) == 79 || abs(muIN1->getEtaHw()) == 92)) &&
((abs(muIN2->getEtaHw()) != 75 && abs(muIN2->getEtaHw()) != 79 &&
abs(muIN2->getEtaHw()) != 92))) { //FIXME condition in this do not affects the final result

(abs(muIN1->getEtaHw()) == 75 || abs(muIN1->getEtaHw()) == 79 || abs(muIN1->getEtaHw()) == 92) &&
(abs(muIN2->getEtaHw()) != 75 && abs(muIN2->getEtaHw()) != 79 && abs(muIN2->getEtaHw()) != 92 &&
abs(muIN2->getEtaHw()) != 121)) {
muIN1->setEta(muIN2->getEtaHw());
}
}
Expand Down
17 changes: 12 additions & 5 deletions L1Trigger/L1TMuonOverlapPhase1/src/Omtf/GoldenPatternResult.cc
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ void GoldenPatternResult::finalise10() {
//the efficiency difference between quality 8 and 12 seems to be at a level of 1-2%
//but in the uGT menu e.g. the L1_DoubleMu0_Upt6_IP_Min1_Upt4 uses quality >= 0, so should be OK

//hard cut - the phiB of the refHit must fit to the pdf
//hard cut - the phiB of the refHit must fit to the pdfS
//but this cut has sometimes side effect: there can be a muon which has has pdfSum = 0 for every pattern,
//then in the OMTFSorter<GoldenPatternType>::sortRefHitResults the first pattern that has FiredLayerCnt >= 3 is chosen
//and not the one with highest pdfSum as it should be
Expand Down Expand Up @@ -403,10 +403,13 @@ void GoldenPatternResult::finalise11() {
//so in this case simply pdfSum += 0;
}
} else {
//the penalty is not applied here when the phiB does not fit to the pdf
//because when extrapolation from the ref layer using the phiB is applied
//it "normal" for the displaced muons to not fit to the pdf
pdfSum += stubResults[iLogicLayer].getPdfVal(); //bending layer not fired at all
//bending layer fired, but not fits to the pdf, N.B works only with the patterns having "no hit value" and with noHitValueInPdf = True
if (stubResults[iLogicLayer].getPdfVal() == 0) {
//high penalty, we set the pdf value in the stubResults[iLogicLayer], so that this penalty is removed from pdfSumUnconstr
pdfSum -= 63;
stubResults[iLogicLayer].setPdfVal(-63);
} else
pdfSum += stubResults[iLogicLayer].getPdfVal(); //bending layer not fired at all
}
} else {
if (iLogicLayer < 10 && stubResults[iLogicLayer].getPdfVal() == 0)
Expand Down Expand Up @@ -436,6 +439,10 @@ void GoldenPatternResult::finalise11() {
////////////////////////////////////////////
////////////////////////////////////////////
std::ostream& operator<<(std::ostream& out, const GoldenPatternResult& gpResult) {
if (gpResult.omtfConfig == nullptr) {
out << "empty GoldenPatternResult" << std::endl;
return out;
}
unsigned int refLayerLogicNum = gpResult.omtfConfig->getRefToLogicNumber()[gpResult.getRefLayer()];

unsigned int sumOverFiredLayers = 0;
Expand Down
2 changes: 2 additions & 0 deletions L1Trigger/L1TMuonOverlapPhase1/src/Omtf/OMTFConfiguration.cc
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,8 @@ unsigned int OMTFConfiguration::etaBits2HwEta(unsigned int bits) {
return 115;
else if (bits == 0b000000000)
return 121;
else if (bits == 0b111111111)
return 95;
else
return 0b111111111;
;
Expand Down
32 changes: 25 additions & 7 deletions L1Trigger/L1TMuonOverlapPhase1/src/Omtf/OMTFProcessor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,24 @@ std::vector<l1t::RegionalMuonCand> OMTFProcessor<GoldenPatternType>::getFinalcan

//the charge is only for the constrained measurement. The constrained measurement is always defined for a valid candidate
if (ptAssignment) {
candidate.setHwPt(myCand->getPtNNConstr());
if (myCand->getPdfSumConstr() > 0 && myCand->getFiredLayerCntConstr() >= 3)
candidate.setHwPt(myCand->getPtNNConstr());
else if (myCand->getPtUnconstr() > 0)
candidate.setHwPt(1);
else
candidate.setHwPt(0);

candidate.setHwSign(myCand->getChargeNNConstr() < 0 ? 1 : 0);
} else {
candidate.setHwPt(myCand->getPtConstr());
if (myCand->getPdfSumConstr() > 0 && myCand->getFiredLayerCntConstr() >= 3)
candidate.setHwPt(myCand->getPtConstr());
else if (myCand->getPtUnconstr() > 0)
//if myCand->getPdfSumConstr() == 0, the myCand->getPtConstr() might not be 0, see the end of GhostBusterPreferRefDt::select
//but 0 means empty candidate, 1 means pt=0, therefore here we set HwPt to 1, as the PtUnconstr > 0
candidate.setHwPt(1);
else
candidate.setHwPt(0);

candidate.setHwSign(myCand->getChargeConstr() < 0 ? 1 : 0);
}

Expand All @@ -139,7 +153,7 @@ std::vector<l1t::RegionalMuonCand> OMTFProcessor<GoldenPatternType>::getFinalcan
if (this->myOmtfConfig->fwVersion() <= 6)
quality = checkHitPatternValidity(myCand->getFiredLayerBits()) ? 0 | (1 << 2) | (1 << 3) : 0 | (1 << 2); //12 : 4

if (abs(myCand->getEtaHw()) == 115 && //115 is eta 1.25 rrrrrrrrccccdddddd
if (abs(myCand->getEtaHw()) == 115 && //115 is eta 1.25 rrrrrrrrccccdddddd
(static_cast<unsigned int>(myCand->getFiredLayerBits()) == std::bitset<18>("100000001110000000").to_ulong() ||
static_cast<unsigned int>(myCand->getFiredLayerBits()) == std::bitset<18>("000000001110000000").to_ulong() ||
static_cast<unsigned int>(myCand->getFiredLayerBits()) == std::bitset<18>("100000000110000000").to_ulong() ||
Expand Down Expand Up @@ -281,7 +295,7 @@ std::vector<l1t::RegionalMuonCand> OMTFProcessor<GoldenPatternType>::getFinalcan
trackAddr[1] = myCand->getRefLayer();
trackAddr[2] = myCand->getDisc();
trackAddr[3] = myCand->getGpResultUnconstr().getPdfSumUnconstr();
if (candidate.hwPt() > 0) {
if (candidate.hwPt() > 0 || candidate.hwPtUnconstrained() > 0) {
candidate.setTrackAddress(trackAddr);
candidate.setTFIdentifiers(iProcessor, mtfType);
result.push_back(candidate);
Expand Down Expand Up @@ -467,8 +481,10 @@ int OMTFProcessor<GoldenPatternType>::extrapolateDtPhiBFloatPoint(const int& ref
phiExtr = round(deltaPhiExtr / omtfConfig->omtfPhiUnit()); //[halfStrip]

if (useEndcapStubsRInExtr) {
extrapolFactors[reflLayerIndex][targetLayer][abs(targetStubEta)] += extrFactor;
extrapolFactorsNorm[reflLayerIndex][targetLayer][abs(targetStubEta)]++;
//extrapolFactors[reflLayerIndex][targetLayer][std::abs(targetStubEta)] += extrFactor;
//extrapolFactorsNorm[reflLayerIndex][targetLayer][std::abs(targetStubEta)]++;
extrapolFactors[reflLayerIndex][targetLayer][std::abs(rME)] += extrFactor;
extrapolFactorsNorm[reflLayerIndex][targetLayer][std::abs(rME)]++;
//extrapolFactors[reflLayerIndex][targetLayer][0] += extrFactor;
//extrapolFactorsNorm[reflLayerIndex][targetLayer][0]++;
} else {
Expand Down Expand Up @@ -508,7 +524,7 @@ int OMTFProcessor<GoldenPatternType>::extrapolateDtPhiBFixedPoint(const int& ref
else
extrFactor = extrapolFactors[reflLayerIndex][targetLayer][0];
} else if (targetLayer == 1 || targetLayer == 3 || targetLayer == 5) {
int deltaPhi = targetStubPhi - refPhi; //[halfStrip]
int deltaPhi = targetStubPhi - refPhi; //here targetStubPhi is phi, not phiB

int scaleFactor = this->myOmtfConfig->omtfPhiUnit() * this->myOmtfConfig->dtPhiBUnitsRad() * 512;
//= 305 for phase-1, 512 is multiplier so that scaleFactor is non-zero integer
Expand All @@ -524,7 +540,9 @@ int OMTFProcessor<GoldenPatternType>::extrapolateDtPhiBFixedPoint(const int& ref
if (useEndcapStubsRInExtr) {
//if given abs(targetStubEta) value is not present in the map, it is added with default value of 0
//so it should be good. The only problem is that the map can grow...
//TODO change to targetStubR when it is implemented in the FW
extrFactor = extrapolFactors[reflLayerIndex][targetLayer][abs(targetStubEta)];
//extrFactor = extrapolFactors[reflLayerIndex][targetLayer][abs(targetStubR)];
} else {
extrFactor = extrapolFactors[reflLayerIndex][targetLayer][0];
}
Expand Down
9 changes: 5 additions & 4 deletions L1Trigger/L1TMuonOverlapPhase1/src/Omtf/OMTFReconstruction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ void OMTFReconstruction::beginRun(edm::Run const& run,
}
}

edm::LogVerbatim("OMTFReconstruction") << "OMTFProcessor constructed. processorType " << processorType
<< ". GoldenPattern type: " << patternType << std::endl;
edm::LogVerbatim("OMTFReconstruction")
<< "OMTFProcessor constructed. processorType " << processorType << ". GoldenPattern type: " << patternType
<< " nProcessors " << omtfConfig->nProcessors() << std::endl;
} else if (patternType == "GoldenPatternWithStat") {
//pattern generation is only possible if the processor is constructed only once per job
//PatternGenerator modifies the patterns!!!
Expand Down Expand Up @@ -204,7 +205,7 @@ void OMTFReconstruction::addObservers(
if (edmParameterSet.getParameter<bool>("eventCaptureDebug")) {
observers.emplace_back(std::make_unique<EventCapture>(
edmParameterSet, omtfConfig.get(), candidateSimMuonMatcher, muonGeometryTokens
//&(omtfProcGoldenPat->getPatterns() ),
//, &(omtfProcGoldenPat->getPatterns() )
//watch out, will crash if the proc is re-constructed from the DB after L1TMuonOverlapParamsRcd change
));
}
Expand All @@ -227,7 +228,7 @@ void OMTFReconstruction::addObservers(
if (edmParameterSet.getParameter<bool>("eventCaptureDebug")) {
observers.emplace_back(std::make_unique<EventCapture>(
edmParameterSet, omtfConfig.get(), candidateSimMuonMatcher, muonGeometryTokens
//&(omtfProcGoldenPat->getPatterns() ),
//&(omtfProcGoldenPat->getPatterns() )
//watch out, will crash if the proc is re-constructed from the DB after L1TMuonOverlapParamsRcd change
));
}
Expand Down
Loading

0 comments on commit 91d48db

Please sign in to comment.