Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

FidVol Namespace Reference


Functions

bool infid_near_z (SimFlag::SimFlag_t simflg, Double_t z)
bool infid_far_z (SimFlag::SimFlag_t simflg, Double_t z)
bool infid_near_circle_z (Double_t x, Double_t y)
bool infid_near_circle_beam (Double_t x, Double_t y, Double_t z)
bool infid_far_coil (Double_t x, Double_t y)
bool infid_far_circle (Double_t x, Double_t y)
bool infid_far_octagon (Double_t x, Double_t y)
bool load_setter_script (std::string name)
bool know_setter (std::string funcname)

Variables

std::string gName = "Default"
Bool_t gNearFollowBeam = true
Double_t gNearR = 1.0
Double_t gNearZData [2] = { 1.01080, 4.99059 }
Double_t gNearZMC [2] = { 1.01080, 4.99059 }
Double_t gBeamAngleRad = 3.34321 * TMath::DegToRad()
Double_t gNearDyDz = TMath::Tan(-gBeamAngleRad)
Double_t gNearX0Beam = 1.4828
Double_t gNearY0Beam = 0.2384
Double_t gNearX0Z = 1.4885
Double_t gNearY0Z = 0.1397
Bool_t gFarOctagon = false
Bool_t gFarCoilCut = true
Double_t gFarRinner = 0.5
Double_t gFarRouter = TMath::Sqrt(14.0)
Double_t gFarZData [4] = { 0.49080, 14.29300, 16.27110, 27.98270}
Double_t gFarZMC [4] = { 0.47692, 14.27860, 16.26470, 27.97240}
const Double_t r_sqrt2 = 7.07106781186547462e-01


Function Documentation

bool FidVol::infid_far_circle Double_t  x,
Double_t  y
[inline]
 

Definition at line 305 of file infid.h.

References gFarRouter.

Referenced by infid().

00306 {
00307   Double_t r2 = x*x + y*y;
00308   if ( r2 > gFarRouter*gFarRouter ) return false;
00309   return true;
00310 }

bool FidVol::infid_far_coil Double_t  x,
Double_t  y
[inline]
 

Definition at line 298 of file infid.h.

References gFarRinner.

Referenced by infid().

00299 {
00300   Double_t r2 = x*x + y*y;
00301   if ( r2 < gFarRinner*gFarRinner ) return false;
00302   return true;
00303 }

bool FidVol::infid_far_octagon Double_t  x,
Double_t  y
[inline]
 

Definition at line 312 of file infid.h.

Referenced by infid().

00313 {
00314   if ( TMath::Abs(x) > gFarRouter ) return false;
00315   if ( TMath::Abs(y) > gFarRouter ) return false;
00316 
00317   Double_t u = (  x + y ) * r_sqrt2;
00318   Double_t v = ( -x + y ) * r_sqrt2;
00319 
00320   if ( TMath::Abs(u) > gFarRouter ) return false;
00321   if ( TMath::Abs(v) > gFarRouter ) return false;
00322 
00323   return true;
00324 }

bool FidVol::infid_far_z SimFlag::SimFlag_t  simflg,
Double_t  z
[inline]
 

Definition at line 270 of file infid.h.

Referenced by infid().

00271 {
00272   Double_t* zcuts = gFarZData;
00273   if ( SimFlag::kMC == simflg ) zcuts = gFarZMC;
00274   if ( z < zcuts[0] ) return false;
00275   if ( z > zcuts[3] ) return false;
00276   if ( z > zcuts[1] && z < zcuts[2] ) return false;
00277   return true;
00278 }

bool FidVol::infid_near_circle_beam Double_t  x,
Double_t  y,
Double_t  z
[inline]
 

Definition at line 289 of file infid.h.

References gNearR, and gNearY0Beam.

Referenced by infid().

00290 {
00291   Double_t xx = x - gNearX0Beam;
00292   Double_t yy = y - gNearY0Beam - z*gNearDyDz;
00293   Double_t r2 = xx*xx + yy*yy;
00294   if ( r2 > gNearR*gNearR ) return false;
00295   return true;
00296 }

bool FidVol::infid_near_circle_z Double_t  x,
Double_t  y
[inline]
 

Definition at line 280 of file infid.h.

References gNearR.

Referenced by infid().

00281 {
00282   Double_t xx = x - gNearX0Z;
00283   Double_t yy = y - gNearY0Z;
00284   Double_t r2 = xx*xx + yy*yy;
00285   if ( r2 > gNearR*gNearR ) return false;
00286   return true;
00287 }

bool FidVol::infid_near_z SimFlag::SimFlag_t  simflg,
Double_t  z
[inline]
 

Definition at line 261 of file infid.h.

Referenced by infid().

00262 {
00263   Double_t* zcuts = gNearZData;
00264   if ( SimFlag::kMC == simflg ) zcuts = gNearZMC;
00265   if ( z < zcuts[0] ) return false;
00266   if ( z > zcuts[1] ) return false;
00267   return true;
00268 }

bool FidVol::know_setter std::string  funcname  )  [inline]
 

Definition at line 190 of file infid.h.

Referenced by choose_infid_set().

00191 {
00192   // determine if we know how to call this function
00193   TInterpreter* interp = gROOT->GetInterpreter();
00194   void* func = interp->GetInterfaceMethod(0,funcname.c_str(),"");
00195   return ( (func) ? true : false );
00196 }

bool FidVol::load_setter_script std::string  name  )  [inline]
 

Definition at line 167 of file infid.h.

References gSystem().

Referenced by choose_infid_set().

00168 {
00169   const char* paths = 
00170     ".:~:$SRT_PRIVATE_CONTEXT/DataUtil:$SRT_PUBLIC_CONTEXT/DataUtil";
00171 
00172   if ( script.find(".C") == std::string::npos ) script += ".C";
00173   const char* filename = gSystem->Which(paths,script.c_str());
00174   if ( filename ) {
00175     //std::cout << "found " << filename << std::endl;
00176     int errcode = gROOT->LoadMacro(filename);
00177     // gSystem->Which() returns allocated space, give it back when done
00178     delete [] filename;
00179     if ( errcode == 0 ) {
00180       //std::cout << "load macro" << filename << std::endl;
00181       return true;
00182     } else {
00183       std::cout << "failed loading " << script 
00184                 << ", status = " << filename << std::endl;
00185     }
00186   }
00187   return false;
00188 }


Variable Documentation

Double_t FidVol::gBeamAngleRad = 3.34321 * TMath::DegToRad() [static]
 

Definition at line 56 of file infid.h.

Bool_t FidVol::gFarCoilCut = true [static]
 

Definition at line 67 of file infid.h.

Bool_t FidVol::gFarOctagon = false [static]
 

Definition at line 66 of file infid.h.

Double_t FidVol::gFarRinner = 0.5 [static]
 

Definition at line 68 of file infid.h.

Referenced by infid_far_coil().

Double_t FidVol::gFarRouter = TMath::Sqrt(14.0) [static]
 

Definition at line 69 of file infid.h.

Referenced by infid_far_circle().

Double_t FidVol::gFarZData[4] = { 0.49080, 14.29300, 16.27110, 27.98270} [static]
 

Definition at line 72 of file infid.h.

Double_t FidVol::gFarZMC[4] = { 0.47692, 14.27860, 16.26470, 27.97240} [static]
 

Definition at line 73 of file infid.h.

std::string FidVol::gName = "Default" [static]
 

Definition at line 45 of file infid.h.

Double_t FidVol::gNearDyDz = TMath::Tan(-gBeamAngleRad) [static]
 

Definition at line 57 of file infid.h.

Bool_t FidVol::gNearFollowBeam = true [static]
 

Definition at line 48 of file infid.h.

Double_t FidVol::gNearR = 1.0 [static]
 

Definition at line 49 of file infid.h.

Referenced by infid_near_circle_beam(), and infid_near_circle_z().

Double_t FidVol::gNearX0Beam = 1.4828 [static]
 

Definition at line 58 of file infid.h.

Double_t FidVol::gNearX0Z = 1.4885 [static]
 

Definition at line 62 of file infid.h.

Double_t FidVol::gNearY0Beam = 0.2384 [static]
 

Definition at line 59 of file infid.h.

Referenced by infid_near_circle_beam().

Double_t FidVol::gNearY0Z = 0.1397 [static]
 

Definition at line 63 of file infid.h.

Double_t FidVol::gNearZData[2] = { 1.01080, 4.99059 } [static]
 

Definition at line 52 of file infid.h.

Double_t FidVol::gNearZMC[2] = { 1.01080, 4.99059 } [static]
 

Definition at line 53 of file infid.h.

const Double_t FidVol::r_sqrt2 = 7.07106781186547462e-01
 

Definition at line 77 of file infid.h.


Generated on Fri Mar 28 16:16:04 2008 for loon by  doxygen 1.3.9.1