Ugli Namespace Reference

Typedefs

typedef enum Ugli::ESMRegion SMRegion_t
 identify z region
typedef enum Ugli::EXYRegion XYRegion_t
 identify x-y region

Enumerations

enum  EModifyMode { kModifiable, kFrozen, kUseGlobal }
 

Choose which list in the loan pool list UgliGeomHandle search.

More...
enum  ESMRegion {
  kUpstream = -1, kDownstream = -2, kSMGap = 0, kInSM1 = 1,
  kInSM2 = 2
}
 

identify z region

More...
enum  EXYRegion {
  kCoil = 0, kThroat = 1, kNeck = 2, kHole = 3,
  kFlange = 4, kBypass = 5, kSteel = 6, kHall = 7,
  kRock = 8
}
 

identify x-y region

More...

Functions

void SetDefaultModifyMode (EModifyMode mmode=kFrozen)
EModifyMode GetDefaultModifyMode ()
const Char_t * AsString (EModifyMode mmode)
const Char_t * AsString (ESMRegion smregion)
const Char_t * AsString (EXYRegion xyregion)
bool XYisUV (Detector::Detector_t det)
void uv2xy (Detector::Detector_t det, Double_t u, Double_t v, Double_t &x, Double_t &y)
void uv2xy (Detector::Detector_t det, Float_t u, Float_t v, Float_t &x, Float_t &y)
void xy2uv (Detector::Detector_t det, Double_t x, Double_t y, Double_t &u, Double_t &v)
void xy2uv (Detector::Detector_t det, Float_t x, Float_t y, Float_t &u, Float_t &v)
TVector3 uvz2xyz (Detector::Detector_t det, const TVector3 &uvz)
TVector3 xyz2uvz (Detector::Detector_t det, const TVector3 &xyz)

Variables

static EModifyMode fDefaultModifyMode = Ugli::kFrozen
static const Double_t pi = 3.14159265358979323846
static const Double_t rad2deg = 180. / pi
static const Double_t deg2rad = pi / 180.
static const Double_t r_sqrt2 = 7.07106781186547462e-01

Typedef Documentation

identify z region

identify x-y region


Enumeration Type Documentation

Choose which list in the loan pool list UgliGeomHandle search.

Enumerator:
kModifiable 
kFrozen 
kUseGlobal 

Definition at line 26 of file Ugli.h.

00026                     {
00027       kModifiable, // geometry may differ from database values 
00028       kFrozen,     // geometry is frozen at database values
00029       kUseGlobal   // choose from above based on static setting of class
00030    };

identify z region

Enumerator:
kUpstream 
kDownstream 
kSMGap 
kInSM1 
kInSM2 

Definition at line 33 of file Ugli.h.

00033                           {
00034      kUpstream   = -1,
00035      kDownstream = -2,
00036      kSMGap      =  0,  // non-SM regions must be <= 0 
00037      kInSM1      =  1,
00038      kInSM2      =  2
00039    } SMRegion_t;

identify x-y region

Enumerator:
kCoil 
kThroat 
kNeck 
kHole 
kFlange 
kBypass 
kSteel 
kHall 
kRock 

Definition at line 42 of file Ugli.h.

00042                           {
00043      kCoil    = 0,  // current carrying material (not implemented)
00044      kThroat  = 1,  // throat of the coil collar
00045      kNeck    = 2,  // narrow outer part of collar in steel
00046      kHole    = 3,  // hole in the steel
00047      kFlange  = 4,  // wide outer part of collar in gap
00048      kBypass  = 5,  // bypass region (not implemented)
00049      kSteel   = 6,  // x-y region outside collar region
00050      kHall    = 7,  // outside region covered of steel (not implemented)
00051      kRock    = 8   // outside the hall (not implemented)
00052    } XYRegion_t;


Function Documentation

const Char_t * Ugli::AsString ( EXYRegion  xyregion  ) 

Definition at line 50 of file Ugli.cxx.

References kBypass, kCoil, kFlange, kHall, kHole, kNeck, kRock, kSteel, and kThroat.

00051 {
00052    // return the mode as a string
00053    switch (xyregion) {
00054    case kCoil:         return "Coil";    break;
00055    case kThroat:       return "Throat";  break;
00056    case kNeck:         return "Neck";    break;
00057    case kHole:         return "Hole";    break;
00058    case kFlange:       return "Flange";  break;
00059    case kBypass:       return "Bypass";  break;
00060    case kSteel:        return "Steel";   break;
00061    case kHall:         return "Hall";    break;
00062    case kRock:         return "Rock";    break;
00063    default: return "UnknownXYRegion";
00064    }
00065 }

const Char_t * Ugli::AsString ( ESMRegion  smregion  ) 

Definition at line 37 of file Ugli.cxx.

References kDownstream, kInSM1, kInSM2, kSMGap, and kUpstream.

00038 {
00039    // return the smregion as a string
00040    switch (smregion) {
00041    case kUpstream:    return "Upstream";   break;
00042    case kDownstream:  return "Downstream"; break;
00043    case kSMGap:       return "SMGap";      break;
00044    case kInSM1:       return "SM1";        break;
00045    case kInSM2:       return "SM2";        break;
00046    default: return "UnknownSMRegion";
00047    }
00048 }

const Char_t * Ugli::AsString ( EModifyMode  mmode  ) 

Definition at line 26 of file Ugli.cxx.

References kFrozen, kModifiable, and kUseGlobal.

00027 {
00028    // return the mode as a string
00029    switch (mmode) {
00030    case kFrozen:      return "Frozen";     break;
00031    case kModifiable:  return "Modifiable"; break;
00032    case kUseGlobal:   return "UseGlobal";  break;
00033    default: return "Unknown";
00034    }
00035 }

EModifyMode Ugli::GetDefaultModifyMode (  )  [inline]

Definition at line 64 of file Ugli.h.

References fDefaultModifyMode.

Referenced by UgliLoanPool::DoesValidGeomExist(), and UgliGeomHandle::UgliGeomHandle().

00064 { return fDefaultModifyMode; }

void Ugli::SetDefaultModifyMode ( EModifyMode  mmode = kFrozen  ) 

Definition at line 68 of file Ugli.cxx.

References fDefaultModifyMode, kFrozen, and kModifiable.

00069 {
00070    // set the global modify mode
00071    // must be either kFrozen or kModifiable
00072    // (kUseGlobal would be circular - if attempted default to kFrozen)
00073    if (kModifiable == mmode) fDefaultModifyMode = kModifiable;
00074    else                      fDefaultModifyMode = kFrozen;
00075 }

void Ugli::uv2xy ( Detector::Detector_t  det,
Float_t  u,
Float_t  v,
Float_t &  x,
Float_t &  y 
)

Definition at line 78 of file Ugli.cxx.

References r_sqrt2, and XYisUV().

00080 {
00081    // convert from detector (u,v) to world (x,y)
00082    if (XYisUV(det)) { x=u, y=v; return; }
00083    x = ( u - v ) * Ugli::r_sqrt2;
00084    y = ( u + v ) * Ugli::r_sqrt2;
00085 }

void Ugli::uv2xy ( Detector::Detector_t  det,
Double_t  u,
Double_t  v,
Double_t &  x,
Double_t &  y 
)

Definition at line 88 of file Ugli.cxx.

References r_sqrt2, and XYisUV().

Referenced by uvz2xyz().

00090 {
00091    // convert from detector (u,v) to world (x,y)
00092    if (XYisUV(det)) { x=u, y=v; return; }
00093    x = ( u - v ) * Ugli::r_sqrt2;
00094    y = ( u + v ) * Ugli::r_sqrt2;
00095 }

TVector3 Ugli::uvz2xyz ( Detector::Detector_t  det,
const TVector3 &  uvz 
)

Definition at line 118 of file Ugli.cxx.

References uv2xy().

Referenced by UgliSteelPlnHandle::GlobalToLocal(), UgliScintMdlHandle::GlobalToLocal(), UgliStripHandle::GlobalToLocal(), UgliScintPlnHandle::GlobalToLocal(), and UgliSteelPlnHandle::GlobalToLocalVect().

00119 {
00120    // convert from detector (u,v,z) to world (x,y,z)
00121    Double_t x, y;
00122    uv2xy(det,uvz.X(),uvz.Y(),x,y);
00123    return TVector3(x,y,uvz.Z());
00124 }

void Ugli::xy2uv ( Detector::Detector_t  det,
Float_t  x,
Float_t  y,
Float_t &  u,
Float_t &  v 
)

Definition at line 98 of file Ugli.cxx.

References r_sqrt2, and XYisUV().

00100 {
00101    // convert from world (x,y) to detector (u,v)
00102    if (XYisUV(det)) { u=x, v=y; return; }
00103    u = ( x + y ) * Ugli::r_sqrt2;
00104    v = (-x + y ) * Ugli::r_sqrt2;
00105 }

void Ugli::xy2uv ( Detector::Detector_t  det,
Double_t  x,
Double_t  y,
Double_t &  u,
Double_t &  v 
)

Definition at line 108 of file Ugli.cxx.

References r_sqrt2, and XYisUV().

Referenced by BfldCache::InXYRegion(), and xyz2uvz().

00110 {
00111    // convert from world (x,y) to detector (u,v)
00112    if (XYisUV(det)) { u=x, v=y; return; }
00113    u = ( x + y ) * Ugli::r_sqrt2;
00114    v = (-x + y ) * Ugli::r_sqrt2;
00115 }

bool Ugli::XYisUV ( Detector::Detector_t  det  )  [inline]

Definition at line 71 of file Ugli.h.

References Detector::kCalDet.

Referenced by uv2xy(), and xy2uv().

00072                { return (Detector::kCalDet == det); } // of three detectors ...

TVector3 Ugli::xyz2uvz ( Detector::Detector_t  det,
const TVector3 &  xyz 
)

Definition at line 127 of file Ugli.cxx.

References xy2uv().

Referenced by UgliStripHandle::GlobalPos(), UgliSteelPlnHandle::LocalToGlobal(), UgliScintMdlHandle::LocalToGlobal(), UgliScintPlnHandle::LocalToGlobal(), UgliStripHandle::LocalToGlobal(), and UgliSteelPlnHandle::LocalToGlobalVect().

00128 {
00129    // convert from world (x,y,z) to detector (u,v,z)
00130    Double_t u, v;
00131    xy2uv(det,xyz.X(),xyz.Y(),u,v);
00132    return TVector3(u,v,xyz.Z());
00133 }


Variable Documentation

const Double_t Ugli::deg2rad = pi / 180. [static]
EModifyMode Ugli::fDefaultModifyMode = Ugli::kFrozen [static]

Definition at line 58 of file Ugli.h.

Referenced by GetDefaultModifyMode(), and SetDefaultModifyMode().

const Double_t Ugli::pi = 3.14159265358979323846 [static]

Definition at line 91 of file Ugli.h.

const Double_t Ugli::r_sqrt2 = 7.07106781186547462e-01 [static]

Definition at line 94 of file Ugli.h.

Referenced by uv2xy(), and xy2uv().

const Double_t Ugli::rad2deg = 180. / pi [static]

Generated on 14 Dec 2017 for loon by  doxygen 1.6.1