CalibMuon
RPCCalibration
src
RPCFakeCalibration.cc
Go to the documentation of this file.
1
#include "
CalibMuon/RPCCalibration/interface/RPCCalibSetUp.h
"
2
#include "
CalibMuon/RPCCalibration/interface/RPCFakeCalibration.h
"
3
#include "
CondFormats/DataRecord/interface/RPCStripNoisesRcd.h
"
4
#include "
CondFormats/RPCObjects/interface/RPCStripNoises.h
"
5
#include "
DataFormats/Common/interface/Handle.h
"
6
#include "
DataFormats/MuonDetId/interface/RPCDetId.h
"
7
#include "
FWCore/Framework/interface/EDAnalyzer.h
"
8
#include "
FWCore/Framework/interface/ESHandle.h
"
9
#include "
FWCore/Framework/interface/Event.h
"
10
#include "
FWCore/Framework/interface/EventSetup.h
"
11
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
12
#include "
FWCore/Framework/interface/MakerMacros.h
"
13
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
14
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
15
#include "
FWCore/ServiceRegistry/interface/Service.h
"
16
17
#include <cmath>
18
#include <fstream>
19
#include <iostream>
20
#include <memory>
21
22
RPCFakeCalibration::RPCFakeCalibration
(
const
edm::ParameterSet
&
pset
) :
RPCPerformanceESSource
(
pset
) {
23
edm::LogInfo
(
"RPCFakeCalibration::RPCFakeCalibration"
);
24
theRPCCalibSetUp
=
new
RPCCalibSetUp
(
pset
);
25
}
26
27
RPCStripNoises
*
RPCFakeCalibration::makeNoise
() {
28
RPCStripNoises
*
obj
=
new
RPCStripNoises
();
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();
39
it != (
theRPCCalibSetUp
->
_mapDetIdNoise
).
end
();
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
54
RPCClusterSize
*
RPCFakeCalibration::makeCls
() {
55
RPCClusterSize
*
obj
=
new
RPCClusterSize
();
56
RPCClusterSize::ClusterSizeItem
rpcClsItem;
57
58
for
(
std::map
<uint32_t, std::vector<double>>::iterator it = (
theRPCCalibSetUp
->
_mapDetClsMap
).begin();
59
it != (
theRPCCalibSetUp
->
_mapDetClsMap
).
end
();
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
}
Handle.h
RPCClusterSize::ClusterSizeItem::dpid
int dpid
Definition:
RPCClusterSize.h:14
MessageLogger.h
dqmiodumpmetadata.n
n
Definition:
dqmiodumpmetadata.py:28
RPCPerformanceESSource
Pure virtual class for EventSetup sources of RPCStripNoises.
Definition:
RPCPerformanceESSource.h:18
ESHandle.h
RPCStripNoises::NoiseItem
Definition:
RPCStripNoises.h:12
RPCClusterSize::ClusterSizeItem::clusterSize
float clusterSize
Definition:
RPCClusterSize.h:15
RPCFakeCalibration::makeCls
RPCClusterSize * makeCls()
Definition:
RPCFakeCalibration.cc:54
edm::LogInfo
Definition:
MessageLogger.h:254
RPCStripNoisesRcd.h
RPCClusterSize
Definition:
RPCClusterSize.h:10
EDAnalyzer.h
RPCStripNoises::NoiseItem::eff
float eff
Definition:
RPCStripNoises.h:15
end
#define end
Definition:
vmac.h:39
RPCCalibSetUp::_clsMap
std::map< int, std::vector< double > > _clsMap
Definition:
RPCCalibSetUp.h:44
RPCCalibSetUp::_mapDetClsMap
std::map< uint32_t, std::vector< double > > _mapDetClsMap
Definition:
RPCCalibSetUp.h:45
RPCClusterSize::ClusterSizeItem
Definition:
RPCClusterSize.h:13
MakerMacros.h
RPCStripNoises
Definition:
RPCStripNoises.h:10
Service.h
dqmdumpme.k
k
Definition:
dqmdumpme.py:60
getGTfromDQMFile.obj
obj
Definition:
getGTfromDQMFile.py:32
RPCDetId.h
edm::ParameterSet
Definition:
ParameterSet.h:36
RPCCalibSetUp::getTime
float getTime(uint32_t id)
Definition:
RPCCalibSetUp.cc:215
Event.h
RPCStripNoises::NoiseItem::dpid
int dpid
Definition:
RPCStripNoises.h:13
RPCCalibSetUp
Definition:
RPCCalibSetUp.h:23
RPCFakeCalibration::makeNoise
RPCStripNoises * makeNoise() override
Definition:
RPCFakeCalibration.cc:27
RPCFakeCalibration::RPCFakeCalibration
RPCFakeCalibration(const edm::ParameterSet &)
Definition:
RPCFakeCalibration.cc:22
RPCCalibSetUp.h
Frameworkfwd.h
RPCStripNoises.h
RPCStripNoises::NoiseItem::noise
float noise
Definition:
RPCStripNoises.h:14
RPCCalibSetUp::_mapDetIdNoise
std::map< uint32_t, std::vector< float > > _mapDetIdNoise
Definition:
RPCCalibSetUp.h:41
EventSetup.h
genParticles_cff.map
map
Definition:
genParticles_cff.py:11
ParameterSet.h
RPCCalibSetUp::getEff
std::vector< float > getEff(uint32_t id)
Definition:
RPCCalibSetUp.cc:200
RPCFakeCalibration::theRPCCalibSetUp
RPCCalibSetUp * theRPCCalibSetUp
Definition:
RPCFakeCalibration.h:33
RPCFakeCalibration.h
RPCStripNoises::NoiseItem::time
float time
Definition:
RPCStripNoises.h:16
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
RPCCalibSetUp::getCls
std::vector< double > getCls(uint32_t id)
Definition:
RPCCalibSetUp.cc:236
findQualityFiles.size
size
Write out results.
Definition:
findQualityFiles.py:443
Generated for CMSSW Reference Manual by
1.8.16