Skip to content
Snippets Groups Projects

Optimization of Run-2 TGC-BW Coincidence Window

Merged Junpei Maeda requested to merge junpei/athena:run2TgcBwLUTopt_2020-12 into master
All threads resolved!
1 file
+ 12
11
Compare changes
  • Side-by-side
  • Inline
@@ -67,10 +67,9 @@ TGCRPhiCoincidenceOut* TGCRPhiCoincidenceMatrix::doCoincidence()
out->setIdSSC(m_SSCId);
int j0 = -1;
int ptMax=-1;
int ptMax = 1;
for( int j=m_nPhiHit-1; j>=0; j-=1){ // left half-SSC has priority when both output same pT
int subsector;
int ptOut = -99;
int chargeOut = 2;
int CoincidenceTypeOut=-1;
@@ -80,9 +79,10 @@ TGCRPhiCoincidenceOut* TGCRPhiCoincidenceMatrix::doCoincidence()
subsector = 4*(2*m_SSCId+m_r)+m_phi[j];
}
int type = m_map->getMapType(m_ptR, m_ptPhi[j]);
// calculate pT of muon candidate
uint8_t ptOut = 0; // 0 is no candidate.
if(tgcArgs()->useRun3Config()){
//Algorithm for Run3
int pt=m_map->test_Run3(m_sectorLogic->getOctantID(),m_sectorLogic->getModuleID(),
@@ -93,19 +93,20 @@ TGCRPhiCoincidenceOut* TGCRPhiCoincidenceMatrix::doCoincidence()
CoincidenceTypeOut=(type==0);
} else { // for Run-2
uint8_t pt = m_map->test(m_sectorLogic->getOctantID(),
m_sectorLogic->getModuleID(), subsector,
type, m_dR, m_dPhi[j]);
if(pt>0) ptOut = pt + 1; // +1 is temporary numbering for the following codes
ptOut = m_map->test(m_sectorLogic->getOctantID(),
m_sectorLogic->getModuleID(), subsector,
type, m_dR, m_dPhi[j]);
}
// Trigger Out
if( ptOut >= ptMax ){
// Trigger Out (only pT>0 candidate
if(ptOut >= ptMax) {
ptMax = ptOut;
out->clear();
out->setIdSSC(m_SSCId);
if(!tgcArgs()->useRun3Config()){out->setHit(ptMax+1);}// for Run2 Algo
else{out->setpT(ptMax);}// for Run3 Algo
if(!tgcArgs()->useRun3Config()) out->setHit(ptMax); // for Run2 Algo
else out->setpT(ptMax); // for Run3 Algo
out->setR(m_r);
out->setPhi(m_phi[j]);
out->setDR(m_dR);
Loading