Skip to content

Commit 99f2750

Browse files
authored
Merge pull request cms-sw#42718 from bsunanda/Phase2-tb75
Phase2-tb75 Enable the analysis code for HGCal TB for 6-inch wafer to run properly
2 parents 4df8e52 + 7cce3cc commit 99f2750

File tree

7 files changed

+28
-29
lines changed

7 files changed

+28
-29
lines changed

SimG4CMS/Calo/src/HGCSD.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,8 @@ uint32_t HGCSD::setDetUnitId(const G4Step* aStep) {
197197
#endif
198198
G4ThreeVector local =
199199
((moduleLev >= 0) ? (touch->GetHistory()->GetTransform(moduleLev).TransformPoint(hitPoint)) : G4ThreeVector());
200-
/*
201200
if (mouseBite_->exclude(local, z, layer, wafer, 0))
202201
id = 0;
203-
*/
204202
}
205203
return id;
206204
}
@@ -213,10 +211,8 @@ void HGCSD::update(const BeginOfJob* job) {
213211
if (dd4hep_)
214212
++levelT_;
215213
numberingScheme_ = std::make_unique<HGCNumberingScheme>(*hgcons_, nameX_);
216-
/*
217214
if (rejectMB_)
218215
mouseBite_ = std::make_unique<HGCMouseBite>(*hgcons_, angles_, mouseBiteCut_, waferRot_);
219-
*/
220216
} else {
221217
edm::LogError("HGCSim") << "HGCSD : Cannot find HGCalTBDDDConstants for " << nameX_;
222218
throw cms::Exception("Unknown", "HGCSD") << "Cannot find HGCalTBDDDConstants for " << nameX_ << "\n";

SimG4CMS/HGCalTestBeam/plugins/HGCalTBAnalyzer.cc

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
#include "FWCore/ServiceRegistry/interface/Service.h"
2525
#include "FWCore/Utilities/interface/InputTag.h"
2626

27-
#include "Geometry/HGCalCommonData/interface/HGCalDDDConstants.h"
28-
#include "Geometry/HGCalGeometry/interface/HGCalGeometry.h"
27+
#include "Geometry/HGCalTBCommonData/interface/HGCalTBDDDConstants.h"
28+
#include "Geometry/HGCalGeometry/interface/HGCalTBGeometry.h"
2929
#include "Geometry/Records/interface/CaloGeometryRecord.h"
3030
#include "Geometry/Records/interface/HcalRecNumberingRecord.h"
3131
#include "Geometry/Records/interface/IdealGeometryRecord.h"
@@ -74,8 +74,8 @@ class HGCalTBAnalyzer : public edm::one::EDAnalyzer<edm::one::WatchRuns, edm::on
7474

7575
edm::Service<TFileService> fs_;
7676
std::unique_ptr<AHCalGeometry> ahcalGeom_;
77-
const HGCalDDDConstants* hgcons_[2];
78-
const HGCalGeometry* hgeom_[2];
77+
const HGCalTBDDDConstants* hgcons_[2];
78+
const HGCalTBGeometry* hgeom_[2];
7979
const bool ifEE_, ifFH_, ifBH_, ifBeam_;
8080
const bool doSimHits_, doDigis_, doRecHits_;
8181
const bool doTree_, doTreeCell_;
@@ -102,10 +102,10 @@ class HGCalTBAnalyzer : public edm::one::EDAnalyzer<edm::one::WatchRuns, edm::on
102102
const edm::EDGetTokenT<HGCRecHitCollection> tok_hitrEE_, tok_hitrFH_, tok_hitrBH_;
103103
const edm::EDGetTokenT<edm::PassiveHitContainer> tok_hgcPHEE_, tok_hgcPHFH_;
104104
const edm::EDGetTokenT<edm::PassiveHitContainer> tok_hgcPHBH_, tok_hgcPHCMSE_, tok_hgcPHBeam_;
105-
const edm::ESGetToken<HGCalDDDConstants, IdealGeometryRecord> tokDDDEE_;
106-
const edm::ESGetToken<HGCalGeometry, IdealGeometryRecord> tokGeomEE_;
107-
const edm::ESGetToken<HGCalDDDConstants, IdealGeometryRecord> tokDDDFH_;
108-
const edm::ESGetToken<HGCalGeometry, IdealGeometryRecord> tokGeomFH_;
105+
const edm::ESGetToken<HGCalTBDDDConstants, IdealGeometryRecord> tokDDDEE_;
106+
const edm::ESGetToken<HGCalTBGeometry, IdealGeometryRecord> tokGeomEE_;
107+
const edm::ESGetToken<HGCalTBDDDConstants, IdealGeometryRecord> tokDDDFH_;
108+
const edm::ESGetToken<HGCalTBGeometry, IdealGeometryRecord> tokGeomFH_;
109109

110110
TTree* tree_;
111111
TH1D *hSimHitE_[4], *hSimHitT_[4];
@@ -209,14 +209,14 @@ HGCalTBAnalyzer::HGCalTBAnalyzer(const edm::ParameterSet& iConfig)
209209
tok_hgcPHBH_(consumes<edm::PassiveHitContainer>(labelPassiveBH_)),
210210
tok_hgcPHCMSE_(consumes<edm::PassiveHitContainer>(labelPassiveCMSE_)),
211211
tok_hgcPHBeam_(consumes<edm::PassiveHitContainer>(labelPassiveBeam_)),
212-
tokDDDEE_(esConsumes<HGCalDDDConstants, IdealGeometryRecord, edm::Transition::BeginRun>(
212+
tokDDDEE_(esConsumes<HGCalTBDDDConstants, IdealGeometryRecord, edm::Transition::BeginRun>(
213213
edm::ESInputTag("", detectorEE_))),
214-
tokGeomEE_(
215-
esConsumes<HGCalGeometry, IdealGeometryRecord, edm::Transition::BeginRun>(edm::ESInputTag("", detectorEE_))),
216-
tokDDDFH_(esConsumes<HGCalDDDConstants, IdealGeometryRecord, edm::Transition::BeginRun>(
214+
tokGeomEE_(esConsumes<HGCalTBGeometry, IdealGeometryRecord, edm::Transition::BeginRun>(
215+
edm::ESInputTag("", detectorEE_))),
216+
tokDDDFH_(esConsumes<HGCalTBDDDConstants, IdealGeometryRecord, edm::Transition::BeginRun>(
217217
edm::ESInputTag("", detectorFH_))),
218-
tokGeomFH_(
219-
esConsumes<HGCalGeometry, IdealGeometryRecord, edm::Transition::BeginRun>(edm::ESInputTag("", detectorFH_))) {
218+
tokGeomFH_(esConsumes<HGCalTBGeometry, IdealGeometryRecord, edm::Transition::BeginRun>(
219+
edm::ESInputTag("", detectorFH_))) {
220220
usesResource("TFileService");
221221
ahcalGeom_ = std::make_unique<AHCalGeometry>(iConfig);
222222

@@ -907,7 +907,7 @@ void HGCalTBAnalyzer::analyzeSimHits(int type, std::vector<PCaloHit>& hits, doub
907907
///id: reco and ID[id]: sim ID
908908
wafer = HGCalDetId(ID[id]).wafer();
909909
double layer = HGCalDetId(id).layer();
910-
double thickness = hgcons_[type]->cellThickness(layer, wafer, 0);
910+
double thickness = hgcons_[type]->cellThickness(layer, wafer);
911911
if (debug)
912912
edm::LogVerbatim("HGCSim") << "wafer is : depth (reco) " << wafer << " " << Depth[id]
913913
<< "\ntype : layer : wafer thickness " << type << " " << layer << " " << thickness

SimG4CMS/HGCalTestBeam/plugins/HGCalTimingAnalyzer.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
#include "FWCore/ServiceRegistry/interface/Service.h"
2323
#include "FWCore/Utilities/interface/InputTag.h"
2424

25-
#include "Geometry/HGCalCommonData/interface/HGCalDDDConstants.h"
26-
#include "Geometry/HGCalGeometry/interface/HGCalGeometry.h"
25+
#include "Geometry/HGCalTBCommonData/interface/HGCalTBDDDConstants.h"
26+
#include "Geometry/HGCalGeometry/interface/HGCalTBGeometry.h"
2727
#include "Geometry/Records/interface/CaloGeometryRecord.h"
2828
#include "Geometry/Records/interface/HcalRecNumberingRecord.h"
2929
#include "Geometry/Records/interface/IdealGeometryRecord.h"
@@ -64,8 +64,8 @@ class HGCalTimingAnalyzer : public edm::one::EDAnalyzer<edm::one::WatchRuns, edm
6464
const double timeUnit_;
6565
const bool doTree_;
6666
const std::vector<int> idBeams_;
67-
const edm::ESGetToken<HGCalDDDConstants, IdealGeometryRecord> tokDDD_;
68-
const HGCalDDDConstants* hgcons_;
67+
const edm::ESGetToken<HGCalTBDDDConstants, IdealGeometryRecord> tokDDD_;
68+
const HGCalTBDDDConstants* hgcons_;
6969
const edm::InputTag labelGen_;
7070
const std::string labelHitEE_, labelHitBeam_;
7171
const edm::EDGetTokenT<edm::HepMCProduct> tok_hepMC_;
@@ -88,7 +88,7 @@ HGCalTimingAnalyzer::HGCalTimingAnalyzer(const edm::ParameterSet& iConfig)
8888
idBeams_((iConfig.getParameter<std::vector<int>>("IDBeams")).empty()
8989
? idBeamDef_
9090
: (iConfig.getParameter<std::vector<int>>("IDBeams"))),
91-
tokDDD_(esConsumes<HGCalDDDConstants, IdealGeometryRecord, edm::Transition::BeginRun>(
91+
tokDDD_(esConsumes<HGCalTBDDDConstants, IdealGeometryRecord, edm::Transition::BeginRun>(
9292
edm::ESInputTag("", detectorEE_))),
9393
labelGen_(iConfig.getParameter<edm::InputTag>("GeneratorSrc")),
9494
labelHitEE_(iConfig.getParameter<std::string>("CaloHitSrcEE")),

SimG4CMS/HGCalTestBeam/test/HGCalTBCERN181Oct1_cfg.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
process.load('Geometry.HGCalTBCommonData.hgcalTBNumberingInitialization_cfi')
1414
process.load('Geometry.HGCalTBCommonData.hgcalTBParametersInitialization_cfi')
1515
process.load('Geometry.HcalTestBeamData.hcalTB06Parameters_cff')
16+
process.load('Geometry.CaloEventSetup.HGCalTBTopology_cfi')
17+
process.load('Geometry.HGCalGeometry.HGCalTBGeometryESProducer_cfi')
1618
process.load('Configuration.StandardSequences.MagneticField_0T_cff')
1719
process.load('Configuration.StandardSequences.Generator_cff')
1820
process.load('IOMC.EventVertexGenerators.VtxSmearedFlat_cfi')
@@ -137,7 +139,7 @@
137139
process.genfiltersummary_step,
138140
process.simulation_step,
139141
process.gunfilter_step,
140-
# process.analysis_step,
142+
process.analysis_step,
141143
process.endjob_step,
142144
process.FEVTDEBUGoutput_step
143145
)

SimG4CMS/HGCalTestBeam/test/HGCalTBGenSimDigiReco_cfg.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
process.load('Geometry.HGCalTBCommonData.hgcalTBNumberingInitialization_cfi')
1414
process.load('Geometry.HGCalTBCommonData.hgcalTBParametersInitialization_cfi')
1515
process.load('Geometry.HcalTestBeamData.hcalTB06Parameters_cff')
16-
process.load('Geometry.HGCalGeometry.HGCalGeometryESProducer_cfi')
16+
process.load('Geometry.CaloEventSetup.HGCalTBTopology_cfi')
17+
process.load('Geometry.HGCalGeometry.HGCalTBGeometryESProducer_cfi')
1718
process.load('Configuration.StandardSequences.MagneticField_0T_cff')
1819
process.load('Configuration.StandardSequences.Generator_cff')
1920
process.load('GeneratorInterface.Core.generatorSmeared_cfi')

SimG4CMS/HGCalTestBeam/test/HGCalTBGenSimDigi_cfg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
process.load('Geometry.HGCalTBCommonData.hgcalTBNumberingInitialization_cfi')
1414
process.load('Geometry.HGCalTBCommonData.hgcalTBParametersInitialization_cfi')
1515
process.load('Geometry.HcalTestBeamData.hcalTB06Parameters_cff')
16-
process.load('Geometry.CaloEventSetup.HGCalTopology_cfi')
17-
process.load('Geometry.HGCalGeometry.HGCalGeometryESProducer_cfi')
16+
process.load('Geometry.CaloEventSetup.HGCalTBTopology_cfi')
17+
process.load('Geometry.HGCalGeometry.HGCalTBGeometryESProducer_cfi')
1818
process.load('Configuration.StandardSequences.MagneticField_0T_cff')
1919
process.load('Configuration.StandardSequences.Generator_cff')
2020
process.load('GeneratorInterface.Core.generatorSmeared_cfi')

SimG4CMS/HGCalTestBeam/test/runTBAnalCERN181Oct1_cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
process.load('Geometry.HcalTestBeamData.hcalTB06Parameters_cff')
1313
process.load('Geometry.HcalCommonData.caloSimulationParameters_cff')
1414
process.load('Geometry.CaloEventSetup.HGCalTopology_cfi')
15-
process.load('Geometry.HGCalGeometry.HGCalGeometryESProducer_cfi')
15+
process.load('Geometry.HGCalGeometry.HGCalTBGeometryESProducer_cfi')
1616
process.load('Configuration.StandardSequences.MagneticField_0T_cff')
1717
process.load('Configuration.StandardSequences.EndOfProcess_cff')
1818
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')

0 commit comments

Comments
 (0)