CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
GEMSimTriv Class Reference

#include <GEMSimTriv.h>

Inheritance diagram for GEMSimTriv:
GEMSim

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 ()
 
- Public Member Functions inherited from GEMSim
virtual void fillDigis (int rollDetId, GEMDigiCollection &digis)
 
GEMSimSetUpgetGEMSimSetUp ()
 
void setGEMSimSetUp (GEMSimSetUp *setup)
 
const StripDigiSimLinksstripDigiSimLinks () const
 
virtual ~GEMSim ()
 

Private Member Functions

void init ()
 

Private Attributes

CLHEP::RandFlat * flatDistr1_
 
CLHEP::RandFlat * flatDistr2_
 
double gate_
 
int nbxing_
 
CLHEP::RandPoissonQ * poissonDistr_
 
double rate_
 
GEMSynchronizersync_
 

Additional Inherited Members

- Public Types inherited from GEMSim
typedef edm::DetSet
< StripDigiSimLink
StripDigiSimLinks
 
- Protected Types inherited from GEMSim
typedef std::multimap
< std::pair< unsigned int, int >
, const PSimHit *, std::less
< std::pair< unsigned int, int > > > 
DetectorHitMap
 
- Protected Member Functions inherited from GEMSim
virtual void addLinks (unsigned int strip, int bx)
 
 GEMSim (const edm::ParameterSet &config)
 
- Protected Attributes inherited from GEMSim
DetectorHitMap detectorHitMap_
 
GEMSimSetUpsimSetUp_
 
StripDigiSimLinks stripDigiSimLinks_
 
std::set< std::pair< int, int > > strips_
 

Detailed Description

Class for the GEM strip response simulation based on a very simple model

Author
Vadim Khotilovich

Definition at line 23 of file GEMSimTriv.h.

Constructor & Destructor Documentation

GEMSimTriv::GEMSimTriv ( const edm::ParameterSet config)

Definition at line 22 of file GEMSimTriv.cc.

References gate_, edm::ParameterSet::getParameter(), nbxing_, rate_, and sync_.

22  :
23  GEMSim(config)
24 {
25  rate_ = config.getParameter<double>("rate");
26  nbxing_ = config.getParameter<int>("nbxing");
27  gate_ = config.getParameter<double>("gate");
28 
29  sync_ = new GEMSynchronizer(config);
30 }
T getParameter(std::string const &) const
GEMSynchronizer * sync_
Definition: GEMSimTriv.h:41
int nbxing_
Definition: GEMSimTriv.h:43
GEMSim(const edm::ParameterSet &config)
Definition: GEMSim.h:50
double rate_
Definition: GEMSimTriv.h:44
double gate_
Definition: GEMSimTriv.h:45
GEMSimTriv::~GEMSimTriv ( )

Definition at line 41 of file GEMSimTriv.cc.

References flatDistr1_, flatDistr2_, poissonDistr_, and sync_.

42 {
43  if (flatDistr1_) delete flatDistr1_;
44  if (flatDistr2_) delete flatDistr2_;
45  if (poissonDistr_) delete poissonDistr_;
46  delete sync_;
47 }
GEMSynchronizer * sync_
Definition: GEMSimTriv.h:41
CLHEP::RandFlat * flatDistr1_
Definition: GEMSimTriv.h:48
CLHEP::RandFlat * flatDistr2_
Definition: GEMSimTriv.h:49
CLHEP::RandPoissonQ * poissonDistr_
Definition: GEMSimTriv.h:50

Member Function Documentation

void GEMSimTriv::init ( void  )
inlineprivatevirtual

Implements GEMSim.

Definition at line 39 of file GEMSimTriv.h.

39 {}
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_.

33 {
34  flatDistr1_ = new CLHEP::RandFlat(eng);
35  flatDistr2_ = new CLHEP::RandFlat(eng);
36  poissonDistr_ = new CLHEP::RandPoissonQ(eng);
37  sync_->setRandomEngine(eng);
38 }
GEMSynchronizer * sync_
Definition: GEMSimTriv.h:41
void setRandomEngine(CLHEP::HepRandomEngine &eng)
CLHEP::RandFlat * flatDistr1_
Definition: GEMSimTriv.h:48
CLHEP::RandFlat * flatDistr2_
Definition: GEMSimTriv.h:49
CLHEP::RandPoissonQ * poissonDistr_
Definition: GEMSimTriv.h:50
void GEMSimTriv::simulate ( const GEMEtaPartition roll,
const edm::PSimHitContainer rpcHits 
)
virtual

Implements GEMSim.

Definition at line 49 of file GEMSimTriv.cc.

References funct::abs(), edm::DetSet< T >::clear(), GEMSim::detectorHitMap_, GEMEtaPartition::id(), DetId::rawId(), GEMEtaPartition::specs(), GEMSim::stripDigiSimLinks_, GEMSim::strips_, and GEMEtaPartitionSpecs::topology().

51 {
52  //_gemSync->setGEMSimSetUp(getGEMSimSetUp());
54  detectorHitMap_.clear();
56 
57  const Topology& topology = roll->specs()->topology();
58 
59  for (const auto & hit: simHits)
60  {
61  if (std::abs(hit.particleType()) != 13) continue;
62 
63  // Here I hould check if the RPC are up side down;
64  auto entry = hit.entryPoint();
65 
66  //int time_hit = _gemSync->getSimHitBx(&(*_hit));
67  // please keep hit time always 0 for this model
68  int time_hit = 0;
69  std::pair<int, int> digi(topology.channel(entry) + 1, time_hit);
70 
72  strips_.insert(digi);
73  }
74 }
DetectorHitMap detectorHitMap_
Definition: GEMSim.h:67
edm::DetSet< StripDigiSimLink > StripDigiSimLinks
Definition: GEMSim.h:30
std::set< std::pair< int, int > > strips_
Definition: GEMSim.h:54
GEMDetId id() const
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
const Topology & topology() const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Container::value_type value_type
const GEMEtaPartitionSpecs * specs() const
tuple simHits
Definition: trackerHits.py:16
void clear()
Definition: DetSet.h:69
StripDigiSimLinks stripDigiSimLinks_
Definition: GEMSim.h:68
void GEMSimTriv::simulateNoise ( const GEMEtaPartition roll)
virtual

Implements GEMSim.

Definition at line 77 of file GEMSimTriv.cc.

78 {
79  // please keep it empty for this model
80  return;
81 }

Member Data Documentation

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().