Skip to content

Commit

Permalink
Merge pull request #4510 from bapavlov/RPC_noise_configurable
Browse files Browse the repository at this point in the history
Rpc noise configurable
  • Loading branch information
ktf committed Jul 7, 2014
2 parents 1cffd4a + 3042f6b commit 9b57483
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions SimMuon/RPCDigitizer/python/muonRPCDigis_cfi.py
Expand Up @@ -19,6 +19,7 @@
Nbxing = cms.int32(9),
timeJitter = cms.double(1.0)
),
doBkgNoise = cms.bool(True), #False - no noise and bkg simulation
Signal = cms.bool(True),
mixLabel = cms.string('mix'),
InputCollection = cms.string('g4SimHitsMuonRPCHits'),
Expand Down
5 changes: 4 additions & 1 deletion SimMuon/RPCDigitizer/src/RPCDigitizer.cc
Expand Up @@ -12,6 +12,7 @@
RPCDigitizer::RPCDigitizer(const edm::ParameterSet& config) {
theName = config.getParameter<std::string>("digiModel");
theRPCSim = RPCSimFactory::get()->create(theName,config.getParameter<edm::ParameterSet>("digiModelConfig"));
theNoise=config.getParameter<bool>("doBkgNoise");
}

RPCDigitizer::~RPCDigitizer() {
Expand Down Expand Up @@ -52,7 +53,9 @@ void RPCDigitizer::doAction(MixCollection<PSimHit> & simHits,
// <<" hit(s) in the rpc roll";

theRPCSim->simulate(*r, rollSimHits, engine);
theRPCSim->simulateNoise(*r, engine);
if(theNoise){
theRPCSim->simulateNoise(*r, engine);
}
theRPCSim->fillDigis((*r)->id(),rpcDigis);
rpcDigiSimLink.insert(theRPCSim->rpcDigiSimLinks());
}
Expand Down
2 changes: 1 addition & 1 deletion SimMuon/RPCDigitizer/src/RPCDigitizer.h
Expand Up @@ -61,7 +61,7 @@ class RPCDigitizer
RPCSim* theRPCSim;
RPCSimSetUp * theSimSetUp;
std::string theName;

bool theNoise;
};

#endif
Expand Down

0 comments on commit 9b57483

Please sign in to comment.