![]() |
![]() |
#include <GEMSimTriv.h>
Public Member Functions | |
GEMSimTriv (const edm::ParameterSet &config) | |
void | setRandomEngine (CLHEP::HepRandomEngine &eng) |
void | simulate (const GEMEtaPartition *roll, const edm::PSimHitContainer &rpcHits) |
void | simulateNoise (const GEMEtaPartition *) |
~GEMSimTriv () | |
Private Member Functions | |
void | init () |
Private Attributes | |
CLHEP::RandFlat * | flatDistr1_ |
CLHEP::RandFlat * | flatDistr2_ |
double | gate_ |
int | nbxing_ |
CLHEP::RandPoissonQ * | poissonDistr_ |
double | rate_ |
GEMSynchronizer * | sync_ |
Class for the GEM strip response simulation based on a very simple model
Definition at line 23 of file GEMSimTriv.h.
GEMSimTriv::GEMSimTriv | ( | const edm::ParameterSet & | config | ) |
Definition at line 22 of file GEMSimTriv.cc.
References gate_, edm::ParameterSet::getParameter(), nbxing_, rate_, and sync_.
: GEMSim(config) { rate_ = config.getParameter<double>("rate"); nbxing_ = config.getParameter<int>("nbxing"); gate_ = config.getParameter<double>("gate"); sync_ = new GEMSynchronizer(config); }
GEMSimTriv::~GEMSimTriv | ( | ) |
Definition at line 41 of file GEMSimTriv.cc.
References flatDistr1_, flatDistr2_, poissonDistr_, and sync_.
{ if (flatDistr1_) delete flatDistr1_; if (flatDistr2_) delete flatDistr2_; if (poissonDistr_) delete poissonDistr_; delete sync_; }
void GEMSimTriv::init | ( | void | ) | [inline, private, virtual] |
void GEMSimTriv::setRandomEngine | ( | CLHEP::HepRandomEngine & | eng | ) | [virtual] |
Implements GEMSim.
Definition at line 32 of file GEMSimTriv.cc.
References flatDistr1_, flatDistr2_, poissonDistr_, GEMSynchronizer::setRandomEngine(), and sync_.
{ flatDistr1_ = new CLHEP::RandFlat(eng); flatDistr2_ = new CLHEP::RandFlat(eng); poissonDistr_ = new CLHEP::RandPoissonQ(eng); sync_->setRandomEngine(eng); }
void GEMSimTriv::simulate | ( | const GEMEtaPartition * | roll, |
const edm::PSimHitContainer & | rpcHits | ||
) | [virtual] |
Implements GEMSim.
Definition at line 49 of file GEMSimTriv.cc.
References abs, edm::DetSet< T >::clear(), GEMSim::detectorHitMap_, GEMEtaPartition::id(), DetId::rawId(), GEMEtaPartition::specs(), GEMSim::stripDigiSimLinks_, GEMSim::strips_, and GEMEtaPartitionSpecs::topology().
{ //_gemSync->setGEMSimSetUp(getGEMSimSetUp()); stripDigiSimLinks_.clear(); detectorHitMap_.clear(); stripDigiSimLinks_ = StripDigiSimLinks(roll->id().rawId()); const Topology& topology = roll->specs()->topology(); for (const auto & hit: simHits) { if (std::abs(hit.particleType()) != 13) continue; // Here I hould check if the RPC are up side down; auto entry = hit.entryPoint(); //int time_hit = _gemSync->getSimHitBx(&(*_hit)); // please keep hit time always 0 for this model int time_hit = 0; std::pair<int, int> digi(topology.channel(entry) + 1, time_hit); detectorHitMap_.insert(DetectorHitMap::value_type(digi, &hit)); strips_.insert(digi); } }
void GEMSimTriv::simulateNoise | ( | const GEMEtaPartition * | roll | ) | [virtual] |
Implements GEMSim.
Definition at line 77 of file GEMSimTriv.cc.
{ // please keep it empty for this model return; }
CLHEP::RandFlat* GEMSimTriv::flatDistr1_ [private] |
Definition at line 48 of file GEMSimTriv.h.
Referenced by setRandomEngine(), and ~GEMSimTriv().
CLHEP::RandFlat* GEMSimTriv::flatDistr2_ [private] |
Definition at line 49 of file GEMSimTriv.h.
Referenced by setRandomEngine(), and ~GEMSimTriv().
double GEMSimTriv::gate_ [private] |
Definition at line 45 of file GEMSimTriv.h.
Referenced by GEMSimTriv().
int GEMSimTriv::nbxing_ [private] |
Definition at line 43 of file GEMSimTriv.h.
Referenced by GEMSimTriv().
CLHEP::RandPoissonQ* GEMSimTriv::poissonDistr_ [private] |
Definition at line 50 of file GEMSimTriv.h.
Referenced by setRandomEngine(), and ~GEMSimTriv().
double GEMSimTriv::rate_ [private] |
Definition at line 44 of file GEMSimTriv.h.
Referenced by GEMSimTriv().
GEMSynchronizer* GEMSimTriv::sync_ [private] |
Definition at line 41 of file GEMSimTriv.h.
Referenced by GEMSimTriv(), setRandomEngine(), and ~GEMSimTriv().