From 964c92a05201c81a2448008c4fe6bbb5728b3a38 Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Wed, 29 Apr 2015 17:56:38 +0900 Subject: [PATCH 1/6] merged with updates --- .../GeometryExtended2023MuonReco_cff.py | 27 +- .../python/GeometryExtended2023Muon_cff.py | 8 + Fireworks/Core/src/FW3DViewGeometry.cc | 27 +- .../Geometry/python/dumpRecoGeometry_cfg.py | 21 +- .../Geometry/python/dumpSimGeometry_cfg.py | 4 +- .../Geometry/src/FWRecoGeometryESProducer.cc | 4 - .../Muons/plugins/FWGEMDigiProxyBuilder.cc | 2 + .../Muons/plugins/FWItemMuonAccessors.cc | 25 +- .../Muons/plugins/FWME0DigiProxyBuilder.cc | 77 +++++ .../Tracks/plugins/FWTrackHitsDetailView.cc | 1 + .../cmsExtendedGeometry2023MuonXML_cfi.py | 289 ++++++++++++++++++ .../Configuration/python/gemCustom.py | 32 ++ 12 files changed, 477 insertions(+), 40 deletions(-) create mode 100644 Configuration/Geometry/python/GeometryExtended2023Muon_cff.py create mode 100644 Fireworks/Muons/plugins/FWME0DigiProxyBuilder.cc create mode 100644 Geometry/CMSCommonData/python/cmsExtendedGeometry2023MuonXML_cfi.py create mode 100644 SLHCUpgradeSimulations/Configuration/python/gemCustom.py diff --git a/Configuration/Geometry/python/GeometryExtended2023MuonReco_cff.py b/Configuration/Geometry/python/GeometryExtended2023MuonReco_cff.py index f3383b15c6040..4442eeea1c77c 100644 --- a/Configuration/Geometry/python/GeometryExtended2023MuonReco_cff.py +++ b/Configuration/Geometry/python/GeometryExtended2023MuonReco_cff.py @@ -1,12 +1,12 @@ import FWCore.ParameterSet.Config as cms # Ideal geometry, needed for transient ECAL alignement -from Configuration.Geometry.GeometryExtended2023Muon_cff import * +from Configuration.Geometry.GeometryExtended2023_cff import * # Reconstruction geometry services # Tracking Geometry #bah - well, this is not a cfi! -from Geometry.CommonDetUnit.globalTracking2023Geometry_cfi import * +from Geometry.CommonDetUnit.globalTrackingGeometry_cfi import * #Tracker from RecoTracker.GeometryESProducer.TrackerRecoGeometryESProducer_cfi import * @@ -22,32 +22,11 @@ from Geometry.TrackerGeometryBuilder.idealForDigiTrackerSLHCGeometry_cff import * from Geometry.CSCGeometryBuilder.idealForDigiCscGeometry_cff import * from Geometry.DTGeometryBuilder.idealForDigiDtGeometry_cff import * -trackerSLHCGeometry.applyAlignment = cms.bool(False) +trackerGeometry.applyAlignment = cms.bool(False) # Calorimeters from Geometry.CaloEventSetup.CaloTopology_cfi import * - -from Geometry.CaloEventSetup.CaloGeometryBuilder_cfi import * - -CaloGeometryBuilder = cms.ESProducer("CaloGeometryBuilder", - SelectedCalos = cms.vstring('HCAL' , - 'ZDC' , - 'CASTOR' , - 'EcalBarrel' , - 'TOWER' ) -) - -from Geometry.EcalAlgo.EcalBarrelGeometry_cfi import * - -## Include EE and ES back temporarily from Geometry.CaloEventSetup.CaloGeometry_cff import * - -from Geometry.HcalEventSetup.HcalGeometry_cfi import * -from Geometry.HcalEventSetup.CaloTowerGeometry_cfi import * -from Geometry.HcalEventSetup.HcalTopology_cfi import * -from Geometry.ForwardGeometry.ForwardGeometry_cfi import * from Geometry.CaloEventSetup.EcalTrigTowerConstituents_cfi import * from Geometry.EcalMapping.EcalMapping_cfi import * from Geometry.EcalMapping.EcalMappingRecord_cfi import * -from Geometry.HcalCommonData.hcalRecNumberingInitialization_cfi import * - diff --git a/Configuration/Geometry/python/GeometryExtended2023Muon_cff.py b/Configuration/Geometry/python/GeometryExtended2023Muon_cff.py new file mode 100644 index 0000000000000..f528cc0170cbe --- /dev/null +++ b/Configuration/Geometry/python/GeometryExtended2023Muon_cff.py @@ -0,0 +1,8 @@ +import FWCore.ParameterSet.Config as cms +# +# Geometry master configuration +# +# Ideal geometry, needed for simulation +from Geometry.CMSCommonData.cmsExtendedGeometry2023MuonXML_cfi import * +from Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi import * +#from Geometry.HcalCommonData.hcalSimNumberingInitialization_cfi import * diff --git a/Fireworks/Core/src/FW3DViewGeometry.cc b/Fireworks/Core/src/FW3DViewGeometry.cc index fbdd527dddfcc..dcb455bfdefe3 100644 --- a/Fireworks/Core/src/FW3DViewGeometry.cc +++ b/Fireworks/Core/src/FW3DViewGeometry.cc @@ -28,6 +28,7 @@ #include "DataFormats/MuonDetId/interface/DTChamberId.h" #include "DataFormats/MuonDetId/interface/CSCDetId.h" #include "DataFormats/MuonDetId/interface/GEMDetId.h" +#include "DataFormats/MuonDetId/interface/ME0DetId.h" #include "DataFormats/SiPixelDetId/interface/PXBDetId.h" #include "DataFormats/SiPixelDetId/interface/PXFDetId.h" @@ -240,7 +241,31 @@ FW3DViewGeometry::showMuonEndcap( bool showMuonEndcap ) // EVE debug :: add list on bottom of TEveBrowser list tree gEve->AddToListTree(GEMlist, false); AddElement( m_muonEndcapElements ); - + + // adding me0 + TEveElementList* ME0list = new TEveElementList( "ME0" ); + for( Int_t iRegion = ME0DetId::minRegionId; iRegion <= ME0DetId::maxRegionId; ++iRegion ) + { + TEveElementList* eRegion = new TEveElementList(Form("Region_%d", iRegion) ); + ME0list->AddElement( eRegion ); + for( Int_t iChamber = ME0DetId::minChamberId; iChamber <= ME0DetId::maxChamberId; ++iChamber ) + { + for( Int_t iLayer = ME0DetId::minLayerId; iLayer <= ME0DetId::maxLayerId ; ++iLayer ) + { + for (Int_t iRoll = ME0DetId::minRollId; iRoll <= ME0DetId::maxRollId ; ++iRoll ) + { + ME0DetId id( iRegion, iLayer, iChamber, iRoll ); + TEveGeoShape* shape = m_geom->getEveShape( id.rawId() ); + shape->SetTitle(TString::Format("ME0: , Ch=%d Rl=%d\ndet-id=%u", + iChamber, iRoll, id.rawId())); + + eRegion->AddElement( shape ); + addToCompound(shape, kFWMuonEndcapLineColorIndex ); + } + } + } + } + m_muonEndcapElements->AddElement(ME0list); } if( m_muonEndcapElements ) diff --git a/Fireworks/Geometry/python/dumpRecoGeometry_cfg.py b/Fireworks/Geometry/python/dumpRecoGeometry_cfg.py index c884d41b8952a..1350295037743 100644 --- a/Fireworks/Geometry/python/dumpRecoGeometry_cfg.py +++ b/Fireworks/Geometry/python/dumpRecoGeometry_cfg.py @@ -38,25 +38,38 @@ def recoGeoLoad(score): process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:upgrade2017', '') process.load('Configuration.Geometry.GeometryExtended2017Reco_cff') # Automatic addition of the customisation function from SLHCUpgradeSimulations.Configuration.combinedCustoms - from SLHCUpgradeSimulations.Configuration.combinedCustoms import cust_2017 + #from SLHCUpgradeSimulations.Configuration.combinedCustoms import cust_2017 + #process.load("SLHCUpgradeSimulations.Configuration.combinedCustoms.cust_2017") # process = cust_2017(process) elif score == "2019": from Configuration.AlCa.GlobalTag import GlobalTag process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:upgrade2019', '') process.load('Configuration.Geometry.GeometryExtended2019Reco_cff') + #from SLHCUpgradeSimulations.Configuration.combinedCustoms import cust_2019 elif score == "PhaseIPixel": from Configuration.AlCa.GlobalTag import GlobalTag process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:mc', '') process.load('Configuration.Geometry.GeometryExtendedPhaseIPixelReco_cff') + elif score == "2023": + from Configuration.AlCa.autoCond import autoCond + process.GlobalTag.globaltag = autoCond['mc'] + #from Configuration.AlCa.GlobalTag import GlobalTag + #process.GlobalTag = GlobalTag(process.GlobalTag, 'PH2_1K_FB_V6::All', '') + process.load('Configuration.Geometry.GeometryExtended2023Reco_cff') + #from SLHCUpgradeSimulations.Configuration.combinedCustoms import cust_2019 + #process = cust_2019(process) + elif score == "2023Muon": - from Configuration.AlCa.GlobalTag import GlobalTag - process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:upgradePLS3', '') + from Configuration.AlCa.autoCond import autoCond + process.GlobalTag.globaltag = autoCond['mc'] + #from Configuration.AlCa.GlobalTag import GlobalTag + #process.GlobalTag = GlobalTag(process.GlobalTag, 'PH2_1K_FB_V6::All', '') process.load('Configuration.Geometry.GeometryExtended2023MuonReco_cff') # Automatic addition of the customisation function from SLHCUpgradeSimulations.Configuration.combinedCustoms - from SLHCUpgradeSimulations.Configuration.combinedCustoms import cust_2023Muon + #from SLHCUpgradeSimulations.Configuration.combinedCustoms import cust_2023Muon #call to customisation function cust_2023Muon imported from SLHCUpgradeSimulations.Configuration.combinedCustoms # process = cust_2023Muon(process) diff --git a/Fireworks/Geometry/python/dumpSimGeometry_cfg.py b/Fireworks/Geometry/python/dumpSimGeometry_cfg.py index cd88d77c91f61..7e6e5463a9f40 100644 --- a/Fireworks/Geometry/python/dumpSimGeometry_cfg.py +++ b/Fireworks/Geometry/python/dumpSimGeometry_cfg.py @@ -48,7 +48,9 @@ def simGeoLoad(score): elif score == "2023Muon": process.load('Configuration.Geometry.GeometryExtended2023MuonReco_cff') - + elif score == "2023": + process.load('Configuration.Geometry.GeometryExtended2023Reco_cff') + elif score == "SLHC": process.load('SLHCUpgradeSimulations.Geometry.Phase1_R30F12_HCal_cmsSimIdealGeometryXML_cff') diff --git a/Fireworks/Geometry/src/FWRecoGeometryESProducer.cc b/Fireworks/Geometry/src/FWRecoGeometryESProducer.cc index 43e749c77988e..f45b7c7fd7215 100644 --- a/Fireworks/Geometry/src/FWRecoGeometryESProducer.cc +++ b/Fireworks/Geometry/src/FWRecoGeometryESProducer.cc @@ -286,8 +286,6 @@ FWRecoGeometryESProducer::addGEMGeometry( void ) } } - - void FWRecoGeometryESProducer::addME0Geometry( void ) { @@ -327,8 +325,6 @@ FWRecoGeometryESProducer::addME0Geometry( void ) edm::LogInfo("FWRecoGeometry") << "failed to produce ME0 geometry " << exception.what() << std::endl; } } - - void FWRecoGeometryESProducer::addPixelBarrelGeometry( void ) diff --git a/Fireworks/Muons/plugins/FWGEMDigiProxyBuilder.cc b/Fireworks/Muons/plugins/FWGEMDigiProxyBuilder.cc index 011311585c33e..39ead0730dcad 100644 --- a/Fireworks/Muons/plugins/FWGEMDigiProxyBuilder.cc +++ b/Fireworks/Muons/plugins/FWGEMDigiProxyBuilder.cc @@ -23,6 +23,8 @@ #include "DataFormats/GEMDigi/interface/GEMDigiCollection.h" #include "DataFormats/GEMDigi/interface/GEMPadDigiCollection.h" +#include "Geometry/GEMGeometry/interface/GEMGeometry.h" +#include "Geometry/GEMGeometry/interface/GEMEtaPartition.h" class FWGEMDigiProxyBuilder : public FWProxyBuilderBase { diff --git a/Fireworks/Muons/plugins/FWItemMuonAccessors.cc b/Fireworks/Muons/plugins/FWItemMuonAccessors.cc index b30adce3708f0..68c4ab27bc5d4 100644 --- a/Fireworks/Muons/plugins/FWItemMuonAccessors.cc +++ b/Fireworks/Muons/plugins/FWItemMuonAccessors.cc @@ -24,12 +24,19 @@ #include "DataFormats/DTRecHit/interface/DTRecHitCollection.h" #include "DataFormats/RPCRecHit/interface/RPCRecHitCollection.h" +#include "DataFormats/GEMRecHit/interface/GEMRecHitCollection.h" +//#include "DataFormats/GEMRecHit/interface/ME0RecHitCollection.h" +//#include "DataFormats/GEMRecHit/interface/ME0SegmentCollection.h" #include "DataFormats/DTDigi/interface/DTDigiCollection.h" #include "DataFormats/CSCDigi/interface/CSCWireDigiCollection.h" #include "DataFormats/CSCDigi/interface/CSCStripDigiCollection.h" #include "DataFormats/RPCDigi/interface/RPCDigiCollection.h" #include "DataFormats/CSCDigi/interface/CSCRPCDigiCollection.h" +#include "DataFormats/GEMDigi/interface/GEMDigiCollection.h" +#include "DataFormats/GEMDigi/interface/GEMPadDigiCollection.h" +#include "DataFormats/GEMDigi/interface/GEMCoPadDigiCollection.h" +#include "DataFormats/GEMDigi/interface/ME0DigiPreRecoCollection.h" #include "Fireworks/Core/interface/FWItemRandomAccessor.h" @@ -39,6 +46,9 @@ REGISTER_TEMPLATE_FWITEMACCESSOR(FWItemRandomAccessor, REGISTER_TEMPLATE_FWITEMACCESSOR(FWItemRandomAccessor,DTRecSegment4DCollection,"DTSegment4DCollectionAccessor"); REGISTER_TEMPLATE_FWITEMACCESSOR(FWItemRandomAccessor,DTRecHitCollection,"DTRecHitCollectionAccessor"); REGISTER_TEMPLATE_FWITEMACCESSOR(FWItemRandomAccessor,RPCRecHitCollection,"RPCRecHitCollectionAccessor"); +REGISTER_TEMPLATE_FWITEMACCESSOR(FWItemRandomAccessor,GEMRecHitCollection,"GEMRecHitCollectionAccessor"); +//REGISTER_TEMPLATE_FWITEMACCESSOR(FWItemRandomAccessor,ME0RecHitCollection,"ME0RecHitCollectionAccessor"); +//REGISTER_TEMPLATE_FWITEMACCESSOR(FWItemRandomAccessor,ME0SegmentCollection,"ME0SegmentCollectionAccessor"); typedef FWItemMuonDigiAccessor DTDigiAccessor; REGISTER_TEMPLATE_FWITEMACCESSOR(DTDigiAccessor, DTDigiCollection, "DTDigiCollectionAccessor"); @@ -56,11 +66,14 @@ REGISTER_TEMPLATE_FWITEMACCESSOR(RPCDigiAccessor, RPCDigiCollection, "RPCDigiCol typedef FWItemMuonDigiAccessor CSCRPCDigiAccessor; REGISTER_TEMPLATE_FWITEMACCESSOR(CSCRPCDigiAccessor, CSCRPCDigiCollection, "CSCRPCDigiCollectionAccessor"); -//============================================================================== - -#include "DataFormats/GEMDigi/interface/GEMDigiCollection.h" -#include "DataFormats/GEMRecHit/interface/GEMRecHitCollection.h" -REGISTER_TEMPLATE_FWITEMACCESSOR(FWItemRandomAccessor,GEMRecHitCollection,"GEMRecHitCollectionAccessor"); - typedef FWItemMuonDigiAccessor GEMDigiAccessor; REGISTER_TEMPLATE_FWITEMACCESSOR(GEMDigiAccessor, GEMDigiCollection, "GEMDigiCollectionAccessor"); + +typedef FWItemMuonDigiAccessor GEMPadDigiAccessor; +REGISTER_TEMPLATE_FWITEMACCESSOR(GEMPadDigiAccessor, GEMPadDigiCollection, "GEMPadDigiCollectionAccessor"); + +typedef FWItemMuonDigiAccessor GEMCoPadDigiAccessor; +REGISTER_TEMPLATE_FWITEMACCESSOR(GEMCoPadDigiAccessor, GEMCoPadDigiCollection, "GEMCoPadDigiCollectionAccessor"); + +typedef FWItemMuonDigiAccessor ME0DigiPreRecoAccessor; +REGISTER_TEMPLATE_FWITEMACCESSOR(ME0DigiPreRecoAccessor, ME0DigiPreRecoCollection, "ME0DigiPreRecoCollectionAccessor"); diff --git a/Fireworks/Muons/plugins/FWME0DigiProxyBuilder.cc b/Fireworks/Muons/plugins/FWME0DigiProxyBuilder.cc new file mode 100644 index 0000000000000..35415d344ec8e --- /dev/null +++ b/Fireworks/Muons/plugins/FWME0DigiProxyBuilder.cc @@ -0,0 +1,77 @@ +//#include "TEveStraightLineSet.h" +#include "TEveBoxSet.h" +#include "TEveCompound.h" +#include "TEveGeoNode.h" + +#include "Fireworks/Core/interface/FWProxyBuilderBase.h" +#include "Fireworks/Core/interface/FWEventItem.h" +#include "Fireworks/Core/interface/FWGeometry.h" +#include "Fireworks/Core/interface/fwLog.h" + +#include "DataFormats/GEMDigi/interface/ME0DigiPreRecoCollection.h" +#include "Geometry/GEMGeometry/interface/ME0Geometry.h" +#include "Geometry/GEMGeometry/interface/ME0EtaPartition.h" + +class FWME0DigiProxyBuilder : public FWProxyBuilderBase +{ +public: + FWME0DigiProxyBuilder() {} + virtual ~FWME0DigiProxyBuilder() {} + + REGISTER_PROXYBUILDER_METHODS(); + +private: + virtual void build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext*); + FWME0DigiProxyBuilder(const FWME0DigiProxyBuilder&); + const FWME0DigiProxyBuilder& operator=(const FWME0DigiProxyBuilder&); +}; + +void FWME0DigiProxyBuilder::build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext*) +{ + const ME0DigiPreRecoCollection* digis = 0; + + iItem->get(digis); + + if ( ! digis ) + { + fwLog(fwlog::kWarning)<<"Failed to get ME0Digis"<getGeom(); + + for ( ME0DigiPreRecoCollection::DigiRangeIterator dri = digis->begin(), driEnd = digis->end(); + dri != driEnd; ++dri ) + { + unsigned int rawid = (*dri).first.rawId(); + const ME0DigiPreRecoCollection::Range& range = (*dri).second; + + if( ! geom->contains( rawid )) + { + fwLog( fwlog::kWarning ) << "Failed to get geometry of ME0 roll with detid: " + << rawid << std::endl; + + TEveCompound* compound = createCompound(); + setupAddElement( compound, product ); + + continue; + } + + for( ME0DigiPreRecoCollection::const_iterator dit = range.first; + dit != range.second; ++dit ) + { + TEveBoxSet* stripDigiSet = new TEveBoxSet; + setupAddElement( stripDigiSet, product ); + + float localPoint[3] = {(*dit).x(), (*dit).y(), 0.0}; + float globalPoint[3]; + + geom->localToGlobal( rawid, localPoint, globalPoint); + + stripDigiSet->AddBox(globalPoint[0], globalPoint[1], globalPoint[2], + (*dit).ex(), (*dit).ey(), 0.1); + } + } +} + +REGISTER_FWPROXYBUILDER(FWME0DigiProxyBuilder, ME0DigiPreRecoCollection, "ME0Digi", + FWViewType::kAll3DBits | FWViewType::kAllRPZBits); diff --git a/Fireworks/Tracks/plugins/FWTrackHitsDetailView.cc b/Fireworks/Tracks/plugins/FWTrackHitsDetailView.cc index 79499a23b759c..9f4db9564a4e3 100644 --- a/Fireworks/Tracks/plugins/FWTrackHitsDetailView.cc +++ b/Fireworks/Tracks/plugins/FWTrackHitsDetailView.cc @@ -432,6 +432,7 @@ FWTrackHitsDetailView::addModules( const reco::Track& track, break; case MuonSubdetId::ME0: name = "ME0"; + break; default: break; } diff --git a/Geometry/CMSCommonData/python/cmsExtendedGeometry2023MuonXML_cfi.py b/Geometry/CMSCommonData/python/cmsExtendedGeometry2023MuonXML_cfi.py new file mode 100644 index 0000000000000..d1d6ef7774623 --- /dev/null +++ b/Geometry/CMSCommonData/python/cmsExtendedGeometry2023MuonXML_cfi.py @@ -0,0 +1,289 @@ +import FWCore.ParameterSet.Config as cms + +## 2015 + new phase 1 pixel detector + +XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource", + geomXMLFiles = cms.vstring('Geometry/CMSCommonData/data/PhaseII/materials.xml', + 'Geometry/CMSCommonData/data/rotations.xml', + 'Geometry/CMSCommonData/data/extend/cmsextent.xml', + 'Geometry/CMSCommonData/data/PhaseI/cms.xml', + 'Geometry/CMSCommonData/data/cmsMother.xml', + 'Geometry/CMSCommonData/data/cmsTracker.xml', + 'Geometry/CMSCommonData/data/caloBase.xml', + 'Geometry/CMSCommonData/data/cmsCalo.xml', + 'Geometry/CMSCommonData/data/muonBase.xml', + 'Geometry/CMSCommonData/data/cmsMuon.xml', + 'Geometry/CMSCommonData/data/mgnt.xml', + 'Geometry/CMSCommonData/data/PhaseII/beampipe.xml', + 'Geometry/CMSCommonData/data/cmsBeam.xml', + 'Geometry/CMSCommonData/data/muonMB.xml', + 'Geometry/CMSCommonData/data/muonMagnet.xml', + 'Geometry/CMSCommonData/data/cavern.xml', + 'Geometry/TrackerCommonData/data/PhaseII/trackerParameters.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixfwdMaterials.xml', + 'Geometry/TrackerCommonData/data/pixfwdCommon.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixfwdCylinder.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixfwd.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixfwdDisks.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixfwdInnerDisk1.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixfwdInnerDisk2.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixfwdInnerDisk3.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixfwdOuterDisk1.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixfwdOuterDisk2.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixfwdOuterDisk3.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixfwdblade1.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixfwdblade2.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixfwdblade3.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarmaterial.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarladder.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarladderfull0.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarladderfull1.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarladderfull2.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarladderfull3.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarlayer.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarlayer0.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarlayer1.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarlayer2.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarlayer3.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbar.xml', + 'Geometry/TrackerCommonData/data/tibtidcommonmaterial.xml', + 'Geometry/TrackerCommonData/data/tibmaterial.xml', + 'Geometry/TrackerCommonData/data/tibmodpar.xml', + 'Geometry/TrackerCommonData/data/tibmodule0.xml', + 'Geometry/TrackerCommonData/data/tibmodule0a.xml', + 'Geometry/TrackerCommonData/data/tibmodule0b.xml', + 'Geometry/TrackerCommonData/data/tibmodule2.xml', + 'Geometry/TrackerCommonData/data/tibstringpar.xml', + 'Geometry/TrackerCommonData/data/tibstring0ll.xml', + 'Geometry/TrackerCommonData/data/tibstring0lr.xml', + 'Geometry/TrackerCommonData/data/tibstring0ul.xml', + 'Geometry/TrackerCommonData/data/tibstring0ur.xml', + 'Geometry/TrackerCommonData/data/tibstring0.xml', + 'Geometry/TrackerCommonData/data/tibstring1ll.xml', + 'Geometry/TrackerCommonData/data/tibstring1lr.xml', + 'Geometry/TrackerCommonData/data/tibstring1ul.xml', + 'Geometry/TrackerCommonData/data/tibstring1ur.xml', + 'Geometry/TrackerCommonData/data/tibstring1.xml', + 'Geometry/TrackerCommonData/data/tibstring2ll.xml', + 'Geometry/TrackerCommonData/data/tibstring2lr.xml', + 'Geometry/TrackerCommonData/data/tibstring2ul.xml', + 'Geometry/TrackerCommonData/data/tibstring2ur.xml', + 'Geometry/TrackerCommonData/data/tibstring2.xml', + 'Geometry/TrackerCommonData/data/tibstring3ll.xml', + 'Geometry/TrackerCommonData/data/tibstring3lr.xml', + 'Geometry/TrackerCommonData/data/tibstring3ul.xml', + 'Geometry/TrackerCommonData/data/tibstring3ur.xml', + 'Geometry/TrackerCommonData/data/tibstring3.xml', + 'Geometry/TrackerCommonData/data/tiblayerpar.xml', + 'Geometry/TrackerCommonData/data/tiblayer0.xml', + 'Geometry/TrackerCommonData/data/tiblayer1.xml', + 'Geometry/TrackerCommonData/data/tiblayer2.xml', + 'Geometry/TrackerCommonData/data/tiblayer3.xml', + 'Geometry/TrackerCommonData/data/tib.xml', + 'Geometry/TrackerCommonData/data/tidmaterial.xml', + 'Geometry/TrackerCommonData/data/tidmodpar.xml', + 'Geometry/TrackerCommonData/data/tidmodule0.xml', + 'Geometry/TrackerCommonData/data/tidmodule0r.xml', + 'Geometry/TrackerCommonData/data/tidmodule0l.xml', + 'Geometry/TrackerCommonData/data/tidmodule1.xml', + 'Geometry/TrackerCommonData/data/tidmodule1r.xml', + 'Geometry/TrackerCommonData/data/tidmodule1l.xml', + 'Geometry/TrackerCommonData/data/tidmodule2.xml', + 'Geometry/TrackerCommonData/data/tidringpar.xml', + 'Geometry/TrackerCommonData/data/tidring0.xml', + 'Geometry/TrackerCommonData/data/tidring0f.xml', + 'Geometry/TrackerCommonData/data/tidring0b.xml', + 'Geometry/TrackerCommonData/data/tidring1.xml', + 'Geometry/TrackerCommonData/data/tidring1f.xml', + 'Geometry/TrackerCommonData/data/tidring1b.xml', + 'Geometry/TrackerCommonData/data/tidring2.xml', + 'Geometry/TrackerCommonData/data/tid.xml', + 'Geometry/TrackerCommonData/data/tidf.xml', + 'Geometry/TrackerCommonData/data/tidb.xml', + 'Geometry/TrackerCommonData/data/tibtidservices.xml', + 'Geometry/TrackerCommonData/data/tibtidservicesf.xml', + 'Geometry/TrackerCommonData/data/tibtidservicesb.xml', + 'Geometry/TrackerCommonData/data/tobmaterial.xml', + 'Geometry/TrackerCommonData/data/tobmodpar.xml', + 'Geometry/TrackerCommonData/data/tobmodule0.xml', + 'Geometry/TrackerCommonData/data/tobmodule2.xml', + 'Geometry/TrackerCommonData/data/tobmodule4.xml', + 'Geometry/TrackerCommonData/data/tobrodpar.xml', + 'Geometry/TrackerCommonData/data/tobrod0c.xml', + 'Geometry/TrackerCommonData/data/tobrod0l.xml', + 'Geometry/TrackerCommonData/data/tobrod0h.xml', + 'Geometry/TrackerCommonData/data/tobrod0.xml', + 'Geometry/TrackerCommonData/data/tobrod1l.xml', + 'Geometry/TrackerCommonData/data/tobrod1h.xml', + 'Geometry/TrackerCommonData/data/tobrod1.xml', + 'Geometry/TrackerCommonData/data/tobrod2c.xml', + 'Geometry/TrackerCommonData/data/tobrod2l.xml', + 'Geometry/TrackerCommonData/data/tobrod2h.xml', + 'Geometry/TrackerCommonData/data/tobrod2.xml', + 'Geometry/TrackerCommonData/data/tobrod3l.xml', + 'Geometry/TrackerCommonData/data/tobrod3h.xml', + 'Geometry/TrackerCommonData/data/tobrod3.xml', + 'Geometry/TrackerCommonData/data/tobrod4c.xml', + 'Geometry/TrackerCommonData/data/tobrod4l.xml', + 'Geometry/TrackerCommonData/data/tobrod4h.xml', + 'Geometry/TrackerCommonData/data/tobrod4.xml', + 'Geometry/TrackerCommonData/data/tobrod5l.xml', + 'Geometry/TrackerCommonData/data/tobrod5h.xml', + 'Geometry/TrackerCommonData/data/tobrod5.xml', + 'Geometry/TrackerCommonData/data/tob.xml', + 'Geometry/TrackerCommonData/data/tecmaterial.xml', + 'Geometry/TrackerCommonData/data/tecmodpar.xml', + 'Geometry/TrackerCommonData/data/tecmodule0.xml', + 'Geometry/TrackerCommonData/data/tecmodule0r.xml', + 'Geometry/TrackerCommonData/data/tecmodule0s.xml', + 'Geometry/TrackerCommonData/data/tecmodule1.xml', + 'Geometry/TrackerCommonData/data/tecmodule1r.xml', + 'Geometry/TrackerCommonData/data/tecmodule1s.xml', + 'Geometry/TrackerCommonData/data/tecmodule2.xml', + 'Geometry/TrackerCommonData/data/tecmodule3.xml', + 'Geometry/TrackerCommonData/data/tecmodule4.xml', + 'Geometry/TrackerCommonData/data/tecmodule4r.xml', + 'Geometry/TrackerCommonData/data/tecmodule4s.xml', + 'Geometry/TrackerCommonData/data/tecmodule5.xml', + 'Geometry/TrackerCommonData/data/tecmodule6.xml', + 'Geometry/TrackerCommonData/data/tecpetpar.xml', + 'Geometry/TrackerCommonData/data/tecring0.xml', + 'Geometry/TrackerCommonData/data/tecring1.xml', + 'Geometry/TrackerCommonData/data/tecring2.xml', + 'Geometry/TrackerCommonData/data/tecring3.xml', + 'Geometry/TrackerCommonData/data/tecring4.xml', + 'Geometry/TrackerCommonData/data/tecring5.xml', + 'Geometry/TrackerCommonData/data/tecring6.xml', + 'Geometry/TrackerCommonData/data/tecring0f.xml', + 'Geometry/TrackerCommonData/data/tecring1f.xml', + 'Geometry/TrackerCommonData/data/tecring2f.xml', + 'Geometry/TrackerCommonData/data/tecring3f.xml', + 'Geometry/TrackerCommonData/data/tecring4f.xml', + 'Geometry/TrackerCommonData/data/tecring5f.xml', + 'Geometry/TrackerCommonData/data/tecring6f.xml', + 'Geometry/TrackerCommonData/data/tecring0b.xml', + 'Geometry/TrackerCommonData/data/tecring1b.xml', + 'Geometry/TrackerCommonData/data/tecring2b.xml', + 'Geometry/TrackerCommonData/data/tecring3b.xml', + 'Geometry/TrackerCommonData/data/tecring4b.xml', + 'Geometry/TrackerCommonData/data/tecring5b.xml', + 'Geometry/TrackerCommonData/data/tecring6b.xml', + 'Geometry/TrackerCommonData/data/tecpetalf.xml', + 'Geometry/TrackerCommonData/data/tecpetalb.xml', + 'Geometry/TrackerCommonData/data/tecpetal0.xml', + 'Geometry/TrackerCommonData/data/tecpetal0f.xml', + 'Geometry/TrackerCommonData/data/tecpetal0b.xml', + 'Geometry/TrackerCommonData/data/tecpetal3.xml', + 'Geometry/TrackerCommonData/data/tecpetal3f.xml', + 'Geometry/TrackerCommonData/data/tecpetal3b.xml', + 'Geometry/TrackerCommonData/data/tecpetal6f.xml', + 'Geometry/TrackerCommonData/data/tecpetal6b.xml', + 'Geometry/TrackerCommonData/data/tecpetal8f.xml', + 'Geometry/TrackerCommonData/data/tecpetal8b.xml', + 'Geometry/TrackerCommonData/data/tecwheel.xml', + 'Geometry/TrackerCommonData/data/tecwheela.xml', + 'Geometry/TrackerCommonData/data/tecwheelb.xml', + 'Geometry/TrackerCommonData/data/tecwheelc.xml', + 'Geometry/TrackerCommonData/data/tecwheeld.xml', + 'Geometry/TrackerCommonData/data/tecwheel6.xml', + 'Geometry/TrackerCommonData/data/tecservices.xml', + 'Geometry/TrackerCommonData/data/tecbackplate.xml', + 'Geometry/TrackerCommonData/data/tec.xml', + 'Geometry/TrackerCommonData/data/trackermaterial.xml', + 'Geometry/TrackerCommonData/data/tracker.xml', + 'Geometry/TrackerCommonData/data/trackerpixbar.xml', + 'Geometry/TrackerCommonData/data/PhaseI/trackerpixfwd.xml', + 'Geometry/TrackerCommonData/data/trackertibtidservices.xml', + 'Geometry/TrackerCommonData/data/trackertib.xml', + 'Geometry/TrackerCommonData/data/trackertid.xml', + 'Geometry/TrackerCommonData/data/trackertob.xml', + 'Geometry/TrackerCommonData/data/trackertec.xml', + 'Geometry/TrackerCommonData/data/trackerbulkhead.xml', + 'Geometry/TrackerCommonData/data/trackerother.xml', + 'Geometry/EcalCommonData/data/eregalgo.xml', + 'Geometry/EcalCommonData/data/ebalgo.xml', + 'Geometry/EcalCommonData/data/ebcon.xml', + 'Geometry/EcalCommonData/data/ebrot.xml', + 'Geometry/EcalCommonData/data/eecon.xml', + 'Geometry/EcalCommonData/data/eefixed.xml', + 'Geometry/EcalCommonData/data/eehier.xml', + 'Geometry/EcalCommonData/data/eealgo.xml', + 'Geometry/EcalCommonData/data/escon.xml', + 'Geometry/EcalCommonData/data/esalgo.xml', + 'Geometry/EcalCommonData/data/eeF.xml', + 'Geometry/EcalCommonData/data/eeB.xml', + 'Geometry/HcalCommonData/data/hcalrotations.xml', + 'Geometry/HcalCommonData/data/hcalalgo.xml', + 'Geometry/HcalCommonData/data/hcalbarrelalgo.xml', + 'Geometry/HcalCommonData/data/hcalendcapalgo.xml', + 'Geometry/HcalCommonData/data/hcalouteralgo.xml', + 'Geometry/HcalCommonData/data/hcalforwardalgo.xml', + 'Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml', + 'Geometry/HcalCommonData/data/PhaseI/hcalSimNumbering.xml', + 'Geometry/HcalCommonData/data/PhaseI/hcalRecNumbering.xml', + 'Geometry/MuonCommonData/data/v1/mbCommon.xml', + 'Geometry/MuonCommonData/data/v1/mb1.xml', + 'Geometry/MuonCommonData/data/v1/mb2.xml', + 'Geometry/MuonCommonData/data/v1/mb3.xml', + 'Geometry/MuonCommonData/data/v1/mb4.xml', + 'Geometry/MuonCommonData/data/design/muonYoke.xml', + #'Geometry/MuonCommonData/data/PhaseII/NoME0/mf.xml', + 'Geometry/MuonCommonData/data/PhaseII/mf.xml', + 'Geometry/MuonCommonData/data/PhaseII/rpcf.xml', + 'Geometry/MuonCommonData/data/v2/gemf.xml', + 'Geometry/MuonCommonData/data/v4/gem11.xml', + 'Geometry/MuonCommonData/data/v6/gem21.xml', + 'Geometry/MuonCommonData/data/v2/csc.xml', + #'Geometry/MuonCommonData/data/PhaseII/NoME0/mfshield.xml', + 'Geometry/MuonCommonData/data/PhaseII/mfshield.xml', + 'Geometry/MuonCommonData/data/PhaseII/me0.xml', + 'Geometry/ForwardCommonData/data/forward.xml', + 'Geometry/ForwardCommonData/data/v2/forwardshield.xml', + 'Geometry/ForwardCommonData/data/brmrotations.xml', + 'Geometry/ForwardCommonData/data/brm.xml', + 'Geometry/ForwardCommonData/data/totemMaterials.xml', + 'Geometry/ForwardCommonData/data/totemRotations.xml', + 'Geometry/ForwardCommonData/data/totemt1.xml', + 'Geometry/ForwardCommonData/data/totemt2.xml', + 'Geometry/ForwardCommonData/data/ionpump.xml', + 'Geometry/ForwardCommonData/data/castor.xml', + 'Geometry/ForwardCommonData/data/zdcmaterials.xml', + 'Geometry/ForwardCommonData/data/lumimaterials.xml', + 'Geometry/ForwardCommonData/data/zdcrotations.xml', + 'Geometry/ForwardCommonData/data/lumirotations.xml', + 'Geometry/ForwardCommonData/data/zdc.xml', + 'Geometry/ForwardCommonData/data/zdclumi.xml', + 'Geometry/ForwardCommonData/data/cmszdc.xml')+cms.vstring( + 'Geometry/MuonCommonData/data/PhaseII/NoME0/muonNumbering.xml', + 'Geometry/TrackerCommonData/data/PhaseI/trackerStructureTopology.xml', + 'Geometry/TrackerSimData/data/PhaseI/trackersens.xml', + 'Geometry/TrackerRecoData/data/PhaseI/trackerRecoMaterial.xml', + 'Geometry/EcalSimData/data/ecalsens.xml', + 'Geometry/HcalCommonData/data/hcalsenspmf.xml', + 'Geometry/HcalSimData/data/hf.xml', + 'Geometry/HcalSimData/data/hfpmt.xml', + 'Geometry/HcalSimData/data/hffibrebundle.xml', + 'Geometry/HcalSimData/data/CaloUtil.xml', + 'Geometry/MuonSimData/data/PhaseII/NoME0/muonSens.xml', + 'Geometry/DTGeometryBuilder/data/dtSpecsFilter.xml', + 'Geometry/CSCGeometryBuilder/data/cscSpecsFilter.xml', + 'Geometry/CSCGeometryBuilder/data/cscSpecs.xml', + 'Geometry/RPCGeometryBuilder/data/PhaseII/RPCSpecs.xml', + 'Geometry/GEMGeometryBuilder/data/v5/GEMSpecs.xml', + 'Geometry/ForwardCommonData/data/brmsens.xml', + 'Geometry/ForwardSimData/data/castorsens.xml', + 'Geometry/ForwardSimData/data/zdcsens.xml', + 'Geometry/HcalSimData/data/HcalProdCuts.xml', + 'Geometry/EcalSimData/data/EcalProdCuts.xml', + 'Geometry/EcalSimData/data/ESProdCuts.xml', + 'Geometry/TrackerSimData/data/PhaseI/trackerProdCuts.xml', + 'Geometry/TrackerSimData/data/trackerProdCutsBEAM.xml', + 'Geometry/MuonSimData/data/PhaseII/muonProdCuts.xml', + 'Geometry/ForwardSimData/data/CastorProdCuts.xml', + 'Geometry/ForwardSimData/data/zdcProdCuts.xml', + 'Geometry/ForwardSimData/data/ForwardShieldProdCuts.xml', + 'Geometry/CMSCommonData/data/FieldParameters.xml'), + rootNodeName = cms.string('cms:OCMS') +) + + diff --git a/SLHCUpgradeSimulations/Configuration/python/gemCustom.py b/SLHCUpgradeSimulations/Configuration/python/gemCustom.py new file mode 100644 index 0000000000000..2d36b9b064c06 --- /dev/null +++ b/SLHCUpgradeSimulations/Configuration/python/gemCustom.py @@ -0,0 +1,32 @@ +import FWCore.ParameterSet.Config as cms +def customise2023(process): + if hasattr(process,'digitisation_step') : + process=customise_digitization(process) + if hasattr(process,'dqmHarvesting'): + process=customise_harvesting(process) + if hasattr(process,'validation_step'): + process=customise_Validation(process) + return process +def customise_digitization(process): + from SimMuon.GEMDigitizer.customizeGEMDigi import customize_digi_addGEM_muon_only + process = customize_digi_addGEM_muon_only(process) + process.simMuonGEMDigis.mixLabel = cms.string("mix") + #process.simMuonRPCDigis.digiModel = cms.string('RPCSimParam') + #process.simMuonME0Digis.mixLabel = cms.string("mix") + process.digitisation_step.remove(process.simMuonRPCDigis) + return process + +def customise_Validation(process): + #process.load('Validation.MuonGEMHits.MuonGEMHits_cfi') + process.load('Validation.MuonGEMHits.gemSimValid_cff') + process.load('Validation.MuonGEMDigis.MuonGEMDigis_cfi') + process.genvalid_all += process.gemSimValid + process.genvalid_all += process.gemDigiValidation + return process + +def customise_harvesting(process): + #process.load('Validation.MuonGEMHits.MuonGEMHits_cfi') + process.load('Validation.MuonGEMHits.gemPostValidation_cff') + process.genHarvesting += process.gemPostValidation + return process + From 9890179ca1f2b951bda876c7133c45f6bb60ddd6 Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Wed, 29 Apr 2015 18:41:01 +0900 Subject: [PATCH 2/6] adding me0 --- Fireworks/Core/interface/FWRPZView.h | 1 + Fireworks/Core/interface/FWRPZViewGeometry.h | 2 + Fireworks/Core/src/FW3DViewGeometry.cc | 41 +++++++------ Fireworks/Core/src/FWRPZView.cc | 4 ++ Fireworks/Core/src/FWRPZViewGeometry.cc | 39 ++++++++++++- .../src/FWTGeoRecoGeometryESProducer.cc | 57 +++++++++---------- 6 files changed, 93 insertions(+), 51 deletions(-) diff --git a/Fireworks/Core/interface/FWRPZView.h b/Fireworks/Core/interface/FWRPZView.h index d54686fb50964..ebf079172a59c 100644 --- a/Fireworks/Core/interface/FWRPZView.h +++ b/Fireworks/Core/interface/FWRPZView.h @@ -94,6 +94,7 @@ class FWRPZView : public FWEveView FWBoolParameter m_showTrackerEndcap; FWBoolParameter m_showRpcEndcap; FWBoolParameter m_showGEM; + FWBoolParameter m_showME0; FWBoolParameter m_shiftOrigin; FWDoubleParameter m_fishEyeDistortion; diff --git a/Fireworks/Core/interface/FWRPZViewGeometry.h b/Fireworks/Core/interface/FWRPZViewGeometry.h index 2fa08dd3dc55e..91a85ed8838ce 100644 --- a/Fireworks/Core/interface/FWRPZViewGeometry.h +++ b/Fireworks/Core/interface/FWRPZViewGeometry.h @@ -48,6 +48,7 @@ class FWRPZViewGeometry : public FWViewGeometryList void showTrackerEndcap( bool ); void showRpcEndcap( bool ); void showGEM( bool ); + void showME0( bool ); private: FWRPZViewGeometry(const FWRPZViewGeometry&); // stop default @@ -77,6 +78,7 @@ class FWRPZViewGeometry : public FWViewGeometryList TEveElementList* m_trackerEndcapElements; TEveElementList* m_rpcEndcapElements; TEveElementList* m_GEMElements; + TEveElementList* m_ME0Elements; }; diff --git a/Fireworks/Core/src/FW3DViewGeometry.cc b/Fireworks/Core/src/FW3DViewGeometry.cc index dcb455bfdefe3..5fe29dbc2714a 100644 --- a/Fireworks/Core/src/FW3DViewGeometry.cc +++ b/Fireworks/Core/src/FW3DViewGeometry.cc @@ -240,32 +240,31 @@ FW3DViewGeometry::showMuonEndcap( bool showMuonEndcap ) // EVE debug :: add list on bottom of TEveBrowser list tree gEve->AddToListTree(GEMlist, false); - AddElement( m_muonEndcapElements ); // adding me0 TEveElementList* ME0list = new TEveElementList( "ME0" ); - for( Int_t iRegion = ME0DetId::minRegionId; iRegion <= ME0DetId::maxRegionId; ++iRegion ) - { - TEveElementList* eRegion = new TEveElementList(Form("Region_%d", iRegion) ); - ME0list->AddElement( eRegion ); - for( Int_t iChamber = ME0DetId::minChamberId; iChamber <= ME0DetId::maxChamberId; ++iChamber ) - { - for( Int_t iLayer = ME0DetId::minLayerId; iLayer <= ME0DetId::maxLayerId ; ++iLayer ) - { - for (Int_t iRoll = ME0DetId::minRollId; iRoll <= ME0DetId::maxRollId ; ++iRoll ) - { - ME0DetId id( iRegion, iLayer, iChamber, iRoll ); - TEveGeoShape* shape = m_geom->getEveShape( id.rawId() ); - shape->SetTitle(TString::Format("ME0: , Ch=%d Rl=%d\ndet-id=%u", - iChamber, iRoll, id.rawId())); + for( Int_t iRegion = ME0DetId::minRegionId; iRegion <= ME0DetId::maxRegionId; ++iRegion ){ + TEveElementList* eRegion = new TEveElementList(Form("Region_%d", iRegion) ); + ME0list->AddElement( eRegion ); + for( Int_t iChamber = ME0DetId::minChamberId; iChamber <= ME0DetId::maxChamberId; ++iChamber ) + { + for( Int_t iLayer = ME0DetId::minLayerId; iLayer <= ME0DetId::maxLayerId ; ++iLayer ) + { + for (Int_t iRoll = ME0DetId::minRollId; iRoll <= ME0DetId::maxRollId ; ++iRoll ) + { + ME0DetId id( iRegion, iLayer, iChamber, iRoll ); + TEveGeoShape* shape = m_geom->getEveShape( id.rawId() ); + shape->SetTitle(TString::Format("ME0: , Ch=%d Rl=%d\ndet-id=%u", + iChamber, iRoll, id.rawId())); - eRegion->AddElement( shape ); - addToCompound(shape, kFWMuonEndcapLineColorIndex ); - } - } - } - } + eRegion->AddElement( shape ); + addToCompound(shape, kFWMuonEndcapLineColorIndex ); + } + } + } + } m_muonEndcapElements->AddElement(ME0list); + AddElement( m_muonEndcapElements ); } if( m_muonEndcapElements ) diff --git a/Fireworks/Core/src/FWRPZView.cc b/Fireworks/Core/src/FWRPZView.cc index efe2bb38fbb4d..2a04535c71dac 100644 --- a/Fireworks/Core/src/FWRPZView.cc +++ b/Fireworks/Core/src/FWRPZView.cc @@ -61,6 +61,7 @@ FWRPZView::FWRPZView(TEveWindowSlot* iParent, FWViewType::EType id) : m_showTrackerEndcap(this, "Show Tracker Endcap", false), m_showRpcEndcap(this, "Show RPC Endcap", false ), m_showGEM(this, "Show GEM", false ), + m_showME0(this, "Show ME0", false ), m_shiftOrigin(this,"Shift origin to beam-spot", false), m_fishEyeDistortion(this,"Distortion",0., 0., 100.), @@ -178,6 +179,7 @@ FWRPZView::setContext(const fireworks::Context& ctx) m_showTrackerEndcap.changed_.connect(boost::bind(&FWRPZViewGeometry::showTrackerEndcap,m_geometryList,_1)); m_showRpcEndcap.changed_.connect(boost::bind(&FWRPZViewGeometry::showRpcEndcap,m_geometryList,_1)); m_showGEM.changed_.connect(boost::bind(&FWRPZViewGeometry::showGEM,m_geometryList,_1)); + m_showME0.changed_.connect(boost::bind(&FWRPZViewGeometry::showME0,m_geometryList,_1)); } @@ -408,6 +410,8 @@ FWRPZView::populateController(ViewerParameterGUI& gui) const det.addParam(&m_showRpcEndcap); bool showGEM = m_context->getGeom()->versionInfo().haveExtraDet("GEM"); if (showGEM) det.addParam(&m_showGEM); + bool showME0 = m_context->getGeom()->versionInfo().haveExtraDet("ME0"); + if (showME0) det.addParam(&m_showME0); } #ifdef TEVEPROJECTIONS_DISPLACE_ORIGIN_MODE diff --git a/Fireworks/Core/src/FWRPZViewGeometry.cc b/Fireworks/Core/src/FWRPZViewGeometry.cc index 7c7ac4d381056..b8bf8ea1befdd 100644 --- a/Fireworks/Core/src/FWRPZViewGeometry.cc +++ b/Fireworks/Core/src/FWRPZViewGeometry.cc @@ -36,6 +36,7 @@ #include "DataFormats/MuonDetId/interface/CSCDetId.h" #include "DataFormats/MuonDetId/interface/RPCDetId.h" #include "DataFormats/MuonDetId/interface/GEMDetId.h" +#include "DataFormats/MuonDetId/interface/ME0DetId.h" // // @@ -61,7 +62,8 @@ FWRPZViewGeometry::FWRPZViewGeometry(const fireworks::Context& context): m_trackerBarrelElements(0), m_trackerEndcapElements(0), m_rpcEndcapElements(0), - m_GEMElements(0) + m_GEMElements(0), + m_ME0Elements(0) { SetElementName("RPZGeomShared"); } @@ -583,6 +585,41 @@ FWRPZViewGeometry::showGEM( bool show ) gEve->Redraw3D(); } } + +void +FWRPZViewGeometry::showME0( bool show ) +{ + if( !m_ME0Elements && show ) + { + m_ME0Elements = new TEveElementList("ME0"); + + std::vector ids; + int rArr [] = { -1, 1}; // front back region + int cArr [] = { 9, 10, 29, 30}; // top bottom chamber + + for (int ri = 0; ri < 2; ++ri ) + for (int ci= 0; ci < 4; ++ci) { + int minRoll = 2; + //if (ci == 1 || ci == 3) minRoll = 2; + for (int layer = 1; layer <=2; ++layer) + { + ME0DetId id(rArr[ri], cArr[ci], layer); + TEveGeoShape* shape = m_geom->getEveShape(id.rawId()); + addToCompound(shape, kFWMuonEndcapLineColorIndex); + m_ME0Elements->AddElement( shape ); + } + } + + AddElement(m_ME0Elements); + importNew(m_ME0Elements); + } + if (m_ME0Elements) + { + m_ME0Elements->SetRnrState(show); + gEve->Redraw3D(); + } +} + //------------------------------------- void FWRPZViewGeometry::importNew(TEveElementList* x) diff --git a/Fireworks/Geometry/src/FWTGeoRecoGeometryESProducer.cc b/Fireworks/Geometry/src/FWTGeoRecoGeometryESProducer.cc index f0813254090c2..17cf43482dba2 100644 --- a/Fireworks/Geometry/src/FWTGeoRecoGeometryESProducer.cc +++ b/Fireworks/Geometry/src/FWTGeoRecoGeometryESProducer.cc @@ -12,7 +12,7 @@ #include "DataFormats/SiStripDetId/interface/TECDetId.h" #include "DataFormats/MuonDetId/interface/RPCDetId.h" #include "DataFormats/MuonDetId/interface/GEMDetId.h" -// #include "DataFormats/MuonDetId/interface/ME0DetId.h" +#include "DataFormats/MuonDetId/interface/ME0DetId.h" #include "DataFormats/EcalDetId/interface/EcalSubdetector.h" #include "DataFormats/HcalDetId/interface/HcalSubdetector.h" #include "DataFormats/EcalDetId/interface/EBDetId.h" @@ -31,7 +31,7 @@ #include "Geometry/RPCGeometry/interface/RPCGeometry.h" #include "Geometry/GEMGeometry/interface/GEMEtaPartition.h" #include "Geometry/GEMGeometry/interface/GEMGeometry.h" -// #include "Geometry/GEMGeometry/interface/ME0Geometry.h" +#include "Geometry/GEMGeometry/interface/ME0Geometry.h" #include "Geometry/Records/interface/CaloGeometryRecord.h" #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" #include "Geometry/TrackerGeometryBuilder/interface/RectangularPixelTopology.h" @@ -804,42 +804,41 @@ FWTGeoRecoGeometryESProducer::addRPCGeometry( ) void FWTGeoRecoGeometryESProducer::addME0Geometry( ) { - /* - TGeoVolume* tv = GetTopHolder("Muon", kMuonCSC); - TGeoVolume *assembly = GetDaughter(tv, "ME0", kMuonME0); + + TGeoVolume* tv = GetTopHolder("Muon", kMuonCSC); + TGeoVolume *assembly = GetDaughter(tv, "ME0", kMuonME0); - DetId detId( DetId::Muon, 5 ); - try - { + DetId detId( DetId::Muon, 5 ); + try + { const ME0Geometry* me0Geom = (const ME0Geometry*) m_geomRecord->slaveGeometry( detId ); for(auto roll : me0Geom->etaPartitions()) - { - if( roll ) - { - unsigned int rawid = roll->geographicalId().rawId(); - // std::cout << "AMT FWTTTTRecoGeometryES\n" << rawid ; + { + if( roll ) + { + unsigned int rawid = roll->geographicalId().rawId(); + // std::cout << "AMT FWTTTTRecoGeometryES\n" << rawid ; - ME0DetId detid(rawid); - std::stringstream s; - s << detid; - std::string name = s.str(); - TGeoVolume* child = createVolume( name, roll, kMuonME0 ); + ME0DetId detid(rawid); + std::stringstream s; + s << detid; + std::string name = s.str(); + TGeoVolume* child = createVolume( name, roll, kMuonME0 ); - TGeoVolume* holder = GetDaughter(assembly, "Region", kMuonME0, detid.region()); - holder = GetDaughter(holder, "Layer", kMuonME0, detid.layer()); - holder = GetDaughter(holder, "Chamber", kMuonME0, detid.chamber()); - AddLeafNode(holder, child, name.c_str(), createPlacement(roll)); + TGeoVolume* holder = GetDaughter(assembly, "Region", kMuonME0, detid.region()); + holder = GetDaughter(holder, "Layer", kMuonME0, detid.layer()); + holder = GetDaughter(holder, "Chamber", kMuonME0, detid.chamber()); + AddLeafNode(holder, child, name.c_str(), createPlacement(roll)); - } - } - } - catch( cms::Exception &exception ) - { + } + } + } + catch( cms::Exception &exception ) + { edm::LogInfo("FWRecoGeometry") << "failed to produce ME0 geometry " << exception.what() << std::endl; - } - */ + } } From dd2b229c231a947d946710d4c48cc65b2446fd7b Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Wed, 29 Apr 2015 21:06:29 +0900 Subject: [PATCH 3/6] fix me0 in FWRPZViewGeometry.cc --- Fireworks/Core/src/FWRPZViewGeometry.cc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Fireworks/Core/src/FWRPZViewGeometry.cc b/Fireworks/Core/src/FWRPZViewGeometry.cc index b8bf8ea1befdd..c5932b6671eb9 100644 --- a/Fireworks/Core/src/FWRPZViewGeometry.cc +++ b/Fireworks/Core/src/FWRPZViewGeometry.cc @@ -594,21 +594,20 @@ FWRPZViewGeometry::showME0( bool show ) m_ME0Elements = new TEveElementList("ME0"); std::vector ids; - int rArr [] = { -1, 1}; // front back region int cArr [] = { 9, 10, 29, 30}; // top bottom chamber - for (int ri = 0; ri < 2; ++ri ) - for (int ci= 0; ci < 4; ++ci) { - int minRoll = 2; - //if (ci == 1 || ci == 3) minRoll = 2; - for (int layer = 1; layer <=2; ++layer) - { - ME0DetId id(rArr[ri], cArr[ci], layer); + for (int region=ME0DetId::minRegionId; region<=ME0DetId::maxRegionId; ++region){ + for (int layer=ME0DetId::minLayerId; layer<=ME0DetId::maxLayerId; ++layer){ + for (int ci= 0; ci < 4; ++ci) { + for (int roll=ME0DetId::minRollId; roll<=ME0DetId::maxRollId; ++roll){ + ME0DetId id(region, layer, cArr[ci], roll); TEveGeoShape* shape = m_geom->getEveShape(id.rawId()); addToCompound(shape, kFWMuonEndcapLineColorIndex); m_ME0Elements->AddElement( shape ); } + } } + } AddElement(m_ME0Elements); importNew(m_ME0Elements); From a00af0ba781e5964965a7a94731f315dc7acaf77 Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Wed, 29 Apr 2015 23:07:07 +0900 Subject: [PATCH 4/6] added me0 to FWRecoGeometryESProducer.cc --- Fireworks/Core/src/FW3DViewGeometry.cc | 54 ++++++++-------- Fireworks/Core/src/FWRPZView.cc | 4 ++ Fireworks/Core/src/FWRPZViewGeometry.cc | 64 +++++++++++-------- .../Geometry/src/FWRecoGeometryESProducer.cc | 10 ++- 4 files changed, 78 insertions(+), 54 deletions(-) diff --git a/Fireworks/Core/src/FW3DViewGeometry.cc b/Fireworks/Core/src/FW3DViewGeometry.cc index 5fe29dbc2714a..b6e37d32b0ad7 100644 --- a/Fireworks/Core/src/FW3DViewGeometry.cc +++ b/Fireworks/Core/src/FW3DViewGeometry.cc @@ -205,37 +205,37 @@ FW3DViewGeometry::showMuonEndcap( bool showMuonEndcap ) // m_muonEndcapElements->AddElement(CSClist); - TEveElementList* GEMlist = new TEveCompound( "GEM" ); - for( Int_t iRegion = GEMDetId::minRegionId; iRegion <= GEMDetId::maxRegionId; ++iRegion ) - { - for( Int_t iStation = GEMDetId::minStationId; iStation <= GEMDetId::maxStationId; ++iStation ) - { - TEveElementList* cStation = new TEveCompound(Form("Station_%d Region_%d", iStation, iRegion) ); + for( Int_t iRegion = GEMDetId::minRegionId; iRegion <= GEMDetId::maxRegionId; iRegion= iRegion+2) + { + for( Int_t iStation = GEMDetId::minStationId; iStation <= 2; ++iStation ) + { + TEveElementList* cStation = new TEveCompound(Form("Station_%d Region_%d", iStation, iRegion) ); GEMlist->AddElement( cStation ); - for( Int_t iRing = GEMDetId::minRingId; iRing <= GEMDetId::maxRingId; ++iRing ) - { - TEveCompound* cRing = new TEveCompound( Form("Ring_%d", iRing) ); - cStation->AddElement( cRing ); - for( Int_t iChamber = GEMDetId::minChamberId; iChamber <= GEMDetId::maxChamberId; ++iChamber ) - { + // for( Int_t iRing = GEMDetId::minRingId; iRing <= GEMDetId::maxRingId; ++iRing ) + // { + Int_t iRing = 1; + TEveCompound* cRing = new TEveCompound( Form("Ring_%d", iRing) ); + cStation->AddElement( cRing ); + for( Int_t iChamber = GEMDetId::minChamberId; iChamber <= GEMDetId::maxChamberId; ++iChamber ) + { for( Int_t iLayer = GEMDetId::minLayerId; iLayer <= GEMDetId::maxLayerId ; ++iLayer ) - { - for (Int_t iRoll = GEMDetId::minRollId; iRoll <= GEMDetId::maxRollId ; ++iRoll ) - { - GEMDetId id( iRegion, iRing, iStation, iLayer, iChamber, iRoll ); - TEveGeoShape* shape = m_geom->getEveShape( id.rawId() ); - shape->SetTitle(TString::Format("GEM: , Rng=%d, St=%d, Ch=%d Rl=%d\ndet-id=%u", - iRing, iStation, iChamber, iRoll, id.rawId())); + { + for (Int_t iRoll = GEMDetId::minRollId; iRoll <= GEMDetId::maxRollId ; ++iRoll ) + { + GEMDetId id( iRegion, iRing, iStation, iLayer, iChamber, iRoll ); + TEveGeoShape* shape = m_geom->getEveShape( id.rawId() ); + shape->SetTitle(TString::Format("GEM: , Rng=%d, St=%d, Ch=%d Rl=%d\ndet-id=%u", + iRing, iStation, iChamber, iRoll, id.rawId())); - cRing->AddElement( shape ); - addToCompound(shape, kFWMuonEndcapLineColorIndex ); - } - } - } + cRing->AddElement( shape ); + addToCompound(shape, kFWMuonEndcapLineColorIndex ); + } + } + } } - } - } + } + //} m_muonEndcapElements->AddElement(GEMlist); // EVE debug :: add list on bottom of TEveBrowser list tree @@ -243,7 +243,7 @@ FW3DViewGeometry::showMuonEndcap( bool showMuonEndcap ) // adding me0 TEveElementList* ME0list = new TEveElementList( "ME0" ); - for( Int_t iRegion = ME0DetId::minRegionId; iRegion <= ME0DetId::maxRegionId; ++iRegion ){ + for( Int_t iRegion = ME0DetId::minRegionId; iRegion <= ME0DetId::maxRegionId; iRegion= iRegion+2 ){ TEveElementList* eRegion = new TEveElementList(Form("Region_%d", iRegion) ); ME0list->AddElement( eRegion ); for( Int_t iChamber = ME0DetId::minChamberId; iChamber <= ME0DetId::maxChamberId; ++iChamber ) diff --git a/Fireworks/Core/src/FWRPZView.cc b/Fireworks/Core/src/FWRPZView.cc index 2a04535c71dac..b225f6d823dc6 100644 --- a/Fireworks/Core/src/FWRPZView.cc +++ b/Fireworks/Core/src/FWRPZView.cc @@ -412,6 +412,10 @@ FWRPZView::populateController(ViewerParameterGUI& gui) const if (showGEM) det.addParam(&m_showGEM); bool showME0 = m_context->getGeom()->versionInfo().haveExtraDet("ME0"); if (showME0) det.addParam(&m_showME0); + std::cout << " showGEM " << showGEM + << " showME0 " << showME0 + << " m_context->getGeom()->versionInfo().haveExtraDet() " << m_context->getGeom()->versionInfo().haveExtraDet("GEM2") + << std::endl; } #ifdef TEVEPROJECTIONS_DISPLACE_ORIGIN_MODE diff --git a/Fireworks/Core/src/FWRPZViewGeometry.cc b/Fireworks/Core/src/FWRPZViewGeometry.cc index c5932b6671eb9..ef4ff5c6bd92b 100644 --- a/Fireworks/Core/src/FWRPZViewGeometry.cc +++ b/Fireworks/Core/src/FWRPZViewGeometry.cc @@ -555,27 +555,42 @@ FWRPZViewGeometry::showGEM( bool show ) { m_GEMElements = new TEveElementList("GEM"); + //int rArr [] = { -1, 1}; // front back region + //int cArr [] = { 9, 10, 29, 30}; // top bottom chamber + + // for (int ri = 0; ri < 2; ++ri ){ + // for (int st = 1; st < 3; ++st ){ + // for (int ci= 0; ci < 4; ++ci) { + // int minRoll = 2; + // //if (ci == 1 || ci == 3) minRoll = 2; + // for (int roll = minRoll; roll <=10; ++roll){ + // for (int layer = 1; layer <=2; ++layer) + // { + // GEMDetId id(rArr[ri], 1, st, layer, cArr[ci], roll); + // TEveGeoShape* shape = m_geom->getEveShape(id.rawId()); + // addToCompound(shape, kFWMuonEndcapLineColorIndex); + // m_GEMElements->AddElement( shape ); + // } + // } + // } + // } + // } + for (int region=GEMDetId::minRegionId; region<=GEMDetId::maxRegionId; region=region+2){ + int ring = 1; + for (int station=GEMDetId::minStationId; station<=2; ++station){ + for (int layer=GEMDetId::minLayerId; layer<=GEMDetId::maxLayerId; ++layer){ + for (int chamber=GEMDetId::minChamberId; chamber<=GEMDetId::maxChamberId; ++chamber){ + for (int roll=GEMDetId::minRollId; roll<=GEMDetId::maxRollId; ++roll){ + GEMDetId id(region, ring, station, layer, chamber, roll); + TEveGeoShape* shape = m_geom->getEveShape(id.rawId()); + addToCompound(shape, kFWMuonEndcapLineColorIndex); + m_GEMElements->AddElement( shape ); + } + } + } + } + } - std::vector ids; - int rArr [] = { -1, 1}; // front back region - int cArr [] = { 9, 10, 29, 30}; // top bottom chamber - - for (int ri = 0; ri < 2; ++ri ) - for (int ci= 0; ci < 4; ++ci) { - int minRoll = 2; - //if (ci == 1 || ci == 3) minRoll = 2; - for (int roll = minRoll; roll <=10; ++roll) - for (int layer = 1; layer <=2; ++layer) - { - GEMDetId id(rArr[ri], 1, 1, layer, cArr[ci], roll); - TEveGeoShape* shape = m_geom->getEveShape(id.rawId()); - addToCompound(shape, kFWMuonEndcapLineColorIndex); - m_GEMElements->AddElement( shape ); - } - } - - - AddElement(m_GEMElements); importNew(m_GEMElements); } @@ -593,14 +608,13 @@ FWRPZViewGeometry::showME0( bool show ) { m_ME0Elements = new TEveElementList("ME0"); - std::vector ids; - int cArr [] = { 9, 10, 29, 30}; // top bottom chamber + //int cArr [] = { 9, 10, 29, 30}; // top bottom chamber - for (int region=ME0DetId::minRegionId; region<=ME0DetId::maxRegionId; ++region){ + for (int region=ME0DetId::minRegionId; region<=ME0DetId::maxRegionId; region=region+2){ for (int layer=ME0DetId::minLayerId; layer<=ME0DetId::maxLayerId; ++layer){ - for (int ci= 0; ci < 4; ++ci) { + for (int chamber=ME0DetId::minChamberId; chamber<=ME0DetId::maxChamberId; ++chamber){ for (int roll=ME0DetId::minRollId; roll<=ME0DetId::maxRollId; ++roll){ - ME0DetId id(region, layer, cArr[ci], roll); + ME0DetId id(region, layer, chamber, roll); TEveGeoShape* shape = m_geom->getEveShape(id.rawId()); addToCompound(shape, kFWMuonEndcapLineColorIndex); m_ME0Elements->AddElement( shape ); diff --git a/Fireworks/Geometry/src/FWRecoGeometryESProducer.cc b/Fireworks/Geometry/src/FWRecoGeometryESProducer.cc index f45b7c7fd7215..e06be32d404f8 100644 --- a/Fireworks/Geometry/src/FWRecoGeometryESProducer.cc +++ b/Fireworks/Geometry/src/FWRecoGeometryESProducer.cc @@ -255,7 +255,6 @@ FWRecoGeometryESProducer::addGEMGeometry( void ) try { const GEMGeometry* gemGeom = (const GEMGeometry*) m_geomRecord->slaveGeometry( detId ); - for(auto roll : gemGeom->etaPartitions()) { if( roll ) @@ -279,6 +278,13 @@ FWRecoGeometryESProducer::addGEMGeometry( void ) } m_fwGeometry->extraDet.Add(new TNamed("GEM", "GEM muon detector")); + try { + GEMDetId id(1, 1, 2, 1, 1, 1 ); + m_geomRecord->slaveGeometry( detId ); + m_fwGeometry->extraDet.Add(new TNamed("GE2", "GEM endcap station 2")); + } + catch (...) {} + } catch( cms::Exception &exception ) { @@ -297,7 +303,6 @@ FWRecoGeometryESProducer::addME0Geometry( void ) try { const ME0Geometry* me0Geom = (const ME0Geometry*) m_geomRecord->slaveGeometry( detId ); - for(auto roll : me0Geom->etaPartitions()) { if( roll ) @@ -319,6 +324,7 @@ FWRecoGeometryESProducer::addME0Geometry( void ) m_fwGeometry->idToName[current].topology[5] = roll->npads(); } } + m_fwGeometry->extraDet.Add(new TNamed("ME0", "ME0 muon detector")); } catch( cms::Exception &exception ) { From 831614f5633880e8b785b6fc95968d9246ee2b9f Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Sat, 2 May 2015 03:01:21 +0900 Subject: [PATCH 5/6] fixed geo settings for GeometryExtended2023Muon --- .../GeometryExtended2023MuonReco_cff.py | 2 +- .../python/GeometryExtended2023Muon_cff.py | 2 +- Fireworks/Core/src/FW3DViewGeometry.cc | 22 +++++--- Fireworks/Core/src/FWRPZView.cc | 4 -- Fireworks/Core/src/FWRPZViewGeometry.cc | 54 +++++++------------ .../Geometry/python/dumpSimGeometry_cfg.py | 2 +- .../src/FWTGeoRecoGeometryESProducer.cc | 8 +-- .../cmsExtendedGeometry2023MuonXML_cfi.py | 7 ++- 8 files changed, 42 insertions(+), 59 deletions(-) diff --git a/Configuration/Geometry/python/GeometryExtended2023MuonReco_cff.py b/Configuration/Geometry/python/GeometryExtended2023MuonReco_cff.py index 4442eeea1c77c..55b5d2947ee87 100644 --- a/Configuration/Geometry/python/GeometryExtended2023MuonReco_cff.py +++ b/Configuration/Geometry/python/GeometryExtended2023MuonReco_cff.py @@ -1,7 +1,7 @@ import FWCore.ParameterSet.Config as cms # Ideal geometry, needed for transient ECAL alignement -from Configuration.Geometry.GeometryExtended2023_cff import * +from Configuration.Geometry.GeometryExtended2023Muon_cff import * # Reconstruction geometry services # Tracking Geometry diff --git a/Configuration/Geometry/python/GeometryExtended2023Muon_cff.py b/Configuration/Geometry/python/GeometryExtended2023Muon_cff.py index f528cc0170cbe..82ffad995535f 100644 --- a/Configuration/Geometry/python/GeometryExtended2023Muon_cff.py +++ b/Configuration/Geometry/python/GeometryExtended2023Muon_cff.py @@ -4,5 +4,5 @@ # # Ideal geometry, needed for simulation from Geometry.CMSCommonData.cmsExtendedGeometry2023MuonXML_cfi import * -from Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi import * +from Geometry.TrackerNumberingBuilder.trackerTopology2023Constants_cfi import * #from Geometry.HcalCommonData.hcalSimNumberingInitialization_cfi import * diff --git a/Fireworks/Core/src/FW3DViewGeometry.cc b/Fireworks/Core/src/FW3DViewGeometry.cc index b6e37d32b0ad7..84dcb9283fb9a 100644 --- a/Fireworks/Core/src/FW3DViewGeometry.cc +++ b/Fireworks/Core/src/FW3DViewGeometry.cc @@ -225,11 +225,13 @@ FW3DViewGeometry::showMuonEndcap( bool showMuonEndcap ) { GEMDetId id( iRegion, iRing, iStation, iLayer, iChamber, iRoll ); TEveGeoShape* shape = m_geom->getEveShape( id.rawId() ); - shape->SetTitle(TString::Format("GEM: , Rng=%d, St=%d, Ch=%d Rl=%d\ndet-id=%u", - iRing, iStation, iChamber, iRoll, id.rawId())); + if (shape){ + shape->SetTitle(TString::Format("GEM: , Rng=%d, St=%d, Ch=%d Rl=%d\ndet-id=%u", + iRing, iStation, iChamber, iRoll, id.rawId())); - cRing->AddElement( shape ); - addToCompound(shape, kFWMuonEndcapLineColorIndex ); + cRing->AddElement( shape ); + addToCompound(shape, kFWMuonEndcapLineColorIndex ); + } } } } @@ -254,15 +256,19 @@ FW3DViewGeometry::showMuonEndcap( bool showMuonEndcap ) { ME0DetId id( iRegion, iLayer, iChamber, iRoll ); TEveGeoShape* shape = m_geom->getEveShape( id.rawId() ); - shape->SetTitle(TString::Format("ME0: , Ch=%d Rl=%d\ndet-id=%u", - iChamber, iRoll, id.rawId())); + if (shape){ + shape->SetTitle(TString::Format("ME0: , Ch=%d Rl=%d\ndet-id=%u", + iChamber, iRoll, id.rawId())); - eRegion->AddElement( shape ); - addToCompound(shape, kFWMuonEndcapLineColorIndex ); + eRegion->AddElement( shape ); + addToCompound(shape, kFWMuonEndcapLineColorIndex ); + } } } } } + gEve->AddToListTree(ME0list, false); + m_muonEndcapElements->AddElement(ME0list); AddElement( m_muonEndcapElements ); } diff --git a/Fireworks/Core/src/FWRPZView.cc b/Fireworks/Core/src/FWRPZView.cc index b225f6d823dc6..2a04535c71dac 100644 --- a/Fireworks/Core/src/FWRPZView.cc +++ b/Fireworks/Core/src/FWRPZView.cc @@ -412,10 +412,6 @@ FWRPZView::populateController(ViewerParameterGUI& gui) const if (showGEM) det.addParam(&m_showGEM); bool showME0 = m_context->getGeom()->versionInfo().haveExtraDet("ME0"); if (showME0) det.addParam(&m_showME0); - std::cout << " showGEM " << showGEM - << " showME0 " << showME0 - << " m_context->getGeom()->versionInfo().haveExtraDet() " << m_context->getGeom()->versionInfo().haveExtraDet("GEM2") - << std::endl; } #ifdef TEVEPROJECTIONS_DISPLACE_ORIGIN_MODE diff --git a/Fireworks/Core/src/FWRPZViewGeometry.cc b/Fireworks/Core/src/FWRPZViewGeometry.cc index ef4ff5c6bd92b..64d611ec4ba82 100644 --- a/Fireworks/Core/src/FWRPZViewGeometry.cc +++ b/Fireworks/Core/src/FWRPZViewGeometry.cc @@ -551,40 +551,22 @@ FWRPZViewGeometry::showRpcEndcap( bool show ) void FWRPZViewGeometry::showGEM( bool show ) { - if( !m_GEMElements && show ) - { + if( !m_GEMElements && show ) + { m_GEMElements = new TEveElementList("GEM"); - //int rArr [] = { -1, 1}; // front back region - //int cArr [] = { 9, 10, 29, 30}; // top bottom chamber - - // for (int ri = 0; ri < 2; ++ri ){ - // for (int st = 1; st < 3; ++st ){ - // for (int ci= 0; ci < 4; ++ci) { - // int minRoll = 2; - // //if (ci == 1 || ci == 3) minRoll = 2; - // for (int roll = minRoll; roll <=10; ++roll){ - // for (int layer = 1; layer <=2; ++layer) - // { - // GEMDetId id(rArr[ri], 1, st, layer, cArr[ci], roll); - // TEveGeoShape* shape = m_geom->getEveShape(id.rawId()); - // addToCompound(shape, kFWMuonEndcapLineColorIndex); - // m_GEMElements->AddElement( shape ); - // } - // } - // } - // } - // } for (int region=GEMDetId::minRegionId; region<=GEMDetId::maxRegionId; region=region+2){ - int ring = 1; - for (int station=GEMDetId::minStationId; station<=2; ++station){ - for (int layer=GEMDetId::minLayerId; layer<=GEMDetId::maxLayerId; ++layer){ - for (int chamber=GEMDetId::minChamberId; chamber<=GEMDetId::maxChamberId; ++chamber){ - for (int roll=GEMDetId::minRollId; roll<=GEMDetId::maxRollId; ++roll){ - GEMDetId id(region, ring, station, layer, chamber, roll); - TEveGeoShape* shape = m_geom->getEveShape(id.rawId()); + int ring = 1; + for (int station=GEMDetId::minStationId; station<=2; ++station){ + for (int layer=GEMDetId::minLayerId; layer<=GEMDetId::maxLayerId; ++layer){ + int chamber = 1; + for (int roll=GEMDetId::minRollId; roll<=GEMDetId::maxRollId; ++roll){ + GEMDetId id(region, ring, station, layer, chamber, roll); + TEveGeoShape* shape = m_geom->getEveShape(id.rawId()); + if (shape){ addToCompound(shape, kFWMuonEndcapLineColorIndex); m_GEMElements->AddElement( shape ); + gEve->AddToListTree(shape, true); } } } @@ -608,16 +590,16 @@ FWRPZViewGeometry::showME0( bool show ) { m_ME0Elements = new TEveElementList("ME0"); - //int cArr [] = { 9, 10, 29, 30}; // top bottom chamber - for (int region=ME0DetId::minRegionId; region<=ME0DetId::maxRegionId; region=region+2){ - for (int layer=ME0DetId::minLayerId; layer<=ME0DetId::maxLayerId; ++layer){ - for (int chamber=ME0DetId::minChamberId; chamber<=ME0DetId::maxChamberId; ++chamber){ - for (int roll=ME0DetId::minRollId; roll<=ME0DetId::maxRollId; ++roll){ - ME0DetId id(region, layer, chamber, roll); - TEveGeoShape* shape = m_geom->getEveShape(id.rawId()); + for (int layer=ME0DetId::minLayerId; layer<=ME0DetId::maxLayerId; layer=layer+15){ + int chamber = 1; + for (int roll=ME0DetId::minRollId; roll<=ME0DetId::maxRollId; ++roll){ + ME0DetId id(region, layer, chamber, roll); + TEveGeoShape* shape = m_geom->getEveShape(id.rawId()); + if (shape){ addToCompound(shape, kFWMuonEndcapLineColorIndex); m_ME0Elements->AddElement( shape ); + gEve->AddToListTree(shape, true); } } } diff --git a/Fireworks/Geometry/python/dumpSimGeometry_cfg.py b/Fireworks/Geometry/python/dumpSimGeometry_cfg.py index 7e6e5463a9f40..c77d23cf9ba58 100644 --- a/Fireworks/Geometry/python/dumpSimGeometry_cfg.py +++ b/Fireworks/Geometry/python/dumpSimGeometry_cfg.py @@ -111,7 +111,7 @@ def simGeoLoad(score): process.add_(cms.ESProducer("TGeoMgrFromDdd", verbose = cms.untracked.bool(False), - level = cms.untracked.int32(defaultLevel) + level = cms.untracked.int32(defaultLevel) )) process.dump = cms.EDAnalyzer("DumpSimGeometry", diff --git a/Fireworks/Geometry/src/FWTGeoRecoGeometryESProducer.cc b/Fireworks/Geometry/src/FWTGeoRecoGeometryESProducer.cc index 17cf43482dba2..1536a1e0e1897 100644 --- a/Fireworks/Geometry/src/FWTGeoRecoGeometryESProducer.cc +++ b/Fireworks/Geometry/src/FWTGeoRecoGeometryESProducer.cc @@ -31,6 +31,7 @@ #include "Geometry/RPCGeometry/interface/RPCGeometry.h" #include "Geometry/GEMGeometry/interface/GEMEtaPartition.h" #include "Geometry/GEMGeometry/interface/GEMGeometry.h" +#include "Geometry/GEMGeometry/interface/ME0EtaPartition.h" #include "Geometry/GEMGeometry/interface/ME0Geometry.h" #include "Geometry/Records/interface/CaloGeometryRecord.h" #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" @@ -804,21 +805,20 @@ FWTGeoRecoGeometryESProducer::addRPCGeometry( ) void FWTGeoRecoGeometryESProducer::addME0Geometry( ) { - - TGeoVolume* tv = GetTopHolder("Muon", kMuonCSC); + TGeoVolume* tv = GetTopHolder("Muon", kMuonME0); TGeoVolume *assembly = GetDaughter(tv, "ME0", kMuonME0); DetId detId( DetId::Muon, 5 ); try { const ME0Geometry* me0Geom = (const ME0Geometry*) m_geomRecord->slaveGeometry( detId ); - + for(auto roll : me0Geom->etaPartitions()) { if( roll ) { unsigned int rawid = roll->geographicalId().rawId(); - // std::cout << "AMT FWTTTTRecoGeometryES\n" << rawid ; + //std::cout << "AMT FWTTTTRecoGeometryES\n" << rawid ; ME0DetId detid(rawid); std::stringstream s; diff --git a/Geometry/CMSCommonData/python/cmsExtendedGeometry2023MuonXML_cfi.py b/Geometry/CMSCommonData/python/cmsExtendedGeometry2023MuonXML_cfi.py index d1d6ef7774623..cafd7df13b7b8 100644 --- a/Geometry/CMSCommonData/python/cmsExtendedGeometry2023MuonXML_cfi.py +++ b/Geometry/CMSCommonData/python/cmsExtendedGeometry2023MuonXML_cfi.py @@ -9,6 +9,7 @@ 'Geometry/CMSCommonData/data/PhaseI/cms.xml', 'Geometry/CMSCommonData/data/cmsMother.xml', 'Geometry/CMSCommonData/data/cmsTracker.xml', + 'Geometry/CMSCommonData/data/eta3/etaMax.xml', 'Geometry/CMSCommonData/data/caloBase.xml', 'Geometry/CMSCommonData/data/cmsCalo.xml', 'Geometry/CMSCommonData/data/muonBase.xml', @@ -227,14 +228,12 @@ 'Geometry/MuonCommonData/data/v1/mb3.xml', 'Geometry/MuonCommonData/data/v1/mb4.xml', 'Geometry/MuonCommonData/data/design/muonYoke.xml', - #'Geometry/MuonCommonData/data/PhaseII/NoME0/mf.xml', 'Geometry/MuonCommonData/data/PhaseII/mf.xml', 'Geometry/MuonCommonData/data/PhaseII/rpcf.xml', 'Geometry/MuonCommonData/data/v2/gemf.xml', 'Geometry/MuonCommonData/data/v4/gem11.xml', 'Geometry/MuonCommonData/data/v6/gem21.xml', 'Geometry/MuonCommonData/data/v2/csc.xml', - #'Geometry/MuonCommonData/data/PhaseII/NoME0/mfshield.xml', 'Geometry/MuonCommonData/data/PhaseII/mfshield.xml', 'Geometry/MuonCommonData/data/PhaseII/me0.xml', 'Geometry/ForwardCommonData/data/forward.xml', @@ -254,7 +253,7 @@ 'Geometry/ForwardCommonData/data/zdc.xml', 'Geometry/ForwardCommonData/data/zdclumi.xml', 'Geometry/ForwardCommonData/data/cmszdc.xml')+cms.vstring( - 'Geometry/MuonCommonData/data/PhaseII/NoME0/muonNumbering.xml', + 'Geometry/MuonCommonData/data/PhaseII/muonNumbering.xml', 'Geometry/TrackerCommonData/data/PhaseI/trackerStructureTopology.xml', 'Geometry/TrackerSimData/data/PhaseI/trackersens.xml', 'Geometry/TrackerRecoData/data/PhaseI/trackerRecoMaterial.xml', @@ -264,7 +263,7 @@ 'Geometry/HcalSimData/data/hfpmt.xml', 'Geometry/HcalSimData/data/hffibrebundle.xml', 'Geometry/HcalSimData/data/CaloUtil.xml', - 'Geometry/MuonSimData/data/PhaseII/NoME0/muonSens.xml', + 'Geometry/MuonSimData/data/PhaseII/muonSens.xml', 'Geometry/DTGeometryBuilder/data/dtSpecsFilter.xml', 'Geometry/CSCGeometryBuilder/data/cscSpecsFilter.xml', 'Geometry/CSCGeometryBuilder/data/cscSpecs.xml', From e783683f0e43d39f22873910e46398164a7dc9db Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Sat, 2 May 2015 05:09:18 +0900 Subject: [PATCH 6/6] fixed FW3DViewGeometry.cc and FWRPZViewGeometry.cc by hardcoding gem and me0 layout --- Fireworks/Core/src/FW3DViewGeometry.cc | 148 ++++++++++++------------ Fireworks/Core/src/FWRPZViewGeometry.cc | 91 ++++++++------- 2 files changed, 126 insertions(+), 113 deletions(-) diff --git a/Fireworks/Core/src/FW3DViewGeometry.cc b/Fireworks/Core/src/FW3DViewGeometry.cc index 84dcb9283fb9a..063923a258177 100644 --- a/Fireworks/Core/src/FW3DViewGeometry.cc +++ b/Fireworks/Core/src/FW3DViewGeometry.cc @@ -169,107 +169,113 @@ FW3DViewGeometry::showMuonEndcap( bool showMuonEndcap ) else cEndcap = new TEveElementList( "CSC Backward" ); m_muonEndcapElements->AddElement( cEndcap ); - // Actual CSC geometry: - // Station 1 has 4 rings with 36 chambers in each - // Station 2: ring 1 has 18 chambers, ring 2 has 36 chambers - // Station 3: ring 1 has 18 chambers, ring 2 has 36 chambers - // Station 4: ring 1 has 18 chambers - Int_t maxChambers = 36; + // Actual CSC geometry: + // Station 1 has 4 rings with 36 chambers in each + // Station 2: ring 1 has 18 chambers, ring 2 has 36 chambers + // Station 3: ring 1 has 18 chambers, ring 2 has 36 chambers + // Station 4: ring 1 has 18 chambers + Int_t maxChambers = 36; for( Int_t iStation = 1; iStation <= 4; ++iStation ) { std::ostringstream s; s << "Station" << iStation; TEveElementList* cStation = new TEveElementList( s.str().c_str() ); cEndcap->AddElement( cStation ); for( Int_t iRing = 1; iRing <= 4; ++iRing ) - { + { if( iStation > 1 && iRing > 2 ) continue; if( iStation > 3 && iRing > 1 ) continue; std::ostringstream s; s << "Ring" << iRing; TEveElementList* cRing = new TEveElementList( s.str().c_str() ); cStation->AddElement( cRing ); - ( iRing == 1 && iStation > 1 ) ? ( maxChambers = 18 ) : ( maxChambers = 36 ); + ( iRing == 1 && iStation > 1 ) ? ( maxChambers = 18 ) : ( maxChambers = 36 ); for( Int_t iChamber = 1; iChamber <= maxChambers; ++iChamber ) { Int_t iLayer = 0; // chamber - CSCDetId id( iEndcap, iStation, iRing, iChamber, iLayer ); - TEveGeoShape* shape = m_geom->getEveShape( id.rawId() ); + CSCDetId id( iEndcap, iStation, iRing, iChamber, iLayer ); + TEveGeoShape* shape = m_geom->getEveShape( id.rawId() ); shape->SetTitle(TString::Format("CSC: %s, S=%d, R=%d, C=%d\ndet-id=%u", cEndcap->GetName(), iStation, iRing, iChamber, id.rawId())); addToCompound(shape, kFWMuonEndcapLineColorIndex); - cRing->AddElement( shape ); + cRing->AddElement( shape ); } } - } + } } - - // m_muonEndcapElements->AddElement(CSClist); - - TEveElementList* GEMlist = new TEveCompound( "GEM" ); - for( Int_t iRegion = GEMDetId::minRegionId; iRegion <= GEMDetId::maxRegionId; iRegion= iRegion+2) - { - for( Int_t iStation = GEMDetId::minStationId; iStation <= 2; ++iStation ) - { - TEveElementList* cStation = new TEveCompound(Form("Station_%d Region_%d", iStation, iRegion) ); - GEMlist->AddElement( cStation ); - // for( Int_t iRing = GEMDetId::minRingId; iRing <= GEMDetId::maxRingId; ++iRing ) - // { - Int_t iRing = 1; - TEveCompound* cRing = new TEveCompound( Form("Ring_%d", iRing) ); - cStation->AddElement( cRing ); - for( Int_t iChamber = GEMDetId::minChamberId; iChamber <= GEMDetId::maxChamberId; ++iChamber ) - { - for( Int_t iLayer = GEMDetId::minLayerId; iLayer <= GEMDetId::maxLayerId ; ++iLayer ) - { - for (Int_t iRoll = GEMDetId::minRollId; iRoll <= GEMDetId::maxRollId ; ++iRoll ) - { - GEMDetId id( iRegion, iRing, iStation, iLayer, iChamber, iRoll ); - TEveGeoShape* shape = m_geom->getEveShape( id.rawId() ); - if (shape){ - shape->SetTitle(TString::Format("GEM: , Rng=%d, St=%d, Ch=%d Rl=%d\ndet-id=%u", - iRing, iStation, iChamber, iRoll, id.rawId())); + // hardcoded gem and me0; need to find better way for different gem geometries + for( Int_t iRegion = GEMDetId::minRegionId; iRegion <= GEMDetId::maxRegionId; iRegion= iRegion+2){ + TEveElementList* teEndcap = 0; + if( iRegion == 1 ) + teEndcap = new TEveElementList( "GEM Forward" ); + else + teEndcap = new TEveElementList( "GEM Backward" ); + m_muonEndcapElements->AddElement( teEndcap ); + + int mxSt = m_geom->versionInfo().haveExtraDet("GE2") ? 3:1; + + for( Int_t iStation = GEMDetId::minStationId; iStation <= mxSt; ++iStation ){ + std::ostringstream s; s << "Station" << iStation; + TEveElementList* cStation = new TEveElementList( s.str().c_str() ); + teEndcap->AddElement( cStation ); + + Int_t iRing = 1; + for( Int_t iLayer = GEMDetId::minLayerId; iLayer <= GEMDetId::maxLayerId ; ++iLayer ){ + int maxChamber = 36; + if (iStation >= 2) maxChamber = 18; + + for( Int_t iChamber = 1; iChamber <= maxChamber; ++iChamber ){ + int maxRoll = iChamber%2 ? 9:10; + if (iStation == 2) maxRoll = 8; + if (iStation == 3) maxRoll = 12; + + for (Int_t iRoll = GEMDetId::minRollId; iRoll <= maxRoll ; ++iRoll ){ + GEMDetId id( iRegion, iRing, iStation, iLayer, iChamber, iRoll ); + TEveGeoShape* shape = m_geom->getEveShape( id.rawId() ); + if (shape){ + shape->SetTitle(TString::Format("GEM: , Rng=%d, St=%d, Ch=%d Rl=%d\ndet-id=%u", + iRing, iStation, iChamber, iRoll, id.rawId())); - cRing->AddElement( shape ); - addToCompound(shape, kFWMuonEndcapLineColorIndex ); - } - } - } + cStation->AddElement( shape ); + addToCompound(shape, kFWMuonEndcapLineColorIndex); } - } + } + } + } } - //} - m_muonEndcapElements->AddElement(GEMlist); + } - // EVE debug :: add list on bottom of TEveBrowser list tree - gEve->AddToListTree(GEMlist, false); - // adding me0 - TEveElementList* ME0list = new TEveElementList( "ME0" ); - for( Int_t iRegion = ME0DetId::minRegionId; iRegion <= ME0DetId::maxRegionId; iRegion= iRegion+2 ){ - TEveElementList* eRegion = new TEveElementList(Form("Region_%d", iRegion) ); - ME0list->AddElement( eRegion ); - for( Int_t iChamber = ME0DetId::minChamberId; iChamber <= ME0DetId::maxChamberId; ++iChamber ) - { - for( Int_t iLayer = ME0DetId::minLayerId; iLayer <= ME0DetId::maxLayerId ; ++iLayer ) - { - for (Int_t iRoll = ME0DetId::minRollId; iRoll <= ME0DetId::maxRollId ; ++iRoll ) - { - ME0DetId id( iRegion, iLayer, iChamber, iRoll ); - TEveGeoShape* shape = m_geom->getEveShape( id.rawId() ); - if (shape){ - shape->SetTitle(TString::Format("ME0: , Ch=%d Rl=%d\ndet-id=%u", - iChamber, iRoll, id.rawId())); + if (m_geom->versionInfo().haveExtraDet("ME0") ){ + for( Int_t iRegion = ME0DetId::minRegionId; iRegion <= ME0DetId::maxRegionId; iRegion= iRegion+2 ){ + TEveElementList* teEndcap = 0; + if( iRegion == 1 ) + teEndcap = new TEveElementList( "ME0 Forward" ); + else + teEndcap = new TEveElementList( "ME0 Backward" ); + m_muonEndcapElements->AddElement( teEndcap ); + + for( Int_t iLayer = 1; iLayer <= 6 ; ++iLayer ){ + std::ostringstream s; s << "Layer" << iLayer; + TEveElementList* cLayer = new TEveElementList( s.str().c_str() ); + teEndcap->AddElement( cLayer ); + + for( Int_t iChamber = 1; iChamber <= 18; ++iChamber ){ + Int_t iRoll = 1; + // for (Int_t iRoll = ME0DetId::minRollId; iRoll <= ME0DetId::maxRollId ; ++iRoll ){ + ME0DetId id( iRegion, iLayer, iChamber, iRoll ); + TEveGeoShape* shape = m_geom->getEveShape( id.rawId() ); + if (shape){ + shape->SetTitle(TString::Format("ME0: , Ch=%d Rl=%d\ndet-id=%u", + iChamber, iRoll, id.rawId())); - eRegion->AddElement( shape ); - addToCompound(shape, kFWMuonEndcapLineColorIndex ); - } - } + addToCompound(shape, kFWMuonEndcapLineColorIndex ); + cLayer->AddElement( shape ); } + } } + } } - gEve->AddToListTree(ME0list, false); - - m_muonEndcapElements->AddElement(ME0list); + AddElement( m_muonEndcapElements ); } diff --git a/Fireworks/Core/src/FWRPZViewGeometry.cc b/Fireworks/Core/src/FWRPZViewGeometry.cc index 64d611ec4ba82..c766cc5717f55 100644 --- a/Fireworks/Core/src/FWRPZViewGeometry.cc +++ b/Fireworks/Core/src/FWRPZViewGeometry.cc @@ -551,17 +551,26 @@ FWRPZViewGeometry::showRpcEndcap( bool show ) void FWRPZViewGeometry::showGEM( bool show ) { - if( !m_GEMElements && show ) - { - m_GEMElements = new TEveElementList("GEM"); - - for (int region=GEMDetId::minRegionId; region<=GEMDetId::maxRegionId; region=region+2){ - int ring = 1; - for (int station=GEMDetId::minStationId; station<=2; ++station){ - for (int layer=GEMDetId::minLayerId; layer<=GEMDetId::maxLayerId; ++layer){ - int chamber = 1; - for (int roll=GEMDetId::minRollId; roll<=GEMDetId::maxRollId; ++roll){ - GEMDetId id(region, ring, station, layer, chamber, roll); + // hardcoded gem and me0; need to find better way for different gem geometries + if( !m_GEMElements && show ){ + m_GEMElements = new TEveElementList("GEM"); + + for( Int_t iRegion = GEMDetId::minRegionId; iRegion <= GEMDetId::maxRegionId; iRegion= iRegion+2){ + int mxSt = m_geom->versionInfo().haveExtraDet("GE2") ? 3:1; + + for( Int_t iStation = GEMDetId::minStationId; iStation <= mxSt; ++iStation ){ + Int_t iRing = 1; + for( Int_t iLayer = GEMDetId::minLayerId; iLayer <= GEMDetId::maxLayerId ; ++iLayer ){ + int maxChamber = 36; + if (iStation >= 2) maxChamber = 18; + + for( Int_t iChamber = 1; iChamber <= maxChamber; ++iChamber ){ + int maxRoll = iChamber%2 ? 9:10; + if (iStation == 2) maxRoll = 8; + if (iStation == 3) maxRoll = 12; + + for (Int_t iRoll = GEMDetId::minRollId; iRoll <= maxRoll ; ++iRoll ){ + GEMDetId id( iRegion, iRing, iStation, iLayer, iChamber, iRoll ); TEveGeoShape* shape = m_geom->getEveShape(id.rawId()); if (shape){ addToCompound(shape, kFWMuonEndcapLineColorIndex); @@ -572,47 +581,45 @@ FWRPZViewGeometry::showGEM( bool show ) } } } + } - AddElement(m_GEMElements); - importNew(m_GEMElements); - } - if (m_GEMElements) - { - m_GEMElements->SetRnrState(show); - gEve->Redraw3D(); - } + AddElement(m_GEMElements); + importNew(m_GEMElements); + } + if (m_GEMElements){ + m_GEMElements->SetRnrState(show); + gEve->Redraw3D(); + } } void FWRPZViewGeometry::showME0( bool show ) { - if( !m_ME0Elements && show ) - { - m_ME0Elements = new TEveElementList("ME0"); - - for (int region=ME0DetId::minRegionId; region<=ME0DetId::maxRegionId; region=region+2){ - for (int layer=ME0DetId::minLayerId; layer<=ME0DetId::maxLayerId; layer=layer+15){ - int chamber = 1; - for (int roll=ME0DetId::minRollId; roll<=ME0DetId::maxRollId; ++roll){ - ME0DetId id(region, layer, chamber, roll); - TEveGeoShape* shape = m_geom->getEveShape(id.rawId()); - if (shape){ - addToCompound(shape, kFWMuonEndcapLineColorIndex); - m_ME0Elements->AddElement( shape ); - gEve->AddToListTree(shape, true); - } + if( !m_ME0Elements && show ){ + m_ME0Elements = new TEveElementList("ME0"); + + for( Int_t iRegion = ME0DetId::minRegionId; iRegion <= ME0DetId::maxRegionId; iRegion= iRegion+2 ){ + for( Int_t iLayer = 1; iLayer <= 6 ; ++iLayer ){ + for( Int_t iChamber = 1; iChamber <= 18; ++iChamber ){ + Int_t iRoll = 1; + ME0DetId id( iRegion, iLayer, iChamber, iRoll ); + TEveGeoShape* shape = m_geom->getEveShape(id.rawId()); + if (shape){ + addToCompound(shape, kFWMuonEndcapLineColorIndex); + m_ME0Elements->AddElement( shape ); + gEve->AddToListTree(shape, true); } } } + } - AddElement(m_ME0Elements); - importNew(m_ME0Elements); - } - if (m_ME0Elements) - { - m_ME0Elements->SetRnrState(show); - gEve->Redraw3D(); - } + AddElement(m_ME0Elements); + importNew(m_ME0Elements); + } + if (m_ME0Elements){ + m_ME0Elements->SetRnrState(show); + gEve->Redraw3D(); + } } //-------------------------------------