|
|
#include <RPCSimAverageNoiseEffCls.h>
Definition at line 29 of file RPCSimAverageNoiseEffCls.h.
◆ RPCSimAverageNoiseEffCls()
RPCSimAverageNoiseEffCls::RPCSimAverageNoiseEffCls |
( |
const edm::ParameterSet & |
config | ) |
|
Definition at line 42 of file RPCSimAverageNoiseEffCls.cc.
43 aveEff =
config.getParameter<
double>(
"averageEfficiency");
44 aveCls =
config.getParameter<
double>(
"averageClusterSize");
47 dtimCs =
config.getParameter<
double>(
"deltatimeAdjacentStrip");
49 sspeed =
config.getParameter<
double>(
"signalPropagationSpeed");
61 <<
"Average Cluster Size = " <<
aveCls <<
" strips" <<
'\n'
62 <<
"RPC Time Resolution = " <<
resRPC <<
" ns" <<
'\n'
63 <<
"RPC Signal formation time = " <<
timOff <<
" ns" <<
'\n'
64 <<
"RPC adjacent strip delay = " <<
dtimCs <<
" ns" <<
'\n'
65 <<
"Electronic Jitter = " <<
resEle <<
" ns" <<
'\n'
66 <<
"Signal propagation time = " <<
sspeed <<
" x c" <<
'\n'
67 <<
"Link Board Gate Width = " <<
lbGate <<
" ns" <<
'\n';
References _rpcSync, aveCls, aveEff, dtimCs, eledig, frate, gate, lbGate, nbxing, rate, resEle, resRPC, rpcdigiprint, sspeed, and timOff.
◆ ~RPCSimAverageNoiseEffCls()
RPCSimAverageNoiseEffCls::~RPCSimAverageNoiseEffCls |
( |
| ) |
|
|
override |
◆ getClSize() [1/2]
int RPCSimAverageNoiseEffCls::getClSize |
( |
float |
posX, |
|
|
CLHEP::HepRandomEngine * |
engine |
|
) |
| |
◆ getClSize() [2/2]
int RPCSimAverageNoiseEffCls::getClSize |
( |
uint32_t |
id, |
|
|
float |
posX, |
|
|
CLHEP::HepRandomEngine * |
engine |
|
) |
| |
◆ init()
void RPCSimAverageNoiseEffCls::init |
( |
void |
| ) |
|
|
inlineoverrideprotectedvirtual |
◆ simulate()
Implements RPCSim.
Definition at line 162 of file RPCSimAverageNoiseEffCls.cc.
176 for (edm::PSimHitContainer::const_iterator _hit = rpcHits.begin(); _hit != rpcHits.end(); ++_hit) {
177 if (!
eledig && _hit->particleType() == 11)
183 float posX = roll->
strip(_hit->localPosition()) - static_cast<int>(roll->
strip(_hit->localPosition()));
185 std::vector<float> veff = (
getRPCSimSetUp())->getEff(rpcId.rawId());
188 int centralStrip =
topology.channel(entr) + 1;
190 float fire = CLHEP::RandFlat::shoot(engine);
192 if (fire < veff[centralStrip - 1]) {
193 int fstrip = centralStrip;
194 int lstrip = centralStrip;
198 std::vector<int> cls;
199 cls.push_back(centralStrip);
201 for (
int cl = 0;
cl < (clsize - 1) / 2;
cl++) {
202 if (centralStrip -
cl - 1 >= 1) {
203 fstrip = centralStrip -
cl - 1;
204 cls.push_back(fstrip);
206 if (centralStrip +
cl + 1 <= roll->
nstrips()) {
207 lstrip = centralStrip +
cl + 1;
208 cls.push_back(lstrip);
211 if (clsize % 2 == 0) {
216 if (lstrip < roll->nstrips()) {
218 cls.push_back(lstrip);
223 cls.push_back(fstrip);
229 for (std::vector<int>::iterator
i = cls.begin();
i != cls.end();
i++) {
231 if (*
i != centralStrip) {
232 if (CLHEP::RandFlat::shoot(engine) < veff[*
i - 1]) {
233 std::pair<int, int> digi(*
i, time_hit);
239 std::pair<int, int> digi(*
i, time_hit);
References _rpcSync, RPCRoll::centreOfStrip(), GetRecoTauVFromDQM_MC_cff::cl, edm::DetSet< T >::clear(), eledig, getClSize(), RPCSim::getRPCSimSetUp(), RPCSynchronizer::getSimHitBx(), mps_fire::i, RPCRoll::id(), RPCRoll::nstrips(), RecoTauValidation_cfi::posX, DetId::rawId(), RPCSynchronizer::setRPCSimSetUp(), RPCRoll::specs(), RPCRoll::strip(), RPCSim::strips, RPCSim::theDetectorHitMap, RPCSim::theRpcDigiSimLinks, RPCRollSpecs::topology(), ecaldqm::topology(), and PV3DBase< T, PVType, FrameType >::x().
◆ simulateNoise()
void RPCSimAverageNoiseEffCls::simulateNoise |
( |
const RPCRoll * |
roll, |
|
|
CLHEP::HepRandomEngine * |
engine |
|
) |
| |
|
overridevirtual |
Implements RPCSim.
Definition at line 249 of file RPCSimAverageNoiseEffCls.cc.
257 unsigned int nstrips = roll->
nstrips();
260 if (rpcId.
region() == 0) {
274 for (
unsigned int j = 0;
j < vnoise.size(); ++
j) {
288 CLHEP::RandPoissonQ randPoissonQ(*engine, ave);
289 N_hits = randPoissonQ.fire();
292 int time_hit = (static_cast<int>(CLHEP::RandFlat::shoot(engine, (
nbxing *
gate) /
gate))) -
nbxing / 2;
293 std::pair<int, int> digi(
j + 1, time_hit);
References custom_jme_cff::area, dqmMemoryStats::float, frate, gate, RPCSim::getRPCSimSetUp(), mps_fire::i, RPCRoll::id(), dqmiolumiharvest::j, RectangularStripTopology::localPosition(), TrapezoidalStripTopology::localPosition(), N_hits, nbxing, RPCRoll::nstrips(), DetId::rawId(), RPCDetId::region(), RectangularStripTopology::stripLength(), TrapezoidalStripTopology::stripLength(), RPCSim::strips, RPCRoll::topology(), x, TrackerOfflineValidation_Dqm_cff::xmax, and TrackerOfflineValidation_Dqm_cff::xmin.
◆ _rpcSync
◆ aveCls
double RPCSimAverageNoiseEffCls::aveCls |
|
protected |
◆ aveEff
double RPCSimAverageNoiseEffCls::aveEff |
|
protected |
◆ clsForDetId
std::vector<double> RPCSimAverageNoiseEffCls::clsForDetId |
|
protected |
◆ clsMap
std::map<int, std::vector<double> > RPCSimAverageNoiseEffCls::clsMap |
|
protected |
◆ dtimCs
double RPCSimAverageNoiseEffCls::dtimCs |
|
protected |
◆ eledig
bool RPCSimAverageNoiseEffCls::eledig |
|
protected |
◆ frate
double RPCSimAverageNoiseEffCls::frate |
|
protected |
◆ gate
double RPCSimAverageNoiseEffCls::gate |
|
protected |
◆ infile
std::ifstream* RPCSimAverageNoiseEffCls::infile |
|
protected |
◆ lbGate
double RPCSimAverageNoiseEffCls::lbGate |
|
protected |
◆ N_hits
int RPCSimAverageNoiseEffCls::N_hits |
|
protected |
◆ nbxing
int RPCSimAverageNoiseEffCls::nbxing |
|
protected |
◆ rate
double RPCSimAverageNoiseEffCls::rate |
|
protected |
◆ resEle
double RPCSimAverageNoiseEffCls::resEle |
|
protected |
◆ resRPC
double RPCSimAverageNoiseEffCls::resRPC |
|
protected |
◆ rpcdigiprint
bool RPCSimAverageNoiseEffCls::rpcdigiprint |
|
protected |
◆ sspeed
double RPCSimAverageNoiseEffCls::sspeed |
|
protected |
◆ sum_clsize
std::vector<double> RPCSimAverageNoiseEffCls::sum_clsize |
|
protected |
◆ timOff
double RPCSimAverageNoiseEffCls::timOff |
|
protected |
void setRPCSimSetUp(RPCSimSetUp *simsetup)
RPCSimSetUp * getRPCSimSetUp()
float stripLength() const override
det heigth (strip length in the middle)
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
RPCSim(const edm::ParameterSet &config)
int getSimHitBx(const PSimHit *, CLHEP::HepRandomEngine *)
int getClSize(float posX, CLHEP::HepRandomEngine *)
Log< level::Info, false > LogInfo
std::set< std::pair< int, int > > strips
LocalPoint localPosition(float strip) const override
const Topology & topology() const override
DetectorHitMap theDetectorHitMap
const CaloTopology * topology(nullptr)
std::vector< double > clsForDetId
RPCDigiSimLinks theRpcDigiSimLinks
const std::vector< double > & getCls(uint32_t id)
const Topology & topology() const override
const std::map< int, std::vector< double > > & getClsMap()
float strip(const LocalPoint &lp) const
LocalPoint centreOfStrip(int strip) const
float stripLength() const override
std::vector< double > sum_clsize
std::map< int, std::vector< double > > clsMap
Container::value_type value_type
RPCSynchronizer * _rpcSync
constexpr uint32_t rawId() const
get the raw id
const RPCRollSpecs * specs() const
LocalPoint localPosition(float strip) const override
edm::DetSet< RPCDigiSimLink > RPCDigiSimLinks