Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLHC:: Import HGCal in reco-tgeo geometry, merge 7x devel #5143

Merged
merged 14 commits into from Sep 8, 2014
14 changes: 9 additions & 5 deletions Fireworks/Core/src/FWGeometryTableManager.cc
Expand Up @@ -223,14 +223,17 @@ void FWGeometryTableManager::updateFilter(int iType)
for (Volumes_i i = m_volumes.begin(); i != m_volumes.end(); ++i)
{
const char* res = 0;



if (iType == FWGeometryTableView::kFilterMaterialName)
{
res = strcasestr( i->first->GetMaterial()->GetName() , filterExp.c_str());
if (i->first->IsAssembly() == false)
res = strcasestr( i->first->GetMaterial()->GetName() , filterExp.c_str());
}
else if (iType == FWGeometryTableView::kFilterMaterialTitle)
{
res = strcasestr( i->first->GetMaterial()->GetTitle() , filterExp.c_str());
if ( i->first->IsAssembly() == false)
res = strcasestr( i->first->GetMaterial()->GetTitle() , filterExp.c_str());
}
else if (iType == FWGeometryTableView::kFilterShapeName)
{
Expand All @@ -240,7 +243,8 @@ void FWGeometryTableManager::updateFilter(int iType)
{
res = strcasestr( i->first->GetShape()->ClassName() , filterExp.c_str());
}



i->second.m_matches = (res != 0);
i->second.m_childMatches = false;
if (res != 0) numMatched++;
Expand All @@ -253,7 +257,7 @@ void FWGeometryTableManager::updateFilter(int iType)
for (Entries_i ni = m_entries.begin(); ni != m_entries.end(); ++ni)
{
ni->resetBit(kFilterCached);
assertNodeFilterCache(*ni);
assertNodeFilterCache(*ni);
}

}
Expand Down
2 changes: 2 additions & 0 deletions Fireworks/Geometry/BuildFile.xml
Expand Up @@ -18,6 +18,8 @@
<use name="Fireworks/Core"/>
<use name="rootcore"/>
<lib name="Geom"/>
<lib name="Eve"/>
<lib name="Physics"/>
<export>
<lib name="1"/>
</export>
26 changes: 20 additions & 6 deletions Fireworks/Geometry/interface/FWTGeoRecoGeometryESProducer.h
Expand Up @@ -25,8 +25,15 @@ class TGeoMaterial;
class TGeoMedium;
class GeomDet;
class CaloCellGeometry;
class HGCalGeometry;

class FWTGeoRecoGeometryESProducer : public edm::ESProducer
{
enum ERecoDet {kDummy,
kSiPixel, kSiStrip,
kMuonDT, kMuonRPC, kMuonCSC, kMuonGEM,
kECal, kHCal,
kHGCE, kHGCH };
public:
FWTGeoRecoGeometryESProducer( const edm::ParameterSet& );
virtual ~FWTGeoRecoGeometryESProducer( void );
Expand All @@ -39,11 +46,14 @@ class FWTGeoRecoGeometryESProducer : public edm::ESProducer

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 );
TGeoVolume* createVolume( const std::string& name, const GeomDet *det, ERecoDet = kDummy );
// TGeoMaterial* createMaterial( const std::string& name );

TGeoVolume* GetDaughter(TGeoVolume* mother, const char* prefix, ERecoDet cidx, int id);
TGeoVolume* GetDaughter(TGeoVolume* mother, const char* prefix, ERecoDet cidx);
TGeoVolume* GetTopHolder( const char* prefix, ERecoDet cidx);

TGeoVolume* GetDaughter(TGeoVolume* mother, const char* prefix, int id);
TGeoVolume* GetTopHolder(const char* prefix);
TGeoMedium* GetMedium(ERecoDet);

void addPixelBarrelGeometry();
void addPixelForwardGeometry();
Expand All @@ -58,16 +68,20 @@ class FWTGeoRecoGeometryESProducer : public edm::ESProducer
void addEcalCaloGeometry();
void addHcalCaloGeometryBarrel();
void addHcalCaloGeometryEndcap();
void addHGCal();

std::map<std::string, TGeoShape*> m_nameToShape;
std::map<TGeoShape*, TGeoVolume*> m_shapeToVolume;
std::map<std::string, TGeoMaterial*> m_nameToMaterial;
std::map<std::string, TGeoMedium*> m_nameToMedium;
std::map<ERecoDet, TGeoMedium*> m_recoMedium;

edm::ESHandle<GlobalTrackingGeometry> m_geomRecord;
edm::ESHandle<CaloGeometry> m_caloGeom;
const TrackerGeometry* m_trackerGeom;

std::map<std::string, edm::ESHandle<HGCalGeometry> > m_hgcGeom;

//edm::ESHandle<HGCalGeometry> m_hgcGeom;

boost::shared_ptr<FWTGeoRecoGeometry> m_fwGeometry;

TGeoMedium* m_dummyMedium;
Expand Down
3 changes: 2 additions & 1 deletion Fireworks/Geometry/interface/FWTGeoRecoGeometryRecord.h
Expand Up @@ -4,7 +4,8 @@
# include "FWCore/Framework/interface/DependentRecordImplementation.h"
# include "Geometry/Records/interface/GlobalTrackingGeometryRecord.h"
# include "Geometry/Records/interface/CaloGeometryRecord.h"
# include "Geometry/Records/interface/IdealGeometryRecord.h"

class FWTGeoRecoGeometryRecord : public edm::eventsetup::DependentRecordImplementation<FWTGeoRecoGeometryRecord,boost::mpl::vector<GlobalTrackingGeometryRecord,CaloGeometryRecord> > {};
class FWTGeoRecoGeometryRecord : public edm::eventsetup::DependentRecordImplementation<FWTGeoRecoGeometryRecord,boost::mpl::vector<GlobalTrackingGeometryRecord,CaloGeometryRecord,IdealGeometryRecord> > {};

#endif // GEOMETRY_FWTGEORECO_GEOMETRY_RECORD_H
4 changes: 2 additions & 2 deletions Fireworks/Geometry/python/dumpRecoGeometry_cfg.py
Expand Up @@ -3,7 +3,7 @@
import FWCore.ParameterSet.VarParsing as VarParsing
from FWCore.Utilities.Enumerate import Enumerate

varType = Enumerate ("Run1 2015 2017 2019 PhaseIPixel 2023Muon 2023HGCal SLHC SLHCDB")
varType = Enumerate ("Run1 2015 2017 2019 PhaseIPixel 2023Muon 2023HGCalV4 SLHC SLHCDB")

def help():
print "Usage: cmsRun dumpFWRecoGeometry_cfg.py tag=TAG "
Expand Down Expand Up @@ -49,7 +49,7 @@ def recoGeoLoad(score):
#call to customisation function cust_2023Muon imported from SLHCUpgradeSimulations.Configuration.combinedCustoms
# process = cust_2023Muon(process)

elif score == "2023HGCal":
elif score == "2023HGCalV4":
from Configuration.AlCa.GlobalTag import GlobalTag
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:upgradePLS3', '')
Expand Down
5 changes: 4 additions & 1 deletion Fireworks/Geometry/python/dumpSimGeometry_cfg.py
Expand Up @@ -3,7 +3,7 @@
import FWCore.ParameterSet.VarParsing as VarParsing
from FWCore.Utilities.Enumerate import Enumerate

varType = Enumerate ("Run1 2015 2019 PhaseIPixel Phase1_R34F16 Phase2Tk 2023Muon SLHC DB SLHCDB")
varType = Enumerate ("Run1 2015 2019 PhaseIPixel Phase1_R34F16 Phase2Tk 2023Muon 2023HGCalV4 SLHC DB SLHCDB")

def help():
print "Usage: cmsRun dumpSimGeometry_cfg.py tag=TAG "
Expand Down Expand Up @@ -39,6 +39,9 @@ def simGeoLoad(score):
elif score == "2023Muon":
process.load('Configuration.Geometry.GeometryExtended2023MuonReco_cff')

elif score == "2023HGCalV4":
process.load('Configuration.Geometry.GeometryExtended2023HGCalV4Reco_cff')


elif score == "SLHC":
process.load('SLHCUpgradeSimulations.Geometry.Phase1_R30F12_HCal_cmsSimIdealGeometryXML_cff')
Expand Down