-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Produce TGeo version of Reco geometry.
--- yaml --- svn_rev: 107915 current_ref: refs/heads/l1t-devel-CMSSW_7_4_0_pre5 current_commit: 081bd1a head_branch: refs/heads/l1t-devel-CMSSW_7_4_0_pre5 migrated_from: v3
- Loading branch information
Ianna Osborne
committed
Sep 28, 2011
1 parent
b619803
commit 13e1c35
Showing
6 changed files
with
774 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/l1t-devel-CMSSW_7_4_0_pre5: 7c6d00991ed18bffc1211c1ce273d1ff8aa6e49f | ||
refs/heads/l1t-devel-CMSSW_7_4_0_pre5: 081bd1affbca445f38bb56ddbfe089bb4f2b2533 |
69 changes: 69 additions & 0 deletions
69
trunk/Fireworks/Geometry/interface/FWTGeoRecoGeometryESProducer.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#ifndef GEOMETRY_FWTGEORECO_GEOMETRY_ES_PRODUCER_H | ||
# define GEOMETRY_FWTGEORECO_GEOMETRY_ES_PRODUCER_H | ||
|
||
# include "boost/shared_ptr.hpp" | ||
|
||
# include "FWCore/Framework/interface/ESProducer.h" | ||
# include "FWCore/Framework/interface/ESHandle.h" | ||
# include "DataFormats/GeometryVector/interface/GlobalPoint.h" | ||
|
||
namespace edm | ||
{ | ||
class ParameterSet; | ||
} | ||
|
||
class CaloGeometry; | ||
class GlobalTrackingGeometry; | ||
class TrackerGeometry; | ||
class FWTGeoRecoGeometry; | ||
class FWTGeoRecoGeometryRecord; | ||
|
||
class TGeoManager; | ||
class TGeoShape; | ||
class TGeoVolume; | ||
class TGeoMaterial; | ||
class TGeoMedium; | ||
class GeomDet; | ||
|
||
class FWTGeoRecoGeometryESProducer : public edm::ESProducer | ||
{ | ||
public: | ||
FWTGeoRecoGeometryESProducer( const edm::ParameterSet& ); | ||
virtual ~FWTGeoRecoGeometryESProducer( void ); | ||
|
||
boost::shared_ptr<FWTGeoRecoGeometry> produce( const FWTGeoRecoGeometryRecord& ); | ||
|
||
private: | ||
FWTGeoRecoGeometryESProducer( const FWTGeoRecoGeometryESProducer& ); | ||
const FWTGeoRecoGeometryESProducer& operator=( const FWTGeoRecoGeometryESProducer& ); | ||
|
||
TGeoManager* createManager( int level ); | ||
TGeoShape* createShape( const GeomDet *det ); | ||
TGeoVolume* createVolume( const std::string& name, const GeomDet *det, const std::string& matname = "Air" ); | ||
TGeoMaterial* createMaterial( const std::string& name ); | ||
const std::string path( TGeoVolume* top, const std::string& name, int copy ); | ||
|
||
void addCSCGeometry( TGeoVolume* top, const std::string& name = "CSC", int copy = 1 ); | ||
void addDTGeometry( TGeoVolume* top, const std::string& name = "DT", int copy = 1 ); | ||
void addRPCGeometry( TGeoVolume* top, const std::string& name = "RPC", int copy = 1 ); | ||
void addPixelBarrelGeometry( TGeoVolume* top, const std::string& name = "PixelBarrel", int copy = 1 ); | ||
void addPixelForwardGeometry( TGeoVolume* top, const std::string& name = "PixelForward", int copy = 1 ); | ||
void addTIBGeometry( TGeoVolume* top, const std::string& name = "TIB", int copy = 1 ); | ||
void addTOBGeometry( TGeoVolume* top, const std::string& name = "TOB", int copy = 1 ); | ||
void addTIDGeometry( TGeoVolume* top, const std::string& name = "TID", int copy = 1 ); | ||
void addTECGeometry( TGeoVolume* top, const std::string& name = "TEC", int copy = 1 ); | ||
void addCaloGeometry( void ); | ||
|
||
std::map<std::string, TGeoShape*> m_nameToShape; | ||
std::map<std::string, TGeoVolume*> m_nameToVolume; | ||
std::map<std::string, TGeoMaterial*> m_nameToMaterial; | ||
std::map<std::string, TGeoMedium*> m_nameToMedium; | ||
|
||
edm::ESHandle<GlobalTrackingGeometry> m_geomRecord; | ||
edm::ESHandle<CaloGeometry> m_caloGeom; | ||
const TrackerGeometry* m_trackerGeom; | ||
|
||
boost::shared_ptr<FWTGeoRecoGeometry> m_fwGeometry; | ||
}; | ||
|
||
#endif // GEOMETRY_FWTGEORECO_GEOMETRY_ES_PRODUCER_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
trunk/Fireworks/Geometry/plugins/FWTGeoRecoGeometryESProducerPlugin.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#include "Fireworks/Geometry/interface/FWTGeoRecoGeometryESProducer.h" | ||
#include "FWCore/Framework/interface/ModuleFactory.h" | ||
|
||
DEFINE_FWK_EVENTSETUP_MODULE( FWTGeoRecoGeometryESProducer ); |
27 changes: 27 additions & 0 deletions
27
trunk/Fireworks/Geometry/python/dumpFWTGeoRecoGeometry_cfg.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
process = cms.Process("DUMP") | ||
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") | ||
from Configuration.AlCa.autoCond import autoCond | ||
process.GlobalTag.globaltag = autoCond['mc'] | ||
process.load("Configuration.StandardSequences.Geometry_cff") | ||
process.load("Configuration.StandardSequences.Reconstruction_cff") | ||
|
||
process.add_(cms.ESProducer("FWTGeoRecoGeometryESProducer")) | ||
|
||
#Adding Timing service: | ||
process.Timing = cms.Service("Timing") | ||
process.options = cms.untracked.PSet( | ||
wantSummary = cms.untracked.bool(True) | ||
) | ||
|
||
process.source = cms.Source("EmptySource") | ||
|
||
process.maxEvents = cms.untracked.PSet( | ||
input = cms.untracked.int32(1) | ||
) | ||
process.dump = cms.EDAnalyzer("DumpFWTGeoRecoGeometry", | ||
level = cms.untracked.int32(1) | ||
) | ||
|
||
process.p = cms.Path(process.dump) |
Oops, something went wrong.