#include "UgliGeometry/UgliGeometry.h"#include "UgliGeometry/UgliLoanPool.h"#include "UgliGeometry/UgliScintPlnNode.h"#include "UgliGeometry/UgliSteelPlnNode.h"#include "DatabaseInterface/DbiResultPtr.h"#include "DatabaseInterface/DbiTableProxy.h"#include "DatabaseInterface/DbiCache.h"#include "UgliGeometry/UgliDbiTables.h"#include "UgliGeometry/UgliDbiGeometry.h"#include "UgliGeometry/UgliDbiScintPlnStruct.h"#include "UgliGeometry/UgliDbiScintMdlStruct.h"#include "UgliGeometry/UgliDbiStripStruct.h"#include "UgliGeometry/UgliDbiSteelPln.h"#include "UgliGeometry/UgliDbiScintPln.h"#include "UgliGeometry/UgliDbiScintMdl.h"#include "UgliGeometry/UgliDbiStrip.h"#include "UgliGeometry/UgliStripShape.h"#include "UgliGeometry/TNodeX.h"#include "UgliGeometry/MinosOutline.h"#include "Conventions/Munits.h"#include "Plex/PlexVetoShieldHack.h"#include "Fabrication/FabPlnInstallLookup.h"#include "MessageService/MsgService.h"#include "TMath.h"#include "TCanvas.h"#include "TMixture.h"#include "TRotMatrix.h"#include "TBRIK.h"#include "TSPHE.h"#include "TView3D.h"#include "TObjArray.h"#include "TList.h"#include <cassert>#include <float.h>Go to the source code of this file.
Typedefs | |
| typedef map< PlexPlaneId, UgliPlnNode * >::const_iterator | nodeItr_t |
| typedef map< PlexPlaneId, UgliPlnNode * >::const_reverse_iterator | nodeRevItr_t |
| typedef pair< PlexPlaneId, UgliPlnNode * > | nodePair_t |
Functions | |
| CVSID ("$Id: UgliGeometry.cxx,v 1.68 2007/02/19 05:57:31 rhatcher Exp $") | |
| size_t | BinarySearchNearestLarger (const std::vector< Double_t > &array, Double_t value) |
|
|
Definition at line 64 of file UgliGeometry.cxx. Referenced by UgliGeometry::BuildNodes(), UgliGeometry::GetPlnNodePtrVector(), UgliGeometry::GetScintPlnNodePtrVector(), UgliGeometry::GetSteelPlnNodePtrVector(), UgliScintPlnNode::GetStripNodePtrVector(), and UgliGeometry::GetZExtent(). |
|
|
Definition at line 66 of file UgliGeometry.cxx. Referenced by UgliGeometry::BuildNodes(), UgliGeometry::GetPlnNodePtrVector(), UgliGeometry::GetScintPlnNodePtrVector(), and UgliGeometry::GetSteelPlnNodePtrVector(). |
|
|
Definition at line 65 of file UgliGeometry.cxx. Referenced by UgliGeometry::GetPlaneIdFromZ(), and UgliGeometry::GetZExtent(). |
|
||||||||||||
|
Definition at line 71 of file UgliGeometry.cxx. Referenced by UgliGeometry::GetNearestSteelPlnNode(). 00073 {
00074 // Binary search in a vector of values to locate value
00075 //
00076 // Vector is assumed to be sorted prior to this call
00077 // If match is found, function returns position of value
00078 // If no match found, function returns first element larger than value
00079 // Except if larger than last element, function returns last element + 1
00080
00081 size_t n(array.size());
00082
00083 // special cases
00084 if ( value > array[n-1] ) return n; // beyond the end, nothing larger
00085 if ( value < array[0] ) return 0; // trivially easy
00086
00087 size_t nabove(n+1);
00088 size_t nbelow(0);
00089 size_t middle;
00090 while ( nabove-nbelow > 1 ) {
00091 middle = (nabove+nbelow)/2;
00092 /*
00093 cout << "[" << nbelow << "," << middle << "," << nabove << "] "
00094 << " n=" << n << endl;
00095 if ( middle-1 > n-1 )
00096 cout << "BinarySearchNearestLarger bad middle" << endl;
00097 */
00098 Double_t vtest = array[middle-1];
00099 if ( value == vtest) return middle-1;
00100 if ( value < vtest) nabove = middle;
00101 else nbelow = middle;
00102 }
00103 // fell through without a match
00104 return nabove-1;
00105
00106 }
|
|
||||||||||||
|
|
1.3.9.1