Commit 4a2e3e2f authored by Tamara Vazquez Schroeder's avatar Tamara Vazquez Schroeder
Browse files

Merge branch 'revert-340f17d2' into '21.0'

Revert "Merge branch 'cherrypick-MR4133-21.0' into '21.0'"

See merge request !4309

Former-commit-id: 0ec0d1ed7cd68212bb64fdfbc1c096f4840cee8b
parents c7faa24e 7a2a69e2
......@@ -139,13 +139,12 @@ MuonInputProvider::createMuonTOB(const MuCTPIL1TopoCandidate & roi) const {
int etaTopo = roi.getieta();
int phiTopo = roi.getiphi();
if( phiTopo > 31 ) phiTopo -= 64;
unsigned int pt = topoMuonPtThreshold(roi);
const unsigned int iso = 0;
TCS::MuonTOB muon( pt, iso, etaTopo, phiTopo, roi.getRoiID() );
TCS::MuonTOB muon( roi.getptValue(), 0, etaTopo, phiTopo, roi.getRoiID() );
muon.setEtaDouble( etaTopo );
muon.setPhiDouble( phiTopo );
m_hPt->Fill(pt);
m_hPt->Fill(muon.Et());
m_hEtaPhi->Fill(muon.eta(),muon.phi());
return muon;
......@@ -157,16 +156,15 @@ MuonInputProvider::createLateMuonTOB(const MuCTPIL1TopoCandidate & roi) const {
float phi = roi.getphi();
if(phi<-M_PI) phi+=2.0*M_PI;
if(phi> M_PI) phi-=2.0*M_PI;
unsigned int pt = topoMuonPtThreshold(roi);
const unsigned int iso = 0;
ATH_MSG_DEBUG("Late Muon ROI (MuCTPiToTopo):bcid=1 thr pt = " << pt << " eta = " << roi.geteta() << " phi = " << phi << ", w = " << MSG::hex << std::setw( 8 ) << roi.getRoiID() << MSG::dec);
TCS::LateMuonTOB muon( pt, iso, int(10*roi.geteta()), int(10*phi), roi.getRoiID() );
ATH_MSG_DEBUG("Late Muon ROI (MuCTPiToTopo):bcid=1 thr pt = " << roi.getptThresholdID() << " eta = " << roi.geteta() << " phi = " << phi << ", w = " << MSG::hex << std::setw( 8 ) << roi.getRoiID() << MSG::dec);
TCS::LateMuonTOB muon( roi.getptValue(), 0, int(10*roi.geteta()), int(10*phi), roi.getRoiID() );
muon.setEtaDouble( roi.geteta() );
muon.setPhiDouble( phi );
m_hPt->Fill(pt);
m_hPt->Fill(muon.Et());
m_hEtaPhi->Fill(muon.eta(),muon.phi());
ATH_MSG_DEBUG("LateMuon created");
......@@ -202,7 +200,7 @@ MuonInputProvider::fillTopoInputEvent(TCS::TopoInputEvent& inputEvent) const {
for( const ROIB::MuCTPIRoI & muonRoI : rois ) {
if( !( muonRoI.roIWord() & LVL1::CandidateVetoMask ) )
inputEvent.addMuon(MuonInputProvider::createMuonTOB( muonRoI.roIWord() ));
inputEvent.addMuon( MuonInputProvider::createMuonTOB( muonRoI.roIWord() ) );
// overflow implemented only for reduced granularity encoding (see below)
else
ATH_MSG_DEBUG(" Ignore Vetoed L1 Mu RoI " << muonRoI.roIWord() );
......@@ -225,7 +223,7 @@ MuonInputProvider::fillTopoInputEvent(TCS::TopoInputEvent& inputEvent) const {
continue;
if( !( roiword & LVL1::CandidateVetoMask ) )
inputEvent.addMuon(MuonInputProvider::createMuonTOB( roiword ));
inputEvent.addMuon( MuonInputProvider::createMuonTOB( roiword ) );
else
ATH_MSG_DEBUG(" Ignore Vetoed L1 Mu RoI " << roiword );
......@@ -249,7 +247,7 @@ MuonInputProvider::fillTopoInputEvent(TCS::TopoInputEvent& inputEvent) const {
for( std::vector<MuCTPIL1TopoCandidate>::const_iterator iMuCand = candList.begin(); iMuCand != candList.end(); iMuCand++)
{
//MuonInputProvider::createMuonTOB( *iMuCand );
inputEvent.addMuon(MuonInputProvider::createMuonTOB( *iMuCand ));
inputEvent.addMuon( MuonInputProvider::createMuonTOB( *iMuCand ) );
if(iMuCand->moreThan2CandidatesOverflow()){
inputEvent.setOverflowFromMuonInput(true);
ATH_MSG_DEBUG("setOverflowFromMuonInput : true (MuCTPIL1TopoCandidate from SG)");
......@@ -266,7 +264,7 @@ MuonInputProvider::fillTopoInputEvent(TCS::TopoInputEvent& inputEvent) const {
for( const MuCTPIL1TopoCandidate & cand : l1topo.getCandidates() ) {
inputEvent.addMuon(MuonInputProvider::createMuonTOB( cand ));
inputEvent.addMuon( MuonInputProvider::createMuonTOB( cand ) );
if(cand.moreThan2CandidatesOverflow()){
inputEvent.setOverflowFromMuonInput(true);
ATH_MSG_DEBUG("setOverflowFromMuonInput : true (MuCTPIL1TopoCandidate from MuctpiSimTool)");
......@@ -295,16 +293,3 @@ MuonInputProvider::fillTopoInputEvent(TCS::TopoInputEvent& inputEvent) const {
return StatusCode::SUCCESS;
}
unsigned int MuonInputProvider::topoMuonPtThreshold(const MuCTPIL1TopoCandidate &mctpiCand) const
{
unsigned int threshold = 0;
for(const TrigConf::TriggerThreshold* thr : m_MuonThresholds) {
if(static_cast< unsigned int >(thr->thresholdNumber()) == mctpiCand.getptL1TopoCode()) {
const int ieta = 0;
const int iphi = 0;
threshold = thr->triggerThresholdValue(ieta, iphi)->ptcut();
break;
}
}
return threshold;
}
......@@ -54,17 +54,6 @@ namespace LVL1 {
TCS::MuonTOB createMuonTOB(uint32_t roiword) const;
TCS::MuonTOB createMuonTOB(const MuCTPIL1TopoCandidate & roi) const;
TCS::LateMuonTOB createLateMuonTOB(const MuCTPIL1TopoCandidate & roi) const;
/**
@brief convert the 2-bit value from MuCTPIL1TopoCandidate::getptL1TopoCode() to an actual pt
The muon TOB encodes pt values in 2 bits.
A MuCTPIL1TopoCandidate provides the encoded 2-bit value with
the function getptL1TopoCode().
This function uses the information from the l1 trigger menu
configuration to convert the threshold to an actual pt value.
For more details, see ATR-16781.
*/
unsigned int topoMuonPtThreshold(const MuCTPIL1TopoCandidate &mctpiCand) const;
StringProperty m_roibLocation;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment