48 int processor= iProcessor+1;
51 int sector = digi.
scNum()+1;
52 int wheel = digi.
whNum();
54 int phiDT = digi.
phi();
56 if (posneg*2 != wheel)
return dummy;
57 if (station > 3 )
return dummy;
60 if (processor !=6 && !(sector >= processor*2-1 && sector <= processor*2+1) )
return dummy;
61 if (processor ==6 && !(sector >= 11 || sector==1) )
return dummy;
64 int ichamber = sector-1-2*(processor-1);
65 if (ichamber < 0) ichamber += 12;
67 int offsetLoc = lround( ((ichamber-1)*
M_PI/6+
M_PI/12.)/hsPhiPitch );
68 double scale = 1./4096/hsPhiPitch;
70 int phi =
static_cast<int>(phiDT*
scale) + offsetLoc;
82 int processor= iProcessor+1;
89 if (posneg != csc.
zendcap())
return dummy;
92 if (csc.
chamber() < (processor-1)*6 + 2)
return dummy;
93 if (csc.
chamber() > (processor-1)*6 + 8)
return dummy;
113 double scale = fabs(stripPhiPitch/hsPhiPitch/2.);
if ( fabs(scale-1.) < 0.0002) scale=1.;
114 double phi15deg =
M_PI/3.*(processor-1)+
M_PI/12.;
115 double phiHalfStrip0 = layer->
centerOfStrip(10).
phi() - order*9*stripPhiPitch - order*stripPhiPitch/4.;
116 if ( processor==6 || phiHalfStrip0<0) phiHalfStrip0 += 2*
M_PI;
117 int offsetLoc = lround( (phiHalfStrip0-phi15deg)/hsPhiPitch );
121 int phi = offsetLoc + order*scale*halfStrip;
133 int processor = iProcessor+1;
135 if (!roll)
return dummy;
137 double phi15deg =
M_PI/3.*(processor-1)+
M_PI/12.;
143 case 6: {phi15deg -= 2*
M_PI;
break; }
144 default : {
if (stripPhi < 0) stripPhi += 2*
M_PI;
break; }
148 int halfStrip = lround ( (stripPhi-phi15deg)/hsPhiPitch );
162 std::unique_ptr<DTChamber> chamb(const_cast<DTChamber*>(
_geodt->chamber(baseid)));
164 std::unique_ptr<DTTrigGeom> trig_geom(
new DTTrigGeom(chamb.get(),
false) );
172 const int NBTI_theta = ( (baseid.station() != 4) ?
173 trig_geom->nCell(2) : trig_geom->nCell(3) );
175 const unsigned bti_actual = bti_group*NBTI_theta/7 + NBTI_theta/14 + 1;
177 if ( baseid.station() != 4 && bti_group != -1) {
178 thetaBTI =
DTBtiId(baseid,2,bti_actual);
182 thetaBTI =
DTBtiId(baseid,3,1);
184 const GlobalPoint theta_gp = trig_geom->CMSPosition(thetaBTI);
185 int iEta = theta_gp.
eta()/2.61*240;
204 std::unique_ptr<const CSCChamber> chamb(
_geocsc->chamber(
id));
205 std::unique_ptr<const CSCLayerGeometry> layer_geom(
208 std::unique_ptr<const CSCLayer> layer(
212 const uint16_t halfstrip = aDigi.
getStrip();
214 const uint16_t keyWG = aDigi.
getKeyWG();
224 const unsigned halfstrip_offs = unsigned(0.5 + halfstrip + offset);
225 const unsigned strip = halfstrip_offs/2 + 1;
230 layer_geom->stripWireGroupIntersection(strip,keyWG);
231 const GlobalPoint coarse_gp = layer->surface().toGlobal(coarse_lp);
235 const double hs_offset = layer_geom->stripPhiPitch()/4.0;
240 const double phi_offset = ( ( halfstrip_offs%2 ? 1 : -1)*
241 ( ccw ? -hs_offset : hs_offset ) );
251 layer_geom.release();
254 int iEta = final_gp.
eta()/2.61*240;
262 std::unique_ptr<const RPCRoll> roll(
_georpc->roll(
id));
263 const LocalPoint lp = roll->centreOfStrip((
int)strip);
267 float iEta = gp.
eta()/2.61*240;
276 const int nStrips = layer->geometry()->numberOfStrips();
277 const double phi1 = layer->centerOfStrip(1).phi();
278 const double phiN = layer->centerOfStrip(nStrips).phi();
279 return ( (
std::abs(phi1 - phiN) <
M_PI && phi1 >= phiN) ||
293 if(!theta_segm)
return bti_group;
295 for(
unsigned int i = 0;
i < 7; ++
i ){
296 if(theta_segm->
position(
i) && bti_group<0) bti_group =
i;
300 else if(theta_segm->
position(
i) && bti_group>-1)
return -1;
unsigned long long cacheIdentifier() const
LocalPoint centreOfStrip(int strip) const
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Geom::Phi< T > phi() const
int getGlobalEta(unsigned int rawid, const L1MuDTChambPhDigi &aDigi, const L1MuDTChambThContainer *dtThDigis)
Convert local eta coordinate to global digital microGMT scale.
unsigned long long _geom_cache_id
int position(const int i) const
Geom::Theta< T > theta() const
int getProcessorPhi(unsigned int iProcessor, l1t::tftype part, const L1MuDTChambPhDigi &digi) const
float stripPhiPitch() const
const CSCChamberSpecs * specs() const
void get(HolderT &iHolder) const
Abs< T >::type abs(const T &t)
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to the given id.
const int findBTIgroup(const L1MuDTChambPhDigi &aDigi, const L1MuDTChambThContainer *dtThDigis)
Find BTI group.
bool isCSCCounterClockwise(const std::unique_ptr< const CSCLayer > &layer) const
Check orientation of strips in given CSC chamber.
T value() const
Explicit access to value in case implicit conversion not OK.
short int zendcap() const
GlobalPoint centerOfStrip(int strip) const
static double get2007Position(int pattern)
L1MuDTChambThDigi const * chThetaSegm(int wheel, int stat, int sect, int bx) const
edm::ESHandle< CSCGeometry > _geocsc
edm::ESHandle< RPCGeometry > _georpc
static const OMTFConfiguration * instance()
void checkAndUpdateGeometry(const edm::EventSetup &)
Update the Geometry with current Event Setup.
edm::ESHandle< DTGeometry > _geodt