#include <UgliScintMdlNode.h>
Inheritance diagram for UgliScintMdlNode:

Public Member Functions | |
| virtual | ~UgliScintMdlNode () |
| virtual PlexScintMdlId | GetPlexScintMdlId () const |
| virtual PlexPlaneId | GetPlexPlaneId () const |
| virtual Int_t | GetModuleNum () const |
| virtual Int_t | NumberOfStrips () const |
| virtual Float_t | GetClearFiber (const StripEnd::StripEnd_t end) const |
| virtual Float_t | GetExtraWlsFiber (const StripEnd::StripEnd_t end) const |
| virtual TVector3 | GlobalToLocal (const TVector3 &global) const |
| virtual TVector3 | LocalToGlobal (const TVector3 &local) const |
| virtual UgliGeometry * | GetUgliGeometry () const |
| UgliScintPlnNode * | GetScintPlnNode (void) const |
| Float_t | GetZRotRelPlnRad () const |
| Float_t | GetLPosRelPln () const |
| Float_t | GetTPosRelPln () const |
| void | SetZRotRelPlnRad (Float_t radians) |
| void | SetLTPosRelPln (Float_t lpos, Float_t tpos) |
| UgliScintMdlNode () | |
Protected Member Functions | |
| virtual void | IncrementRef () |
| virtual void | DecrementRef () |
| UgliScintMdlNode (const PlexScintMdlId scintmdlid, UgliScintPlnNode *plnNode, const UgliDbiTables &ugliTables) | |
Static Protected Member Functions | |
| void | SetDefaultModuleOutline (TXTRU *mdlShape, const string &typeName, const Float_t width) |
Protected Attributes | |
| UgliGeometry * | fUgliGeometry |
| PlexScintMdlId | fScintMdlId |
| Int_t | fModuleNum |
| Float_t | fClearLenEast |
| Float_t | fClearLenWest |
| Float_t | fWlsLenEast |
| Float_t | fWlsLenWest |
Private Member Functions | |
| UgliScintMdlNode (const UgliScintMdlNode &that) | |
| UgliScintMdlNode & | operator= (const UgliScintMdlNode &ugh) |
Friends | |
| class | UgliScintPlnNode |
| class | UgliScintMdlHandle |
|
|
Definition at line 41 of file UgliScintMdlNode.cxx. References UgliRefCnt::CountRef(), and MSG. 00042 {
00043 // destructor should delete any owned objects
00044 if (CountRef()) {
00045 MSG("Ugli",Msg::kWarning)
00046 << "~UgliScintMdlNode still had " << CountRef()
00047 << " outstanding references " << endl;
00048 }
00049 }
|
|
|
Definition at line 34 of file UgliScintMdlNode.cxx. 00035 : fUgliGeometry(0) 00036 { 00037 // Default constructor (for i/o) 00038 }
|
|
||||||||||||||||
|
Definition at line 52 of file UgliScintMdlNode.cxx. References fClearLenEast, fClearLenWest, fScintMdlId, UgliDbiTables::fScintMdlStructTbl, fWlsLenEast, fWlsLenWest, UgliDbiScintMdl::GetClearLenEast(), UgliDbiScintMdl::GetClearLenWest(), UgliDbiTables::GetDbiScintMdlById(), UgliDbiScintMdl::GetLPosRelPln(), Nav::GetName(), DbiResultPtr< T >::GetRowByIndex(), UgliDbiScintMdl::GetTPosRelPln(), UgliDbiScintMdlStruct::GetTypeName(), UgliDbiScintMdl::GetWidth(), UgliDbiScintMdl::GetWlsLenEast(), UgliDbiScintMdl::GetWlsLenWest(), UgliDbiScintMdl::GetZRotRelPlnDeg(), MSG, SetDefaultModuleOutline(), SetLTPosRelPln(), and TNodeX::SetParent(). 00055 : TNodeX(scintmdlid.AsString(),scintmdlid.AsString(),"noshape"), 00056 fUgliGeometry(plnNode->GetUgliGeometry()), 00057 fScintMdlId(scintmdlid) 00058 { 00059 // ctor for DBI driven UgliGeometry 00060 00061 unsigned int mdlstruct_indx = 00062 UgliDbiStructHash(fScintMdlId).HashAsScintMdl(); 00063 const UgliDbiScintMdlStruct* mdlStructRow = 00064 ugliTables.fScintMdlStructTbl.GetRowByIndex(mdlstruct_indx); 00065 00066 const UgliDbiScintMdl *mdlRow = ugliTables.GetDbiScintMdlById(fScintMdlId); 00067 if (!mdlRow) { 00068 MSG("Ugli",Msg::kError) 00069 << "no UgliDbiScintMdl for " << fScintMdlId << endl; 00070 return; 00071 } 00072 fClearLenEast = mdlRow->GetClearLenEast(); 00073 fClearLenWest = mdlRow->GetClearLenWest(); 00074 fWlsLenEast = mdlRow->GetWlsLenEast(); 00075 fWlsLenWest = mdlRow->GetWlsLenWest(); 00076 00077 // build and attach the shape we should actually have 00078 // for now just a box ... 00079 TXTRU* mdlshape = 00080 new TXTRU(GetName(),mdlStructRow->GetTypeName().c_str(), 00081 "void",8,2); 00082 TXTRU* plnshape = dynamic_cast<TXTRU*>(plnNode->GetShape()); 00083 if (!plnshape) 00084 MSG("Ugli",Msg::kWarning) 00085 << "UgliScintPlnNode isn't a TXTRU" << endl; 00086 mdlshape->DefineSection(0,plnshape->GetSectionZ(0)); 00087 mdlshape->DefineSection(1,plnshape->GetSectionZ(1)); 00088 Float_t width = mdlRow->GetWidth(); 00089 SetDefaultModuleOutline(mdlshape,mdlStructRow->GetTypeName(),width); 00090 00091 SetParent(plnNode); 00092 fShape = mdlshape; 00093 00094 // set the position relative to the steel 00095 Float_t tpos = mdlRow->GetTPosRelPln(); 00096 Float_t lpos = mdlRow->GetLPosRelPln(); 00097 SetLTPosRelPln(lpos,tpos); 00098 // cout << " Module " << mdlStructRow->GetTypeName() << " at tpos= " 00099 // << tpos << " lpos = " << lpos << endl; 00100 00101 // needs to build and set the right rotation matrix 00102 // here we only have a single rotation around z 00103 const Double_t deg90 = 90; 00104 Double_t zrot = mdlRow->GetZRotRelPlnDeg(); 00105 fMatrix = new TRotMatrix(GetName(),GetName(), 00106 deg90,zrot,deg90,zrot+deg90,0,0); 00107 00108 SetLineColor(41); // beige 00109 // SetLineWidth(5); 00110 SetVisibility(0); 00111 00112 // strips are installed by plane 00113 00114 }
|
|
|
|
|
|
Reimplemented from UgliRefCnt. Definition at line 140 of file UgliScintMdlNode.cxx. References UgliRefCnt::DecrementRef(), and fUgliGeometry. Referenced by UgliScintMdlHandle::operator=(), and UgliScintMdlHandle::~UgliScintMdlHandle(). 00141 {
00142 fRef--;
00143 fUgliGeometry->DecrementRef();
00144 if (!fRef) SetVisibility(0);
00145 }
|
|
|
Implements UgliScintMdlABC. Definition at line 117 of file UgliScintMdlNode.cxx. Referenced by UgliStripNode::ClearFiber(), and UgliScintMdlHandle::GetClearFiber(). 00118 {
00119 if (end == StripEnd::kEast) return fClearLenEast;
00120 else if (end == StripEnd::kWest) return fClearLenWest;
00121 else return 0;
00122 }
|
|
|
Implements UgliScintMdlABC. Definition at line 124 of file UgliScintMdlNode.cxx. Referenced by UgliScintMdlHandle::GetExtraWlsFiber(), and UgliStripNode::WlsPigtail(). 00125 {
00126 if (end == StripEnd::kEast) return fWlsLenEast;
00127 else if (end == StripEnd::kWest) return fWlsLenWest;
00128 else return 0;
00129 }
|
|
|
Definition at line 120 of file UgliScintMdlNode.h. Referenced by UgliScintMdlHandle::GetLPosRelPln(). 00120 { return fX; }
|
|
|
Implements UgliScintMdlABC. Definition at line 111 of file UgliScintMdlNode.h. References fScintMdlId, and PlexScintMdlId::GetModule(). Referenced by UgliScintMdlHandle::GetModuleNum(). 00112 { return fScintMdlId.GetModule(); }
|
|
|
Implements UgliScintMdlABC. Definition at line 108 of file UgliScintMdlNode.h. References fScintMdlId. Referenced by UgliScintMdlHandle::GetPlexPlaneId(). 00109 { return PlexPlaneId(fScintMdlId); }
|
|
|
Implements UgliScintMdlABC. Definition at line 41 of file UgliScintMdlNode.h. Referenced by UgliScintMdlHandle::GetPlexScintMdlId(). 00041 {return fScintMdlId;}
|
|
|
Definition at line 377 of file UgliScintMdlNode.cxx. Referenced by UgliStripHandle::GetScintPlnHandle(), UgliScintMdlHandle::GetScintPlnHandle(), and UgliStripNode::GetTPos(). 00378 { return dynamic_cast<UgliScintPlnNode*>(fParent); }
|
|
|
Definition at line 121 of file UgliScintMdlNode.h. Referenced by UgliScintMdlHandle::GetTPosRelPln(). 00121 { return fY; }
|
|
|
Definition at line 54 of file UgliScintMdlNode.h. Referenced by UgliScintMdlHandle::IsFrozen(). 00054 { return fUgliGeometry; }
|
|
|
Definition at line 117 of file UgliScintMdlNode.h. Referenced by UgliScintMdlHandle::GetZRotRelPlnRad(). 00118 { return fMatrix->GetPhi()*Ugli::deg2rad; }
|
|
|
Definition at line 156 of file UgliScintMdlNode.cxx. Referenced by UgliScintMdlHandle::GlobalToLocal(). 00157 {
00158 // get the local position based on global position
00159
00160 Double_t gxyz[3], lxyz[3];
00161
00162 gxyz[0] = global.X();
00163 gxyz[1] = global.Y();
00164 gxyz[2] = global.Z();
00165
00166 // deal with fact that TNode::Master2Local isn't declared const
00167 UgliScintMdlNode* self = const_cast<UgliScintMdlNode*>(this);
00168 self->cd();
00169 self->UpdateMatrix();
00170 self->Master2Local(gxyz,lxyz);
00171
00172 return TVector3(lxyz[0],lxyz[1],lxyz[2]);
00173 }
|
|
|
Reimplemented from UgliRefCnt. Definition at line 133 of file UgliScintMdlNode.cxx. References fUgliGeometry, and UgliRefCnt::IncrementRef(). Referenced by UgliScintMdlHandle::operator=(), and UgliScintMdlHandle::UgliScintMdlHandle(). 00134 {
00135 fRef++;
00136 fUgliGeometry->IncrementRef();
00137 SetVisibility(1);
00138 }
|
|
|
Definition at line 176 of file UgliScintMdlNode.cxx. Referenced by UgliScintMdlHandle::LocalToGlobal(). 00177 {
00178 // get the global position based on local position
00179
00180 Double_t gxyz[3], lxyz[3];
00181
00182 lxyz[0] = local.X();
00183 lxyz[1] = local.Y();
00184 lxyz[2] = local.Z();
00185
00186 // deal with fact that TNode::Local2Master isn't declared const
00187 UgliScintMdlNode* self = const_cast<UgliScintMdlNode*>(this);
00188 self->cd();
00189 self->UpdateMatrix();
00190 self->Local2Master(lxyz,gxyz);
00191
00192 return TVector3(gxyz[0],gxyz[1],gxyz[2]);
00193 }
|
|
|
Implements UgliScintMdlABC. Definition at line 148 of file UgliScintMdlNode.cxx. Referenced by UgliScintMdlHandle::NumberOfStrips(). 00149 {
00150 // return the number of strips in the module
00151 if (!fNodes) return 0;
00152 return fNodes->GetSize();
00153 }
|
|
|
|
|
||||||||||||||||
|
Definition at line 196 of file UgliScintMdlNode.cxx. Referenced by UgliScintMdlNode(). 00199 {
00200
00201 typedef struct basic_mdl_shape {
00202 string mdl_name;
00203 Int_t n_vtx;
00204 Float_t xvtx_abs[8];
00205 Float_t yvtx_rel[8];
00206 } MdlShape;
00207
00208 const Float_t half = 0.5;
00209
00210 const Float_t far = half * 8.000 * Munits::m;
00211 const Float_t as = half * 3.464 * Munits::m;
00212 const Float_t al = half * 5.738 * Munits::m;
00213 const Float_t bs = half * 5.735 * Munits::m;
00214 const Float_t byfc = 25 * Munits::cm;
00215 const Float_t byft = 16 * Munits::cm;
00216 const Float_t byff = 6./20.;
00217
00218 const Float_t swidth = 4.1 * Munits::cm;
00219 const Float_t glw = 109.764 * Munits::inch;
00220 const Float_t gsw = glw - 28*swidth;
00221 const Float_t g0 = swidth + half*10*swidth; // ??
00222 const Float_t hw = 103.307 * Munits::inch;
00223 const Float_t notch = (103.307-85.551) * Munits::inch;
00224 const Float_t iff = 11./20.;
00225
00226 const Float_t caldet = half * 1.0 * Munits::m;
00227
00228 MdlShape shapelist[] = {
00229 // A shapes are the same (except a->A is rotated)
00230 { "aU", 4,
00231 {-as,as,al,-al,0,0,0,0},
00232 {-half,-half,half,half,0,0,0,0}
00233 },
00234 { "aV", 4,
00235 {-as,as,al,-al,0,0,0,0},
00236 {-half,-half,half,half,0,0,0,0}
00237 },
00238 { "AU", 4,
00239 {-al,al,as,-as,0,0,0,0},
00240 {-half,-half,half,half,0,0,0,0}
00241 },
00242 { "AV", 4,
00243 {-al,al,as,-as,0,0,0,0},
00244 {-half,-half,half,half,0,0,0,0}
00245 },
00246 // B shapes are the same (except b->B is rotated)
00247 { "bU", 4,
00248 {-bs,bs,far,-far,0,0,0,0},
00249 {-half,-half,half,half,0,0,0,0}
00250 },
00251 { "bV", 4,
00252 {-bs,bs,far,-far,0,0,0,0},
00253 {-half,-half,half,half,0,0,0,0}
00254 },
00255 { "BU", 4,
00256 {-far,far,bs,-bs,0,0,0,0},
00257 {-half,-half,half,half,0,0,0,0}
00258 },
00259 { "BV", 4,
00260 {-far,far,bs,-bs,0,0,0,0},
00261 {-half,-half,half,half,0,0,0,0}
00262 },
00263 // e,E (U view) and c,C (V view) are all nice and regular
00264 { "eU", 4,
00265 {-far,far,far,-far,0,0,0,0},
00266 {-half,-half,half,half,0,0,0,0}
00267 },
00268 { "EU", 4,
00269 {-far,far,far,-far,0,0,0,0},
00270 {-half,-half,half,half,0,0,0,0}
00271 },
00272 { "cV", 4,
00273 {-far,far,far,-far,0,0,0,0},
00274 {-half,-half,half,half,0,0,0,0}
00275 },
00276 { "CV", 4,
00277 {-far,far,far,-far,0,0,0,0},
00278 {-half,-half,half,half,0,0,0,0}
00279 },
00280 // f,F (U view) has a bypass
00281 { "fU", 8,
00282 {-far,far,far,byfc,byft,-byft,-byfc,-far},
00283 {-half,-half,half,half,half-byff,half-byff,half,half}
00284 },
00285 { "FU", 8,
00286 {-far,-byfc,-byft,byft,byfc,far,far,-far},
00287 {-half,-half,-half+byff,-half+byff,-half,-half,half,half}
00288 },
00289 // d,D (V view) has a bypass
00290 { "dV", 8,
00291 {-far,far,far,byfc,byft,-byft,-byfc,-far},
00292 {-half,-half,half,half,half-byff,half-byff,half,half}
00293 },
00294 { "DV", 8,
00295 {-far,-byfc,-byft,byft,byfc,far,far,-far},
00296 {-half,-half,-half+byff,-half+byff,-half,-half,half,half}
00297 },
00298 // Near U partial (REAL Detector)
00299 { "GU", 4,
00300 {glw-g0,-g0,-g0,gsw-g0,0,0,0,0},
00301 {-half,-half,half,half,0,0,0,0}
00302 },
00303 { "HU", 4,
00304 {hw-g0,-g0,-g0,hw-g0,0,0,0,0},
00305 {-half,-half,half,half,0,0,0,0}
00306 },
00307 { "IU", 6,
00308 {hw-g0,-g0+notch,-g0+notch,-g0,hw-g0,0,0},
00309 {-half,-half,-half+iff,-half+iff,half,half,0,0}
00310 },
00311 // Near V partial (REAL Detector)
00312 { "GV", 4,
00313 {glw-g0,-g0,-g0,gsw-g0,0,0,0,0},
00314 {half,half,-half,-half,0,0,0,0}
00315 },
00316 { "HV", 4,
00317 {hw-g0,-g0,-g0,hw-g0,0,0,0,0},
00318 {half,half,-half,-half,0,0,0,0}
00319 },
00320 { "IV", 6,
00321 {hw-g0,-g0+notch,-g0+notch,-g0,hw-g0,0,0},
00322 {half,half,half-iff,half-iff,-half,-half,0,0}
00323 },
00324 // CalDet
00325 { "XU", 4,
00326 {-caldet,caldet,caldet,-caldet,0,0,0,0},
00327 {-half,-half,half,half,0,0,0,0}
00328 },
00329 { "XV", 4,
00330 {-caldet,caldet,caldet,-caldet,0,0,0,0},
00331 {-half,-half,half,half,0,0,0,0}
00332 },
00333 { "XA", 4,
00334 {-caldet,caldet,caldet,-caldet,0,0,0,0},
00335 {-half,-half,half,half,0,0,0,0}
00336 },
00337 { "XB", 4,
00338 {-caldet,caldet,caldet,-caldet,0,0,0,0},
00339 {-half,-half,half,half,0,0,0,0}
00340 },
00341 #ifdef NOPE
00342 { "default", 4,
00343 {-4,4,4,-4,0,0,0,0},
00344 {-half,-half,half,half,0,0,0,0}
00345 },
00346 #endif
00347 // this makes the outline disappear
00348 { "default",4, {0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0} }
00349 };
00350
00351 Int_t listsize = sizeof(shapelist)/sizeof(MdlShape);
00352
00353 Bool_t hitdefault = false;
00354 for (int indx=0; indx<listsize; indx++) {
00355 MdlShape* shapeptr = shapelist + indx;
00356 hitdefault = (shapeptr->mdl_name == "default");
00357 // if (hitdefault) {
00358 // cout << " no shape default for modules of type "
00359 // << typeName << endl;
00360 // }
00361 if (shapeptr->mdl_name == typeName || hitdefault ) {
00362 // use this one
00363 mdlShape->TruncateNxy(shapeptr->n_vtx);
00364 for (int i=0; i<shapeptr->n_vtx; i++) {
00365 mdlShape->DefineVertex(i,shapeptr->xvtx_abs[i],
00366 shapeptr->yvtx_rel[i]*width);
00367 }
00368 break; // out of loop
00369 }
00370 } // loop over list of potential shapes
00371
00372 }
|
|
||||||||||||
|
Definition at line 114 of file UgliScintMdlNode.h. Referenced by UgliScintMdlHandle::SetLTPosRelPln(), and UgliScintMdlNode(). 00115 { SetPosition(lpos,tpos,0.0); }
|
|
|
Definition at line 381 of file UgliScintMdlNode.cxx. Referenced by UgliScintMdlHandle::SetZRotRelPlnRad(). 00382 {
00383 // set the rotation around z
00384 // this matrix is specific to this module so we can modify it
00385 Float_t zrotdeg = radians * Ugli::rad2deg;
00386 fMatrix->SetAngles(90,zrotdeg,90,zrotdeg+90,0,0);
00387 }
|
|
|
Definition at line 34 of file UgliScintMdlNode.h. |
|
|
Definition at line 33 of file UgliScintMdlNode.h. |
|
|
Definition at line 87 of file UgliScintMdlNode.h. Referenced by UgliScintMdlNode(). |
|
|
Definition at line 87 of file UgliScintMdlNode.h. Referenced by UgliScintMdlNode(). |
|
|
Definition at line 86 of file UgliScintMdlNode.h. |
|
|
Definition at line 85 of file UgliScintMdlNode.h. Referenced by GetModuleNum(), GetPlexPlaneId(), and UgliScintMdlNode(). |
|
|
Definition at line 84 of file UgliScintMdlNode.h. Referenced by DecrementRef(), and IncrementRef(). |
|
|
Definition at line 88 of file UgliScintMdlNode.h. Referenced by UgliScintMdlNode(). |
|
|
Definition at line 88 of file UgliScintMdlNode.h. Referenced by UgliScintMdlNode(). |
1.3.9.1