GeoScintPlnVolume Class Reference

#include <GeoScintPlnVolume.h>

Inheritance diagram for GeoScintPlnVolume:
GeoVolume

List of all members.

Public Member Functions

 GeoScintPlnVolume ()
virtual ~GeoScintPlnVolume ()
virtual Int_t NumberOfStrips () const
virtual Int_t NumberOfModules () const
virtual std::vector
< GeoStripNode * > 
GetStripNodePtrVector () const
virtual std::vector
< GeoScintMdlNode * > 
GetScintMdlNodePtrVector () const
Float_t GetThick () const
virtual void Print (Option_t *option="") const

Protected Member Functions

 GeoScintPlnVolume (GeoGeometry *geo, const PlexPlaneId &plnid, Float_t plnthick)

Private Member Functions

TGeoShape * BuildPlaneShape () const
TGeoShape * BuildFar () const
TGeoShape * BuildFarActive () const
TGeoShape * BuildFarVetoActive () const
TGeoShape * BuildNear () const
TGeoShape * BuildNearFullActive () const
TGeoShape * BuildNearPartialActive () const
TGeoShape * BuildCalDet () const
void AddCoilNode ()
TGeoVolume * BuildFarCoilVolume () const
TGeoVolume * BuildNearCoilVolume () const

Private Attributes

Detector::Detector_t fDetector
PlaneCoverage::PlaneCoverage_t fCoverage
PlaneView::PlaneView_t fView
Bool_t fVetoShield
Float_t fThick

Friends

class GeoGeometry

Detailed Description

Definition at line 24 of file GeoScintPlnVolume.h.


Constructor & Destructor Documentation

GeoScintPlnVolume::GeoScintPlnVolume (  ) 

Definition at line 30 of file GeoScintPlnVolume.cxx.

00030                                      : GeoVolume(),
00031     fDetector(Detector::kUnknown),
00032     fCoverage(PlaneCoverage::kUnknown),fView(PlaneView::kUnknown),
00033     fVetoShield(false), fThick(0) {
00034   // Default constructor, for i/o
00035   
00036 }

virtual GeoScintPlnVolume::~GeoScintPlnVolume (  )  [inline, virtual]

Definition at line 31 of file GeoScintPlnVolume.h.

00031 {}

GeoScintPlnVolume::GeoScintPlnVolume ( GeoGeometry geo,
const PlexPlaneId plnid,
Float_t  plnthick 
) [protected]

Definition at line 39 of file GeoScintPlnVolume.cxx.

References AddCoilNode(), BuildPlaneShape(), GeoVolume::fGeoGeometry, GeoVolume::fShpName, fVetoShield, GeoVolume::GetExistingShape(), GeoMediumMap::GetMedium(), GeoGeometry::GetMediumMap(), Nav::GetName(), gGeoManager, Geo::kPlnScint, and Geo::kVSPlnScint.

00041                                                        : GeoVolume(geo,
00042             (GeoGeometry::GetGeoCompatibleName(plnid.AsString())).c_str(),0),
00043     fDetector(plnid.GetDetector()),
00044     fCoverage(plnid.GetPlaneCoverage()),fView(plnid.GetPlaneView()),
00045     fVetoShield(plnid.IsVetoShield()),
00046     fThick(plnthick) {
00047   // Normal constructor
00048   // Protected because responsible use of gGeoManager pointer is
00049   // required.
00050   
00051   const GeoMediumMap& medMap = fGeoGeometry->GetMediumMap();
00052   if ( fVetoShield ) SetMedium(medMap.GetMedium(Geo::kVSPlnScint));
00053   else SetMedium(medMap.GetMedium(Geo::kPlnScint));
00054   
00055   fShpName = string(GetName());
00056   if ( fVetoShield && fShpName.size() >= 4 ) {
00057     fShpName.erase(0,fShpName.size() - 4);
00058   }
00059   else if ( fShpName.size() >= 3 ) {
00060     fShpName.erase(0,fShpName.size() - 3);
00061   }
00062 
00063   TGeoShape* shape = GetExistingShape();
00064   if (!shape) shape = BuildPlaneShape();
00065   
00066   SetShape(shape);
00067 
00068   // Because shape was unknown at time of TGeoVolume construction, volume
00069   // was added to run-time list of volumes. Remove and add to normal list
00070   gGeoManager -> GetListOfGVolumes() -> Remove(this);
00071   Int_t index = gGeoManager->GetListOfVolumes() -> GetEntriesFast();
00072   gGeoManager -> GetListOfVolumes() 
00073               -> AddAtAndExpand(this,index);
00074   
00075   // Add coil node for near and far detector
00076   AddCoilNode();
00077   
00078 }


Member Function Documentation

void GeoScintPlnVolume::AddCoilNode (  )  [private]

Definition at line 367 of file GeoScintPlnVolume.cxx.

References BuildFarCoilVolume(), BuildNearCoilVolume(), fDetector, GeoVolume::fGeoGeometry, fVetoShield, fView, GeoGeometry::GetRot315(), GeoGeometry::GetRot45(), Detector::kFar, Detector::kNear, PlaneView::kU, and GeoVolume::UpdateGlobalManager().

Referenced by GeoScintPlnVolume().

00367                                     {
00368   // Build scint coil volume and insert it as node in this scint plane.
00369 
00370   UpdateGlobalManager();
00371 
00372   switch ( fDetector ) {
00373 
00374   case Detector::kFar:
00375     {
00376       if ( !fVetoShield ) {
00377         TGeoVolume* volCoil = BuildFarCoilVolume();
00378         if ( fView == PlaneView::kU ) {
00379           TGeoRotation* rot45 = fGeoGeometry->GetRot45();
00380           this -> AddNode(volCoil,1,rot45);
00381         }
00382         else {
00383           TGeoRotation* rot315 = fGeoGeometry->GetRot315();
00384           this -> AddNode(volCoil,1,rot315);
00385         }
00386       }
00387     }
00388     break;
00389 
00390   case Detector::kNear:
00391     {
00392       TGeoVolume* volCoil = BuildNearCoilVolume();
00393       this -> AddNode(volCoil,1,gGeoIdentity);
00394     }
00395     break;
00396 
00397   default:
00398     // no coil
00399     break;
00400 
00401   } // end of switch
00402 
00403   return;
00404 
00405 }

TGeoShape * GeoScintPlnVolume::BuildCalDet (  )  const [private]

Definition at line 207 of file GeoScintPlnVolume.cxx.

References GeoVolume::fShpName, fThick, GeoVolume::GetScale(), Geo::kCalDetSteelWidth, Msg::kDebug, Geo::kModuleSkinThick, MSG, and GeoVolume::UpdateGlobalManager().

Referenced by BuildPlaneShape().

00207                                                 {
00208  // Private method used to build shape for cal detector scint plane. 
00209  // Generic shape of a cal detector scint plane is built as a TGeoBBox
00210 
00211   UpdateGlobalManager();
00212   
00213   Double_t scale = GetScale();
00214 
00215   Float_t halfx = scale*(0.5*Geo::kCalDetSteelWidth
00216                         +Geo::kModuleSkinThick); 
00217   Float_t halfy = halfx;  // square
00218   Float_t halfz = 0.5*fThick;
00219 
00220   MSG("Geo",Msg::kDebug)
00221     << "Build cal detector scint pln shape " << fShpName.c_str() 
00222     << " w/halfthick " << halfz << " and halfwidth " << halfx 
00223     << "." << endl;
00224 
00225   // Shape is automatically adopted by gGeoManager
00226   TGeoBBox* plnShape = new TGeoBBox(fShpName.c_str(),halfx,halfy,halfz);
00227 
00228   return plnShape;
00229 
00230 
00231 } 

TGeoShape * GeoScintPlnVolume::BuildFar (  )  const [private]

Definition at line 193 of file GeoScintPlnVolume.cxx.

References BuildFarActive(), BuildFarVetoActive(), fVetoShield, and GeoVolume::UpdateGlobalManager().

Referenced by BuildPlaneShape().

00193                                              {
00194   // Private method used to build shape for far detector plane. 
00195 
00196   UpdateGlobalManager();
00197   
00198   if ( fVetoShield ) {
00199     return BuildFarVetoActive();
00200   }
00201 
00202   return BuildFarActive();
00203 
00204 } 

TGeoShape * GeoScintPlnVolume::BuildFarActive (  )  const [private]

Definition at line 258 of file GeoScintPlnVolume.cxx.

References GeoVolume::fShpName, fThick, GeoVolume::GetScale(), Msg::kDebug, Geo::kFarSteelWidth, Geo::kModuleSkinThick, MSG, and GeoVolume::UpdateGlobalManager().

Referenced by BuildFar().

00258                                                    {
00259  // Private method used to build shape for far detector active plane. 
00260  // Generic shape of a far detector active plane is built as a 
00261  // TGeoPgon
00262 
00263   UpdateGlobalManager();
00264   
00265   MSG("Geo",Msg::kDebug)
00266          << "Build far detector active plane shape " << endl;
00267 
00268   Double_t scale = GetScale();
00269 
00270   // Scale up scint plane size by 2% to completely enclose strips
00271   // Scint pln medium is Air, e.g. acts as empty shell to enclose
00272   // strip nodes.
00273   Double_t r_inscribed = scale*(0.5*Geo::kFarSteelWidth*1.02
00274                                    +Geo::kModuleSkinThick);
00275   Double_t r_coil = 0.; // No coil hole since coil is inserted as node
00276   
00277   // Shape is automatically adopted by gGeoManager
00278   TGeoPgon* plnShape = new TGeoPgon(fShpName.c_str(),22.5,360.,8,2);
00279 
00280   plnShape -> DefineSection(0,-0.5*fThick,r_coil,r_inscribed);
00281   plnShape -> DefineSection(1,+0.5*fThick,r_coil,r_inscribed);
00282 
00283   return plnShape;
00284 
00285 } 

TGeoVolume * GeoScintPlnVolume::BuildFarCoilVolume (  )  const [private]

Definition at line 408 of file GeoScintPlnVolume.cxx.

References GeoVolume::fGeoGeometry, fThick, Geo::GetAppType(), GeoMediumMap::GetMedium(), GeoGeometry::GetMediumMap(), GeoVolume::GetScale(), gGeoManager, Geo::kCoilRad, Geo::kCRSctBypass, Geo::kCRSctCoil, Geo::kCRSctFlange, Geo::kCRSctThroat, Geo::kFarBypassRad, Geo::kFlangeRad, Geo::kThroatRad, and GeoVolume::UpdateGlobalManager().

Referenced by AddCoilNode().

00408                                                         {
00409   //
00410   // Build far scint coil region.  This is built in the following
00411   // way, per instruction from R. Hatcher:
00412   //   1)Insert a "bypass" (r=Geo::kFarBypassRad) region (not to be confused 
00413   //     with the bypass plastic insert).  This is constructed of magnetized 
00414   //     air.  
00415   //   2)Insert into the "bypass" a "flange" (r=Geo::kFlangeRad) of magnetized 
00416   //     iron.
00417   //   3)Insert into the "flange" a "throat" (r=Geo::kThroatRad) of magnetized 
00418   //     air.
00419   //   4)Insert into the "throat" a "coil segment" (r=Geo::kCoilRad) of 
00420   //     magnetized FARCOIL medium.  The coil segment is set to rest on the 
00421   //     throat (off-center in y).
00422   //
00423   // The thickness in z of all pieces is set to be -1 when defining the shapes,
00424   // and built as a TGeoVolumeMulti.  When placed as a node in the scint plane 
00425   // volume, the volumemulti shape will take on the thickness of its parent.  
00426   // This allows for variable thickness of the scint plane in a non-perfect 
00427   // geometry.
00428   //
00429 
00430   UpdateGlobalManager();
00431 
00432   const GeoMediumMap& medMap = fGeoGeometry -> GetMediumMap();
00433   
00434   // The nomenclature used here is "F" (far), "A" (active), followed by
00435   // the two letter code to indicate the coil part type.
00436 
00437   // First check to see if volumemulti has been built. Need only build once.
00438   // The following is expensive, fix me.
00439   TGeoVolume* volBypass = gGeoManager->GetVolume("FABY");
00440   if ( volBypass ) return volBypass;
00441   
00442   Double_t scale = Geo::GetScale(fGeoGeometry -> GetAppType());
00443   
00444   Float_t halfz = 0.5*fThick; // -1. to use volumemulti
00445 
00446   TGeoVolume* volCoil
00447     = gGeoManager->MakeTube("FACO",medMap.GetMedium(Geo::kCRSctCoil),
00448                              0,Geo::kCoilRad*scale,halfz); //coil
00449   volCoil -> SetLineColor(42); // tan
00450   
00451   TGeoVolume* volThroat
00452     = gGeoManager->MakeTube("FATR",medMap.GetMedium(Geo::kCRSctThroat),
00453                             0,Geo::kThroatRad*scale,halfz); // throat
00454   volThroat -> SetLineColor(kBlue);
00455   
00456   TGeoVolume* volFlange
00457     = gGeoManager->MakeTube("FAFL",medMap.GetMedium(Geo::kCRSctFlange),
00458                              0,Geo::kFlangeRad*scale,halfz); // flange
00459   volFlange -> SetLineColor(46); // rust
00460   
00461   volBypass
00462     = gGeoManager->MakeTube("FABY",medMap.GetMedium(Geo::kCRSctBypass),
00463                              0,Geo::kFarBypassRad*scale,halfz); // bypass
00464   volBypass -> SetLineColor(kBlue);
00465   volBypass -> SetLineStyle(2); // dashed
00466   volBypass -> SetVisibility(kFALSE); // invisible by default
00467 
00468   volBypass -> AddNode(volFlange,1,gGeoIdentity);
00469   volFlange -> AddNode(volThroat,1,gGeoIdentity);
00470   volThroat -> AddNode(volCoil,1,new TGeoTranslation(0,-0.01*scale,0));
00471 
00472   return volBypass;
00473 
00474 }

TGeoShape * GeoScintPlnVolume::BuildFarVetoActive (  )  const [private]

Definition at line 234 of file GeoScintPlnVolume.cxx.

References GeoVolume::fGeoGeometry, GeoVolume::fShpName, fThick, Geo::GetAppType(), GeoVolume::GetScale(), Msg::kDebug, Geo::kFarSteelWidth, Geo::kModuleSkinThick, Geo::kStripWidth, MSG, and GeoVolume::UpdateGlobalManager().

Referenced by BuildFar().

00234                                                        {
00235  // Private method used to build shape for far detector veto shield plane. 
00236  // Generic shape of a far detector shield plane is built as a TGeoBBox
00237 
00238   UpdateGlobalManager();
00239   
00240   MSG("Geo",Msg::kDebug)
00241          << "Build far detector veto active plane shape " << endl;
00242 
00243   Double_t scale = Geo::GetScale(fGeoGeometry -> GetAppType());
00244 
00245   Float_t halfx = scale*(0.5*Geo::kFarSteelWidth+Geo::kModuleSkinThick); 
00246   Float_t halfy = scale*(0.5*20.*Geo::kStripWidth+Geo::kModuleSkinThick);  
00247   Float_t halfz = 0.5*fThick;
00248 
00249   // Shape is automatically adopted by gGeoManager
00250   TGeoBBox* plnShape = new TGeoBBox(fShpName.c_str(),halfx,halfy,halfz);
00251 
00252   return plnShape;
00253 
00254 
00255 } 

TGeoShape * GeoScintPlnVolume::BuildNear (  )  const [private]

Definition at line 288 of file GeoScintPlnVolume.cxx.

References bfld::AsString(), BuildNearFullActive(), BuildNearPartialActive(), fCoverage, PlaneCoverage::kNearFull, PlaneCoverage::kNearPartial, Msg::kWarning, MSG, and GeoVolume::UpdateGlobalManager().

Referenced by BuildPlaneShape().

00288                                               {
00289   // Private method used to build shape for near detector plane. 
00290 
00291   UpdateGlobalManager();
00292   
00293   switch ( fCoverage ) {
00294   case ( PlaneCoverage::kNearFull ) :
00295     return BuildNearFullActive();
00296   case ( PlaneCoverage::kNearPartial ) :
00297     return BuildNearPartialActive();
00298   default:
00299     MSG("Geo",Msg::kWarning)
00300       << "Unable to construct near active plane w/ coverage "
00301       << PlaneCoverage::AsString(fCoverage) << endl;
00302   }
00303 
00304   return 0;
00305 
00306 } 

TGeoVolume * GeoScintPlnVolume::BuildNearCoilVolume (  )  const [private]

to rest on the throat

Definition at line 477 of file GeoScintPlnVolume.cxx.

References fCoverage, GeoVolume::fGeoGeometry, fThick, fView, Geo::GetAppType(), GeoMediumMap::GetMedium(), GeoGeometry::GetMediumMap(), GeoVolume::GetScale(), gGeoManager, Geo::kCoilRad, Geo::kCRSctBypass, Geo::kCRSctCoil, Geo::kCRSctFlange, Geo::kCRSctThroat, Geo::kCRSctWater, Geo::kFlangeRad, Geo::kNearCoolRad, PlaneCoverage::kNearFull, Geo::kNearFullBypassRad, PlaneCoverage::kNearPartial, Geo::kNearPartialBypassRad, Geo::kThroatRad, PlaneView::kU, and GeoVolume::UpdateGlobalManager().

Referenced by AddCoilNode().

00477                                                          {
00478   //
00479   // Build near scint coil region for full coverage planes.  This is built 
00480   // in the following way, per instruction from R. Hatcher:
00481   //   1)For full coverage planes, insert a "bypass" tube 
00482   //     (r=Geo::kNearFullBypassRad) region (not to be confused with the 
00483   //     bypass plastic insert).  This is constructed of magnetized air, 
00484   //     else...  
00485   //     For partial coverage planes, insert a "bypass" box
00486   //     (halfx/y = Geo::kNearPartialBypassRad) region.  This is constructed 
00487   //     of magnetized air.  
00488   //   2)Insert into the "bypass" a "flange" (box of halfx/y = Geo::kFlangeRad)
00489   //     of  magnetized iron.
00490   //   3)Insert into the "flange" a "throat" (box of halfx/y = Geo::kThroatRad)
00491   //     of  magnetized air.
00492   //   4)Insert into the "throat" a "coil segment" (box of halfx/y 
00493   //     = Geo::kCoilRad) of magnetized aluminum.  The coil segment is set 
00495   //   5)Insert into the "coil segment" tubes (r=Geo::kNearCoolRad) of 
00496   //     magnetized water in an array of 6 columns x 8 rows.
00497   //
00498   // The thickness in z of all pieces is set to be -1 when defining the shapes,
00499   // and built as a TGeoVolumeMulti.  When placed as a node in the scint 
00500   // plane, the volumemulti shape will take on the thickness of its parent.  
00501   // This allows for variable thickness of the scint plane in a non-perfect 
00502   // geometry.
00503   //
00504 
00505   UpdateGlobalManager();
00506 
00507   const GeoMediumMap& medMap = fGeoGeometry -> GetMediumMap();
00508   
00509   // The nomenclature used here is "N" (near), "A" (active), "U" or "V"
00510   // for view, "f" or "p" for full or partial coverage, followed by
00511   // the two letter code to indicate the coil part type.
00512   std::string preface = "NAV";
00513   if ( fView == PlaneView::kU ) preface = "NAU";
00514   if ( fCoverage == PlaneCoverage::kNearFull ) preface += "f";
00515   else preface += "p";
00516   
00517   // First check to see if volumemulti has been built. Need only build once
00518   // per view/coverage combination.
00519   // The following search is expensive. Fix me.
00520   TGeoVolume* volBypass
00521     = gGeoManager->GetVolume(std::string(preface+"BY").c_str());
00522   if ( volBypass ) return volBypass;
00523   
00524   Double_t scale = Geo::GetScale(fGeoGeometry -> GetAppType());
00525   
00526   Float_t halfz = 0.5*fThick; // -1.
00527 
00528   TGeoVolume* volWater
00529     = gGeoManager->MakeTube(std::string(preface+"WA").c_str(),
00530                             medMap.GetMedium(Geo::kCRSctWater),
00531                             0,Geo::kNearCoolRad*scale,halfz); // water
00532   volWater -> SetLineColor(kGreen);
00533   
00534   TGeoVolume* volCoil
00535     = gGeoManager->MakeBox(std::string(preface+"CO").c_str(),
00536                            medMap.GetMedium(Geo::kCRSctCoil),
00537                       Geo::kCoilRad*scale,Geo::kCoilRad*scale,halfz); // coil
00538   volCoil -> SetLineColor(kBlack);
00539   
00540   TGeoVolume* volThroat
00541     = gGeoManager->MakeBox(std::string(preface+"TR").c_str(),
00542                            medMap.GetMedium(Geo::kCRSctThroat),
00543                    Geo::kThroatRad*scale,Geo::kThroatRad*scale,halfz);//throat
00544   volThroat -> SetLineColor(kBlue);
00545   
00546   TGeoVolume* volFlange
00547     = gGeoManager->MakeBox(std::string(preface+"FL").c_str(),
00548                            medMap.GetMedium(Geo::kCRSctFlange),
00549                    Geo::kFlangeRad*scale,Geo::kFlangeRad*scale,halfz); //flange
00550   volFlange -> SetLineColor(kBlack);
00551   
00552   // Bypass region is built according to full or partial coverage
00553   if ( fCoverage == PlaneCoverage::kNearPartial ) {
00554     volBypass = gGeoManager->MakeBox(std::string(preface+"BY").c_str(),
00555                              medMap.GetMedium(Geo::kCRSctBypass),
00556                              Geo::kNearPartialBypassRad*scale,
00557                              Geo::kNearPartialBypassRad*scale,halfz);// bypass
00558   }
00559   else {
00560     // full coverage
00561     volBypass
00562       = gGeoManager->MakeTube(std::string(preface+"BY").c_str(),
00563                               medMap.GetMedium(Geo::kCRSctBypass),
00564                               0,Geo::kNearFullBypassRad*scale,halfz); // bypass
00565   }
00566   
00567   volBypass -> SetLineColor(kBlue);
00568   volBypass -> SetLineStyle(2); // dashed
00569 
00570   volBypass -> AddNode(volFlange,1,gGeoIdentity);
00571   volFlange -> AddNode(volThroat,1,gGeoIdentity);
00572 
00573   // Coil addition depends on view, because U&V scint planes are rotated
00574   // in opposite directions when placed in detector.
00575   if ( fView == PlaneView::kU ) {
00576     volThroat -> AddNode(volCoil,1,
00577                          new TGeoTranslation(+0.01*scale,-0.01*scale,0));
00578   }
00579   else {
00580     // v-view
00581     volThroat -> AddNode(volCoil,1,
00582                          new TGeoTranslation(-0.01*scale,-0.01*scale,0));
00583   }
00584   
00585   Int_t nx = 6;
00586   Int_t ny = 8;
00587 
00588   Float_t xedge = 0.02475*scale;// dist from x-edge to center of 1st(last) tube
00589   Float_t x0   = -Geo::kCoilRad*scale + xedge;  // first tube position in x 
00590   // separation of tubes in x direction 
00591   Float_t xsep = 2.*(Geo::kCoilRad*scale - xedge)/(Float_t)(nx-1);
00592   
00593   Float_t yedge = 0.02221*scale;// dist from y-edge to center of 1st(last) tube
00594   Float_t y0   = -Geo::kCoilRad*scale + yedge;  // first tube position in y 
00595   // separation of tubes in y direction 
00596   Float_t ysep = 2.*(Geo::kCoilRad*scale - yedge)/(Float_t)(ny-1);
00597   
00598   for ( int ix = 0; ix < nx; ix++ ) {
00599     Float_t xpos = x0 + (Float_t)ix*xsep;
00600     for ( int iy = 0; iy < ny; iy++ ) {
00601       Float_t ypos = y0 + (Float_t)iy*ysep;
00602       Int_t itube = ix*ny+iy+1;
00603       if ( fView == PlaneView::kU ) {
00604         volCoil -> AddNode(volWater,itube,new TGeoTranslation(ypos,xpos,0));
00605       }
00606       else {
00607         // v-view
00608         volCoil -> AddNode(volWater,itube,new TGeoTranslation(xpos,ypos,0));
00609       }
00610     }
00611   }
00612   
00613   return volBypass;
00614 
00615 }

TGeoShape * GeoScintPlnVolume::BuildNearFullActive (  )  const [private]

Definition at line 336 of file GeoScintPlnVolume.cxx.

References GeoVolume::fGeoGeometry, GeoVolume::fShpName, fThick, Geo::GetAppType(), GeoVolume::GetScale(), Msg::kDebug, MSG, and GeoVolume::UpdateGlobalManager().

Referenced by BuildNear().

00336                                                         {
00337   // Private method used to build shape for near detector full active 
00338   // plane. 
00339 
00340   UpdateGlobalManager();
00341   
00342   MSG("Geo",Msg::kDebug) <<
00343     "Build near detector full active plane shape " << endl;
00344 
00345   Double_t scale = Geo::GetScale(fGeoGeometry -> GetAppType());
00346 
00347   // Shape is automatically adopted by gGeoManager
00348   Float_t halfz = 0.5*fThick;
00349   Double_t r_coil = 0.; // No coil hole since coil is inserted as node
00350   // former r_inscribed of 2.977 (r_inscribed of steel + nearoffset)
00351   // was too big to fit in hall. reduced 10/11/05. s.k.
00352   // this is still big enough to enclose plane modules
00353   // Expand to 2.91 to fit imperfect geometry.  Fix me.  The polygon
00354   // needs to be done away with in favor of a "squashed" or truncated
00355   // polygon shape in y to avoid extrusion with floor of hall.
00356   Double_t  r_inscribed = 2.91*scale; 
00357 
00358   TGeoPgon* plnShape = new TGeoPgon(fShpName.c_str(),22.5,360.,8,2);
00359   plnShape -> DefineSection(0,-halfz, r_coil, r_inscribed);
00360   plnShape -> DefineSection(1,+halfz, r_coil, r_inscribed);
00361 
00362   return plnShape;
00363 
00364 } 

TGeoShape * GeoScintPlnVolume::BuildNearPartialActive (  )  const [private]

Definition at line 309 of file GeoScintPlnVolume.cxx.

References GeoVolume::fGeoGeometry, GeoVolume::fShpName, fThick, Geo::GetAppType(), GeoVolume::GetScale(), Msg::kDebug, MSG, and GeoVolume::UpdateGlobalManager().

Referenced by BuildNear().

00309                                                            {
00310   // Private method used to build shape for near detector partial active 
00311   // plane. 
00312 
00313   UpdateGlobalManager();
00314   
00315   MSG("Geo",Msg::kDebug) <<
00316     "Build near detector partial active plane shape " << endl;
00317 
00318   Double_t scale = Geo::GetScale(fGeoGeometry -> GetAppType());
00319 
00320   // Shape is automatically adopted by gGeoManager
00321   Float_t halfz = 0.5*fThick;
00322   Double_t r_coil = 0.; // No coil hole since coil is inserted as node
00323   // former r_inscribed of 2.977 (r_inscribed of steel + nearoffset)
00324   // was too big to fit in hall. reduced 10/11/05. s.k.
00325   // this is still big enough to enclose plane modules.
00326   Double_t  r_inscribed = 2.9*scale;
00327   TGeoPgon* plnShape = new TGeoPgon(fShpName.c_str(),22.5,360.,8,2);
00328   plnShape -> DefineSection(0,-halfz, r_coil, r_inscribed);
00329   plnShape -> DefineSection(1,+halfz, r_coil, r_inscribed);
00330 
00331   return plnShape;
00332 
00333 } 

TGeoShape * GeoScintPlnVolume::BuildPlaneShape (  )  const [private]

Definition at line 156 of file GeoScintPlnVolume.cxx.

References bfld::AsString(), BuildCalDet(), BuildFar(), BuildNear(), fDetector, Detector::kCalDet, Msg::kError, Detector::kFar, Detector::kNear, MSG, and GeoVolume::UpdateGlobalManager().

Referenced by GeoScintPlnVolume().

00156                                                     {
00157   // Private method used to build shape for this plane. 
00158 
00159   UpdateGlobalManager();
00160 
00161   TGeoShape* shape = 0;
00162   
00163   switch ( fDetector ) {
00164 
00165   case Detector::kFar:
00166 
00167     shape = BuildFar();
00168     break;
00169     
00170   case Detector::kNear:
00171 
00172     shape = BuildNear();
00173     break;
00174 
00175   case Detector::kCalDet:
00176 
00177     shape = BuildCalDet();
00178     break;
00179     
00180   default:
00181 
00182     MSG("Geo",Msg::kError)<< "Scint Pln shape construction for detector type\n"
00183     << Detector::AsString(fDetector)
00184     << " not yet supported." << endl;
00185 
00186   } // end of switch
00187 
00188   return shape;
00189 
00190 } 

std::vector< GeoScintMdlNode * > GeoScintPlnVolume::GetScintMdlNodePtrVector (  )  const [virtual]

Definition at line 123 of file GeoScintPlnVolume.cxx.

References GeoVolume::UpdateGlobalManager().

Referenced by NumberOfModules().

00124                                                                             {
00125   // Return vector of GeoScintMdlNode's in this plane 
00126 
00127   UpdateGlobalManager();
00128 
00129   std::vector<GeoScintMdlNode*> mdlnodes;
00130   Int_t nmodule = GetNdaughters();
00131   for ( int imdl = 0; imdl < nmodule; imdl++ ) {
00132     GeoScintMdlNode* mdlNode = dynamic_cast<GeoScintMdlNode*>(GetNode(imdl));
00133     if ( mdlNode ) mdlnodes.push_back(mdlNode);
00134   }
00135 
00136   return mdlnodes;
00137   
00138 }

std::vector< GeoStripNode * > GeoScintPlnVolume::GetStripNodePtrVector (  )  const [virtual]

Definition at line 98 of file GeoScintPlnVolume.cxx.

References GeoScintMdlNode::GetStripNodePtrVector(), and GeoVolume::UpdateGlobalManager().

00098                                                                         {
00099   // Return vector of GeoStripNode's in this plane 
00100 
00101   UpdateGlobalManager();
00102   
00103   std::vector<GeoStripNode*> stpnodes;
00104   Int_t nmodule = GetNdaughters();
00105   for ( int imdl = 0; imdl < nmodule; imdl++ ) {
00106     GeoScintMdlNode* mdlNode = dynamic_cast<GeoScintMdlNode*>(GetNode(imdl));
00107     if ( mdlNode ) {
00108       std::vector<GeoStripNode*> mdlstpnodes=mdlNode->GetStripNodePtrVector();
00109       std::vector<GeoStripNode*>::const_iterator mdlstpitr=mdlstpnodes.begin();
00110       while (mdlstpitr != mdlstpnodes.end()) {
00111         stpnodes.push_back(*mdlstpitr);
00112         mdlstpitr++;
00113       }
00114     }
00115     
00116   }
00117   
00118   return stpnodes;
00119   
00120 }

Float_t GeoScintPlnVolume::GetThick (  )  const [inline]

Definition at line 39 of file GeoScintPlnVolume.h.

References fThick.

00039 { return fThick; }

virtual Int_t GeoScintPlnVolume::NumberOfModules (  )  const [inline, virtual]

Definition at line 35 of file GeoScintPlnVolume.h.

References GetScintMdlNodePtrVector().

00035                                          { 
00036                                    return GetScintMdlNodePtrVector().size(); }

Int_t GeoScintPlnVolume::NumberOfStrips (  )  const [virtual]

Definition at line 81 of file GeoScintPlnVolume.cxx.

References GeoVolume::UpdateGlobalManager().

00081                                               {
00082   // Return number of strips in plane
00083 
00084   UpdateGlobalManager();
00085 
00086   Int_t nstrip = 0;
00087   Int_t nmodule = GetNdaughters();
00088   for ( int imdl = 0; imdl < nmodule; imdl++ ) {
00089     GeoScintMdlNode* mdlNode = dynamic_cast<GeoScintMdlNode*>(GetNode(imdl));
00090     if ( mdlNode ) nstrip += mdlNode -> NumberOfStrips();
00091   }
00092 
00093   return nstrip;
00094   
00095 }

void GeoScintPlnVolume::Print ( Option_t *  option = ""  )  const [virtual]

Definition at line 141 of file GeoScintPlnVolume.cxx.

References bfld::AsString(), fCoverage, fDetector, fThick, fView, Nav::GetName(), and GeoVolume::UpdateGlobalManager().

00141                                                           {
00142    // print to cout
00143 
00144   UpdateGlobalManager();
00145 
00146   cout << "GeoScintPlnVolume::Print\n"
00147        << GetName() << endl;
00148   cout << "Det " << Detector::AsString(fDetector) << " Cover " 
00149        << PlaneCoverage::AsString(fCoverage) << " View " 
00150        << PlaneView::AsString(fView) << endl;
00151   cout << " Thick " << fThick << endl;
00152   
00153 }


Friends And Related Function Documentation

friend class GeoGeometry [friend]

Definition at line 26 of file GeoScintPlnVolume.h.


Member Data Documentation

Definition at line 64 of file GeoScintPlnVolume.h.

Referenced by BuildNear(), BuildNearCoilVolume(), and Print().

Definition at line 63 of file GeoScintPlnVolume.h.

Referenced by AddCoilNode(), BuildPlaneShape(), and Print().

Float_t GeoScintPlnVolume::fThick [private]

Definition at line 66 of file GeoScintPlnVolume.h.

Referenced by AddCoilNode(), BuildFar(), and GeoScintPlnVolume().

Definition at line 65 of file GeoScintPlnVolume.h.

Referenced by AddCoilNode(), BuildNearCoilVolume(), and Print().


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1