Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-05-10 02:21:02

0001 #include "L1Trigger/L1TMuonOverlapPhase2/interface/OmtfPhase2AngleConverter.h"
0002 
0003 int OmtfPhase2AngleConverter::getProcessorPhi(int phiZero, l1t::tftype part, int dtScNum, int dtPhi) const {
0004   constexpr int dtPhiBins = 65536;          //65536. for [-0.5,0.5] radians
0005   double hsPhiPitch = 2 * M_PI / nPhiBins;  // width of phi Pitch, related to halfStrip at CSC station 2
0006 
0007   int sector = dtScNum + 1;  //NOTE: there is a inconsistency in DT sector numb. Thus +1 needed to get detector numb.
0008 
0009   double scale = 0.5 / dtPhiBins / hsPhiPitch;  //was 0.8
0010   int scale_coeff = lround(scale * (1 << 15));
0011 
0012   int ichamber = sector - 1;
0013   if (ichamber > 6)
0014     ichamber = ichamber - 12;
0015 
0016   int offsetGlobal = (int)nPhiBins * ichamber / 12;
0017 
0018   int phiConverted = ((dtPhi * scale_coeff) >> 15) + offsetGlobal - phiZero;
0019 
0020   return config->foldPhi(phiConverted);
0021 }
0022 
0023 /* TODO implement the etat for the phase2 stubs
0024 int getGlobalEta(const DTChamberId dTChamberId, const L1Phase2MuDTThContainer *dtThDigis, int bxNum) const {
0025 
0026   //const DTChamberId dTChamberId(aDigi.whNum(),aDigi.stNum(),aDigi.scNum()+1);
0027   DTTrigGeom trig_geom(_geodt->chamber(dTChamberId), false);
0028 
0029 
0030 }
0031 */