39 _mapDetIdNoise.clear();
51 std::vector<double> sum_clsize;
53 for(
unsigned int n = 0;
n < vcls.size(); ++
n){
55 sum_clsize.push_back(vcls[
n]);
57 if(counter == row*20) {
59 _clsMap[row] = sum_clsize;
69 std::vector<float> veff, vvnoise;
73 for(std::vector<RPCStripNoises::NoiseItem>::iterator it = vnoise.begin(); it != vnoise.end(); ++it){
76 _mapDetIdNoise[
temp]= vvnoise;
77 _mapDetIdEff[
temp] = veff;
78 _bxmap[
RPCDetId(it->dpid)] = it->time;
82 vvnoise.push_back((it->noise));
83 veff.push_back((it->eff));
86 vvnoise.push_back((it->noise));
87 veff.push_back((it->eff));
88 _bxmap[
RPCDetId(it->dpid)] = it->time;
90 }
else if (n == vnoise.size()-1 ){
92 vvnoise.push_back((it->noise));
93 veff.push_back((it->eff));
94 _mapDetIdNoise[
temp]= vvnoise;
95 _mapDetIdEff[
temp] = veff;
98 vvnoise.push_back((it->noise));
99 veff.push_back((it->eff));
105 void RPCSimSetUp::setRPCSetUp(std::vector<RPCStripNoises::NoiseItem> vnoise, std::vector<RPCClusterSize::ClusterSizeItem> vClusterSize){
107 std::vector<RPCClusterSize::ClusterSizeItem>::iterator itCls;
110 std::vector<double> clsVect;
112 for(itCls = vClusterSize.begin(); itCls != vClusterSize.end(); ++itCls){
113 clsVect.push_back(((
double)(itCls->clusterSize)));
114 if((!(clsCounter%100)) && (clsCounter!=0)){
116 _mapDetClsMap[detId]=clsVect;
125 std::vector<float> veff, vvnoise;
129 for(std::vector<RPCStripNoises::NoiseItem>::iterator it = vnoise.begin(); it != vnoise.end(); ++it){
132 _mapDetIdNoise[
temp]= vvnoise;
133 _mapDetIdEff[
temp] = veff;
134 _bxmap[
RPCDetId(it->dpid)] = it->time;
138 vvnoise.push_back((it->noise));
139 veff.push_back((it->eff));
142 vvnoise.push_back((it->noise));
143 veff.push_back((it->eff));
144 _bxmap[
RPCDetId(it->dpid)] = it->time;
146 }
else if (n == vnoise.size()-1 ){
148 vvnoise.push_back((it->noise));
149 veff.push_back((it->eff));
150 _mapDetIdNoise[
temp]= vvnoise;
151 _mapDetIdEff[
temp] = veff;
154 vvnoise.push_back((it->noise));
155 veff.push_back((it->eff));
164 map<uint32_t,std::vector<float> >::iterator iter = _mapDetIdNoise.find(
id);
165 if(iter == _mapDetIdNoise.end()){
167 <<
"Exception comming from RPCSimSetUp - no noise information for DetId\t"<<
id<< std::endl;
174 map<uint32_t,std::vector<float> >::iterator iter = _mapDetIdEff.find(
id);
175 if(iter == _mapDetIdEff.end()){
177 <<
"Exception comming from RPCSimSetUp - no efficiency information for DetId\t"<<
id<< std::endl;
179 if((iter->second).size() != 96){
181 <<
"Exception comming from RPCSimSetUp - efficiency information in a wrong format for DetId\t"<<
id<< std::endl;
189 std::map<RPCDetId, float>::iterator iter = _bxmap.find(rpcid);
190 if(iter == _bxmap.end()){
192 <<
"Exception comming from RPCSimSetUp - no timing information for rpcid.rawId()\t"<<rpcid.
rawId()<< std::endl;
199 if(_clsMap.size()!=5){
201 <<
"Exception comming from RPCSimSetUp - cluster size - a wrong format "<< std::endl;
211 map<uint32_t,std::vector<double> >::iterator iter = _mapDetClsMap.find(
id);
212 if(iter == _mapDetClsMap.end()){
214 <<
"Exception comming from RPCSimSetUp - no cluster size information for DetId\t"<<
id<< std::endl;
216 if((iter->second).size() != 100){
218 <<
"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)