#include <UgliDbiTables.h>
|
|
Definition at line 120 of file UgliDbiTables.cxx. References MSG. 00120 : 00121 fAlgorithmic(false), fVldContext(vldc), 00122 fDetector(vldc.GetDetector()), 00123 fGeomTbl(vldc), fSteelTbl(vldc), 00124 fScintPlnStructTbl(vldc), fScintPlnTbl(vldc), 00125 fScintMdlStructTbl(vldc), fScintMdlTbl(vldc), 00126 fStripStructTbl(vldc), fStripTbl(vldc) 00127 { 00128 // Normal constructor 00129 MSG("Ugli",Msg::kDebug) << "UgliDbiTables normal vldc ctor" << endl; 00130 }
|
|
||||||||||||
|
Definition at line 134 of file UgliDbiTables.cxx. References MSG. 00134 : 00135 fAlgorithmic(true), fVldContext(vldc), fDetector(vldc.GetDetector()), 00136 fScintPlnStructTbl(vldc), 00137 fScintMdlStructTbl(vldc), 00138 fStripStructTbl(vldc) 00139 { 00140 // Empty constructor 00141 // "b" is used only to make the signature different 00142 MSG("Ugli",Msg::kDebug) << "UgliDbiTables empty ctor" << endl; 00143 }
|
|
|
Definition at line 147 of file UgliDbiTables.cxx. References MSG. 00148 {
00149 // Normal dtor
00150 MSG("Ugli",Msg::kDebug) << "UgliDbiTables default dtor" << endl;
00151 }
|
|
|
Definition at line 155 of file UgliDbiTables.cxx. References fGeomTbl, fVldContext, DbiResultPtr< T >::GetNumRows(), DbiResultPtr< T >::GetRow(), and MSG. Referenced by GeoGeometry::BuildGeometry(), and UgliGeometry::BuildNodes(). 00156 {
00157
00158 // if use real tables if we have them
00159
00160 if (!fAlgorithmic) {
00161 int nrows = fGeomTbl.GetNumRows();
00162 if (nrows != 1) {
00163 MSG("Ugli",Msg::kError)
00164 << "UgliDbiGeometry unexpectedly had "
00165 << nrows << " rows " << endl
00166 << " for VldContext: " << fVldContext << endl;
00167 if (nrows < 1) return 0;
00168 }
00169 return fGeomTbl.GetRow(0);
00170 }
00171
00172 // algorithmic approach
00173
00174 static UgliDbiGeometry* geo = 0;
00175 if (geo) { delete geo; geo = 0; }
00176
00177 const Float_t near_min[] = {-4.358,-2.591,-49.07};
00178 const Float_t near_max[] = { 4.786, 2.591, 19.63};
00179 const Float_t far_min[] = {-6.9, -5.8, -0.75};
00180 const Float_t far_max[] = { 6.9, 5.8, 81.55};
00181 const Float_t caldet_min[] = {-1.5, -1.5, 0.0};
00182 const Float_t caldet_max[] = { 1.5, 1.5, 14.0};
00183
00184 switch (fDetector) {
00185 case Detector::kNear:
00186 geo = new UgliDbiGeometry(Detector::kNear,false,near_min,near_max);
00187 break;
00188 case Detector::kFar:
00189 geo = new UgliDbiGeometry(Detector::kFar,false,far_min,far_max);
00190 break;
00191 case Detector::kCalDet:
00192 geo = new UgliDbiGeometry(Detector::kCalDet,true,caldet_min,caldet_max);
00193 break;
00194 default:
00195 MSG("Ugli",Msg::kFatal)
00196 << "no algorithmic UgliDbiGeometry for " << fVldContext << endl;
00197 break;
00198 }
00199 return geo;
00200 }
|
|
|
Definition at line 393 of file UgliDbiTables.cxx. References fScintMdlTbl, fVldContext, PlexScintMdlId::GetModule(), PlexPlaneId::GetPlane(), DbiResultPtr< T >::GetRowByIndex(), UgliDbiScintMdl::HashToIndex(), and MSG. Referenced by GeoGeometry::BuildModules(), UgliScintMdlNode::UgliScintMdlNode(), and UgliStripNode::UgliStripNode(). 00394 {
00395 int mdl_indx = UgliDbiScintMdl::HashToIndex(mdlid);
00396
00397 // if use real tables if we have them
00398
00399 if (!fAlgorithmic) return fScintMdlTbl.GetRowByIndex(mdl_indx);
00400
00401 // algorithmic approach
00402
00403 static UgliDbiScintMdl* scintMdlRow = 0;
00404 if (scintMdlRow) { delete scintMdlRow; scintMdlRow = 0; }
00405
00406 unsigned int ipln = mdlid.GetPlane();
00407 unsigned int imdl = mdlid.GetModule();
00408
00409 switch (fDetector) {
00410 // case Detector::kNear:
00411 // steelRow = 0;
00412 // break;
00413 case Detector::kFar:
00414 {
00415 //const int nstrips_mdl[] = { 28, 28, 20, 20, 20, 20, 28, 28};
00416 //const int nmdl = sizeof(nstrips_mdl)/sizeof(int);
00417 const float farMdlWidth[8] =
00418 { 1.153, 1.153, 0.825, 0.825, 0.825, 0.825, 1.153, 1.153 };
00419 const float farMdlTPos[8] =
00420 { -3.378, -2.225, -1.237, -0.412, 0.412, 1.237, 2.225, 3.378 };
00421
00422 float width = farMdlWidth[imdl];
00423 float tpos = farMdlTPos[imdl];
00424 const float lpos = 0.0;
00425 const float zrot = 0.0;
00426
00427 // completely bogus clear & WLS lengths
00428 float clearE=3, clearW=3, wlsE=0, wlsW=0;
00429
00430 scintMdlRow = new UgliDbiScintMdl(mdlid,width,tpos,lpos,zrot,
00431 clearE,clearW,wlsE,wlsW);
00432 }
00433 break;
00434 case Detector::kCalDet:
00435 {
00436 const float width = 0.9835 * Munits::m;
00437 const float tpos=0.0, lpos=0.0, zrot=0.0;
00438 float clearE=0, clearW=6, wlsE=4, wlsW=0;
00439 if (ipln & 1) { clearE=6; clearW=0; wlsE=0; wlsW=4; }
00440 if (ipln >= 61 ) { clearE=6; clearW=6; wlsE=0; wlsW=0; }
00441 scintMdlRow = new UgliDbiScintMdl(mdlid,width,tpos,lpos,zrot,
00442 clearE,clearW,wlsE,wlsW);
00443 }
00444 break;
00445 default:
00446 break;
00447 }
00448 if (!scintMdlRow)
00449 MSG("Ugli",Msg::kFatal)
00450 << "no algorithmic UgliDbiScintMdl for " << fVldContext << endl;
00451
00452 return scintMdlRow;
00453 }
|
|
|
Definition at line 334 of file UgliDbiTables.cxx. References fDetector, fScintPlnTbl, fVldContext, PlexPlaneId::GetPlaneView(), DbiResultPtr< T >::GetRowByIndex(), and MSG. Referenced by GeoGeometry::BuildPlanePairVolumes(), and UgliScintPlnNode::UgliScintPlnNode(). 00335 {
00336
00337 // if use real tables if we have them
00338
00339 if (!fAlgorithmic) return fScintPlnTbl.GetRowByIndex(ipln);
00340
00341 // algorithmic approach
00342
00343 static UgliDbiScintPln* scintPlnRow = 0;
00344 if (scintPlnRow) { delete scintPlnRow; scintPlnRow = 0; }
00345
00346 PlexPlaneId plnid(fDetector,ipln,false);
00347 const float scintthick = 1.1 * Munits::cm;
00348 const float nominalgap = 2.0 * Munits::mm;
00349
00350 const float piby4 = 0.25*TMath::Pi();
00351 const float pi3by2 = 1.5*TMath::Pi();
00352
00353 const float vrot = piby4;
00354 const float urot = -vrot;
00355
00356 switch (fDetector) {
00357 // case Detector::kNear:
00358 // steelRow = 0;
00359 // break;
00360 case Detector::kFar:
00361 {
00362 float gap = nominalgap;
00363 const float x0=0.0, y0=0.0;
00364 float zrot = (PlaneView::kV==plnid.GetPlaneView()) ? vrot : urot ;
00365
00366 scintPlnRow = new UgliDbiScintPln(plnid,scintthick,gap,x0,y0,zrot);
00367 }
00368 break;
00369 case Detector::kCalDet:
00370 {
00371 float gap = nominalgap;
00372 const float x0=0.0, y0=0.0;
00373 float zrot = (ipln&1) ? pi3by2 : 0.0;
00374 if (ipln >= 61 ) {
00375 gap = 0.0;
00376 zrot = 0;
00377 }
00378 scintPlnRow = new UgliDbiScintPln(plnid,scintthick,gap,x0,y0,zrot);
00379 }
00380 break;
00381 default:
00382 break;
00383 }
00384 if (!scintPlnRow)
00385 MSG("Ugli",Msg::kFatal)
00386 << "no algorithmic UgliDbiScintPln for " << fVldContext << endl;
00387
00388 return scintPlnRow;
00389 }
|
|
|
Definition at line 242 of file UgliDbiTables.cxx. References fSteelTbl, GetDbiSteelPlnByIndex(), and DbiResultPtr< T >::GetRow(). Referenced by UgliGeometry::BuildNodes(). 00243 {
00244
00245 // if use real tables if we have them
00246
00247 if (!fAlgorithmic) return fSteelTbl.GetRow(irow);
00248
00249 // algorithmic approach
00250
00251 return GetDbiSteelPlnByIndex(irow);
00252 }
|
|
|
Definition at line 255 of file UgliDbiTables.cxx. References fDetector, fSteelTbl, fVldContext, PlexPlaneId::GetPlaneCoverage(), DbiResultPtr< T >::GetRowByIndex(), PlexPlaneId::LastPlaneFarSM0(), and MSG. Referenced by GetDbiSteelPln(), and UgliSteelPlnNode::UgliSteelPlnNode(). 00256 {
00257
00258 // if use real tables if we have them
00259
00260 if (!fAlgorithmic) return fSteelTbl.GetRowByIndex(ipln);
00261
00262 // algorithmic approach
00263
00264 static UgliDbiSteelPln* steelRow = 0;
00265 if (steelRow) { delete steelRow; steelRow = 0; }
00266
00267 PlexPlaneId plnid(fDetector,ipln,true);
00268 const float steelthick = 2.54 * Munits::cm;
00269 const float steelpitch = 5.94 * Munits::cm;
00270 const float pi = TMath::Pi();
00271 const float piby2 = 0.5*TMath::Pi();
00272 const float pi3by2 = 1.5*TMath::Pi();
00273
00274 switch (fDetector) {
00275 // case Detector::kNear:
00276 // steelRow = 0;
00277 // break;
00278 case Detector::kFar:
00279 {
00280 int melt = 1000120;
00281 float totalz = steelthick +
00282 ((PlaneCoverage::kNoActive==plnid.GetPlaneCoverage()) ?
00283 0.0020 : 0.0130);
00284 const float zback0 = -0.0320 + steelpitch;
00285 // nominal steel spacing
00286 float zback = zback0 + (float)(ipln)*steelpitch;
00287 if ( ipln > PlexPlaneId::LastPlaneFarSM0() )
00288 zback += 1.5 * Munits::m; // supermodule gap
00289 const float piby2 = 0.5*TMath::Pi();
00290 const float x0=0.0, y0=0.0;
00291 const float thetaX=piby2, phiX=0, thetaY=piby2, phiY=piby2,
00292 thetaZ=0, phiZ=0;
00293
00294 steelRow = new UgliDbiSteelPln(plnid,melt,steelthick,
00295 totalz,x0,y0,zback,
00296 thetaX,phiX,thetaY,phiY,thetaZ,phiZ);
00297 }
00298 break;
00299 case Detector::kCalDet:
00300 {
00301 int melt = 0;
00302 float thick = steelthick;
00303 float totalz = 3.84 * Munits::cm;
00304 float x0=0, y0=0;
00305 float zback = (8.68 * Munits::cm) + (float)ipln*steelpitch;
00306 float thetaX=piby2, phiX=0, thetaY=piby2, phiY=piby2, thetaZ=0, phiZ=0;
00307
00308 if (ipln >= 61) {
00309 thick = 0;
00310 totalz = 1.101 * Munits::cm;
00311 if (ipln&1) y0 = -1.600 * Munits::m;
00312 else y0 = -1.611 * Munits::m;
00313
00314 const float zbcosmic[] = { 0.5055, 1.5055, 2.0695, 3.0695};
00315 zback = zbcosmic[ipln-61];
00316 thetaX=pi; phiX=0; thetaY=piby2; phiY=0; thetaZ=piby2; phiZ=pi3by2;
00317 }
00318 steelRow = new UgliDbiSteelPln(plnid,melt,steelthick,
00319 totalz,x0,y0,zback,
00320 thetaX,phiX,thetaY,phiY,thetaZ,phiZ);
00321 }
00322 break;
00323 default:
00324 break;
00325 }
00326 if (!steelRow)
00327 MSG("Ugli",Msg::kFatal)
00328 << "no algorithmic UgliDbiSteelPln for " << fVldContext << endl;
00329
00330 return steelRow;
00331 }
|
|
|
Definition at line 457 of file UgliDbiTables.cxx. References fStripTbl, fVldContext, PlexScintMdlId::GetModule(), DbiResultPtr< T >::GetRowByIndex(), PlexStripEndId::GetScintMdlId(), PlexStripEndId::GetStrip(), PlexStripEndId::GetStripInMdl(), UgliDbiStrip::HashToIndex(), and MSG. Referenced by GeoScintMdlVolume::Build4Corners(), GeoScintMdlVolume::BuildHalfY(), GeoScintMdlVolume::BuildNeariXtru(), GeoScintMdlVolume::BuildNearIXtru(), GeoGeometry::BuildStrips(), and UgliStripNode::UgliStripNode(). 00458 {
00459 int strip_indx = UgliDbiStrip::HashToIndex(seid);
00460
00461 // if use real tables if we have them
00462
00463 if (!fAlgorithmic) return fStripTbl.GetRowByIndex(strip_indx);
00464
00465 // algorithmic approach
00466
00467 static UgliDbiStrip* stripRow = 0;
00468 if (stripRow) { delete stripRow; stripRow = 0; }
00469
00470 //unsigned int ipln = seid.GetPlane();
00471 unsigned int istrip = seid.GetStrip();
00472 const float strip_width = 4.1 * Munits::cm;
00473 const float lpos = 0.0;
00474 const float zrot = 0.0;
00475
00476 switch (fDetector) {
00477 // case Detector::kNear:
00478 // steelRow = 0;
00479 // break;
00480 case Detector::kFar:
00481 {
00482 const int nstrips_mdl[] = { 28, 28, 20, 20, 20, 20, 28, 28};
00483 //const int nmdl = sizeof(nstrips_mdl)/sizeof(int);
00484
00485 PlexScintMdlId mdlid = seid.GetScintMdlId();
00486 int stripinmdl = seid.GetStripInMdl();
00487
00488 int nstrips = nstrips_mdl[mdlid.GetModule()];
00489 float toff = ((float)(nstrips)/2 - 0.5);
00490 float tpos = ((float)stripinmdl - toff)*strip_width;
00491
00492 stripRow = new UgliDbiStrip(seid,tpos,lpos,zrot);
00493
00494 }
00495 break;
00496 case Detector::kCalDet:
00497 {
00498 const int nstrips=24;
00499 const float toff = ((float)(nstrips)/2 - 0.5);
00500 float tpos = ((float)istrip - toff)*strip_width;
00501 stripRow = new UgliDbiStrip(seid,tpos,lpos,zrot);
00502 }
00503 break;
00504 default:
00505 break;
00506 }
00507 if (!stripRow)
00508 MSG("Ugli",Msg::kFatal)
00509 << "no algorithmic UgliDbiStrip for " << fVldContext << endl;
00510
00511 return stripRow;
00512 }
|
|
|
Definition at line 203 of file UgliDbiTables.cxx. References fSteelTbl, fVldContext, DbiResultPtr< T >::GetNumRows(), PlexPlaneId::LastPlaneFarSM1(), PlexPlaneId::LastPlaneNearSpect(), and MSG. Referenced by UgliGeometry::BuildNodes(). 00204 {
00205
00206 //#define LIMITPLNS
00207 #ifdef LIMITPLNS
00208 unsigned int nmax = 4;
00209 MSG("Ugli",Msg::kError)
00210 << " **************** force " << nmax << " planes " << endl;
00211 return nmax;
00212 #endif
00213
00214
00215 // if use real tables if we have them
00216
00217 if (!fAlgorithmic) {
00218 int nrows = fSteelTbl.GetNumRows();
00219 if (nrows < 1) {
00220 MSG("Ugli",Msg::kError)
00221 << "UgliDbiSteelPln unexpectedly had "
00222 << nrows << " rows " << endl;
00223 if (nrows < 1) return 0;
00224 }
00225 return nrows;
00226 }
00227
00228 // algorithmic approach
00229
00230 switch (fDetector) {
00231 case Detector::kNear: return PlexPlaneId::LastPlaneNearSpect()+1;
00232 case Detector::kFar: return PlexPlaneId::LastPlaneFarSM1()+1;
00233 case Detector::kCalDet: return 5*12 + 4 + 1;
00234 default:
00235 MSG("Ugli",Msg::kFatal)
00236 << "no algorithmic GetNumSteelRows for " << fVldContext << endl;
00237 }
00238 return 0;
00239 }
|
|
|
Definition at line 101 of file UgliDbiTables.cxx. References fgAlgorithmic, and UgliDbiTablesInitDefaults(). Referenced by UgliLoanPool::Config(), and UgliGeometry::UgliGeometry(). 00102 { UgliDbiTablesInitDefaults(); return fgAlgorithmic[det]; }
|
|
|
Definition at line 115 of file UgliDbiTables.cxx. References fgCutOnPlnInstall, and UgliDbiTablesInitDefaults(). Referenced by UgliGeometry::BuildNodes(), and UgliLoanPool::Config(). 00116 { UgliDbiTablesInitDefaults(); return fgCutOnPlnInstall[det]; }
|
|
||||||||||||
|
Definition at line 76 of file UgliDbiTables.cxx. References Detector::AsString(), det, fgAlgorithmic, MSG, and UgliDbiTablesInitDefaults(). Referenced by UgliLoanPool::Config(). 00077 {
00078 // set whether algorithmic approach is taken of any detector
00079 // disallow setting it for one's we haven't implemented
00080 // always allow setting it off
00081
00082 UgliDbiTablesInitDefaults();
00083 if (!flag) fgAlgorithmic[det] = false;
00084 else {
00085 bool implemented = false;
00086 switch (det) {
00087 case Detector::kNear: break;
00088 case Detector::kFar: implemented = true; break;
00089 case Detector::kCalDet: implemented = true; break;
00090 default: break;
00091 }
00092 if (implemented) fgAlgorithmic[det] = true;
00093 else
00094 MSG("Ugli",Msg::kWarning)
00095 << "UgliDbiTables::SetAlgorithmic - unable to generate "
00096 << Detector::AsString(det) << " geometry "
00097 << endl;
00098 }
00099 }
|
|
||||||||||||
|
Definition at line 105 of file UgliDbiTables.cxx. References fgCutOnPlnInstall, and UgliDbiTablesInitDefaults(). Referenced by UgliLoanPool::Config(). 00107 {
00108 // set whether plane entry into geomtry should depend of
00109 // FabPlnInstall table entries.
00110
00111 UgliDbiTablesInitDefaults();
00112 fgCutOnPlnInstall[det] = flag;
00113 }
|
|
|
Definition at line 621 of file UgliDbiTables.cxx. References alwaysTrue(), fGeomTbl, fScintMdlStructTbl, fScintMdlTbl, fScintPlnStructTbl, fScintPlnTbl, fSteelTbl, fStripStructTbl, fStripTbl, gVetoOnly, vetoMdl(), vetoPln(), vetoStrip(), and WriteTableToCSVFile(). 00622 {
00623
00624 // write out CSV (comma separated value) text files
00625
00626 gVetoOnly = vetoOnly;
00627
00628 WriteTableToCSVFile(fGeomTbl,"UGLIDBIGEOMETRY",alwaysTrue);
00629
00630 WriteTableToCSVFile(fSteelTbl,"UGLIDBISTEELPLN",vetoPln);
00631
00632 WriteTableToCSVFile(fScintPlnStructTbl,"UGLIDBISCINTPLNSTRUCT",alwaysTrue);
00633 WriteTableToCSVFile(fScintPlnTbl,"UGLIDBISCINTPLN",vetoPln);
00634
00635 WriteTableToCSVFile(fScintMdlStructTbl,"UGLIDBISCINTMDLSTRUCT",alwaysTrue);
00636 WriteTableToCSVFile(fScintMdlTbl,"UGLIDBISCINTMDL",vetoMdl);
00637
00638 WriteTableToCSVFile(fStripStructTbl,"UGLIDBISTRIPSTRUCT",alwaysTrue);
00639 WriteTableToCSVFile(fStripTbl,"UGLIDBISTRIP",vetoStrip);
00640
00641 }
|
|
|
Definition at line 52 of file UgliDbiTables.h. |
|
|
Definition at line 54 of file UgliDbiTables.h. Referenced by GetDbiScintPlnByIndex(), and GetDbiSteelPlnByIndex(). |
|
|
Definition at line 33 of file UgliDbiTables.cxx. Referenced by IsAlgorithmic(), and SetAlgorithmic(). |
|
|
Definition at line 34 of file UgliDbiTables.cxx. Referenced by IsCutOnPlnInstall(), and SetCutOnPlnInstall(). |
|
|
Definition at line 56 of file UgliDbiTables.h. Referenced by GetDbiGeometry(), and WriteCSVFiles(). |
|
|
Definition at line 60 of file UgliDbiTables.h. Referenced by GeoScintMdlVolume::Build4Corners(), GeoScintMdlVolume::BuildHalfY(), UgliScintPlnNode::BuildStrips(), GeoGeometry::BuildStrips(), UgliScintMdlNode::UgliScintMdlNode(), and WriteCSVFiles(). |
|
|
Definition at line 61 of file UgliDbiTables.h. Referenced by GetDbiScintMdlById(), and WriteCSVFiles(). |
|
|
Definition at line 58 of file UgliDbiTables.h. Referenced by GeoGeometry::BuildModules(), UgliScintPlnNode::BuildStrips(), and WriteCSVFiles(). |
|
|
Definition at line 59 of file UgliDbiTables.h. Referenced by GetDbiScintPlnByIndex(), and WriteCSVFiles(). |
|
|
Definition at line 57 of file UgliDbiTables.h. Referenced by GetDbiSteelPln(), GetDbiSteelPlnByIndex(), GetNumSteelRows(), and WriteCSVFiles(). |
|
|
Definition at line 62 of file UgliDbiTables.h. Referenced by UgliStripNode::UgliStripNode(), and WriteCSVFiles(). |
|
|
Definition at line 63 of file UgliDbiTables.h. Referenced by GetDbiStripById(), and WriteCSVFiles(). |
|
|
Definition at line 53 of file UgliDbiTables.h. Referenced by GetDbiGeometry(), GetDbiScintMdlById(), GetDbiScintPlnByIndex(), GetDbiSteelPlnByIndex(), GetDbiStripById(), and GetNumSteelRows(). |
1.3.9.1