Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:27:27

0001 {
0002    // gSystem->Load("libFireworksCore");
0003    DetIdToMatrix map;
0004    const char* geomtryFile = "cmsGeom10.root";
0005    map.loadGeometry( geomtryFile );
0006    map.loadMap( geomtryFile );
0007 
0008    // display the extract
0009    TEveManager::Create();
0010 
0011    for (int i = 637500000; i < 637600000; ++i) {
0012       TEveGeoShapeExtract* extract = map.getExtract(i);
0013       if ( extract ) {
0014          RPCDetId id(i);
0015          if ( id.region() != 0 ) continue;
0016          std::cout << "id: " << i
0017                    << " Region "<<id.region()
0018                    << " Ring "<<id.ring()
0019                    << " Station "<<id.station()
0020                    << " Sector "<<id.sector()
0021                    << " Layer "<<id.layer()
0022                    << " Subsector "<<id.subsector()
0023                    << " Roll "<<id.roll()
0024                    << " Tr "<<id.trIndex() << std::endl;
0025          gEve->AddElement(TEveGeoShape::ImportShapeExtract(extract));
0026       }
0027    }
0028 
0029 
0030    /*
0031       TEveGeoShapeExtract* container = new TEveGeoShapeExtract( "MuonRhoZ" );
0032               container->AddElement( map.getExtract( 588349440 ) );
0033               container->AddElement( map.getExtract( 584155136 ) );
0034               container->AddElement( map.getExtract( 579960832 ) );
0035               container->AddElement( map.getExtract( 575766528 ) );
0036 
0037               container->AddElement( map.getExtract( 577339392 ) );
0038               container->AddElement( map.getExtract( 581533696 ) );
0039               container->AddElement( map.getExtract( 585728000 ) );
0040               container->AddElement( map.getExtract( 590970880 ) );
0041       TFile f("muonz.root", "RECREATE");
0042       container->Write("Extract");
0043       f.Close();
0044       TEveGeoShape::ImportShapeExtract( container, 0);
0045     */
0046 
0047    // TEveGeoShape::ImportShapeExtract(map.getAllExtracts(),0);
0048 
0049    /*
0050       TEveGeoShape::ImportShapeExtract( map.getExtract( 575766528 ),0 );
0051       TEveGeoShape::ImportShapeExtract( map.getExtract( 584155136 ),0 );
0052       TEveGeoShape::ImportShapeExtract( map.getExtract( 579960832 ),0 );
0053       TEveGeoShape::ImportShapeExtract( map.getExtract( 575766528 ),0 );
0054 
0055       TEveGeoShape::ImportShapeExtract( map.getExtract( 577339392 ),0 );
0056       TEveGeoShape::ImportShapeExtract( map.getExtract( 581533696 ),0 );
0057       TEveGeoShape::ImportShapeExtract( map.getExtract( 585728000 ),0 );
0058       TEveGeoShape::ImportShapeExtract( map.getExtract( 590970880 ),0 );
0059 
0060       for ( Int_t i=0; i<1000; ++i) {
0061       TEveGeoShapeExtract* extract = map.getExtract(574980096+(i << 18));
0062       if ( extract ) TEveGeoShape::ImportShapeExtract(extract,0);
0063       }
0064     */
0065    /*
0066       TEveGeoShape* extract = TEveGeoShape::ImportShapeExtract(map.getExtract(575176704),0);
0067 
0068       TEveElementList* eveTopElement = new TEveElementList("CMS");
0069       gEve->AddGlobalElement( eveTopElement );
0070       TEveGeoTopNode* eveTopNode = new TEveGeoTopNode(gGeoManager, extract);
0071       // eveTopNode->UseNodeTrans();
0072       // gEve->AddGlobalElement(eveTopNode, eveTopNodeElement);
0073       gEve->AddGlobalElement(eveTopElement);
0074     */
0075 }
0076