MinosOutline Class Reference

#include <MinosOutline.h>

List of all members.

Public Member Functions

 MinosOutline ()
 MinosOutline (const Text_t *name, const Text_t *title, const Text_t *material, const PlexPlaneId plnid, Bool_t withEars, const Float_t dz, const Float_t scale)
 MinosOutline (const MinosOutline &so)
virtual ~MinosOutline ()
PlexPlaneId GetDetCover () const
Float_t GetGlobalXOffset () const
Bool_t GetShowEars () const

Private Member Functions

void BuildNear ()
void BuildFar ()
void BuildCalDet ()
void BuildNearSteelEars ()
void BuildNearSteelBasic ()
void BuildNearPartialActive (PlaneView::PlaneView_t view)
void BuildNearFullActive (PlaneView::PlaneView_t view)
void BuildFarSteelEars ()
void BuildFarSteelBasic ()
void BuildFarActive ()
void BuildFarVetoActive ()
void BuildCalDetBasic ()
void Copy (TObject &obj) const

Private Attributes

PlexPlaneId fDetCover
Bool_t fShowEars
Float_t fGlobalXOffset

Detailed Description

Definition at line 20 of file MinosOutline.h.


Constructor & Destructor Documentation

MinosOutline::MinosOutline (  ) 

Definition at line 32 of file MinosOutline.cxx.

00033 {
00034    // Default constructor
00035 
00036 }

MinosOutline::MinosOutline ( const Text_t *  name,
const Text_t *  title,
const Text_t *  material,
const PlexPlaneId  plnid,
Bool_t  withEars,
const Float_t  dz,
const Float_t  scale 
)

Definition at line 39 of file MinosOutline.cxx.

References bfld::AsString(), BuildCalDet(), BuildFar(), BuildNear(), fDetCover, fShowEars, PlexPlaneId::GetDetector(), PlexPlaneId::IsSteel(), PlexPlaneId::IsVetoShield(), Detector::kCalDet, Msg::kError, Detector::kFar, Detector::kNear, Msg::kWarning, and MSG.

00043    : TXTRU(name,title,material,8,2), fDetCover(plnid), fShowEars(showEars)
00044 {
00045 
00046    this->DefineSection(0,-dz,scale,0.,0.);
00047    this->DefineSection(1,+dz,scale,0.,0.);
00048 
00049    if ( fShowEars && !fDetCover.IsSteel() ) {
00050       if (!plnid.IsVetoShield()) {
00051         MSG("Ugli",Msg::kWarning)
00052           << " MinosOutline ctor error: " 
00053           << " doesn't make sense to build active with ears -- ignore flag"
00054           << endl;
00055       }
00056       fShowEars = false;
00057    }
00058 
00059    switch ( fDetCover.GetDetector() ) {
00060    case Detector::kNear:   BuildNear();    break;
00061    case Detector::kFar:    BuildFar();     break;
00062    case Detector::kCalDet: BuildCalDet();  break;
00063    default:
00064       MSG("Ugli",Msg::kError) 
00065          << " MinosOutline ctor error: " 
00066          << " can't construct Detector = " 
00067          << "\"" << Detector::AsString(fDetCover.GetDetector()) << "\""
00068          << endl;
00069    }
00070 
00071 }

MinosOutline::MinosOutline ( const MinosOutline so  ) 

Definition at line 80 of file MinosOutline.cxx.

00081   : TXTRU()
00082 {
00083    ((MinosOutline&)so).Copy(*this);
00084 }

MinosOutline::~MinosOutline (  )  [virtual]

Definition at line 75 of file MinosOutline.cxx.

00076 {
00077 }


Member Function Documentation

void MinosOutline::BuildCalDet (  )  [private]

Definition at line 147 of file MinosOutline.cxx.

References bfld::AsString(), BuildCalDetBasic(), fDetCover, PlexPlaneId::GetPlaneCoverage(), PlaneCoverage::kComplete, Msg::kInfo, PlaneCoverage::kNoActive, and MSG.

Referenced by MinosOutline().

00148 {
00149    // decision tree for CalDet
00150 
00151    // easy since all CalDet planes are the same
00152 
00153    BuildCalDetBasic();
00154 
00155    // complain about nonsense
00156    PlaneCoverage::PlaneCoverage_t cover = fDetCover.GetPlaneCoverage();
00157    if (cover != PlaneCoverage::kComplete &&
00158        cover != PlaneCoverage::kNoActive    ) {
00159       MSG("Ugli",Msg::kInfo) 
00160          << " MinosOutline: odd request for CalDet plane with " 
00161          << "\"" << PlaneCoverage::AsString(cover) << "\" coverage"
00162          << endl;
00163    }
00164 }

void MinosOutline::BuildCalDetBasic (  )  [private]

Definition at line 375 of file MinosOutline.cxx.

References caldet_half_size, caldetxoffset, and fGlobalXOffset.

Referenced by BuildCalDet().

00376 {
00377 
00378    fGlobalXOffset = caldetxoffset;
00379    this->DefineVertex( 0,-caldet_half_size,-caldet_half_size);
00380    this->DefineVertex( 1, caldet_half_size,-caldet_half_size);
00381    this->DefineVertex( 2, caldet_half_size, caldet_half_size);
00382    this->DefineVertex( 3,-caldet_half_size, caldet_half_size);
00383    TruncateNxy(4);                                          
00384 }                                                           

void MinosOutline::BuildFar (  )  [private]

Definition at line 123 of file MinosOutline.cxx.

References bfld::AsString(), BuildFarActive(), BuildFarSteelBasic(), BuildFarSteelEars(), BuildFarVetoActive(), fDetCover, fShowEars, PlexPlaneId::GetPlaneCoverage(), PlexPlaneId::IsSteel(), PlexPlaneId::IsVetoShield(), PlaneCoverage::kComplete, Msg::kWarning, and MSG.

Referenced by MinosOutline().

00124 {
00125    // decision tree for Far
00126    if (fDetCover.IsVetoShield()) {
00127      BuildFarVetoActive();
00128    }
00129    else if (fDetCover.IsSteel()) {
00130       if (fShowEars) BuildFarSteelEars();
00131       else           BuildFarSteelBasic();
00132    }
00133    else {
00134       BuildFarActive();
00135       PlaneCoverage::PlaneCoverage_t cover = fDetCover.GetPlaneCoverage();
00136       if (cover != PlaneCoverage::kComplete) {
00137          MSG("Ugli",Msg::kWarning) 
00138             << " MinosOutline ctor error: " 
00139             << " can't construct Far with " 
00140             << "\"" << PlaneCoverage::AsString(cover) << "\" coverage"
00141             << endl;
00142       }
00143    }
00144 }

void MinosOutline::BuildFarActive (  )  [private]

Definition at line 339 of file MinosOutline.cxx.

References Anp::angle(), Munits::cm, Munits::degree, farxoffset, and fGlobalXOffset.

Referenced by BuildFar().

00340 {
00341    // Far Active
00342    fGlobalXOffset = farxoffset;
00343 
00344    Double_t r_inscribed = 400.0 * Munits::cm;
00345    Double_t dangle = 360./8. * Munits::degree;
00346    Double_t R_outside = r_inscribed /TMath::Cos(0.5*dangle);
00347    Double_t angleoff = 0.;
00348    Double_t x0 = 0, y0 = 0;
00349 
00350    for (int i = 0; i < 8; i++ ) {
00351       Double_t angle = (float(i)+0.5)*dangle + angleoff;
00352       Double_t x = TMath::Cos(angle)*R_outside + x0;
00353       Double_t y = TMath::Sin(angle)*R_outside + y0;
00354       this->DefineVertex(i,x,y);
00355    }
00356 }

void MinosOutline::BuildFarSteelBasic (  )  [private]

Definition at line 324 of file MinosOutline.cxx.

References Munits::cm, farxoffset, and fGlobalXOffset.

Referenced by BuildFar().

00325 {
00326    // Far Steel w/o Ears
00327    fGlobalXOffset = farxoffset;
00328    this->DefineVertex( 0,  400.00*Munits::cm, -165.72*Munits::cm);
00329    this->DefineVertex( 1,  400.00*Munits::cm,  165.67*Munits::cm);
00330    this->DefineVertex( 2,  165.70*Munits::cm,  399.99*Munits::cm);
00331    this->DefineVertex( 3, -165.66*Munits::cm,  400.01*Munits::cm);
00332    this->DefineVertex( 4, -399.98*Munits::cm,  165.71*Munits::cm);
00333    this->DefineVertex( 5, -400.01*Munits::cm, -165.65*Munits::cm);
00334    this->DefineVertex( 6, -165.72*Munits::cm, -399.98*Munits::cm);
00335    this->DefineVertex( 7,  165.64*Munits::cm, -400.02*Munits::cm);
00336 }

void MinosOutline::BuildFarSteelEars (  )  [private]

Definition at line 285 of file MinosOutline.cxx.

References Munits::cm, farxoffset, and fGlobalXOffset.

Referenced by BuildFar().

00286 {
00287    // Far Steel w/ Ears
00288    fGlobalXOffset = farxoffset;
00289    this->DefineVertex(  0,  421.8893*Munits::cm, -142.8867*Munits::cm);
00290    this->DefineVertex(  1,  421.8893*Munits::cm, -138.3342*Munits::cm);
00291    this->DefineVertex(  2,  400.1614*Munits::cm, -115.9855*Munits::cm);
00292    this->DefineVertex(  3,  400.7823*Munits::cm,   87.6358*Munits::cm);
00293    this->DefineVertex(  4,  406.9902*Munits::cm,   94.0507*Munits::cm);
00294    this->DefineVertex(  5,  429.1319*Munits::cm,  101.5003*Munits::cm);
00295    this->DefineVertex(  6,  447.1350*Munits::cm,  101.5003*Munits::cm);
00296    this->DefineVertex(  7,  454.7915*Munits::cm,   94.2577*Munits::cm);
00297    this->DefineVertex(  8,  457.6886*Munits::cm,   94.2577*Munits::cm);
00298    this->DefineVertex(  9,  457.6886*Munits::cm,  109.3637*Munits::cm);
00299    this->DefineVertex( 10,  143.7724*Munits::cm,  423.2799*Munits::cm);
00300    this->DefineVertex( 11,  139.4268*Munits::cm,  423.2799*Munits::cm);
00301    this->DefineVertex( 12,  117.2850*Munits::cm,  401.1382*Munits::cm);
00302    this->DefineVertex( 13, -116.9622*Munits::cm,  401.1382*Munits::cm);
00303    this->DefineVertex( 14, -139.1040*Munits::cm,  423.2799*Munits::cm);
00304    this->DefineVertex( 15, -143.4496*Munits::cm,  423.2799*Munits::cm);
00305    this->DefineVertex( 16, -457.3658*Munits::cm,  109.3637*Munits::cm);
00306    this->DefineVertex( 17, -457.3658*Munits::cm,   94.2577*Munits::cm);
00307    this->DefineVertex( 18, -454.4687*Munits::cm,   94.2577*Munits::cm);
00308    this->DefineVertex( 19, -439.9834*Munits::cm,  101.9141*Munits::cm);
00309    this->DefineVertex( 20, -429.8438*Munits::cm,  101.9141*Munits::cm);
00310    this->DefineVertex( 21, -406.6674*Munits::cm,   94.2577*Munits::cm);
00311    this->DefineVertex( 22, -399.8386*Munits::cm,   84.7388*Munits::cm);
00312    this->DefineVertex( 23, -399.8386*Munits::cm, -115.9855*Munits::cm);
00313    this->DefineVertex( 24, -421.5665*Munits::cm, -137.7134*Munits::cm);
00314    this->DefineVertex( 25, -421.5665*Munits::cm, -142.8867*Munits::cm);
00315    this->DefineVertex( 26, -143.4496*Munits::cm, -421.0036*Munits::cm);
00316    this->DefineVertex( 27, -139.1040*Munits::cm, -421.0036*Munits::cm);
00317    this->DefineVertex( 28, -116.9622*Munits::cm, -398.8619*Munits::cm);
00318    this->DefineVertex( 29,  116.8712*Munits::cm, -398.8619*Munits::cm);
00319    this->DefineVertex( 30,  139.4268*Munits::cm, -421.0036*Munits::cm);
00320    this->DefineVertex( 31,  143.7724*Munits::cm, -421.0036*Munits::cm);
00321 }

void MinosOutline::BuildFarVetoActive (  )  [private]

Definition at line 359 of file MinosOutline.cxx.

References farwidth, fGlobalXOffset, and stripwidth.

Referenced by BuildFar().

00360 {
00361    // Far Veto Active
00362    fGlobalXOffset = 0;
00363 
00364    Double_t half_width  = 0.5*farwidth;
00365    Double_t half_height = 0.5*20*stripwidth;
00366 
00367    this->DefineVertex( 0, -half_width, -half_height);
00368    this->DefineVertex( 1,  half_width, -half_height);
00369    this->DefineVertex( 2,  half_width,  half_height);
00370    this->DefineVertex( 3, -half_width,  half_height);
00371    TruncateNxy(4);
00372 }

void MinosOutline::BuildNear (  )  [private]

Definition at line 96 of file MinosOutline.cxx.

References bfld::AsString(), BuildNearFullActive(), BuildNearPartialActive(), BuildNearSteelBasic(), BuildNearSteelEars(), fDetCover, fShowEars, PlexPlaneId::GetPlaneCoverage(), PlexPlaneId::GetPlaneView(), PlexPlaneId::IsSteel(), PlaneCoverage::kNearFull, PlaneCoverage::kNearPartial, Msg::kWarning, and MSG.

Referenced by MinosOutline().

00097 {
00098    // decision tree for Near
00099    if (fDetCover.IsSteel()) {
00100       // Steel
00101       if (fShowEars) BuildNearSteelEars();
00102       else           BuildNearSteelBasic();
00103    }
00104    else {
00105       // Active
00106       PlaneCoverage::PlaneCoverage_t cover = fDetCover.GetPlaneCoverage();
00107       PlaneView::PlaneView_t         view  = fDetCover.GetPlaneView();
00108       switch (cover) {
00109       case (PlaneCoverage::kNearFull):    BuildNearFullActive(view);    break;
00110       case (PlaneCoverage::kNearPartial): BuildNearPartialActive(view); break;
00111       default:
00112          MSG("Ugli",Msg::kWarning) 
00113             << " MinosOutline ctor error: " 
00114             << " can't construct Near with " 
00115             << "\"" << PlaneCoverage::AsString(cover) << "\" coverage"
00116             << endl;
00117          BuildNearFullActive(view);
00118       }
00119    }
00120 }

void MinosOutline::BuildNearFullActive ( PlaneView::PlaneView_t  view  )  [private]

Definition at line 248 of file MinosOutline.cxx.

References Munits::cm, fGlobalXOffset, PlaneView::kU, PlaneView::kV, nearxoffset, and FidVol::r_sqrt2.

Referenced by BuildNear().

00249 {
00250    // Near Full Active
00251    fGlobalXOffset = nearxoffset;
00252 
00253    Double_t r_sqrt2 = 1.0 / TMath::Sqrt(2.0);
00254    Double_t pxy[16] = {
00255       141.48*Munits::cm, -190.51*Munits::cm,
00256       241.91*Munits::cm,  -90.09*Munits::cm,
00257       241.91*Munits::cm,   90.08*Munits::cm,
00258       141.41*Munits::cm,  190.59*Munits::cm,
00259       -43.64*Munits::cm,  190.60*Munits::cm,
00260      -234.25*Munits::cm,    0.01*Munits::cm,
00261      -234.25*Munits::cm,    0.01*Munits::cm,
00262       -43.78*Munits::cm, -190.49*Munits::cm
00263    };
00264 
00265    for (int i=0; i<8; i++) {
00266       Double_t x = pxy[i*2] + nearxoffset;
00267       Double_t y = pxy[i*2+1];
00268       Double_t xp, yp;
00269       switch (view) {
00270       case (PlaneView::kU):
00271          xp = ( x - y ) * r_sqrt2; yp = ( x + y ) * r_sqrt2;
00272          break;
00273       case (PlaneView::kV):
00274          xp = ( x + y ) * r_sqrt2; yp = (-x + y ) * r_sqrt2;
00275          break;
00276       default:
00277          xp = x; yp = y;
00278          break;
00279       }
00280       this->DefineVertex(i,xp,yp);
00281    }
00282 }

void MinosOutline::BuildNearPartialActive ( PlaneView::PlaneView_t  view  )  [private]

Definition at line 211 of file MinosOutline.cxx.

References Munits::cm, fGlobalXOffset, PlaneView::kU, PlaneView::kV, nearxoffset, and FidVol::r_sqrt2.

Referenced by BuildNear().

00212 {
00213    // Near Partial Active
00214    fGlobalXOffset = nearxoffset;
00215 
00216    Double_t r_sqrt2 = 1.0 / TMath::Sqrt(2.0);
00217    Double_t pxy[16] = {
00218       141.37*Munits::cm, -190.62*Munits::cm,
00219       241.91*Munits::cm,  -90.09*Munits::cm,
00220       241.91*Munits::cm,   90.08*Munits::cm,
00221       141.41*Munits::cm,  190.59*Munits::cm,
00222       122.19*Munits::cm,  190.59*Munits::cm,
00223        -8.77*Munits::cm,   59.66*Munits::cm,
00224        -8.78*Munits::cm,  -59.67*Munits::cm,
00225       122.16*Munits::cm, -190.62*Munits::cm
00226    };
00227 
00228    for (int i=0; i<8; i++) {
00229       Double_t x = pxy[i*2] + nearxoffset;
00230       Double_t y = pxy[i*2+1];
00231       Double_t xp, yp;
00232       switch (view) {
00233       case (PlaneView::kU):
00234          xp = ( x - y ) * r_sqrt2; yp = ( x + y ) * r_sqrt2;
00235          break;
00236       case (PlaneView::kV):
00237          xp = ( x + y ) * r_sqrt2; yp = (-x + y ) * r_sqrt2;
00238          break;
00239       default:
00240          xp = x; yp = y;
00241          break;
00242       }
00243       this->DefineVertex(i,xp,yp);
00244    }
00245 }

void MinosOutline::BuildNearSteelBasic (  )  [private]

Definition at line 196 of file MinosOutline.cxx.

References Munits::cm, fGlobalXOffset, and nearxoffset.

Referenced by BuildNear().

00197 {
00198    // Near Steel w/o Ears
00199    fGlobalXOffset = nearxoffset;
00200    this->DefineVertex( 0,  241.91*Munits::cm,  -90.12*Munits::cm);
00201    this->DefineVertex( 1,  241.91*Munits::cm,   90.08*Munits::cm);
00202    this->DefineVertex( 2,  141.41*Munits::cm,  190.59*Munits::cm);
00203    this->DefineVertex( 3, -141.39*Munits::cm,  190.60*Munits::cm);
00204    this->DefineVertex( 4, -241.90*Munits::cm,   90.11*Munits::cm);
00205    this->DefineVertex( 5, -241.91*Munits::cm,  -90.08*Munits::cm);
00206    this->DefineVertex( 6, -141.42*Munits::cm, -190.59*Munits::cm);
00207    this->DefineVertex( 7,  141.38*Munits::cm, -190.62*Munits::cm);
00208 }

void MinosOutline::BuildNearSteelEars (  )  [private]

Definition at line 167 of file MinosOutline.cxx.

References fGlobalXOffset, Munits::inch, and nearxoffset.

Referenced by BuildNear().

00168 {
00169    // Near Steel w/ Ears
00170    fGlobalXOffset = nearxoffset;
00171    this->DefineVertex( 0, -121.43*Munits::inch,   0.47*Munits::inch);
00172    this->DefineVertex( 1, -120.25*Munits::inch,   0.47*Munits::inch);
00173    this->DefineVertex( 2, -115.14*Munits::inch,   3.42*Munits::inch);
00174    this->DefineVertex( 3, -110.24*Munits::inch,   3.42*Munits::inch);
00175    this->DefineVertex( 4,  -95.24*Munits::inch,  -1.48*Munits::inch);
00176    this->DefineVertex( 5,  -95.24*Munits::inch, -35.47*Munits::inch);
00177    this->DefineVertex( 6,  -69.80*Munits::inch, -60.91*Munits::inch);
00178    this->DefineVertex( 7,  -69.80*Munits::inch, -75.04*Munits::inch);
00179    this->DefineVertex( 8,   69.80*Munits::inch, -75.04*Munits::inch);
00180    this->DefineVertex( 9,   69.80*Munits::inch, -60.91*Munits::inch);
00181    this->DefineVertex(10,   95.24*Munits::inch, -35.47*Munits::inch);
00182    this->DefineVertex(11,   95.24*Munits::inch,  -1.48*Munits::inch);
00183    this->DefineVertex(12,  110.16*Munits::inch,   3.42*Munits::inch);
00184    this->DefineVertex(13,  117.30*Munits::inch,   3.42*Munits::inch);
00185    this->DefineVertex(14,  120.25*Munits::inch,   0.47*Munits::inch);
00186    this->DefineVertex(15,  121.43*Munits::inch,   0.47*Munits::inch);
00187    this->DefineVertex(16,  121.43*Munits::inch,   9.28*Munits::inch);
00188    this->DefineVertex(17,   69.80*Munits::inch,  60.91*Munits::inch);
00189    this->DefineVertex(18,   69.80*Munits::inch,  75.04*Munits::inch);
00190    this->DefineVertex(19,  -69.80*Munits::inch,  75.04*Munits::inch);
00191    this->DefineVertex(20,  -69.80*Munits::inch,  60.91*Munits::inch);
00192    this->DefineVertex(21, -121.43*Munits::inch,   9.28*Munits::inch);
00193 }

void MinosOutline::Copy ( TObject &  obj  )  const [private]

Definition at line 87 of file MinosOutline.cxx.

00088 {
00089    TXTRU::Copy(obj);
00090 //   this->fDetCover      = obj.fDetCover;
00091 //   this->fShowEars      = obj.fShowEars;
00092 //   this->fGlobalXOffset = obj.fGlobalXOffset;
00093 }

PlexPlaneId MinosOutline::GetDetCover (  )  const [inline]

Definition at line 33 of file MinosOutline.h.

References fDetCover.

00033 { return fDetCover; }

Float_t MinosOutline::GetGlobalXOffset (  )  const [inline]

Definition at line 34 of file MinosOutline.h.

References fGlobalXOffset.

Referenced by UgliGeometryReroot::BuildShapes(), and UgliSteelPlnNode::UgliSteelPlnNode().

00034 { return fGlobalXOffset; }

Bool_t MinosOutline::GetShowEars (  )  const [inline]

Definition at line 35 of file MinosOutline.h.

References fShowEars.

00035 { return fShowEars; }


Member Data Documentation

Definition at line 55 of file MinosOutline.h.

Referenced by BuildCalDet(), BuildFar(), BuildNear(), GetDetCover(), and MinosOutline().

Float_t MinosOutline::fGlobalXOffset [private]
Bool_t MinosOutline::fShowEars [private]

Definition at line 56 of file MinosOutline.h.

Referenced by BuildFar(), BuildNear(), GetShowEars(), and MinosOutline().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1