39 _mapDetIdNoise.clear();
48 unsigned int counter = 1;
50 std::vector<double> sum_clsize;
52 for(
unsigned int n = 0;
n < vcls.size(); ++
n){
54 sum_clsize.push_back(vcls[
n]);
56 if(counter == row*20) {
58 _clsMap[row] = sum_clsize;
67 std::vector<float> veff, vvnoise;
71 for(std::vector<RPCStripNoises::NoiseItem>::iterator it = vnoise.begin(); it != vnoise.end(); ++it){
74 _mapDetIdNoise[
temp]= vvnoise;
75 _mapDetIdEff[
temp] = veff;
76 _bxmap[
RPCDetId(it->dpid)] = it->time;
80 vvnoise.push_back((it->noise));
81 veff.push_back((it->eff));
84 vvnoise.push_back((it->noise));
85 veff.push_back((it->eff));
86 _bxmap[
RPCDetId(it->dpid)] = it->time;
88 }
else if (n == vnoise.size()-1 ){
90 vvnoise.push_back((it->noise));
91 veff.push_back((it->eff));
92 _mapDetIdNoise[
temp]= vvnoise;
93 _mapDetIdEff[
temp] = veff;
96 vvnoise.push_back((it->noise));
97 veff.push_back((it->eff));
103 void RPCSimSetUp::setRPCSetUp(std::vector<RPCStripNoises::NoiseItem> vnoise, std::vector<RPCClusterSize::ClusterSizeItem> vClusterSize){
105 std::vector<RPCClusterSize::ClusterSizeItem>::iterator itCls;
108 std::vector<double> clsVect;
110 for(itCls = vClusterSize.begin(); itCls != vClusterSize.end(); ++itCls){
111 clsVect.push_back(((
double)(itCls->clusterSize)));
112 if((!(clsCounter%100)) && (clsCounter!=0)){
114 _mapDetClsMap[detId]=clsVect;
123 std::vector<float> veff, vvnoise;
127 for(std::vector<RPCStripNoises::NoiseItem>::iterator it = vnoise.begin(); it != vnoise.end(); ++it){
130 _mapDetIdNoise[
temp]= vvnoise;
131 _mapDetIdEff[
temp] = veff;
132 _bxmap[
RPCDetId(it->dpid)] = it->time;
136 vvnoise.push_back((it->noise));
137 veff.push_back((it->eff));
140 vvnoise.push_back((it->noise));
141 veff.push_back((it->eff));
142 _bxmap[
RPCDetId(it->dpid)] = it->time;
144 }
else if (n == vnoise.size()-1 ){
146 vvnoise.push_back((it->noise));
147 veff.push_back((it->eff));
148 _mapDetIdNoise[
temp]= vvnoise;
149 _mapDetIdEff[
temp] = veff;
152 vvnoise.push_back((it->noise));
153 veff.push_back((it->eff));
162 map<uint32_t,std::vector<float> >::iterator iter = _mapDetIdNoise.find(
id);
163 if(iter == _mapDetIdNoise.end()){
165 <<
"Exception comming from RPCSimSetUp - no noise information for DetId\t"<<
id<< std::endl;
172 map<uint32_t,std::vector<float> >::iterator iter = _mapDetIdEff.find(
id);
173 if(iter == _mapDetIdEff.end()){
175 <<
"Exception comming from RPCSimSetUp - no efficiency information for DetId\t"<<
id<< std::endl;
177 if((iter->second).size() != 96){
179 <<
"Exception comming from RPCSimSetUp - efficiency information in a wrong format for DetId\t"<<
id<< std::endl;
187 std::map<RPCDetId, float>::iterator iter = _bxmap.find(rpcid);
188 if(iter == _bxmap.end()){
190 <<
"Exception comming from RPCSimSetUp - no timing information for rpcid.rawId()\t"<<rpcid.
rawId()<< std::endl;
197 if(_clsMap.size()!=5){
199 <<
"Exception comming from RPCSimSetUp - cluster size - a wrong format "<< std::endl;
209 map<uint32_t,std::vector<double> >::iterator iter = _mapDetClsMap.find(
id);
210 if(iter == _mapDetClsMap.end()){
212 <<
"Exception comming from RPCSimSetUp - no cluster size information for DetId\t"<<
id<< std::endl;
214 if((iter->second).size() != 100){
216 <<
"Exception comming from RPCSimSetUp - cluster size information in a wrong format for DetId\t"<<
id<< std::endl;
float getTime(uint32_t id)
RPCSimSetUp(const edm::ParameterSet &ps)
const std::vector< float > & getEff(uint32_t id)
uint32_t rawId() const
get the raw id
const std::vector< float > & getNoise(uint32_t id)
const std::vector< double > & getCls(uint32_t id)
const std::map< int, std::vector< double > > & getClsMap()
void setRPCSetUp(std::vector< RPCStripNoises::NoiseItem > vnoise, std::vector< float > vcls)