CMS 3D CMS Logo

RPCFakeCalibration.cc
Go to the documentation of this file.
18 
19 #include <cmath>
20 #include <cmath>
21 #include <iostream>
22 #include <memory>
23 #include <fstream>
24 
26  edm::LogInfo("RPCFakeCalibration::RPCFakeCalibration");
27  theRPCCalibSetUp = new RPCCalibSetUp(pset);
28 }
29 
32 
33  std::map< int, std::vector<double> >::iterator itc;
34  for(itc = (theRPCCalibSetUp->_clsMap).begin();itc != (theRPCCalibSetUp->_clsMap).end();++itc){
35  for(unsigned int n = 0; n < (itc->second).size();++n){
36  (obj->v_cls).push_back((itc->second)[n]);
37  }
38  }
39 
40  RPCStripNoises::NoiseItem tipoprova;
41  for(std::map<uint32_t, std::vector<float> >::iterator it = (theRPCCalibSetUp->_mapDetIdNoise).begin();
42  it != (theRPCCalibSetUp->_mapDetIdNoise).end(); ++it){
43 
44  tipoprova.dpid = it->first;
45  tipoprova.time = theRPCCalibSetUp->getTime(it->first);
46 
47  for(unsigned int k = 0; k < 96; ++k){
48  tipoprova.noise = ((it->second))[k];
49  tipoprova.eff = (theRPCCalibSetUp->getEff(it->first))[k];
50  (obj->v_noises).push_back(tipoprova);
51  }
52  }
53 
54  return obj;
55 }
56 
60 
61  for(std::map<uint32_t, std::vector<double> >::iterator it
62  = (theRPCCalibSetUp->_mapDetClsMap).begin();
63  it != (theRPCCalibSetUp->_mapDetClsMap).end(); ++it){
64 
65  rpcClsItem.dpid = it->first;
66 
67  for(unsigned int k = 0; k < 100; k++){
68 
69 
70  rpcClsItem.clusterSize = (theRPCCalibSetUp->getCls(it->first))[k];
71  (obj->v_cls).push_back(rpcClsItem);
72  }
73  }
74  return obj;
75 }
size
Write out results.
RPCClusterSize * makeCls()
std::vector< ClusterSizeItem > v_cls
RPCCalibSetUp * theRPCCalibSetUp
std::vector< double > getCls(uint32_t id)
std::vector< float > getEff(uint32_t id)
std::map< uint32_t, std::vector< float > > _mapDetIdNoise
Definition: RPCCalibSetUp.h:43
#define end
Definition: vmac.h:37
RPCFakeCalibration(const edm::ParameterSet &)
std::map< int, std::vector< double > > _clsMap
Definition: RPCCalibSetUp.h:46
int k[5][pyjets_maxn]
float getTime(uint32_t id)
std::vector< float > v_cls
std::vector< NoiseItem > v_noises
RPCStripNoises * makeNoise() override
Pure virtual class for EventSetup sources of RPCStripNoises.
std::map< uint32_t, std::vector< double > > _mapDetClsMap
Definition: RPCCalibSetUp.h:47