CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
CSCNoiseMatrixConditions Class Reference

#include <CSCNoiseMatrixConditions.h>

Inheritance diagram for CSCNoiseMatrixConditions:
edm::ESProducer edm::EventSetupRecordIntervalFinder edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Types

typedef std::unique_ptr
< CSCNoiseMatrix
ReturnType
 

Public Member Functions

 CSCNoiseMatrixConditions (const edm::ParameterSet &)
 
ReturnType produceNoiseMatrix (const CSCNoiseMatrixRcd &)
 
 ~CSCNoiseMatrixConditions () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector
< ESProxyIndex > > 
updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
 ESProxyFactoryProducer (const ESProxyFactoryProducer &)=delete
 
const ESProxyFactoryProduceroperator= (const ESProxyFactoryProducer &)=delete
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
void createKeyedProxies (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
 DataProxyProvider ()
 
 DataProxyProvider (const DataProxyProvider &)=delete
 
const ComponentDescriptiondescription () const
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const DataProxyProvideroperator= (const DataProxyProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 
- Public Member Functions inherited from edm::EventSetupRecordIntervalFinder
bool concurrentFinder () const
 
const
eventsetup::ComponentDescription
descriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
 EventSetupRecordIntervalFinder (const EventSetupRecordIntervalFinder &)=delete
 
std::set
< eventsetup::EventSetupRecordKey
findingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
bool nonconcurrentAndIOVNeedsUpdate (const eventsetup::EventSetupRecordKey &key, const IOVSyncValue &syncValue) const
 
const
EventSetupRecordIntervalFinder
operator= (const EventSetupRecordIntervalFinder &)=delete
 
void resetInterval (const eventsetup::EventSetupRecordKey &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder () noexcept(false)
 

Static Public Member Functions

static CSCNoiseMatrixprefillNoiseMatrix ()
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 

Private Member Functions

void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
 

Private Attributes

CSCNoiseMatrixcnMatrix
 

Additional Inherited Members

- Protected Types inherited from edm::ESProxyFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::DataProxyProvider
using KeyedProxiesVector = std::vector< std::pair< DataKey, std::shared_ptr< DataProxy >>>
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
ESConsumesCollectorT< TRecord > setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
void usesResources (std::vector< std::string > const &)
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedProxiesVector registerProxies (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 
- Protected Member Functions inherited from edm::EventSetupRecordIntervalFinder
template<class T >
void findingRecord ()
 
void findingRecordWithKey (const eventsetup::EventSetupRecordKey &)
 

Detailed Description

Definition at line 19 of file CSCNoiseMatrixConditions.h.

Member Typedef Documentation

Definition at line 26 of file CSCNoiseMatrixConditions.h.

Constructor & Destructor Documentation

CSCNoiseMatrixConditions::CSCNoiseMatrixConditions ( const edm::ParameterSet iConfig)

Definition at line 422 of file CSCNoiseMatrixConditions.cc.

References produceNoiseMatrix(), and edm::ESProducer::setWhatProduced().

422  {
423  // the following line is needed to tell the framework what
424  // data is being produced
425  // added by Zhen (changed since 1_2_0)
427  findingRecord<CSCNoiseMatrixRcd>();
428  // now do what ever other initialization is needed
429 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
ReturnType produceNoiseMatrix(const CSCNoiseMatrixRcd &)
CSCNoiseMatrixConditions::~CSCNoiseMatrixConditions ( )
override

Definition at line 431 of file CSCNoiseMatrixConditions.cc.

431  {
432  // do anything here that needs to be done at desctruction time
433  // (e.g. close files, deallocate resources etc.)
434 }

Member Function Documentation

CSCNoiseMatrix * CSCNoiseMatrixConditions::prefillNoiseMatrix ( )
static

Definition at line 6 of file CSCNoiseMatrixConditions.cc.

References EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, CSCDetId, beamvalidation::exit(), recoMuon::in, CSCNoiseMatrix::matrix, CSCDetId::maxChamberId(), CSCDetId::maxEndcapId(), CSCDetId::maxLayerId(), CSCDetId::maxRingId(), CSCDetId::maxStationId(), CSCDetId::minChamberId(), CSCDetId::minEndcapId(), CSCDetId::minLayerId(), CSCDetId::minRingId(), and CSCDetId::minStationId().

Referenced by produceNoiseMatrix().

6  {
7  int old_chamber_id, old_strip, new_chamber_id, new_strip;
8  float old_elm33, old_elm34, old_elm44, old_elm35, old_elm45, old_elm55;
9  float old_elm46, old_elm56, old_elm66, old_elm57, old_elm67, old_elm77;
10  std::vector<int> old_cham_id;
11  std::vector<int> old_strips;
12  std::vector<float> old_elem33;
13  std::vector<float> old_elem34;
14  std::vector<float> old_elem44;
15  std::vector<float> old_elem45;
16  std::vector<float> old_elem35;
17  std::vector<float> old_elem55;
18  std::vector<float> old_elem46;
19  std::vector<float> old_elem56;
20  std::vector<float> old_elem66;
21  std::vector<float> old_elem57;
22  std::vector<float> old_elem67;
23  std::vector<float> old_elem77;
24 
25  float new_elm33, new_elm34, new_elm44, new_elm35, new_elm45, new_elm55;
26  float new_elm46, new_elm56, new_elm66, new_elm57, new_elm67, new_elm77;
27  std::vector<int> new_cham_id;
28  std::vector<int> new_strips;
29  std::vector<float> new_elem33;
30  std::vector<float> new_elem34;
31  std::vector<float> new_elem44;
32  std::vector<float> new_elem45;
33  std::vector<float> new_elem35;
34  std::vector<float> new_elem55;
35  std::vector<float> new_elem46;
36  std::vector<float> new_elem56;
37  std::vector<float> new_elem66;
38  std::vector<float> new_elem57;
39  std::vector<float> new_elem67;
40  std::vector<float> new_elem77;
41 
42  const CSCDetId &detId = CSCDetId();
43  CSCNoiseMatrix *cnmatrix = new CSCNoiseMatrix();
44 
45  int max_istrip, id_layer, max_ring, max_cham;
46  unsigned int old_nrlines = 0;
47  unsigned int new_nrlines = 0;
48 
49  std::ifstream olddata;
50  olddata.open("old_matrix.dat", std::ios::in);
51  if (!olddata) {
52  std::cerr << "Error: old_matrix.dat -> no such file!" << std::endl;
53  exit(1);
54  }
55 
56  while (!olddata.eof()) {
57  olddata >> old_chamber_id >> old_strip >> old_elm33 >> old_elm34 >> old_elm44 >> old_elm35 >> old_elm45 >>
58  old_elm55 >> old_elm46 >> old_elm56 >> old_elm66 >> old_elm57 >> old_elm67 >> old_elm77;
59  old_cham_id.push_back(old_chamber_id);
60  old_strips.push_back(old_strip);
61  old_elem33.push_back(old_elm33);
62  old_elem34.push_back(old_elm34);
63  old_elem44.push_back(old_elm44);
64  old_elem35.push_back(old_elm35);
65  old_elem45.push_back(old_elm45);
66  old_elem55.push_back(old_elm55);
67  old_elem46.push_back(old_elm46);
68  old_elem56.push_back(old_elm56);
69  old_elem66.push_back(old_elm66);
70  old_elem57.push_back(old_elm57);
71  old_elem67.push_back(old_elm67);
72  old_elem77.push_back(old_elm77);
73 
74  old_nrlines++;
75  }
76  olddata.close();
77 
78  std::ifstream newdata;
79  newdata.open("new_matrix.txt", std::ios::in);
80  if (!newdata) {
81  std::cerr << "Error: new_matrix.txt -> no such file!" << std::endl;
82  exit(1);
83  }
84 
85  while (!newdata.eof()) {
86  newdata >> new_chamber_id >> new_strip >> new_elm33 >> new_elm34 >> new_elm44 >> new_elm35 >> new_elm45 >>
87  new_elm55 >> new_elm46 >> new_elm56 >> new_elm66 >> new_elm57 >> new_elm67 >> new_elm77;
88  new_cham_id.push_back(new_chamber_id);
89  new_strips.push_back(new_strip);
90  new_elem33.push_back(new_elm33);
91  new_elem34.push_back(new_elm34);
92  new_elem44.push_back(new_elm44);
93  new_elem35.push_back(new_elm35);
94  new_elem45.push_back(new_elm45);
95  new_elem55.push_back(new_elm55);
96  new_elem46.push_back(new_elm46);
97  new_elem56.push_back(new_elm56);
98  new_elem66.push_back(new_elm66);
99  new_elem57.push_back(new_elm57);
100  new_elem67.push_back(new_elm67);
101  new_elem77.push_back(new_elm77);
102  new_nrlines++;
103  }
104  newdata.close();
105 
106  // endcap=1 to 2,station=1 to 4, ring=1 to 4,chamber=1 to 36,layer=1 to 6
107 
108  for (int iendcap = detId.minEndcapId(); iendcap <= detId.maxEndcapId(); iendcap++) {
109  for (int istation = detId.minStationId(); istation <= detId.maxStationId(); istation++) {
110  max_ring = detId.maxRingId();
111  // station 4 ring 4 not there(36 chambers*2 missing)
112  // 3 rings max this way of counting (ME1a & b)
113  if (istation == 1)
114  max_ring = 3;
115  if (istation == 2)
116  max_ring = 2;
117  if (istation == 3)
118  max_ring = 2;
119  if (istation == 4)
120  max_ring = 1;
121 
122  for (int iring = detId.minRingId(); iring <= max_ring; iring++) {
123  max_istrip = 80;
124  max_cham = detId.maxChamberId();
125  if (istation == 1 && iring == 1)
126  max_cham = 36;
127  if (istation == 1 && iring == 2)
128  max_cham = 36;
129  if (istation == 1 && iring == 3)
130  max_cham = 36;
131  if (istation == 2 && iring == 1)
132  max_cham = 18;
133  if (istation == 2 && iring == 2)
134  max_cham = 36;
135  if (istation == 3 && iring == 1)
136  max_cham = 18;
137  if (istation == 3 && iring == 2)
138  max_cham = 36;
139  if (istation == 4 && iring == 1)
140  max_cham = 18;
141 
142  for (int ichamber = detId.minChamberId(); ichamber <= max_cham; ichamber++) {
143  for (int ilayer = detId.minLayerId(); ilayer <= detId.maxLayerId(); ilayer++) {
144  // station 1 ring 3 has 64 strips per layer instead of 80
145  if (istation == 1 && iring == 3)
146  max_istrip = 64;
147 
148  std::vector<CSCNoiseMatrix::Item> itemvector;
149  itemvector.resize(max_istrip);
150  id_layer = 100000 * iendcap + 10000 * istation + 1000 * iring + 10 * ichamber + ilayer;
151 
152  for (int istrip = 0; istrip < max_istrip; istrip++) {
153  if (istation == 1 && iring == 1) {
154  itemvector[istrip].elem33 = 7.86675;
155  itemvector[istrip].elem34 = 2.07075;
156  itemvector[istrip].elem44 = 6.93875;
157  itemvector[istrip].elem35 = 1.42525;
158  itemvector[istrip].elem45 = 2.51025;
159  itemvector[istrip].elem55 = 7.93975;
160  itemvector[istrip].elem46 = 0.94725;
161  itemvector[istrip].elem56 = 2.39275;
162  itemvector[istrip].elem66 = 6.46475;
163  itemvector[istrip].elem57 = 1.86325;
164  itemvector[istrip].elem67 = 2.08025;
165  itemvector[istrip].elem77 = 6.67975;
166  cnmatrix->matrix[id_layer] = itemvector;
167  }
168 
169  if (istation == 1 && iring == 2) {
170  itemvector[istrip].elem33 = 9.118;
171  itemvector[istrip].elem34 = 3.884;
172  itemvector[istrip].elem44 = 7.771;
173  itemvector[istrip].elem35 = 1.8225;
174  itemvector[istrip].elem45 = 3.7505;
175  itemvector[istrip].elem55 = 8.597;
176  itemvector[istrip].elem46 = 1.651;
177  itemvector[istrip].elem56 = 2.5225;
178  itemvector[istrip].elem66 = 6.583;
179  itemvector[istrip].elem57 = 1.5055;
180  itemvector[istrip].elem67 = 2.733;
181  itemvector[istrip].elem77 = 6.988;
182  cnmatrix->matrix[id_layer] = itemvector;
183  }
184 
185  if (istation == 1 && iring == 3) {
186  itemvector[istrip].elem33 = 9.5245;
187  itemvector[istrip].elem34 = 3.2415;
188  itemvector[istrip].elem44 = 7.6265;
189  itemvector[istrip].elem35 = 1.7225;
190  itemvector[istrip].elem45 = 3.6075;
191  itemvector[istrip].elem55 = 8.7275;
192  itemvector[istrip].elem46 = 1.663;
193  itemvector[istrip].elem56 = 2.592;
194  itemvector[istrip].elem66 = 7.5685;
195  itemvector[istrip].elem57 = 1.7905;
196  itemvector[istrip].elem67 = 2.409;
197  itemvector[istrip].elem77 = 7.1495;
198  cnmatrix->matrix[id_layer] = itemvector;
199  }
200 
201  if (istation == 2 && iring == 1) {
202  itemvector[istrip].elem33 = 9.06825;
203  itemvector[istrip].elem34 = 3.32025;
204  itemvector[istrip].elem44 = 7.52925;
205  itemvector[istrip].elem35 = 3.66125;
206  itemvector[istrip].elem45 = 3.39125;
207  itemvector[istrip].elem55 = 9.97625;
208  itemvector[istrip].elem46 = 1.32725;
209  itemvector[istrip].elem56 = 3.99025;
210  itemvector[istrip].elem66 = 8.10125;
211  itemvector[istrip].elem57 = 2.56456;
212  itemvector[istrip].elem67 = 2.96625;
213  itemvector[istrip].elem77 = 7.30925;
214  cnmatrix->matrix[id_layer] = itemvector;
215  }
216 
217  if (istation == 2 && iring == 2) {
218  itemvector[istrip].elem33 = 16.7442;
219  itemvector[istrip].elem34 = 7.96925;
220  itemvector[istrip].elem44 = 14.1643;
221  itemvector[istrip].elem35 = 4.67975;
222  itemvector[istrip].elem45 = 8.44075;
223  itemvector[istrip].elem55 = 17.2243;
224  itemvector[istrip].elem46 = 3.68575;
225  itemvector[istrip].elem56 = 7.48825;
226  itemvector[istrip].elem66 = 14.4902;
227  itemvector[istrip].elem57 = 4.4482;
228  itemvector[istrip].elem67 = 6.47875;
229  itemvector[istrip].elem77 = 14.6733;
230  cnmatrix->matrix[id_layer] = itemvector;
231  }
232 
233  if (istation == 3 && iring == 1) {
234  itemvector[istrip].elem33 = 9.3495;
235  itemvector[istrip].elem34 = 3.529;
236  itemvector[istrip].elem44 = 7.8715;
237  itemvector[istrip].elem35 = 3.8155;
238  itemvector[istrip].elem45 = 3.858;
239  itemvector[istrip].elem55 = 10.8205;
240  itemvector[istrip].elem46 = 1.8585;
241  itemvector[istrip].elem56 = 4.445;
242  itemvector[istrip].elem66 = 8.0175;
243  itemvector[istrip].elem57 = 3.29479;
244  itemvector[istrip].elem67 = 3.625;
245  itemvector[istrip].elem77 = 8.3895;
246  cnmatrix->matrix[id_layer] = itemvector;
247  }
248 
249  if (istation == 3 && iring == 2) {
250  itemvector[istrip].elem33 = 13.6193;
251  itemvector[istrip].elem34 = 5.91025;
252  itemvector[istrip].elem44 = 11.3842;
253  itemvector[istrip].elem35 = 3.31775;
254  itemvector[istrip].elem45 = 5.69775;
255  itemvector[istrip].elem55 = 11.6652;
256  itemvector[istrip].elem46 = 2.46175;
257  itemvector[istrip].elem56 = 4.48325;
258  itemvector[istrip].elem66 = 9.95725;
259  itemvector[istrip].elem57 = 2.10561;
260  itemvector[istrip].elem67 = 4.04625;
261  itemvector[istrip].elem77 = 9.51625;
262  cnmatrix->matrix[id_layer] = itemvector;
263  }
264 
265  if (istation == 4 && iring == 1) {
266  itemvector[istrip].elem33 = 10.0;
267  itemvector[istrip].elem34 = 4.0;
268  itemvector[istrip].elem44 = 10.0;
269  itemvector[istrip].elem35 = 3.0;
270  itemvector[istrip].elem45 = 8.0;
271  itemvector[istrip].elem55 = 10.0;
272  itemvector[istrip].elem46 = 2.0;
273  itemvector[istrip].elem56 = 5.0;
274  itemvector[istrip].elem66 = 10.0;
275  itemvector[istrip].elem57 = 3.0;
276  itemvector[istrip].elem67 = 4.0;
277  itemvector[istrip].elem77 = 10.0;
278  cnmatrix->matrix[id_layer] = itemvector;
279  }
280  }
281  }
282  }
283  }
284  }
285  }
286 
287  // overwrite fakes with old values from DB
288  int istrip = 0;
289  std::vector<CSCNoiseMatrix::Item> itemvector;
290  itemvector.resize(80);
291 
292  for (unsigned int mystrip = 0; mystrip < old_nrlines - 1; mystrip++) {
293  if (old_strips[mystrip] == 0)
294  istrip = 0;
295  itemvector[istrip].elem33 = old_elem33[mystrip];
296  itemvector[istrip].elem34 = old_elem34[mystrip];
297  itemvector[istrip].elem44 = old_elem44[mystrip];
298  itemvector[istrip].elem35 = old_elem35[mystrip];
299  itemvector[istrip].elem45 = old_elem45[mystrip];
300  itemvector[istrip].elem55 = old_elem55[mystrip];
301  itemvector[istrip].elem46 = old_elem46[mystrip];
302  itemvector[istrip].elem56 = old_elem56[mystrip];
303  itemvector[istrip].elem66 = old_elem66[mystrip];
304  itemvector[istrip].elem57 = old_elem57[mystrip];
305  itemvector[istrip].elem67 = old_elem67[mystrip];
306  itemvector[istrip].elem77 = old_elem77[mystrip];
307  cnmatrix->matrix[old_cham_id[mystrip]] = itemvector;
308  istrip++;
309  }
310 
311  itemvector.resize(64);
312  for (unsigned int mystrip = 0; mystrip < old_nrlines - 1; mystrip++) {
313  if (old_strips[mystrip] == 0)
314  istrip = 0;
315  if (old_cham_id[mystrip] >= 113000 && old_cham_id[mystrip] <= 113999) {
316  itemvector[istrip].elem33 = old_elem33[mystrip];
317  itemvector[istrip].elem34 = old_elem34[mystrip];
318  itemvector[istrip].elem44 = old_elem44[mystrip];
319  itemvector[istrip].elem35 = old_elem35[mystrip];
320  itemvector[istrip].elem45 = old_elem45[mystrip];
321  itemvector[istrip].elem55 = old_elem55[mystrip];
322  itemvector[istrip].elem46 = old_elem46[mystrip];
323  itemvector[istrip].elem56 = old_elem56[mystrip];
324  itemvector[istrip].elem66 = old_elem66[mystrip];
325  itemvector[istrip].elem57 = old_elem57[mystrip];
326  itemvector[istrip].elem67 = old_elem67[mystrip];
327  itemvector[istrip].elem77 = old_elem77[mystrip];
328  cnmatrix->matrix[old_cham_id[mystrip]] = itemvector;
329  istrip++;
330  }
331  }
332 
333  itemvector.resize(64);
334  for (unsigned int mystrip = 0; mystrip < old_nrlines - 1; mystrip++) {
335  if (old_strips[mystrip] == 0)
336  istrip = 0;
337  if (old_cham_id[mystrip] >= 213000 && old_cham_id[mystrip] <= 213999) {
338  itemvector[istrip].elem33 = old_elem33[mystrip];
339  itemvector[istrip].elem34 = old_elem34[mystrip];
340  itemvector[istrip].elem44 = old_elem44[mystrip];
341  itemvector[istrip].elem35 = old_elem35[mystrip];
342  itemvector[istrip].elem45 = old_elem45[mystrip];
343  itemvector[istrip].elem55 = old_elem55[mystrip];
344  itemvector[istrip].elem46 = old_elem46[mystrip];
345  itemvector[istrip].elem56 = old_elem56[mystrip];
346  itemvector[istrip].elem66 = old_elem66[mystrip];
347  itemvector[istrip].elem57 = old_elem57[mystrip];
348  itemvector[istrip].elem67 = old_elem67[mystrip];
349  itemvector[istrip].elem77 = old_elem77[mystrip];
350  cnmatrix->matrix[old_cham_id[mystrip]] = itemvector;
351  istrip++;
352  }
353  }
354 
355  // overwrite old values with ones from new runs
356  itemvector.resize(80);
357  for (unsigned int mystrip = 0; mystrip < new_nrlines - 1; mystrip++) {
358  if (new_strips[mystrip] == 0)
359  istrip = 0;
360  itemvector[istrip].elem33 = new_elem33[mystrip];
361  itemvector[istrip].elem34 = new_elem34[mystrip];
362  itemvector[istrip].elem44 = new_elem44[mystrip];
363  itemvector[istrip].elem35 = new_elem35[mystrip];
364  itemvector[istrip].elem45 = new_elem45[mystrip];
365  itemvector[istrip].elem55 = new_elem55[mystrip];
366  itemvector[istrip].elem46 = new_elem46[mystrip];
367  itemvector[istrip].elem56 = new_elem56[mystrip];
368  itemvector[istrip].elem66 = new_elem66[mystrip];
369  itemvector[istrip].elem57 = new_elem57[mystrip];
370  itemvector[istrip].elem67 = new_elem67[mystrip];
371  itemvector[istrip].elem77 = new_elem77[mystrip];
372  cnmatrix->matrix[new_cham_id[mystrip]] = itemvector;
373  istrip++;
374  }
375 
376  itemvector.resize(64);
377  for (unsigned int mystrip = 0; mystrip < new_nrlines - 1; mystrip++) {
378  if (new_strips[mystrip] == 0)
379  istrip = 0;
380  if (new_cham_id[mystrip] >= 113000 && new_cham_id[mystrip] <= 113999) {
381  itemvector[istrip].elem33 = new_elem33[mystrip];
382  itemvector[istrip].elem34 = new_elem34[mystrip];
383  itemvector[istrip].elem44 = new_elem44[mystrip];
384  itemvector[istrip].elem35 = new_elem35[mystrip];
385  itemvector[istrip].elem45 = new_elem45[mystrip];
386  itemvector[istrip].elem55 = new_elem55[mystrip];
387  itemvector[istrip].elem46 = new_elem46[mystrip];
388  itemvector[istrip].elem56 = new_elem56[mystrip];
389  itemvector[istrip].elem66 = new_elem66[mystrip];
390  itemvector[istrip].elem57 = new_elem57[mystrip];
391  itemvector[istrip].elem67 = new_elem67[mystrip];
392  itemvector[istrip].elem77 = new_elem77[mystrip];
393  cnmatrix->matrix[new_cham_id[mystrip]] = itemvector;
394  istrip++;
395  }
396  }
397 
398  itemvector.resize(64);
399  for (unsigned int mystrip = 0; mystrip < new_nrlines - 1; mystrip++) {
400  if (new_strips[mystrip] == 0)
401  istrip = 0;
402  if (new_cham_id[mystrip] >= 213000 && new_cham_id[mystrip] <= 213999) {
403  itemvector[istrip].elem33 = new_elem33[mystrip];
404  itemvector[istrip].elem34 = new_elem34[mystrip];
405  itemvector[istrip].elem44 = new_elem44[mystrip];
406  itemvector[istrip].elem35 = new_elem35[mystrip];
407  itemvector[istrip].elem45 = new_elem45[mystrip];
408  itemvector[istrip].elem55 = new_elem55[mystrip];
409  itemvector[istrip].elem46 = new_elem46[mystrip];
410  itemvector[istrip].elem56 = new_elem56[mystrip];
411  itemvector[istrip].elem66 = new_elem66[mystrip];
412  itemvector[istrip].elem57 = new_elem57[mystrip];
413  itemvector[istrip].elem67 = new_elem67[mystrip];
414  itemvector[istrip].elem77 = new_elem77[mystrip];
415  cnmatrix->matrix[new_cham_id[mystrip]] = itemvector;
416  istrip++;
417  }
418  }
419  return cnmatrix;
420 }
static int minRingId()
Definition: CSCDetId.h:238
static int minEndcapId()
Definition: CSCDetId.h:234
static int maxStationId()
Definition: CSCDetId.h:237
static int maxRingId()
Definition: CSCDetId.h:239
static int minChamberId()
Definition: CSCDetId.h:240
static int minStationId()
Definition: CSCDetId.h:236
static int maxEndcapId()
Definition: CSCDetId.h:235
NoiseMatrixMap matrix
static int minLayerId()
Definition: CSCDetId.h:242
static int maxChamberId()
Definition: CSCDetId.h:241
static int maxLayerId()
Definition: CSCDetId.h:243
CSCNoiseMatrixConditions::ReturnType CSCNoiseMatrixConditions::produceNoiseMatrix ( const CSCNoiseMatrixRcd iRecord)

Definition at line 441 of file CSCNoiseMatrixConditions.cc.

References prefillNoiseMatrix().

Referenced by CSCNoiseMatrixConditions().

441  {
442  // Added by Zhen, need a new object so to not be deleted at exit
444 }
static CSCNoiseMatrix * prefillNoiseMatrix()
std::unique_ptr< CSCNoiseMatrix > ReturnType
void CSCNoiseMatrixConditions::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey ,
const edm::IOVSyncValue ,
edm::ValidityInterval oValidity 
)
overrideprivatevirtual

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 446 of file CSCNoiseMatrixConditions.cc.

References edm::IOVSyncValue::beginOfTime(), and edm::IOVSyncValue::endOfTime().

448  {
450 }
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:82
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:17
static const IOVSyncValue & beginOfTime()
Definition: IOVSyncValue.cc:88

Member Data Documentation

CSCNoiseMatrix* CSCNoiseMatrixConditions::cnMatrix
private

Definition at line 35 of file CSCNoiseMatrixConditions.h.