CMS 3D CMS Logo

CSCFakeNoiseMatrixConditions.cc
Go to the documentation of this file.
1 
3 
5  const CSCDetId &detId = CSCDetId();
6  CSCNoiseMatrix *cnmatrix = new CSCNoiseMatrix();
7 
8  int max_istrip, id_layer, max_ring, max_cham;
9  // endcap=1 to 2,station=1 to 4, ring=1 to 4,chamber=1 to 36,layer=1 to 6
10 
11  for (int iendcap = detId.minEndcapId(); iendcap <= detId.maxEndcapId(); iendcap++) {
12  for (int istation = detId.minStationId(); istation <= detId.maxStationId(); istation++) {
13  max_ring = detId.maxRingId();
14  // station 4 ring 4 not there(36 chambers*2 missing)
15  // 3 rings max this way of counting (ME1a & b)
16  if (istation == 1)
17  max_ring = 3;
18  if (istation == 2)
19  max_ring = 2;
20  if (istation == 3)
21  max_ring = 2;
22  if (istation == 4)
23  max_ring = 1;
24 
25  for (int iring = detId.minRingId(); iring <= max_ring; iring++) {
26  max_istrip = 80;
27  max_cham = detId.maxChamberId();
28  if (istation == 1 && iring == 1)
29  max_cham = 36;
30  if (istation == 1 && iring == 2)
31  max_cham = 36;
32  if (istation == 1 && iring == 3)
33  max_cham = 36;
34  if (istation == 2 && iring == 1)
35  max_cham = 18;
36  if (istation == 2 && iring == 2)
37  max_cham = 36;
38  if (istation == 3 && iring == 1)
39  max_cham = 18;
40  if (istation == 3 && iring == 2)
41  max_cham = 36;
42  if (istation == 4 && iring == 1)
43  max_cham = 18;
44 
45  for (int ichamber = detId.minChamberId(); ichamber <= max_cham; ichamber++) {
46  for (int ilayer = detId.minLayerId(); ilayer <= detId.maxLayerId(); ilayer++) {
47  // station 1 ring 3 has 64 strips per layer instead of 80
48  if (istation == 1 && iring == 3)
49  max_istrip = 64;
50 
51  std::vector<CSCNoiseMatrix::Item> itemvector;
52  itemvector.resize(max_istrip);
53  id_layer = 100000 * iendcap + 10000 * istation + 1000 * iring + 10 * ichamber + ilayer;
54 
55  for (int istrip = 0; istrip < max_istrip; istrip++) {
56  if (istation == 1 && iring == 1) {
57  itemvector[istrip].elem33 = 7.86675;
58  itemvector[istrip].elem34 = 2.07075;
59  itemvector[istrip].elem44 = 6.93875;
60  itemvector[istrip].elem35 = 1.42525;
61  itemvector[istrip].elem45 = 2.51025;
62  itemvector[istrip].elem55 = 7.93975;
63  itemvector[istrip].elem46 = 0.94725;
64  itemvector[istrip].elem56 = 2.39275;
65  itemvector[istrip].elem66 = 6.46475;
66  itemvector[istrip].elem57 = 1.86325;
67  itemvector[istrip].elem67 = 2.08025;
68  itemvector[istrip].elem77 = 6.67975;
69  cnmatrix->matrix[id_layer] = itemvector;
70  }
71 
72  if (istation == 1 && iring == 2) {
73  itemvector[istrip].elem33 = 9.118;
74  itemvector[istrip].elem34 = 3.884;
75  itemvector[istrip].elem44 = 7.771;
76  itemvector[istrip].elem35 = 1.8225;
77  itemvector[istrip].elem45 = 3.7505;
78  itemvector[istrip].elem55 = 8.597;
79  itemvector[istrip].elem46 = 1.651;
80  itemvector[istrip].elem56 = 2.5225;
81  itemvector[istrip].elem66 = 6.583;
82  itemvector[istrip].elem57 = 1.5055;
83  itemvector[istrip].elem67 = 2.733;
84  itemvector[istrip].elem77 = 6.988;
85  cnmatrix->matrix[id_layer] = itemvector;
86  }
87 
88  if (istation == 1 && iring == 3) {
89  itemvector[istrip].elem33 = 9.5245;
90  itemvector[istrip].elem34 = 3.2415;
91  itemvector[istrip].elem44 = 7.6265;
92  itemvector[istrip].elem35 = 1.7225;
93  itemvector[istrip].elem45 = 3.6075;
94  itemvector[istrip].elem55 = 8.7275;
95  itemvector[istrip].elem46 = 1.663;
96  itemvector[istrip].elem56 = 2.592;
97  itemvector[istrip].elem66 = 7.5685;
98  itemvector[istrip].elem57 = 1.7905;
99  itemvector[istrip].elem67 = 2.409;
100  itemvector[istrip].elem77 = 7.1495;
101  cnmatrix->matrix[id_layer] = itemvector;
102  }
103 
104  if (istation == 2 && iring == 1) {
105  itemvector[istrip].elem33 = 9.06825;
106  itemvector[istrip].elem34 = 3.32025;
107  itemvector[istrip].elem44 = 7.52925;
108  itemvector[istrip].elem35 = 3.66125;
109  itemvector[istrip].elem45 = 3.39125;
110  itemvector[istrip].elem55 = 9.97625;
111  itemvector[istrip].elem46 = 1.32725;
112  itemvector[istrip].elem56 = 3.99025;
113  itemvector[istrip].elem66 = 8.10125;
114  itemvector[istrip].elem57 = 2.56456;
115  itemvector[istrip].elem67 = 2.96625;
116  itemvector[istrip].elem77 = 7.30925;
117  cnmatrix->matrix[id_layer] = itemvector;
118  }
119 
120  if (istation == 2 && iring == 2) {
121  itemvector[istrip].elem33 = 16.7442;
122  itemvector[istrip].elem34 = 7.96925;
123  itemvector[istrip].elem44 = 14.1643;
124  itemvector[istrip].elem35 = 4.67975;
125  itemvector[istrip].elem45 = 8.44075;
126  itemvector[istrip].elem55 = 17.2243;
127  itemvector[istrip].elem46 = 3.68575;
128  itemvector[istrip].elem56 = 7.48825;
129  itemvector[istrip].elem66 = 14.4902;
130  itemvector[istrip].elem57 = 4.4482;
131  itemvector[istrip].elem67 = 6.47875;
132  itemvector[istrip].elem77 = 14.6733;
133  cnmatrix->matrix[id_layer] = itemvector;
134  }
135 
136  if (istation == 3 && iring == 1) {
137  itemvector[istrip].elem33 = 9.3495;
138  itemvector[istrip].elem34 = 3.529;
139  itemvector[istrip].elem44 = 7.8715;
140  itemvector[istrip].elem35 = 3.8155;
141  itemvector[istrip].elem45 = 3.858;
142  itemvector[istrip].elem55 = 10.8205;
143  itemvector[istrip].elem46 = 1.8585;
144  itemvector[istrip].elem56 = 4.445;
145  itemvector[istrip].elem66 = 8.0175;
146  itemvector[istrip].elem57 = 3.29479;
147  itemvector[istrip].elem67 = 3.625;
148  itemvector[istrip].elem77 = 8.3895;
149  cnmatrix->matrix[id_layer] = itemvector;
150  }
151 
152  if (istation == 3 && iring == 2) {
153  itemvector[istrip].elem33 = 13.6193;
154  itemvector[istrip].elem34 = 5.91025;
155  itemvector[istrip].elem44 = 11.3842;
156  itemvector[istrip].elem35 = 3.31775;
157  itemvector[istrip].elem45 = 5.69775;
158  itemvector[istrip].elem55 = 11.6652;
159  itemvector[istrip].elem46 = 2.46175;
160  itemvector[istrip].elem56 = 4.48325;
161  itemvector[istrip].elem66 = 9.95725;
162  itemvector[istrip].elem57 = 2.10561;
163  itemvector[istrip].elem67 = 4.04625;
164  itemvector[istrip].elem77 = 9.51625;
165  cnmatrix->matrix[id_layer] = itemvector;
166  }
167 
168  if (istation == 4 && iring == 1) {
169  itemvector[istrip].elem33 = 10.0;
170  itemvector[istrip].elem34 = 4.0;
171  itemvector[istrip].elem44 = 10.0;
172  itemvector[istrip].elem35 = 3.0;
173  itemvector[istrip].elem45 = 8.0;
174  itemvector[istrip].elem55 = 10.0;
175  itemvector[istrip].elem46 = 2.0;
176  itemvector[istrip].elem56 = 5.0;
177  itemvector[istrip].elem66 = 10.0;
178  itemvector[istrip].elem57 = 3.0;
179  itemvector[istrip].elem67 = 4.0;
180  itemvector[istrip].elem77 = 10.0;
181  cnmatrix->matrix[id_layer] = itemvector;
182  }
183  }
184  }
185  }
186  }
187  }
188  }
189  return cnmatrix;
190 }
191 
193  // tell the framework what data is being produced
195 
196  findingRecord<CSCNoiseMatrixRcd>();
197 
198  // now do what ever other initialization is needed
199 }
200 
202  // do anything here that needs to be done at destruction time
203  // (e.g. close files, deallocate resources etc.)
204 }
205 
206 //
207 // member functions
208 //
209 
210 // ------------ method called to produce the data ------------
212  const CSCNoiseMatrixRcd &iRecord) {
214 }
215 
217  const edm::IOVSyncValue &,
218  edm::ValidityInterval &oValidity) {
220 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:166
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:82
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:17
std::unique_ptr< CSCNoiseMatrix > ReturnType
static const IOVSyncValue & beginOfTime()
Definition: IOVSyncValue.cc:88
NoiseMatrixMap matrix
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
CSCFakeNoiseMatrixConditions(const edm::ParameterSet &)
ReturnType produceNoiseMatrix(const CSCNoiseMatrixRcd &)