CMS 3D CMS Logo

RPCFakeCalibration.cc
Go to the documentation of this file.
16 
17 #include <cmath>
18 #include <fstream>
19 #include <iostream>
20 #include <memory>
21 
23  edm::LogInfo("RPCFakeCalibration::RPCFakeCalibration");
24  theRPCCalibSetUp = new RPCCalibSetUp(pset);
25 }
26 
29 
30  std::map<int, std::vector<double>>::iterator itc;
31  for (itc = (theRPCCalibSetUp->_clsMap).begin(); itc != (theRPCCalibSetUp->_clsMap).end(); ++itc) {
32  for (unsigned int n = 0; n < (itc->second).size(); ++n) {
33  (obj->v_cls).push_back((itc->second)[n]);
34  }
35  }
36 
37  RPCStripNoises::NoiseItem tipoprova;
38  for (std::map<uint32_t, std::vector<float>>::iterator it = (theRPCCalibSetUp->_mapDetIdNoise).begin();
40  ++it) {
41  tipoprova.dpid = it->first;
42  tipoprova.time = theRPCCalibSetUp->getTime(it->first);
43 
44  for (unsigned int k = 0; k < 96; ++k) {
45  tipoprova.noise = ((it->second))[k];
46  tipoprova.eff = (theRPCCalibSetUp->getEff(it->first))[k];
47  (obj->v_noises).push_back(tipoprova);
48  }
49  }
50 
51  return obj;
52 }
53 
57 
58  for (std::map<uint32_t, std::vector<double>>::iterator it = (theRPCCalibSetUp->_mapDetClsMap).begin();
60  ++it) {
61  rpcClsItem.dpid = it->first;
62 
63  for (unsigned int k = 0; k < 100; k++) {
64  rpcClsItem.clusterSize = (theRPCCalibSetUp->getCls(it->first))[k];
65  (obj->v_cls).push_back(rpcClsItem);
66  }
67  }
68  return obj;
69 }
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:41
#define end
Definition: vmac.h:39
RPCFakeCalibration(const edm::ParameterSet &)
std::map< int, std::vector< double > > _clsMap
Definition: RPCCalibSetUp.h:44
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:45