/////////////////////////////////////////////////////////////////////////////// // File: get_CFT_geom.cpp // // Purpose: // // Created: 25-Nov-1998 Kin Yip // History: Copied from /d0dist/dist/releases/test/cft_geometry/tests/BaseGeometry_t.cpp // // /////////////////////////////////////////////////////////////////////////////// #include #include #include #include #include #include #include #include "tsim_l1ft/cft_parameters.hpp" using namespace std; using std::vector; using edm::RCPManager; using edm::RCP; const char* cft_para::cft_name[]={"CFTX1","CFTX2","CFTX3","CFTX4", "CFTX5","CFTX6","CFTX7","CFTX8", "CFTU1","CFTU2","CFTU3","CFTU4", "CFTV1","CFTV2","CFTV3","CFTV4"}; const int cft_para::nfib[16] ={1280,1600,1920,2240,2560,2880,3200,3520, 1280,1920,2560,3200,1600,2240,2880,3520}; // Default but will be OVERWRITTEN in get_CFT_geom : //float cft_para::axial_radius[8] = { 20.0786, 24.9886, 29.8887, 34.7987, // 39.7087, 44.6187, 49.5187, 51.5189 }; float cft_para::axial_radius[8] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; cft_para::cft_para() { } cft_para::~cft_para() { } void cft_para::get_CFT_geom(bool debug) { d0_Ref cft; // The geometry... // // RCP stuff // if (debug) cout << "Get default parameters from RCP file" << endl; RCPManager rcpman; try { RCP rcp = rcpman.create("CftBaseGeometry.rcp"); cft = CftBaseGeometry::build_default(&rcp); // Build default using RCP } catch(runtime_error mistake) { cerr << "ERROR: " << mistake.what() << endl; exit(1); } CftGeometer* cftgm = CftGeometer::get_instance(); // Get Geometer cftgm->refresh(cft); // update geometry : ONLY after // you already have an old geometry set if (debug) cout << endl << "Nominal radius of the CFT barrel surfaces of the axial layers:" << endl; CFTDoubletList dbls = CFTDetector::all_doublets(); // Gets a list of all possible doublets CFTDoubletList::const_iterator idbl; // Gets an iterator to the doublets for (idbl = dbls.begin(); idbl != dbls.end(); ++idbl) { CFTDoublet dbl = *idbl; if ( vindex(dbl) < 8 ) { axial_radius[vindex(dbl)] = (cftgm->get_doublet_handle(dbl))->nominal_radius(); if (debug) cout << "recorded doublet " << vindex(dbl) << " " << axial_radius[vindex(dbl)] << endl; } } // I may just use // axial_radius[0] = (cftgm->get_doublet_handle(CFTX1))->nominal_radius(); // axial_radius[1] = (cftgm->get_doublet_handle(CFTX2))->nominal_radius(); // .... // double inner_radius = (cftgm->get_doublet(i))->inner_radius(); // double outer_radius = (cftgm->get_doublet(i))->outer_radius(); }// end of get_CFT_geom.cpp