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 simulate (const RPCRoll *roll, const edm::PSimHitContainer &rpcHits, CLHEP::HepRandomEngine *) override
 
void simulateNoise (const RPCRoll *, CLHEP::HepRandomEngine *) override
 
 ~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
 
double gate
 
int N_hits
 
int nbxing
 
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 19 of file RPCSimTriv.h.

Constructor & Destructor Documentation

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

Definition at line 13 of file RPCSimTriv.cc.

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

13  : RPCSim(config){
14 
15  rate=config.getParameter<double>("Rate");
16  nbxing=config.getParameter<int>("Nbxing");
17  gate=config.getParameter<double>("Gate");
18 
19  _rpcSync = new RPCSynchronizer(config);
20 }
T getParameter(std::string const &) const
RPCSim(const edm::ParameterSet &config)
Definition: RPCSim.cc:5
double gate
Definition: RPCSimTriv.h:40
RPCSynchronizer * _rpcSync
Definition: RPCSimTriv.h:33
int nbxing
Definition: RPCSimTriv.h:38
double rate
Definition: RPCSimTriv.h:39
RPCSimTriv::~RPCSimTriv ( )

Definition at line 22 of file RPCSimTriv.cc.

References _rpcSync.

22  {
23  delete _rpcSync;
24 }
RPCSynchronizer * _rpcSync
Definition: RPCSimTriv.h:33

Member Function Documentation

void RPCSimTriv::init ( void  )
inlineprivatevirtual

Implements RPCSim.

Definition at line 33 of file RPCSimTriv.h.

33 {};
void RPCSimTriv::simulate ( const RPCRoll roll,
const edm::PSimHitContainer rpcHits,
CLHEP::HepRandomEngine *   
)
overridevirtual

Implements RPCSim.

Definition at line 27 of file RPCSimTriv.cc.

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

30 {
31 
32  //_rpcSync->setRPCSimSetUp(getRPCSimSetUp());
34  theDetectorHitMap.clear();
36 
37  const Topology& topology=roll->specs()->topology();
38  for (edm::PSimHitContainer::const_iterator _hit = rpcHits.begin();
39  _hit != rpcHits.end(); ++_hit){
40 
41  int type = _hit->particleType();
42  if (type == 13 || type == -13){
43  // Here I hould check if the RPC are up side down;
44  const LocalPoint& entr=_hit->entryPoint();
45  //int time_hit = _rpcSync->getSimHitBx(&(*_hit));
46  // please keep hit time always 0 for this model
47  int time_hit = 0;
48  std::pair<int, int> digi(topology.channel(entr)+1,
49  time_hit);
50 
51  theDetectorHitMap.insert(DetectorHitMap::value_type(digi,&(*_hit)));
52  strips.insert(digi);
53  }
54  }
55 }
type
Definition: HCALResponse.h:21
CaloTopology const * topology(0)
DetectorHitMap theDetectorHitMap
Definition: RPCSim.h:71
const RPCRollSpecs * specs() const
Definition: RPCRoll.cc:18
std::set< std::pair< int, int > > strips
Definition: RPCSim.h:60
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
edm::DetSet< RPCDigiSimLink > RPCDigiSimLinks
Definition: RPCSim.h:35
RPCDetId id() const
Definition: RPCRoll.cc:24
Container::value_type value_type
void clear()
Definition: DetSet.h:69
RPCDigiSimLinks theRpcDigiSimLinks
Definition: RPCSim.h:73
const Topology & topology() const
Definition: RPCRollSpecs.cc:43
void RPCSimTriv::simulateNoise ( const RPCRoll roll,
CLHEP::HepRandomEngine *   
)
overridevirtual

Implements RPCSim.

Definition at line 58 of file RPCSimTriv.cc.

60 {
61  // plase keep it empty for this model
62  return;
63 }

Member Data Documentation

RPCSynchronizer* RPCSimTriv::_rpcSync
private

Definition at line 33 of file RPCSimTriv.h.

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

double RPCSimTriv::gate
private

Definition at line 40 of file RPCSimTriv.h.

Referenced by RPCSimTriv().

int RPCSimTriv::N_hits
private

Definition at line 37 of file RPCSimTriv.h.

int RPCSimTriv::nbxing
private

Definition at line 38 of file RPCSimTriv.h.

Referenced by RPCSimTriv().

double RPCSimTriv::rate
private

Definition at line 39 of file RPCSimTriv.h.

Referenced by RPCSimTriv().