Skip to content

Commit

Permalink
Merge pull request #29223 from fabiocos/fc-simfwd
Browse files Browse the repository at this point in the history
Clean residual dependency of SimG4Core/Forward on DetectorDescription
  • Loading branch information
cmsbuild committed Mar 19, 2020
2 parents 128aae0 + 1ea6f0c commit cd58a5a
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 11 deletions.
1 change: 0 additions & 1 deletion SimG4CMS/Forward/BuildFile.xml
Expand Up @@ -13,7 +13,6 @@
<use name="SimDataFormats/SimHitMaker"/>
<use name="SimDataFormats/CaloHit"/>
<use name="SimDataFormats/Forward"/>
<use name="DetectorDescription/Core"/>
<use name="Geometry/HGCalCommonData"/>
<use name="Geometry/MTDCommonData"/>
<use name="boost"/>
Expand Down
1 change: 0 additions & 1 deletion SimG4CMS/Forward/interface/CastorShowerLibrary.h
Expand Up @@ -13,7 +13,6 @@
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "SimDataFormats/CaloHit/interface/CastorShowerLibraryInfo.h"
#include "SimDataFormats/CaloHit/interface/CastorShowerEvent.h"
#include "DetectorDescription/Core/interface/DDsvalues.h"

#include "G4ParticleTable.hh"
#include "G4ThreeVector.hh"
Expand Down
4 changes: 1 addition & 3 deletions SimG4CMS/Forward/interface/ZdcShowerLibrary.h
Expand Up @@ -12,18 +12,16 @@

#include "G4ParticleTable.hh"
#include "G4ThreeVector.hh"
#include "DetectorDescription/Core/interface/DDsvalues.h"
#include "DataFormats/HcalDetId/interface/HcalZDCDetId.h"

#include <string>
#include <memory>

class G4Step;
class DDCompactView;
class ZdcShowerLibrary {
public:
//Constructor and Destructor
ZdcShowerLibrary(const std::string& name, const DDCompactView& cpv, edm::ParameterSet const& p);
ZdcShowerLibrary(const std::string& name, edm::ParameterSet const& p);
~ZdcShowerLibrary();

public:
Expand Down
6 changes: 1 addition & 5 deletions SimG4CMS/Forward/src/ZdcSD.cc
Expand Up @@ -8,7 +8,6 @@
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/Framework/interface/ESTransientHandle.h"
#include "Geometry/Records/interface/IdealGeometryRecord.h"
#include "DetectorDescription/Core/interface/DDCompactView.h"
#include "SimG4Core/Notification/interface/TrackInformation.h"

#include "G4SDManager.hh"
Expand Down Expand Up @@ -50,11 +49,8 @@ ZdcSD::ZdcSD(const std::string& name,

edm::LogVerbatim("ZdcSD") << "\nEnergy Threshold Cut set to " << zdcHitEnergyCut / GeV << " (GeV)";

edm::ESTransientHandle<DDCompactView> cpv;
es.get<IdealGeometryRecord>().get(cpv);

if (useShowerLibrary) {
showerLibrary.reset(new ZdcShowerLibrary(name, *cpv, p));
showerLibrary.reset(new ZdcShowerLibrary(name, p));
setParameterized(true);
} else {
showerLibrary.reset(nullptr);
Expand Down
2 changes: 1 addition & 1 deletion SimG4CMS/Forward/src/ZdcShowerLibrary.cc
Expand Up @@ -17,7 +17,7 @@
#include "Randomize.hh"
#include "CLHEP/Units/GlobalSystemOfUnits.h"

ZdcShowerLibrary::ZdcShowerLibrary(const std::string& name, const DDCompactView& cpv, edm::ParameterSet const& p) {
ZdcShowerLibrary::ZdcShowerLibrary(const std::string& name, edm::ParameterSet const& p) {
edm::ParameterSet m_HS = p.getParameter<edm::ParameterSet>("ZdcShowerLibrary");
verbose = m_HS.getUntrackedParameter<int>("Verbosity", 0);

Expand Down

0 comments on commit cd58a5a

Please sign in to comment.