Skip to content

Commit

Permalink
Produce TGeo version of Reco geometry.
Browse files Browse the repository at this point in the history
---
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
Show file tree
Hide file tree
Showing 6 changed files with 774 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
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 trunk/Fireworks/Geometry/interface/FWTGeoRecoGeometryESProducer.h
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
6 changes: 6 additions & 0 deletions trunk/Fireworks/Geometry/plugins/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,9 @@
<use name="Fireworks/Geometry"/>
<flags EDM_PLUGIN="1"/>
</library>

<library file="FWTGeoRecoGeometryESProducerPlugin.cc"
name="FireworksGeometryFWTGeoRecoGeometryESProducerPlugin">
<use name="Fireworks/Geometry"/>
<flags EDM_PLUGIN="1"/>
</library>
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 trunk/Fireworks/Geometry/python/dumpFWTGeoRecoGeometry_cfg.py
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)
Loading

0 comments on commit 13e1c35

Please sign in to comment.