CMS 3D CMS Logo

RCTConfigProducers.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: RCTConfigProducers
4 // Class: RCTConfigProducers
5 //
13 //
14 // Original Author: Sridhara Dasu
15 // Created: Mon Jul 16 23:48:35 CEST 2007
16 //
17 //
18 
19 // system include files
20 #include <memory>
21 
22 // user include files
27 
34 
35 //
36 // class declaration
37 //
38 
40 public:
42  ~RCTConfigProducers() override;
43 
44  //typedef std::shared_ptr<L1RCTParameters> ReturnType;
45  //typedef edm::ESProducts< std::shared_ptr<L1RCTParameters>, std::shared_ptr<L1RCTChannelMask> > ReturnType;
46 
47  //ReturnType produce(const L1RCTParametersRcd&);
48  std::unique_ptr<L1RCTParameters> produceL1RCTParameters(const L1RCTParametersRcd&);
49  std::unique_ptr<L1RCTChannelMask> produceL1RCTChannelMask(const L1RCTChannelMaskRcd&);
50  std::unique_ptr<L1RCTNoisyChannelMask> produceL1RCTNoisyChannelMask(const L1RCTNoisyChannelMaskRcd&);
51 
52 private:
53  // ----------member data ---------------------------
57 };
58 
59 //
60 // constants, enums and typedefs
61 //
62 
63 //
64 // static data member definitions
65 //
66 
67 //
68 // constructors and destructor
69 //
71  //the following line is needed to tell the framework what
72  // data is being produced
73  //setWhatProduced(this);
77 
78  //now do what ever other initialization is needed
79  rctParameters = L1RCTParameters(iConfig.getParameter<double>("eGammaLSB"),
80  iConfig.getParameter<double>("jetMETLSB"),
81  iConfig.getParameter<double>("eMinForFGCut"),
82  iConfig.getParameter<double>("eMaxForFGCut"),
83  iConfig.getParameter<double>("hOeCut"),
84  iConfig.getParameter<double>("eMinForHoECut"),
85  iConfig.getParameter<double>("eMaxForHoECut"),
86  iConfig.getParameter<double>("hMinForHoECut"),
87  iConfig.getParameter<double>("eActivityCut"),
88  iConfig.getParameter<double>("hActivityCut"),
89  iConfig.getParameter<unsigned>("eicIsolationThreshold"),
90  iConfig.getParameter<unsigned>("jscQuietThresholdBarrel"),
91  iConfig.getParameter<unsigned>("jscQuietThresholdEndcap"),
92  iConfig.getParameter<bool>("noiseVetoHB"),
93  iConfig.getParameter<bool>("noiseVetoHEplus"),
94  iConfig.getParameter<bool>("noiseVetoHEminus"),
95  iConfig.getParameter<bool>("useCorrectionsLindsey"),
96  iConfig.getParameter<std::vector<double> >("eGammaECalScaleFactors"),
97  iConfig.getParameter<std::vector<double> >("eGammaHCalScaleFactors"),
98  iConfig.getParameter<std::vector<double> >("jetMETECalScaleFactors"),
99  iConfig.getParameter<std::vector<double> >("jetMETHCalScaleFactors"),
100  iConfig.getParameter<std::vector<double> >("ecal_calib_Lindsey"),
101  iConfig.getParameter<std::vector<double> >("hcal_calib_Lindsey"),
102  iConfig.getParameter<std::vector<double> >("hcal_high_calib_Lindsey"),
103  iConfig.getParameter<std::vector<double> >("cross_terms_Lindsey"),
104  iConfig.getParameter<std::vector<double> >("HoverE_low_Lindsey"),
105  iConfig.getParameter<std::vector<double> >("HoverE_high_Lindsey"));
106 
107  // value of true if channel is masked, false if not masked
108  for (int i = 0; i < 18; i++) {
109  for (int j = 0; j < 2; j++) {
110  for (int k = 0; k < 28; k++) {
111  rctChannelMask.ecalMask[i][j][k] = false;
112  rctChannelMask.hcalMask[i][j][k] = false;
113  }
114  for (int k = 0; k < 4; k++) {
115  rctChannelMask.hfMask[i][j][k] = false;
116  }
117  }
118  }
119 
120  //Now the hot tower mask
121 
122  //first the thresholds
123 
127 
128  for (int i = 0; i < 18; i++) {
129  for (int j = 0; j < 2; j++) {
130  for (int k = 0; k < 28; k++) {
131  rctNoisyChannelMask.ecalMask[i][j][k] = false;
132  rctNoisyChannelMask.hcalMask[i][j][k] = false;
133  }
134  for (int k = 0; k < 4; k++) {
135  rctNoisyChannelMask.hfMask[i][j][k] = false;
136  }
137  }
138  }
139 }
140 
142  // do anything here that needs to be done at desctruction time
143  // (e.g. close files, deallocate resources etc.)
144 }
145 
146 //
147 // member functions
148 //
149 
150 // ------------ method called to produce the data ------------
151 //RCTConfigProducers::ReturnType
152 std::unique_ptr<L1RCTParameters> RCTConfigProducers::produceL1RCTParameters(const L1RCTParametersRcd& iRecord) {
153  return std::make_unique<L1RCTParameters>(rctParameters);
154 }
155 
156 std::unique_ptr<L1RCTChannelMask> RCTConfigProducers::produceL1RCTChannelMask(const L1RCTChannelMaskRcd& iRecord) {
157  return std::make_unique<L1RCTChannelMask>(rctChannelMask);
158 }
159 
160 std::unique_ptr<L1RCTNoisyChannelMask> RCTConfigProducers::produceL1RCTNoisyChannelMask(
161  const L1RCTNoisyChannelMaskRcd& iRecord) {
162  return std::make_unique<L1RCTNoisyChannelMask>(rctNoisyChannelMask);
163 }
164 
165 //define this as a plug-in
L1RCTNoisyChannelMask.h
L1RCTChannelMaskRcd.h
mps_fire.i
i
Definition: mps_fire.py:355
L1RCTNoisyChannelMaskRcd
Definition: L1RCTNoisyChannelMaskRcd.h:12
L1RCTParameters.h
L1RCTNoisyChannelMask::hfThreshold
float hfThreshold
Definition: L1RCTNoisyChannelMask.h:14
ESHandle.h
RCTConfigProducers::RCTConfigProducers
RCTConfigProducers(const edm::ParameterSet &)
Definition: RCTConfigProducers.cc:70
RCTConfigProducers::rctChannelMask
L1RCTChannelMask rctChannelMask
Definition: RCTConfigProducers.cc:55
L1RCTParametersRcd
Definition: L1RCTParametersRcd.h:12
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
ESProducer.h
RCTConfigProducers::~RCTConfigProducers
~RCTConfigProducers() override
Definition: RCTConfigProducers.cc:141
L1RCTChannelMask::hfMask
bool hfMask[18][2][4]
Definition: L1RCTChannelMask.h:10
L1RCTChannelMask
Definition: L1RCTChannelMask.h:7
L1RCTNoisyChannelMask::ecalMask
bool ecalMask[18][2][28]
Definition: L1RCTNoisyChannelMask.h:8
RCTConfigProducers::produceL1RCTNoisyChannelMask
std::unique_ptr< L1RCTNoisyChannelMask > produceL1RCTNoisyChannelMask(const L1RCTNoisyChannelMaskRcd &)
Definition: RCTConfigProducers.cc:160
RCTConfigProducers::rctParameters
L1RCTParameters rctParameters
Definition: RCTConfigProducers.cc:54
L1RCTChannelMask.h
L1RCTNoisyChannelMaskRcd.h
L1RCTNoisyChannelMask
Definition: L1RCTNoisyChannelMask.h:7
dqmdumpme.k
k
Definition: dqmdumpme.py:60
RCTConfigProducers::produceL1RCTParameters
std::unique_ptr< L1RCTParameters > produceL1RCTParameters(const L1RCTParametersRcd &)
Definition: RCTConfigProducers.cc:152
ESProducts.h
edm::ParameterSet
Definition: ParameterSet.h:36
L1RCTChannelMaskRcd
Definition: L1RCTChannelMaskRcd.h:12
RCTConfigProducers::rctNoisyChannelMask
L1RCTNoisyChannelMask rctNoisyChannelMask
Definition: RCTConfigProducers.cc:56
L1RCTNoisyChannelMask::ecalThreshold
float ecalThreshold
Definition: L1RCTNoisyChannelMask.h:12
L1RCTNoisyChannelMask::hfMask
bool hfMask[18][2][4]
Definition: L1RCTNoisyChannelMask.h:10
L1RCTChannelMask::hcalMask
bool hcalMask[18][2][28]
Definition: L1RCTChannelMask.h:9
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
ModuleFactory.h
RCTConfigProducers
Definition: RCTConfigProducers.cc:39
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
L1RCTParameters
Definition: L1RCTParameters.h:27
edm::ESProducer
Definition: ESProducer.h:101
L1RCTParametersRcd.h
L1RCTChannelMask::ecalMask
bool ecalMask[18][2][28]
Definition: L1RCTChannelMask.h:8
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
RCTConfigProducers::produceL1RCTChannelMask
std::unique_ptr< L1RCTChannelMask > produceL1RCTChannelMask(const L1RCTChannelMaskRcd &)
Definition: RCTConfigProducers.cc:156
L1RCTNoisyChannelMask::hcalThreshold
float hcalThreshold
Definition: L1RCTNoisyChannelMask.h:13
L1RCTNoisyChannelMask::hcalMask
bool hcalMask[18][2][28]
Definition: L1RCTNoisyChannelMask.h:9