Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4908 from bsunanda/Phase2-hgx22
Phase2-hgx22
- Loading branch information
Showing
12 changed files
with
303 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<use name="FWCore/Framework"/> | ||
<use name="FWCore/ParameterSet"/> | ||
<use name="FWCore/Utilities"/> | ||
<use name="SimGeneral/MixingModule"/> | ||
<use name="SimCalorimetry/HGCSimProducers"/> | ||
<use name="DataFormats/ForwardDetId"/> | ||
<use name="DataFormats/HGCDigi"/> | ||
<use name="Geometry/Records"/> | ||
<use name="Geometry/FCalGeometry"/> | ||
<use name="hepmc"/> | ||
<use name="CLHEP"/> | ||
<flags EDM_PLUGIN="1"/> | ||
<library file="HGCalDigiTester.cc" name="testSimCalorimetryHCCalDigi"> </library> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
#include <iostream> | ||
#include <string> | ||
#include <vector> | ||
|
||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
#include "FWCore/Framework/interface/Frameworkfwd.h" | ||
#include "FWCore/Framework/interface/EDAnalyzer.h" | ||
|
||
#include "FWCore/Framework/interface/Event.h" | ||
#include "FWCore/Framework/interface/EventSetup.h" | ||
#include "FWCore/Framework/interface/ESTransientHandle.h" | ||
#include "FWCore/Framework/interface/ESHandle.h" | ||
#include "FWCore/Framework/interface/MakerMacros.h" | ||
|
||
#include "Geometry/Records/interface/IdealGeometryRecord.h" | ||
#include "Geometry/FCalGeometry/interface/HGCalGeometry.h" | ||
#include "DataFormats/HGCDigi/interface/HGCDigiCollections.h" | ||
#include "DataFormats/ForwardDetId/interface/HGCEEDetId.h" | ||
#include "DataFormats/ForwardDetId/interface/HGCHEDetId.h" | ||
#include "DataFormats/ForwardDetId/interface/ForwardSubdetector.h" | ||
|
||
class HGCalDigiTester : public edm::EDAnalyzer { | ||
public: | ||
explicit HGCalDigiTester(const edm::ParameterSet& ); | ||
~HGCalDigiTester(); | ||
|
||
|
||
virtual void analyze(const edm::Event&, const edm::EventSetup& ); | ||
|
||
private: | ||
// ----------member data --------------------------- | ||
}; | ||
|
||
HGCalDigiTester::HGCalDigiTester(const edm::ParameterSet& ) {} | ||
|
||
|
||
HGCalDigiTester::~HGCalDigiTester() {} | ||
|
||
void HGCalDigiTester::analyze(const edm::Event& iEvent, | ||
const edm::EventSetup& iSetup ) { | ||
|
||
std::string name; | ||
edm::ESHandle<HGCalGeometry> geom; | ||
|
||
name = "HGCalEESensitive"; | ||
iSetup.get<IdealGeometryRecord>().get(name,geom); | ||
if (geom.isValid()) { | ||
edm::Handle<HGCEEDigiCollection> digis; | ||
iEvent.getByLabel(edm::InputTag("mix","HGCDigisEE"),digis); | ||
if (digis.isValid()) { | ||
std::cout << "HGCEE with " << (*digis).size() << " elements" | ||
<< std::endl; | ||
for (unsigned int k=0; k < (*digis).size(); ++k) { | ||
HGCEEDetId id = (*digis)[k].id(); | ||
GlobalPoint global = (*geom).getPosition(id); | ||
HGCEEDetId idc = (HGCEEDetId)((*geom).getClosestCell(global)); | ||
std::cout << "HGCalDigiTester:ID " << id << " global (" << global.x() | ||
<< ", " << global.y() << ", " << global.z() << ") new ID " | ||
<< idc << std::endl; | ||
} | ||
} else { | ||
std::cout << "No valid collection for HGCEE" << std::endl; | ||
} | ||
} else { | ||
std::cout << "Cannot get valid HGCalGeometry Object for " << name | ||
<< std::endl; | ||
} | ||
|
||
name = "HGCalHESiliconSensitive"; | ||
iSetup.get<IdealGeometryRecord>().get(name,geom); | ||
if (geom.isValid()) { | ||
edm::Handle<HGCHEDigiCollection> digis; | ||
iEvent.getByLabel(edm::InputTag("mix","HGCDigisHEfront"),digis); | ||
if (digis.isValid()) { | ||
std::cout << "HGCHEfront with " << (*digis).size() << " elements" | ||
<< std::endl; | ||
for (unsigned int k=0; k < (*digis).size(); ++k) { | ||
HGCHEDetId id = (*digis)[k].id(); | ||
GlobalPoint global = (*geom).getPosition(id); | ||
HGCHEDetId idc = (HGCHEDetId)((*geom).getClosestCell(global)); | ||
std::cout << "HGCalDigiTester:ID " << id << " global (" << global.x() | ||
<< ", " << global.y() << ", " << global.z() << ") new ID " | ||
<< idc << std::endl; | ||
} | ||
} else { | ||
std::cout << "No valid collection for HGCHEfront" << std::endl; | ||
} | ||
} else { | ||
std::cout << "Cannot get valid HGCalGeometry Object for " << name | ||
<< std::endl; | ||
} | ||
|
||
name = "HGCalHEScintillatorSensitive"; | ||
iSetup.get<IdealGeometryRecord>().get(name,geom); | ||
if (geom.isValid()) { | ||
edm::Handle<HGCHEDigiCollection> digis; | ||
iEvent.getByLabel(edm::InputTag("mix","HGCDigisHEback"),digis); | ||
if (digis.isValid()) { | ||
std::cout << "HGCHEback with " << (*digis).size() << " elements" | ||
<< std::endl; | ||
for (unsigned int k=0; k < (*digis).size(); ++k) { | ||
HGCHEDetId id = (*digis)[k].id(); | ||
GlobalPoint global = (*geom).getPosition(id); | ||
HGCHEDetId idc = (HGCHEDetId)((*geom).getClosestCell(global)); | ||
std::cout << "HGCalDigiTester:ID " << id << " global (" << global.x() | ||
<< ", " << global.y() << ", " << global.z() << ") new ID " | ||
<< idc << std::endl; | ||
} | ||
} else { | ||
std::cout << "No valid collection for HGCHEback" << std::endl; | ||
} | ||
} else { | ||
std::cout << "Cannot get valid HGCalGeometry Object for " << name | ||
<< std::endl; | ||
} | ||
|
||
} | ||
|
||
|
||
//define this as a plug-in | ||
DEFINE_FWK_MODULE(HGCalDigiTester); |
120 changes: 120 additions & 0 deletions
120
SimCalorimetry/HGCSimProducers/test/testHGCalDigi_cfg.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
process = cms.Process('SIMDIGI') | ||
|
||
# import of standard configurations | ||
process.load('Configuration.StandardSequences.Services_cff') | ||
process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') | ||
process.load('FWCore.MessageService.MessageLogger_cfi') | ||
process.load('Configuration.EventContent.EventContent_cff') | ||
process.load('FWCore.MessageService.MessageLogger_cfi') | ||
process.load('Configuration.EventContent.EventContent_cff') | ||
process.load('SimGeneral.MixingModule.mixNoPU_cfi') | ||
process.load('Configuration.Geometry.GeometryExtended2023HGCalMuonReco_cff') | ||
process.load('Configuration.Geometry.GeometryExtended2023HGCalMuon_cff') | ||
process.load('Configuration.StandardSequences.MagneticField_38T_PostLS1_cff') | ||
process.load('Configuration.StandardSequences.Generator_cff') | ||
process.load('IOMC.EventVertexGenerators.VtxSmearedGauss_cfi') | ||
process.load('GeneratorInterface.Core.genFilterSummary_cff') | ||
process.load('Configuration.StandardSequences.SimIdeal_cff') | ||
process.load('Configuration.StandardSequences.Digi_cff') | ||
process.load('Configuration.StandardSequences.SimL1Emulator_cff') | ||
process.load('Configuration.StandardSequences.DigiToRaw_cff') | ||
process.load('Configuration.StandardSequences.EndOfProcess_cff') | ||
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') | ||
|
||
process.maxEvents = cms.untracked.PSet( | ||
input = cms.untracked.int32(10) | ||
) | ||
|
||
# Input source | ||
process.source = cms.Source("EmptySource") | ||
|
||
process.options = cms.untracked.PSet( | ||
|
||
) | ||
|
||
# Production Info | ||
process.configurationMetadata = cms.untracked.PSet( | ||
version = cms.untracked.string('$Revision: 1.20 $'), | ||
annotation = cms.untracked.string('SingleElectronPt10_cfi nevts:10'), | ||
name = cms.untracked.string('Applications') | ||
) | ||
|
||
# Output definition | ||
|
||
process.FEVTDEBUGHLToutput = cms.OutputModule("PoolOutputModule", | ||
splitLevel = cms.untracked.int32(0), | ||
eventAutoFlushCompressedSize = cms.untracked.int32(5242880), | ||
outputCommands = process.FEVTDEBUGHLTEventContent.outputCommands, | ||
fileName = cms.untracked.string('file:junk.root'), | ||
dataset = cms.untracked.PSet( | ||
filterName = cms.untracked.string(''), | ||
dataTier = cms.untracked.string('GEN-SIM-DIGI-RAW') | ||
), | ||
SelectEvents = cms.untracked.PSet( | ||
SelectEvents = cms.vstring('generation_step') | ||
) | ||
) | ||
|
||
# Additional output definition | ||
|
||
# Other statements | ||
process.genstepfilter.triggerConditions=cms.vstring("generation_step") | ||
from Configuration.AlCa.GlobalTag import GlobalTag | ||
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:upgradePLS3', '') | ||
|
||
process.generator = cms.EDProducer("FlatRandomPtGunProducer", | ||
PGunParameters = cms.PSet( | ||
MaxPt = cms.double(10.01), | ||
MinPt = cms.double(9.99), | ||
PartID = cms.vint32(13), | ||
MaxEta = cms.double(2.5), | ||
MaxPhi = cms.double(3.14159265359), | ||
MinEta = cms.double(-2.5), | ||
MinPhi = cms.double(-3.14159265359) | ||
), | ||
Verbosity = cms.untracked.int32(0), | ||
psethack = cms.string('single electron pt 10'), | ||
AddAntiParticle = cms.bool(True), | ||
firstRun = cms.untracked.uint32(1) | ||
) | ||
|
||
process.mix.digitizers = cms.PSet(process.theDigitizersValid) | ||
|
||
process.DigiTester = cms.EDAnalyzer("HGCalDigiTester") | ||
|
||
# Path and EndPath definitions | ||
process.generation_step = cms.Path(process.pgen) | ||
process.simulation_step = cms.Path(process.psim) | ||
process.genfiltersummary_step = cms.EndPath(process.genFilterSummary) | ||
process.digitisation_step = cms.Path(process.pdigi_valid) | ||
process.L1simulation_step = cms.Path(process.SimL1Emulator) | ||
process.digi2raw_step = cms.Path(process.DigiToRaw) | ||
process.digitest_step = cms.Path(process.DigiTester) | ||
|
||
# Schedule definition | ||
process.schedule = cms.Schedule(process.generation_step,process.genfiltersummary_step,process.simulation_step,process.digitisation_step,process.L1simulation_step,process.digi2raw_step,process.digitest_step) | ||
# filter all path with the production filter sequence | ||
for path in process.paths: | ||
getattr(process,path)._seq = process.generator * getattr(process,path)._seq | ||
|
||
# customisation of the process. | ||
|
||
# Automatic addition of the customisation function from SLHCUpgradeSimulations.Configuration.combinedCustoms | ||
from SLHCUpgradeSimulations.Configuration.combinedCustoms import cust_2023HGCalMuon | ||
|
||
#call to customisation function cust_2023HGCalMuon imported from SLHCUpgradeSimulations.Configuration.combinedCustoms | ||
process = cust_2023HGCalMuon(process) | ||
|
||
# End of customisation functions | ||
|
||
process.g4SimHits.HGCSD.Verbosity = 1 | ||
process.mix.digitizers.hgceeDigitizer.useAllChannels = False | ||
process.mix.digitizers.hgceeDigitizer.verbosity = 1 | ||
process.mix.digitizers.hgchefrontDigitizer.useAllChannels = False | ||
process.mix.digitizers.hgchefrontDigitizer.verbosity = 1 | ||
process.mix.digitizers.hgchebackDigitizer.useAllChannels = False | ||
process.mix.digitizers.hgchebackDigitizer.verbosity = 1 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.