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
RPCSimTriv Class Reference

#include <RPCSimTriv.h>

Inheritance diagram for RPCSimTriv:
RPCSim

Public Member Functions

 RPCSimTriv (const edm::ParameterSet &config)
 
void setRandomEngine (CLHEP::HepRandomEngine &eng)
 
void simulate (const RPCRoll *roll, const edm::PSimHitContainer &rpcHits)
 
void simulateNoise (const RPCRoll *)
 
 ~RPCSimTriv ()
 
- Public Member Functions inherited from RPCSim
const DigiSimLinksdigiSimLinks () const
 
virtual void fillDigis (int rollDetId, RPCDigiCollection &digis)
 
RPCSimSetUpgetRPCSimSetUp ()
 
const RPCDigiSimLinksrpcDigiSimLinks () const
 
void setRPCSimSetUp (RPCSimSetUp *setup)
 
virtual ~RPCSim ()
 

Private Member Functions

void init ()
 

Private Attributes

RPCSynchronizer_rpcSync
 
CLHEP::RandFlat * flatDistribution1
 
CLHEP::RandFlat * flatDistribution2
 
double gate
 
int N_hits
 
int nbxing
 
CLHEP::RandPoissonQ * poissonDistribution
 
double rate
 

Additional Inherited Members

- Public Types inherited from RPCSim
typedef edm::DetSet
< StripDigiSimLink
DigiSimLinks
 
typedef edm::DetSet
< RPCDigiSimLink
RPCDigiSimLinks
 
- Protected Types inherited from RPCSim
typedef std::multimap
< std::pair< unsigned int, int >
, const PSimHit *, std::less
< std::pair< unsigned int, int > > > 
DetectorHitMap
 
- Protected Member Functions inherited from RPCSim
virtual void addLinks (unsigned int strip, int bx)
 
 RPCSim (const edm::ParameterSet &config)
 
- Protected Attributes inherited from RPCSim
std::set< std::pair< int, int > > strips
 
DetectorHitMap theDetectorHitMap
 
DigiSimLinks theDigiSimLinks
 
RPCDigiSimLinks theRpcDigiSimLinks
 
RPCSimSetUptheSimSetUp
 

Detailed Description

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

Author
Marcello Maggi – INFN Bari

Definition at line 21 of file RPCSimTriv.h.

Constructor & Destructor Documentation

RPCSimTriv::RPCSimTriv ( const edm::ParameterSet config)

Definition at line 24 of file RPCSimTriv.cc.

References _rpcSync, gate, edm::ParameterSet::getParameter(), nbxing, and rate.

24  : RPCSim(config){
25 
26  rate=config.getParameter<double>("Rate");
27  nbxing=config.getParameter<int>("Nbxing");
28  gate=config.getParameter<double>("Gate");
29 
30  _rpcSync = new RPCSynchronizer(config);
31 }
T getParameter(std::string const &) const
RPCSim(const edm::ParameterSet &config)
Definition: RPCSim.cc:5
double gate
Definition: RPCSimTriv.h:42
RPCSynchronizer * _rpcSync
Definition: RPCSimTriv.h:35
int nbxing
Definition: RPCSimTriv.h:40
double rate
Definition: RPCSimTriv.h:41
RPCSimTriv::~RPCSimTriv ( )

Definition at line 40 of file RPCSimTriv.cc.

References _rpcSync, flatDistribution1, flatDistribution2, and poissonDistribution.

40  {
41  delete flatDistribution1;
42  delete flatDistribution2;
43  delete poissonDistribution;
44  delete _rpcSync;
45 }
CLHEP::RandPoissonQ * poissonDistribution
Definition: RPCSimTriv.h:47
CLHEP::RandFlat * flatDistribution1
Definition: RPCSimTriv.h:45
RPCSynchronizer * _rpcSync
Definition: RPCSimTriv.h:35
CLHEP::RandFlat * flatDistribution2
Definition: RPCSimTriv.h:46

Member Function Documentation

void RPCSimTriv::init ( void  )
inlineprivatevirtual

Implements RPCSim.

Definition at line 35 of file RPCSimTriv.h.

35 {};
void RPCSimTriv::setRandomEngine ( CLHEP::HepRandomEngine &  eng)
virtual

Implements RPCSim.

Definition at line 33 of file RPCSimTriv.cc.

References _rpcSync, flatDistribution1, flatDistribution2, poissonDistribution, and RPCSynchronizer::setRandomEngine().

33  {
34  flatDistribution1 = new CLHEP::RandFlat(eng);
35  flatDistribution2 = new CLHEP::RandFlat(eng);
36  poissonDistribution = new CLHEP::RandPoissonQ(eng);
38 }
CLHEP::RandPoissonQ * poissonDistribution
Definition: RPCSimTriv.h:47
CLHEP::RandFlat * flatDistribution1
Definition: RPCSimTriv.h:45
void setRandomEngine(CLHEP::HepRandomEngine &eng)
RPCSynchronizer * _rpcSync
Definition: RPCSimTriv.h:35
CLHEP::RandFlat * flatDistribution2
Definition: RPCSimTriv.h:46
void RPCSimTriv::simulate ( const RPCRoll roll,
const edm::PSimHitContainer rpcHits 
)
virtual

Implements RPCSim.

Definition at line 48 of file RPCSimTriv.cc.

References edm::DetSet< T >::clear(), RPCRoll::id(), DetId::rawId(), RPCRoll::specs(), RPCSim::strips, RPCSim::theDetectorHitMap, RPCSim::theRpcDigiSimLinks, and RPCRollSpecs::topology().

50 {
51 
52  //_rpcSync->setRPCSimSetUp(getRPCSimSetUp());
54  theDetectorHitMap.clear();
56 
57  const Topology& topology=roll->specs()->topology();
58  for (edm::PSimHitContainer::const_iterator _hit = rpcHits.begin();
59  _hit != rpcHits.end(); ++_hit){
60 
61  int type = _hit->particleType();
62  if (type == 13 || type == -13){
63  // Here I hould check if the RPC are up side down;
64  const LocalPoint& entr=_hit->entryPoint();
65  //int time_hit = _rpcSync->getSimHitBx(&(*_hit));
66  // please keep hit time always 0 for this model
67  int time_hit = 0;
68  std::pair<int, int> digi(topology.channel(entr)+1,
69  time_hit);
70 
71  theDetectorHitMap.insert(DetectorHitMap::value_type(digi,&(*_hit)));
72  strips.insert(digi);
73  }
74  }
75 }
type
Definition: HCALResponse.h:21
DetectorHitMap theDetectorHitMap
Definition: RPCSim.h:68
const RPCRollSpecs * specs() const
Definition: RPCRoll.cc:18
std::set< std::pair< int, int > > strips
Definition: RPCSim.h:57
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
edm::DetSet< RPCDigiSimLink > RPCDigiSimLinks
Definition: RPCSim.h:32
RPCDetId id() const
Definition: RPCRoll.cc:24
Container::value_type value_type
void clear()
Definition: DetSet.h:70
RPCDigiSimLinks theRpcDigiSimLinks
Definition: RPCSim.h:70
const Topology & topology() const
Definition: RPCRollSpecs.cc:43
void RPCSimTriv::simulateNoise ( const RPCRoll roll)
virtual

Implements RPCSim.

Definition at line 78 of file RPCSimTriv.cc.

79 {
80  // plase keep it empty for this model
81  return;
82 }

Member Data Documentation

RPCSynchronizer* RPCSimTriv::_rpcSync
private

Definition at line 35 of file RPCSimTriv.h.

Referenced by RPCSimTriv(), setRandomEngine(), and ~RPCSimTriv().

CLHEP::RandFlat* RPCSimTriv::flatDistribution1
private

Definition at line 45 of file RPCSimTriv.h.

Referenced by setRandomEngine(), and ~RPCSimTriv().

CLHEP::RandFlat* RPCSimTriv::flatDistribution2
private

Definition at line 46 of file RPCSimTriv.h.

Referenced by setRandomEngine(), and ~RPCSimTriv().

double RPCSimTriv::gate
private

Definition at line 42 of file RPCSimTriv.h.

Referenced by RPCSimTriv().

int RPCSimTriv::N_hits
private

Definition at line 39 of file RPCSimTriv.h.

int RPCSimTriv::nbxing
private

Definition at line 40 of file RPCSimTriv.h.

Referenced by RPCSimTriv().

CLHEP::RandPoissonQ* RPCSimTriv::poissonDistribution
private

Definition at line 47 of file RPCSimTriv.h.

Referenced by setRandomEngine(), and ~RPCSimTriv().

double RPCSimTriv::rate
private

Definition at line 41 of file RPCSimTriv.h.

Referenced by RPCSimTriv().