CMS 3D CMS Logo

RPCSimSetUp Class Reference

#include <SimMuon/RPCDigitizer/src/RPCSimSetUp.h>

List of all members.

Public Member Functions

const std::map< int,
std::vector< double > > & 
getClsMap ()
const std::vector< float > & getEff (uint32_t id)
const RPCGeometrygetGeometry ()
const std::vector< float > & getNoise (uint32_t id)
float getTime (uint32_t id)
 RPCSimSetUp (const edm::ParameterSet &ps)
void setGeometry (const RPCGeometry *geom)
 sets geometry
void setRPCSetUp (std::vector< RPCStripNoises::NoiseItem > vnoise, std::vector< float > vcls)
virtual ~RPCSimSetUp ()

Public Attributes

std::map< RPCDetId, float > _bxmap
std::map< int, std::vector
< double > > 
_clsMap
std::map< uint32_t,
std::vector< float > > 
_mapDetIdEff
std::map< uint32_t,
std::vector< float > > 
_mapDetIdNoise
const RPCGeometrytheGeometry


Detailed Description

Definition at line 26 of file RPCSimSetUp.h.


Constructor & Destructor Documentation

RPCSimSetUp::RPCSimSetUp ( const edm::ParameterSet ps  )  [explicit]

Definition at line 37 of file RPCSimSetUp.cc.

References _bxmap, _clsMap, _mapDetIdEff, and _mapDetIdNoise.

00037                                                   {
00038 
00039   _mapDetIdNoise.clear();
00040   _mapDetIdEff.clear();
00041   _bxmap.clear();
00042   _clsMap.clear();
00043 
00044 }

RPCSimSetUp::~RPCSimSetUp (  )  [virtual]

Definition at line 129 of file RPCSimSetUp.cc.

00129 {}


Member Function Documentation

const std::map< int, std::vector< double > > & RPCSimSetUp::getClsMap (  ) 

Definition at line 124 of file RPCSimSetUp.cc.

References _clsMap.

Referenced by RPCSimAverageNoiseEff::getClSize(), RPCSimAverageNoise::getClSize(), and RPCSimAverage::getClSize().

00125 {
00126   return _clsMap;
00127 }

const std::vector< float > & RPCSimSetUp::getEff ( uint32_t  id  ) 

Definition at line 111 of file RPCSimSetUp.cc.

References _mapDetIdEff, and iter.

00112 {
00113   map<uint32_t,std::vector<float> >::iterator iter = _mapDetIdEff.find(id);
00114   return iter->second;
00115 }

const RPCGeometry* RPCSimSetUp::getGeometry (  )  [inline]

Definition at line 42 of file RPCSimSetUp.h.

References theGeometry.

Referenced by RPCSynchronizer::getSimHitBx().

00042 { return theGeometry; }

const std::vector< float > & RPCSimSetUp::getNoise ( uint32_t  id  ) 

Definition at line 105 of file RPCSimSetUp.cc.

References _mapDetIdNoise, and iter.

00106 {
00107   map<uint32_t,std::vector<float> >::iterator iter = _mapDetIdNoise.find(id);
00108   return iter->second;
00109 }

float RPCSimSetUp::getTime ( uint32_t  id  ) 

Definition at line 117 of file RPCSimSetUp.cc.

References _bxmap, and iter.

Referenced by RPCSynchronizer::getSimHitBx().

00118 {
00119   RPCDetId rpcid(id);
00120   std::map<RPCDetId, float>::iterator iter = _bxmap.find(rpcid);
00121   return iter->second;
00122 }

void RPCSimSetUp::setGeometry ( const RPCGeometry geom  )  [inline]

sets geometry

Definition at line 40 of file RPCSimSetUp.h.

References theGeometry.

Referenced by RPCDigiProducer::beginRun().

00040 {theGeometry = geom;}

void RPCSimSetUp::setRPCSetUp ( std::vector< RPCStripNoises::NoiseItem vnoise,
std::vector< float >  vcls 
)

Definition at line 46 of file RPCSimSetUp.cc.

References _bxmap, _clsMap, _mapDetIdEff, _mapDetIdNoise, counter(), it, n, row, sum(), and pyDBSRunClass::temp.

Referenced by RPCDigiProducer::beginRun().

00046                                                                                              {
00047 
00048   double sum = 0;
00049   unsigned int counter = 1;
00050   unsigned int row = 1;
00051   std::vector<double> sum_clsize;
00052 
00053   for(unsigned int n = 0; n < vcls.size(); ++n){
00054 
00055     sum_clsize.push_back(vcls[n]);
00056 
00057     if(counter == row*20) {
00058 
00059       _clsMap[row] = sum_clsize;
00060       row++;
00061       sum = 0;
00062       sum_clsize.clear();
00063     }
00064     counter++;
00065   }
00066 
00067   unsigned int n = 0; 
00068   uint32_t temp = 0; 
00069   std::vector<float> veff, vvnoise;
00070   veff.clear();
00071   vvnoise.clear();
00072 
00073   for(std::vector<RPCStripNoises::NoiseItem>::iterator it = vnoise.begin(); it != vnoise.end(); ++it){
00074 
00075     if(n%96 == 0) {
00076       if(n > 0 ){
00077         _mapDetIdNoise[temp]= vvnoise;
00078         _mapDetIdEff[temp] = veff;
00079         _bxmap[RPCDetId(it->dpid)] = it->time;
00080         veff.clear();
00081         vvnoise.clear();
00082         vvnoise.push_back((it->noise));
00083         veff.push_back((it->eff));
00084       }
00085       else if(n == 0 ){
00086         vvnoise.push_back((it->noise));
00087         veff.push_back((it->eff));
00088         _bxmap[RPCDetId(it->dpid)] = it->time;
00089       }
00090     } else if (n == vnoise.size()-1 ){
00091       temp = it->dpid;
00092       vvnoise.push_back((it->noise));
00093       veff.push_back((it->eff));
00094       _mapDetIdNoise[temp]= vvnoise;
00095       _mapDetIdEff[temp] = veff;
00096     } else {
00097       temp = it->dpid;
00098       vvnoise.push_back((it->noise));
00099       veff.push_back((it->eff));
00100     }
00101     n++;
00102   }
00103 }


Member Data Documentation

std::map<RPCDetId, float> RPCSimSetUp::_bxmap

Definition at line 48 of file RPCSimSetUp.h.

Referenced by getTime(), RPCSimSetUp(), and setRPCSetUp().

std::map< int, std::vector<double> > RPCSimSetUp::_clsMap

Definition at line 49 of file RPCSimSetUp.h.

Referenced by getClsMap(), RPCSimSetUp(), and setRPCSetUp().

std::map<uint32_t, std::vector<float> > RPCSimSetUp::_mapDetIdEff

Definition at line 47 of file RPCSimSetUp.h.

Referenced by getEff(), RPCSimSetUp(), and setRPCSetUp().

std::map<uint32_t, std::vector<float> > RPCSimSetUp::_mapDetIdNoise

Definition at line 46 of file RPCSimSetUp.h.

Referenced by getNoise(), RPCSimSetUp(), and setRPCSetUp().

const RPCGeometry* RPCSimSetUp::theGeometry

Definition at line 44 of file RPCSimSetUp.h.

Referenced by getGeometry(), and setGeometry().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:31:11 2009 for CMSSW by  doxygen 1.5.4