146 std::cout <<
"No theta superlayer in station 4!" << std::endl;
169 if ( nlay==4 && ntube==1) {
170 std::cout <<
"ATTENTION: no wire nuber 1 for 4th layer!!!" << std::endl;
196 std::cout <<
"No theta superlayer in station 4!" << std::endl;
245 std::cout << setiosflags(std::ios::showpoint | std::ios::fixed) << std::setw(4) <<
246 std::setprecision(1);
251 std::cout <<
"Position: Mag=" << pp.
mag() <<
"cm, Phi=" << pp.
phi()*180/3.14159;
252 std::cout <<
" deg, Z=" << pp.
z() <<
" cm" << std::endl;
253 std::cout <<
"Rotation: ANGLE=" <<
phiCh()*180/3.14159 << std::endl;
255 std::cout <<
"Z of superlayers: phi=" <<
ZSL(1) <<
", ";
259 " sl 3 " <<
nCell(3) << std::endl;
269 std::cout <<
"DTTrigGeom::ZSL: wrong SL number: " << sl;
270 std::cout << -999 <<
" returned" << std::endl;
283 std::cout <<
"Position: Mag=" << pp.
mag() <<
"cm, Phi=" << pp.
phi()*180/3.14159;
284 std::cout <<
" deg, Z=" << pp.
z() <<
" cm" << std::endl;
285 std::cout <<
"Rotation: ANGLE=" <<
phiCh()*180/3.14159 << std::endl;
286 std::cout <<
"Z of superlayers: phi=" <<
ZSL(1) <<
", ";
289 " SL3=" <<
nCell(3) << std::endl;
290 std::cout <<
"First wire positions:" << std::endl;
293 for( ii = 1; ii<=3; ii++ ) {
295 for ( jj =1; jj<=4; jj++ ) {
296 std::cout <<
" SL=" << ii <<
", lay=" << jj <<
", wire 1 position=";
310 std::cout <<
" Position: R=" << gp1.
perp() <<
"cm, Phi=" << gp1.
phi()*180/3.14159 <<
" deg, Z=" << gp1.
z() <<
" cm" << std::endl;
316 std::cout <<
" Position: R=" << gp2.
perp() <<
"cm, Phi=" << gp2.
phi()*180/3.14159 <<
" deg, Z=" << gp2.
z() <<
" cm" << std::endl;
321 std::cout <<
" Position: R=" << gp3.
perp() <<
"cm, Phi=" << gp3.
phi()*180/3.14159 <<
" deg, Z=" << gp3.
z() <<
" cm" << std::endl;
325 std::cout <<
"******************************************************" << std::endl;
337 string name =
"Lut_from_CMSSW_geom";
356 fout.open(name.c_str(),ofstream::app);
369 float SL_shift = xBTI1_3 - xBTI1_1;
386 d = fabs(traco_1.
x());
387 xcn = fabs(traco_1.
y());
391 xcn_sign =
static_cast<int>(pp.
y()/fabs(pp.
y()))*
static_cast<int>(traco_1.
y()/fabs(traco_1.
y()));
393 xcn_sign = - xcn_sign;
397 float m1 = (traco_2.
y()-traco_1.
y())/(traco_2.
x()-traco_1.
x());
398 float q1 = traco_1.
y()-m1*traco_1.
x();
400 float xn = q1/(m-m1);
403 d =
sqrt(xn*xn+yn*yn);
404 xcn =
sqrt( (xn-traco_1.
x())*(xn-traco_1.
x()) + (yn-traco_1.
y())*(yn-traco_1.
y()) );
409 float diff = (pp.
x()-traco_1.
x())*traco_1.
y();
410 xcn_sign =
static_cast<int>(diff/fabs(diff));
421 short int Low_byte = (btic & 0x00FF);
422 short int High_byte =( btic>>8 & 0x00FF);
423 fout << setw(2) << setfill(
'0') << hex << High_byte << setw(2) << setfill(
'0') << Low_byte;
426 short int DSPmantissa = 0;
427 short int DSPexp = 0;
431 Low_byte = (DSPmantissa & 0x00FF);
432 High_byte =( DSPmantissa>>8 & 0x00FF);
433 fout << setw(2) << setfill(
'0') << hex << High_byte << setw(2) << setfill(
'0') << Low_byte;
434 Low_byte = (DSPexp & 0x00FF);
435 High_byte =( DSPexp>>8 & 0x00FF);
436 fout << setw(2) << setfill(
'0') << High_byte << setw(2) << setfill(
'0') << Low_byte;
442 Low_byte = (DSPmantissa & 0x00FF);
443 High_byte =( DSPmantissa>>8 & 0x00FF);
444 fout << setw(2) << setfill(
'0') << hex << High_byte << setw(2) << setfill(
'0') << Low_byte;
445 Low_byte = (DSPexp & 0x00FF);
446 High_byte =( DSPexp>>8 & 0x00FF);
447 fout << setw(2) << setfill(
'0') << High_byte << setw(2) << setfill(
'0') << Low_byte;
450 Low_byte = (xcn_sign & 0x00FF);
451 High_byte =( xcn_sign>>8 & 0x00FF);
452 fout << setw(2) << setfill(
'0') << hex << High_byte << setw(2) << setfill(
'0') << Low_byte << dec <<
"\n";
471 memcpy(pl,&f,
sizeof(
float));
472 if((*pl & 0x80000000)!=0)
474 lm = ( 0x800000 | (*pl & 0x7FFFFF));
477 DSPexp = ((*pl>>23)&0xFF)-126;
478 DSPmantissa = (short)lm;
480 DSPmantissa = - DSPmantissa;
529 int nsl =
id.superlayer();
535 float zt = -
cellH() * 3./2.;
DTTrigGeom(DTChamber *stat, bool debug)
Constructor.
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
int sector() const
Return sector number.
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
Local3DVector LocalVector
int mapTubeInFEch(int nsl, int nlay, int ntube) const
Staggering of first wire of layer respect to default: obsolete 19/6/06.
float phiCh() const
Rotation angle of chamber (deg)
float cellPitch() const
Width of a cell (cm) i.e. distance between ywo wires.
int wheel() const
Return wheel number.
const int channels() const
Returns the number of wires in the layer.
void setGeom(const DTChamber *stat)
Set/Update Geometry.
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Geom::Phi< T > phi() const
void dumpLUT(short int btic)
Dump the LUT for this chamber.
GlobalPoint toGlobal(const LocalPoint p) const
Go to CMS coordinate system for a point.
void dumpGeom() const
Dump the geometry.
const int firstChannel() const
Returns the wire number of the first wire.
static int position[TOTALCHAMBERS][3]
const DTTopology & specificTopology() const
float distSL() const
Distance between the phi view superlayers (cms)
float cellH() const
Height of a cell (cm)
LocalPoint toLocal(const GlobalPoint &gp) const
float ZcenterSL() const
Coordinate of center of the 2 Phi SL.
Tan< T >::type tan(const T &t)
int posFE(int sl) const
Front End position : 1=toward negative y, 0=toward positive y.
unsigned int offset(bool)
const DTLayer * layer(DTLayerId id) const
Return the layer corresponding to the given id.
int station() const
Return station number.
LocalPoint tubePosInCh(int nsl, int nlay, int ntube) const
Wire position in chamber frame.
float phiSLOffset()
Superlayer offset in chamber front-end frame, in cm.
DTChamberId statId() const
Identifier of the associated chamber.
void getGeom()
Get the geometry from the station.
LocalPoint localPosition(const DTBtiId) const
Local position in chamber of a BTI.
const DTChamber * stat() const
Associated chamber.
void IEEE32toDSP(float f, short int &DSPmantissa, short int &DSPexp)
GlobalPoint CMSPosition(const DTBtiId obj) const
CMS position of a BTI.
int nCell(int sl) const
Number of BTIs in a required superlayer (i.e. nCells in lay 1)
virtual const BoundPlane & surface() const
The nominal surface of the GeomDet.
float ZSL(int) const
Radial coordinate in chamber frame of center of a superlayer.
const DTSuperLayer * superLayer(DTSuperLayerId id) const
Return the superlayer corresponding to the given id.