CMS 3D CMS Logo

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