diff --git a/Geometry/HcalCommonData/data/hcalRecNumbering/hfshower/v1/hcalRecNumbering.xml b/Geometry/HcalCommonData/data/hcalRecNumbering/hfshower/v1/hcalRecNumbering.xml
new file mode 100644
index 0000000000000..a6f280ac3cbe1
--- /dev/null
+++ b/Geometry/HcalCommonData/data/hcalRecNumbering/hfshower/v1/hcalRecNumbering.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
+
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
+
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4
+
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4
+
+
+ 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
+
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
+
+
+ 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
+
+
+ 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
+
+
+ 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Geometry/HcalCommonData/data/hcalSimNumbering/hfshower/v1/hcalSimNumbering.xml b/Geometry/HcalCommonData/data/hcalSimNumbering/hfshower/v1/hcalSimNumbering.xml
new file mode 100644
index 0000000000000..41f2623f0b6fa
--- /dev/null
+++ b/Geometry/HcalCommonData/data/hcalSimNumbering/hfshower/v1/hcalSimNumbering.xml
@@ -0,0 +1,101 @@
+
+
+
+
+
+ 0.0*deg, 0.0*deg, 0.0*deg, 10.0*deg, 10.0*deg
+
+
+ 0.000, 0.087, 0.174, 0.261, 0.348, 0.435, 0.522, 0.609, 0.696,
+ 0.783, 0.870, 0.957, 1.044, 1.131, 1.218, 1.305, 1.392, 1.479,
+ 1.566, 1.653, 1.740, 1.830, 1.930, 2.043, 2.172, 2.322, 2.500,
+ 2.650, 2.868, 3.000
+
+
+ 12.50*cm, 16.90*cm, 20.10*cm, 24.00*cm, 28.60*cm, 34.00*cm,
+ 40.60*cm, 48.30*cm, 57.60*cm, 68.60*cm, 81.80*cm, 97.50*cm,
+ 116.20*cm, 130.00*cm
+
+
+ 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg,
+ 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg,
+ 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, 5.0*deg, 10.0*deg,
+ 10.0*deg, 10.0*deg, 10.0*deg, 10.0*deg, 10.0*deg, 10.0*deg,
+ 10.0*deg, 10.0*deg
+
+
+ 10.0*deg, 10.0*deg, 10.0*deg, 10.0*deg, 10.0*deg, 10.0*deg,
+ 10.0*deg, 10.0*deg, 10.0*deg, 10.0*deg, 10.0*deg, 20.0*deg,
+ 20.0*deg
+
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4
+
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4
+
+
+ 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
+
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
+
+
+ 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
+
+
+ 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
+
+
+ 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
+
+
+ 1, 16, 29, 1
+
+
+ 16, 29, 41, 15
+
+
+ 2, 3, 2, 4
+
+
+ 1.392, 3.000, 5.500, 1.305
+
+
+ 22.0*cm, 165.0*cm, 30.0*cm, 0.0*cm, 1115.0*cm, 0.375*cm,
+ 1137.0*cm
+
+
+ 15, 29, 4, 10, 5, 2, 4, 18, 19, 11, 12, 13, 14
+
+
+ 0.5, 0.5
+
+
+ 117.0, 117.0, 117.0, 217.0
+
+
+ 0, 0, 0, 0
+
+
+ 178.0, 178.0, 178.0, 0.000
+
+
+ 0, 0, 0, 0
+
+
+ 2.840, 2.090, 0.000, 0.000
+
+
+ 0, 0, 0, 0
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Geometry/HcalCommonData/data/hcalforwardshower/v2/hcalforwardshower.xml b/Geometry/HcalCommonData/data/hcalforwardshower/v2/hcalforwardshower.xml
new file mode 100644
index 0000000000000..46bdf32e54983
--- /dev/null
+++ b/Geometry/HcalCommonData/data/hcalforwardshower/v2/hcalforwardshower.xml
@@ -0,0 +1,311 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ hcalforwardshower:HFWedge
+
+
+
+
+
+ 0., 0., 182.5*cm
+
+
+
+
+
+ hcalforwardshower:HFBox
+
+
+
+
+
+ 0., 0., 0.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SimG4CMS/ShowerLibraryProducer/python/hcalforwardshower_cfi.py b/SimG4CMS/ShowerLibraryProducer/python/hcalforwardshower_cfi.py
index 433f994b11178..fa18291cc967c 100644
--- a/SimG4CMS/ShowerLibraryProducer/python/hcalforwardshower_cfi.py
+++ b/SimG4CMS/ShowerLibraryProducer/python/hcalforwardshower_cfi.py
@@ -3,11 +3,9 @@
XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource",
geomXMLFiles = cms.vstring('Geometry/CMSCommonData/data/materials.xml',
'Geometry/HcalCommonData/data/hcalforwardmaterial.xml',
- 'Geometry/HcalCommonData/data/hcalforwardshower/v1/hcalforwardshower.xml',
- 'Geometry/HcalCommonData/data/hcalSimNumbering.xml',
- 'Geometry/HcalSimData/data/hf.xml',
- 'Geometry/HcalSimData/data/hfpmt.xml',
- 'Geometry/HcalSimData/data/hffibrebundle.xml'),
+ 'Geometry/HcalCommonData/data/hcalforwardshower/v2/hcalforwardshower.xml',
+ 'Geometry/HcalCommonData/data/hcalSimNumbering/hfshower/v1/hcalSimNumbering.xml',
+ 'Geometry/HcalCommonData/data/hcalRecNumbering/hfshower/v1/hcalRecNumbering.xml'),
rootNodeName = cms.string('hcalforwardshower:HFWorld')
)
diff --git a/SimG4CMS/ShowerLibraryProducer/src/FiberSD.cc b/SimG4CMS/ShowerLibraryProducer/src/FiberSD.cc
index 74425939f8d07..15a9ac0436fbd 100644
--- a/SimG4CMS/ShowerLibraryProducer/src/FiberSD.cc
+++ b/SimG4CMS/ShowerLibraryProducer/src/FiberSD.cc
@@ -29,12 +29,13 @@ FiberSD::FiberSD(const std::string& iname,
theShower(nullptr),
theHCID(-1),
theHC(nullptr) {
- // Get pointer to HcalDDDConstant and HcalSimulationConstants
+ edm::LogVerbatim("FiberSim") << "FiberSD : Instantiating for " << iname;
+ // Get pointer to HcalDDDConstants and HcalSimulationConstants
edm::ESHandle hdsc;
es.get().get(hdsc);
if (!hdsc.isValid()) {
- edm::LogError("FiberSim") << "FiberSD : Cannot find HcalDDDSimulationConstant";
- throw cms::Exception("Unknown", "FiberSD") << "Cannot find HcalDDDSimulationConstant\n";
+ edm::LogError("FiberSim") << "FiberSD : Cannot find HcalSimulationConstants";
+ throw cms::Exception("Unknown", "FiberSD") << "Cannot find HcalSimulationConstants\n";
}
const HcalSimulationConstants* hsps = hdsc.product();
edm::ESHandle hdc;
@@ -54,7 +55,7 @@ FiberSD::~FiberSD() {
}
void FiberSD::Initialize(G4HCofThisEvent* HCE) {
- LogDebug("FiberSim") << "FiberSD : Initialize called for " << GetName();
+ edm::LogVerbatim("FiberSim") << "FiberSD : Initialize called for " << GetName();
theHC = new FiberG4HitsCollection(GetName(), collectionName[0]);
if (theHCID < 0)
theHCID = G4SDManager::GetSDMpointer()->GetCollectionID(collectionName[0]);
@@ -69,7 +70,7 @@ G4bool FiberSD::ProcessHits(G4Step* aStep, G4TouchableHistory*) {
if (!hits.empty()) {
std::vector thePE;
for (unsigned int i = 0; i < hits.size(); i++) {
- //std::cout<<"hit position z "<GetPosition().x(), preStepPoint->GetPosition().y(), preStepPoint->GetPosition().z());
- //std::cout<<"presteppoint position z "<GetPosition().z()<GetPosition().z();
FiberG4Hit* aHit = new FiberG4Hit(lv, detID, depth, trackID);
- std::cout << "hit size " << hits.size() << " npe" << aHit->npe() << std::endl;
- std::cout << "pre hit position " << aHit->hitPos() << std::endl;
+ edm::LogVerbatim("FiberSim") << "FiberSD :hit size " << hits.size() << " npe" << aHit->npe();
+ edm::LogVerbatim("FiberSim") << "FiberSD :pre hit position " << aHit->hitPos();
aHit->setNpe(hits.size());
aHit->setPos(theHitPos);
aHit->setTime(preStepPoint->GetGlobalTime());
aHit->setPhoton(thePE);
- std::cout << "ShowerPhoton position " << thePE[0].x() << " " << thePE[0].y() << " " << thePE[0].z() << std::endl;
+ edm::LogVerbatim("FiberSim") << "FiberSD :ShowerPhoton position " << thePE[0].x() << " " << thePE[0].y() << " "
+ << thePE[0].z();
- LogDebug("FiberSim") << "FiberSD: Hit created at " << lv->GetName() << " DetID: " << aHit->towerId()
- << " Depth: " << aHit->depth() << " Track ID: " << aHit->trackId()
- << " Nb. of Cerenkov Photons: " << aHit->npe() << " Time: " << aHit->time() << " at "
- << aHit->hitPos();
+ edm::LogVerbatim("FiberSim") << "FiberSD: Hit created at " << lv->GetName() << " DetID: " << aHit->towerId()
+ << " Depth: " << aHit->depth() << " Track ID: " << aHit->trackId()
+ << " Nb. of Cerenkov Photons: " << aHit->npe() << " Time: " << aHit->time() << " at "
+ << aHit->hitPos();
for (unsigned int i = 0; i < thePE.size(); i++)
- LogDebug("FiberSim") << "FiberSD: PE[" << i << "] " << thePE[i];
+ edm::LogVerbatim("FiberSim") << "FiberSD: PE[" << i << "] " << thePE[i];
theHC->insert(aHit);
}
@@ -106,9 +108,9 @@ G4bool FiberSD::ProcessHits(G4Step* aStep, G4TouchableHistory*) {
}
void FiberSD::EndOfEvent(G4HCofThisEvent* HCE) {
- LogDebug("FiberSim") << "FiberSD: Sees" << theHC->entries() << " hits";
+ edm::LogVerbatim("FiberSim") << "FiberSD: Sees" << theHC->entries() << " hits";
clear();
- std::cout << "theHC entries = " << theHC->entries() << std::endl;
+ edm::LogVerbatim("FiberSim") << "theHC entries = " << theHC->entries();
}
void FiberSD::clear() {}
diff --git a/SimG4CMS/ShowerLibraryProducer/src/HFChamberSD.cc b/SimG4CMS/ShowerLibraryProducer/src/HFChamberSD.cc
index 0bccbeaf163a0..f63d93e441c90 100644
--- a/SimG4CMS/ShowerLibraryProducer/src/HFChamberSD.cc
+++ b/SimG4CMS/ShowerLibraryProducer/src/HFChamberSD.cc
@@ -21,12 +21,14 @@ HFChamberSD::HFChamberSD(const std::string& name,
const SensitiveDetectorCatalog& clg,
edm::ParameterSet const& p,
const SimTrackManager* manager)
- : SensitiveCaloDetector(name, es, clg, p), m_trackManager(manager), theHCID(-1), theHC(nullptr), theNSteps(0) {}
+ : SensitiveCaloDetector(name, es, clg, p), m_trackManager(manager), theHCID(-1), theHC(nullptr), theNSteps(0) {
+ edm::LogVerbatim("FiberSim") << "HFChamberSD : Instantiated for " << name;
+}
HFChamberSD::~HFChamberSD() { delete theHC; }
void HFChamberSD::Initialize(G4HCofThisEvent* HCE) {
- LogDebug("FiberSim") << "HFChamberSD : Initialize called for " << GetName();
+ edm::LogVerbatim("FiberSim") << "HFChamberSD : Initialize called for " << GetName();
theHC = new HFShowerG4HitsCollection(GetName(), collectionName[0]);
if (theHCID < 0)
theHCID = G4SDManager::GetSDMpointer()->GetCollectionID(collectionName[0]);
@@ -60,16 +62,18 @@ G4bool HFChamberSD::ProcessHits(G4Step* aStep, G4TouchableHistory*) {
aHit->setGlobalPos(globalPos);
aHit->setPrimMomDir(momDir);
- LogDebug("FiberSim") << "HFChamberSD: Hit created in (" << touch->GetVolume(0)->GetLogicalVolume()->GetName() << ") "
- << " ID " << detID << " Track " << trackID << " Edep: " << edep / MeV << " MeV; Time: " << time
- << " ns; Position (local) " << localPos << " (global ) " << globalPos << " direction " << momDir;
+ edm::LogVerbatim("FiberSim") << "HFChamberSD: Hit created in (" << touch->GetVolume(0)->GetLogicalVolume()->GetName()
+ << ") "
+ << " ID " << detID << " Track " << trackID << " Edep: " << edep / MeV
+ << " MeV; Time: " << time << " ns; Position (local) " << localPos << " (global ) "
+ << globalPos << " direction " << momDir;
theHC->insert(aHit);
return true;
}
void HFChamberSD::EndOfEvent(G4HCofThisEvent* HCE) {
- LogDebug("FiberSim") << "HFChamberSD: Sees" << theHC->entries() << " hits";
+ edm::LogVerbatim("FiberSim") << "HFChamberSD: Sees" << theHC->entries() << " hits";
clear();
}
diff --git a/SimG4CMS/ShowerLibraryProducer/src/HFWedgeSD.cc b/SimG4CMS/ShowerLibraryProducer/src/HFWedgeSD.cc
index c54126e8e7c0d..b3373293b2399 100644
--- a/SimG4CMS/ShowerLibraryProducer/src/HFWedgeSD.cc
+++ b/SimG4CMS/ShowerLibraryProducer/src/HFWedgeSD.cc
@@ -21,16 +21,14 @@ HFWedgeSD::HFWedgeSD(const std::string& iname,
const SensitiveDetectorCatalog& clg,
edm::ParameterSet const& p,
const SimTrackManager* manager)
- : SensitiveCaloDetector(iname, es, clg, p),
- m_trackManager(manager),
- hcID(-1),
- theHC(nullptr),
- currentHit(nullptr) {}
+ : SensitiveCaloDetector(iname, es, clg, p), m_trackManager(manager), hcID(-1), theHC(nullptr), currentHit(nullptr) {
+ edm::LogVerbatim("FiberSim") << "HFWedgeSD : Instantiated for " << iname;
+}
HFWedgeSD::~HFWedgeSD() { delete theHC; }
void HFWedgeSD::Initialize(G4HCofThisEvent* HCE) {
- LogDebug("FiberSim") << "HFWedgeSD : Initialize called for " << GetName();
+ edm::LogVerbatim("FiberSim") << "HFWedgeSD : Initialize called for " << GetName();
theHC = new HFShowerG4HitsCollection(GetName(), collectionName[0]);
if (hcID < 0)
hcID = G4SDManager::GetSDMpointer()->GetCollectionID(collectionName[0]);
@@ -59,7 +57,7 @@ G4bool HFWedgeSD::ProcessHits(G4Step* aStep, G4TouchableHistory*) {
}
void HFWedgeSD::EndOfEvent(G4HCofThisEvent* HCE) {
- LogDebug("FiberSim") << "HFWedgeSD: Sees" << theHC->entries() << " hits";
+ edm::LogVerbatim("FiberSim") << "HFWedgeSD: Sees" << theHC->entries() << " hits";
clear();
}
@@ -86,9 +84,9 @@ G4bool HFWedgeSD::hitExists() {
}
HFShowerG4Hit* HFWedgeSD::createNewHit() {
- LogDebug("FiberSim") << "HFWedgeSD::CreateNewHit for ID " << currentID << " Track " << trackID
- << " Edep: " << edep / MeV << " MeV; Time: " << time << " ns; Position (local) " << localPos
- << " (global ) " << globalPos << " direction " << momDir;
+ edm::LogVerbatim("FiberSim") << "HFWedgeSD::CreateNewHit for ID " << currentID << " Track " << trackID
+ << " Edep: " << edep / MeV << " MeV; Time: " << time << " ns; Position (local) "
+ << localPos << " (global ) " << globalPos << " direction " << momDir;
HFShowerG4Hit* aHit = new HFShowerG4Hit;
aHit->setHitId(currentID);
aHit->setTrackId(trackID);
@@ -107,7 +105,8 @@ HFShowerG4Hit* HFWedgeSD::createNewHit() {
void HFWedgeSD::updateHit(HFShowerG4Hit* aHit) {
if (edep != 0) {
aHit->updateEnergy(edep);
- LogDebug("FiberSim") << "HFWedgeSD: Add energy deposit in " << currentID << " edep " << edep / MeV << " MeV";
+ edm::LogVerbatim("FiberSim") << "HFWedgeSD: Add energy deposit in " << currentID << " edep " << edep / MeV
+ << " MeV";
}
previousID = currentID;
}
diff --git a/SimG4CMS/ShowerLibraryProducer/src/HcalForwardAnalysis.cc b/SimG4CMS/ShowerLibraryProducer/src/HcalForwardAnalysis.cc
index 6a4eecc142442..7879308f23c41 100644
--- a/SimG4CMS/ShowerLibraryProducer/src/HcalForwardAnalysis.cc
+++ b/SimG4CMS/ShowerLibraryProducer/src/HcalForwardAnalysis.cc
@@ -52,7 +52,7 @@ HcalForwardAnalysis::~HcalForwardAnalysis() {}
void HcalForwardAnalysis::produce(edm::Event& iEvent, const edm::EventSetup&) {
//std::auto_ptr product(new HFShowerPhotonCollection);
- //edm::LogInfo("HcalForwardLib") << "HcalForwardAnalysis: =====> Filling event";
+ //edm::LogVerbatim("HcalForwardLib") << "HcalForwardAnalysis: =====> Filling event";
//fillEvent(*product);
//iEvent.put(product);
//std::auto_ptr product(new PHcalForwardLibInfo);
@@ -86,13 +86,13 @@ void HcalForwardAnalysis::init() {
void HcalForwardAnalysis::update(const BeginOfRun* run) {
int irun = (*run)()->GetRunID();
- edm::LogInfo("HcalForwardLib") << " =====> Begin of Run = " << irun;
+ edm::LogVerbatim("HcalForwardLib") << " =====> Begin of Run = " << irun;
}
void HcalForwardAnalysis::update(const BeginOfEvent* evt) {
evNum = (*evt)()->GetEventID();
clear();
- edm::LogInfo("HcalForwardLib") << "HcalForwardAnalysis: =====> Begin of event = " << evNum;
+ edm::LogVerbatim("HcalForwardLib") << "HcalForwardAnalysis: =====> Begin of event = " << evNum;
}
void HcalForwardAnalysis::update(const G4Step* aStep) {}
@@ -101,18 +101,18 @@ void HcalForwardAnalysis::update(const EndOfEvent* evt) {
count++;
//fill the buffer
- LogDebug("HcalForwardLib") << "HcalForwardAnalysis::Fill event " << (*evt)()->GetEventID();
+ edm::LogVerbatim("HcalForwardLib") << "HcalForwardAnalysis::Fill event " << (*evt)()->GetEventID();
setPhotons(evt);
int iEvt = (*evt)()->GetEventID();
if (iEvt < 10)
- edm::LogInfo("HcalForwardLib") << "HcalForwardAnalysis:: Event " << iEvt;
+ edm::LogVerbatim("HcalForwardLib") << "HcalForwardAnalysis:: Event " << iEvt;
else if ((iEvt < 100) && (iEvt % 10 == 0))
- edm::LogInfo("HcalForwardLib") << "HcalForwardAnalysis:: Event " << iEvt;
+ edm::LogVerbatim("HcalForwardLib") << "HcalForwardAnalysis:: Event " << iEvt;
else if ((iEvt < 1000) && (iEvt % 100 == 0))
- edm::LogInfo("HcalForwardLib") << "HcalForwardAnalysis:: Event " << iEvt;
+ edm::LogVerbatim("HcalForwardLib") << "HcalForwardAnalysis:: Event " << iEvt;
else if ((iEvt < 10000) && (iEvt % 1000 == 0))
- edm::LogInfo("HcalForwardLib") << "HcalForwardAnalysis:: Event " << iEvt;
+ edm::LogVerbatim("HcalForwardLib") << "HcalForwardAnalysis:: Event " << iEvt;
}
void HcalForwardAnalysis::setPhotons(const EndOfEvent* evt) {
@@ -123,19 +123,19 @@ void HcalForwardAnalysis::setPhotons(const EndOfEvent* evt) {
std::string sdName = theNames[0]; //name for fiber hits
idHC = G4SDManager::GetSDMpointer()->GetCollectionID(sdName);
theHC = (FiberG4HitsCollection*)allHC->GetHC(idHC);
- LogDebug("HcalForwardLib") << "HcalForwardAnalysis::setPhotons() Hit Collection for " << sdName << " of ID " << idHC
- << " is obtained at " << theHC;
+ edm::LogVerbatim("HcalForwardLib") << "HcalForwardAnalysis::setPhotons() Hit Collection for " << sdName << " of ID "
+ << idHC << " is obtained at " << theHC;
std::vector ShortFiberPhotons;
std::vector LongFiberPhotons;
LongFiberPhotons.clear();
ShortFiberPhotons.clear();
- int thehc_entries = theHC->entries();
if (idHC >= 0 && theHC != nullptr) {
- std::cout << "FiberhitSize " << thehc_entries << std::endl;
+ int thehc_entries = theHC->entries();
+ edm::LogVerbatim("HcalForwardLib") << "FiberhitSize " << thehc_entries;
for (j = 0; j < thehc_entries; j++) {
FiberG4Hit* aHit = (*theHC)[j];
std::vector thePhotonsFromHit = aHit->photon();
- std::cout << "Fiberhit " << j << " has " << thePhotonsFromHit.size() << " photons." << std::endl;
+ edm::LogVerbatim("HcalForwardLib") << "Fiberhit " << j << " has " << thePhotonsFromHit.size() << " photons.";
int fTowerId = -1;
int fCellId = -1;
int fFiberId = -1;
@@ -146,18 +146,18 @@ void HcalForwardAnalysis::setPhotons(const EndOfEvent* evt) {
if (aHit->depth() == 2)
ShortFiberPhotons.push_back(thePhotonsFromHit[iph]);
}
- LogDebug("HcalForwardLib") << "HcalForwardAnalysis::setPhotons() NbPhotons " << thePhotonsFromHit.size()
- << " towerId " << fTowerId << " cellId " << fCellId << " fiberId " << fFiberId
- << " depth " << aHit->depth();
+ edm::LogVerbatim("HcalForwardLib") << "HcalForwardAnalysis::setPhotons() NbPhotons " << thePhotonsFromHit.size()
+ << " towerId " << fTowerId << " cellId " << fCellId << " fiberId " << fFiberId
+ << " depth " << aHit->depth();
}
} else {
- LogDebug("HcalForwardLib") << "HcalForwardAnalysis::setPhotons(): No Photons!";
+ edm::LogVerbatim("HcalForwardLib") << "HcalForwardAnalysis::setPhotons(): No Photons!";
return;
}
- LogDebug("HcalForwardLib") << "HcalForwardAnalysis::setPhotons() LongFibPhotons: " << LongFiberPhotons.size()
- << " ShortFibPhotons: " << ShortFiberPhotons.size();
- std::cout << "HcalForwardAnalysis::setPhotons() LongFibPhotons: " << LongFiberPhotons.size()
- << " ShortFibPhotons: " << ShortFiberPhotons.size() << std::endl;
+ edm::LogVerbatim("HcalForwardLib") << "HcalForwardAnalysis::setPhotons() LongFibPhotons: " << LongFiberPhotons.size()
+ << " ShortFibPhotons: " << ShortFiberPhotons.size();
+ edm::LogVerbatim("HcalForwardLib") << "HcalForwardAnalysis::setPhotons() LongFibPhotons: " << LongFiberPhotons.size()
+ << " ShortFibPhotons: " << ShortFiberPhotons.size();
//Chamber hits to find information about primary particle on surface
HFShowerG4HitsCollection* theChamberHC;
@@ -172,19 +172,20 @@ void HcalForwardAnalysis::setPhotons(const EndOfEvent* evt) {
// (in newer Geant4 versions) and as a result primary particle may have
// multiple hits. We want to take last one which is close the HF absorber
if (idHC >= 0 && theChamberHC != nullptr) {
- LogDebug("HcalForwardLib") << "HcalForwardAnalysis::setPhotons() Chamber Hits size: " << theChamberHC->entries();
+ edm::LogVerbatim("HcalForwardLib") << "HcalForwardAnalysis::setPhotons() Chamber Hits size: "
+ << theChamberHC->entries();
int thec_hc_entries = theChamberHC->entries();
for (j = 0; j < thec_hc_entries; ++j) {
HFShowerG4Hit* aHit = (*theChamberHC)[j];
- LogDebug("HcalForwardLib") << "HcalForwardAnalysis::setPhotons() Chamber Hit id " << aHit->hitId() << " track id "
- << aHit->trackId() << " prim. pos. " << aHit->globalPosition() << " prom mom. dir. "
- << aHit->primaryMomDir() << " time " << aHit->time();
+ edm::LogVerbatim("HcalForwardLib") << "HcalForwardAnalysis::setPhotons() Chamber Hit id " << aHit->hitId()
+ << " track id " << aHit->trackId() << " prim. pos. " << aHit->globalPosition()
+ << " prom mom. dir. " << aHit->primaryMomDir() << " time " << aHit->time();
primPosOnSurf.SetXYZ(aHit->globalPosition().x(), aHit->globalPosition().y(), aHit->globalPosition().z());
primMomDirOnSurf.SetXYZ(aHit->primaryMomDir().x(), aHit->primaryMomDir().y(), aHit->primaryMomDir().z());
primTimeOnSurf = aHit->time();
}
} else {
- LogDebug("HcalForwardLib") << "HcalForwardAnalysis::setPhotons(): No Chamber hits. Something is wrong!";
+ edm::LogVerbatim("HcalForwardLib") << "HcalForwardAnalysis::setPhotons(): No Chamber hits. Something is wrong!";
return;
}
primX = primPosOnSurf.x();
@@ -226,7 +227,7 @@ void HcalForwardAnalysis::setPhotons(const EndOfEvent* evt) {
}
void HcalForwardAnalysis::fillEvent() {
/*
- edm::LogInfo("HcalForwardLib") << "HcalForwardAnalysis: =====> filledEvent";
+ edm::LogVerbatim("HcalForwardLib") << "HcalForwardAnalysis: =====> filledEvent";
*/
nphot = int(thePhotons.size());
for (int i = 0; i < nphot; ++i) {
diff --git a/SimG4CMS/ShowerLibraryProducer/test/python/runHFShower.py b/SimG4CMS/ShowerLibraryProducer/test/python/runHFShower.py
index e326c72392ce9..922b2098e0eff 100644
--- a/SimG4CMS/ShowerLibraryProducer/test/python/runHFShower.py
+++ b/SimG4CMS/ShowerLibraryProducer/test/python/runHFShower.py
@@ -30,6 +30,7 @@
process.load('FWCore.MessageService.MessageLogger_cfi')
if hasattr(process,'MessageLogger'):
process.MessageLogger.FiberSim=dict()
+ process.MessageLogger.HcalSim=dict()
process.MessageLogger.HFShower=dict()
process.MessageLogger.HcalForwardLib=dict()
diff --git a/SimG4CMS/ShowerLibraryProducer/test/python/runHFShowerTMP_cfg2.py b/SimG4CMS/ShowerLibraryProducer/test/python/runHFShowerTMP_cfg.py
similarity index 79%
rename from SimG4CMS/ShowerLibraryProducer/test/python/runHFShowerTMP_cfg2.py
rename to SimG4CMS/ShowerLibraryProducer/test/python/runHFShowerTMP_cfg.py
index 45657cf98bcca..feecb6e790598 100644
--- a/SimG4CMS/ShowerLibraryProducer/test/python/runHFShowerTMP_cfg2.py
+++ b/SimG4CMS/ShowerLibraryProducer/test/python/runHFShowerTMP_cfg.py
@@ -2,13 +2,14 @@
process = cms.Process("HFShowerLib")
process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
-process.load("IOMC.EventVertexGenerators.VtxSmearedGauss_cfi")
#process.load("Geometry.HcalCommonData.hcalforwardshowerLong_cfi")
process.load("SimG4CMS.ShowerLibraryProducer.hcalforwardshower_cfi")
process.load("Geometry.HcalCommonData.hcalDDDSimConstants_cff")
-process.load("SimG4Core.Application.g4SimHits_cfi")
-process.load("Configuration.StandardSequences.Services_cff")
+process.load("IOMC.EventVertexGenerators.VtxSmearedGauss_cfi")
+process.load('Configuration.StandardSequences.Generator_cff')
+process.load('Configuration.StandardSequences.SimIdeal_cff')
process.load("Configuration.StandardSequences.MagneticField_cff")
+process.load("Configuration.StandardSequences.Services_cff")
process.load("FWCore.MessageLogger.MessageLogger_cfi")
if 'MessageLogger' in process.__dict__:
@@ -17,11 +18,11 @@
process.MessageLogger.HFShower=dict()
process.MessageLogger.HcalForwardLib=dict()
+process.RandomNumberGeneratorService.generator.initialSeed = 12345
-process.load("IOMC.RandomEngine.IOMC_cff")
-process.RandomNumberGeneratorService.generator.initialSeed = 456789
-process.RandomNumberGeneratorService.g4SimHits.initialSeed = 9876
-process.RandomNumberGeneratorService.VtxSmeared.initialSeed = 123456789
+from IOMC.RandomEngine.RandomServiceHelper import RandomNumberServiceHelper
+randSvc = RandomNumberServiceHelper(process.RandomNumberGeneratorService)
+randSvc.populate()
process.Timing = cms.Service("Timing")
@@ -56,7 +57,17 @@
fileName = cms.string('hfShowerLibSimu_extended2_50GeVElec_deneme.root')
)
-process.p1 = cms.Path(cms.SequencePlaceholder("randomEngineStateProducer")+process.generator*process.VtxSmeared*process.g4SimHits)
+# for GEN produced since 760pre6, for older GEN - just "":
+process.VtxSmeared.src = cms.InputTag("generator", "unsmeared")
+process.generatorSmeared = cms.EDProducer("GeneratorSmearedProducer")
+process.g4SimHits.Generator.HepMCProductLabel = cms.InputTag('VtxSmeared')
+
+process.p1 = cms.Path(
+ process.generator *
+ process.VtxSmeared *
+ process.generatorSmeared *
+ process.g4SimHits
+)
process.outpath = cms.EndPath(process.o1)
process.g4SimHits.HCalSD.UseShowerLibrary = True