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

Phase2-TB76A Enable the TB script to produce meaningful results #43071

Merged
merged 2 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions SimG4CMS/HGCalTestBeam/plugins/HGCalTB23Analyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
class HGCalTB23Analyzer : public edm::one::EDAnalyzer<edm::one::WatchRuns, edm::one::SharedResources> {
public:
explicit HGCalTB23Analyzer(edm::ParameterSet const&);
~HGCalTB23Analyzer() override;
~HGCalTB23Analyzer() override = default;

static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);

Expand Down Expand Up @@ -217,8 +217,6 @@ HGCalTB23Analyzer::HGCalTB23Analyzer(const edm::ParameterSet& iConfig)
#endif
}

HGCalTB23Analyzer::~HGCalTB23Analyzer() {}

void HGCalTB23Analyzer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
desc.add<std::string>("detectorEE", "HGCalEESensitive");
Expand Down Expand Up @@ -737,7 +735,7 @@ void HGCalTB23Analyzer::analyzeSimHits(int type, std::vector<PCaloHit>& hits, do
}

if (type < 2) { //store only for EE and FH
edm::LogVerbatim("HGCSim") << "HGCalTAnalyzer:: " << map_hitWafer.size() << " wafers are hit in type " << type;
edm::LogVerbatim("HGCSim") << "HGCalTB23Analyzer:: " << map_hitWafer.size() << " wafers are hit in type " << type;
for (auto itr = map_hitWafer.begin(); itr != map_hitWafer.end(); ++itr)
edm::LogVerbatim("HGCSim") << "Wafer: " << itr->first << " Deposited Energy " << itr->second;
///now sort the vector of each cell hits
Expand Down
3 changes: 2 additions & 1 deletion SimG4CMS/HGCalTestBeam/test/HGCalTB230FEB_cfg.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import FWCore.ParameterSet.Config as cms
from Configuration.Eras.Modifier_hgcaltb_cff import hgcaltb

process = cms.Process('SIM')
process = cms.Process('SIM', hgcaltb)

# import of standard configurations
process.load("FWCore.MessageService.MessageLogger_cfi")
Expand Down
27 changes: 21 additions & 6 deletions SimG4CMS/HGCalTestBeam/test/HGCalTB230Jul_cfg.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import FWCore.ParameterSet.Config as cms
from Configuration.Eras.Modifier_hgcaltb_cff import hgcaltb

process = cms.Process('SIM')
process = cms.Process('SIM', hgcaltb)

# import of standard configurations
process.load("FWCore.MessageService.MessageLogger_cfi")
Expand All @@ -25,10 +26,12 @@
)

if 'MessageLogger' in process.__dict__:
process.MessageLogger.G4cerr=dict()
process.MessageLogger.G4cout=dict()
process.MessageLogger.HGCSim=dict()
process.MessageLogger.CaloSim=dict()
process.MessageLogger.FlatThetaGun=dict()
# process.MessageLogger.FlatEvtVtx=dict()
process.MessageLogger.FlatEvtVtx=dict()

# Input source
process.source = cms.Source("EmptySource")
Expand Down Expand Up @@ -72,8 +75,8 @@
process.generator = cms.EDProducer("FlatRandomEThetaGunProducer",
AddAntiParticle = cms.bool(False),
PGunParameters = cms.PSet(
MinE = cms.double(9.99),
MaxE = cms.double(10.01),
MinE = cms.double(99.99),
MaxE = cms.double(100.01),
MinTheta = cms.double(0.0),
MaxTheta = cms.double(0.0),
MinPhi = cms.double(-3.14159265359),
Expand All @@ -84,8 +87,8 @@
firstRun = cms.untracked.uint32(1),
psethack = cms.string('single electron E 10')
)
process.VtxSmeared.MinZ = 0.0
process.VtxSmeared.MaxZ = 0.0
process.VtxSmeared.MinZ = -100.0
process.VtxSmeared.MaxZ = -100.0
#process.VtxSmeared.MinX = -1.0
#process.VtxSmeared.MaxX = 1.0
#process.VtxSmeared.MinY = -1.0
Expand All @@ -95,6 +98,18 @@
process.g4SimHits.HGCSD.RejectMouseBite = False
process.g4SimHits.HGCSD.RotatedWafer = False

process.g4SimHits.CaloTrkProcessing.TestBeam = True
process.g4SimHits.HCalSD.ForTBHCAL = True
process.g4SimHits.NonBeamEvent = True
process.g4SimHits.UseMagneticField = False

process.g4SimHits.EventVerbose = 2
process.g4SimHits.SteppingVerbosity = 2
process.g4SimHits.StepVerboseThreshold= 0.1
process.g4SimHits.VerboseEvents = [1]
process.g4SimHits.VertexNumber = []
process.g4SimHits.VerboseTracks =[]

# Path and EndPath definitions
process.generation_step = cms.Path(process.pgen)
process.simulation_step = cms.Path(process.psim)
Expand Down