CMS 3D CMS Logo

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

#include <CSCFakeNoiseMatrixConditions.h>

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

Public Types

typedef const CSCNoiseMatrixReturnType
 
- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair
< DataKey, boost::shared_ptr
< DataProxy > > > 
KeyedProxies
 
typedef std::vector
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 

Public Member Functions

 CSCFakeNoiseMatrixConditions (const edm::ParameterSet &)
 
void prefillNoiseMatrix ()
 
ReturnType produceNoiseMatrix (const CSCNoiseMatrixRcd &)
 
 ~CSCFakeNoiseMatrixConditions ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer ()
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider ()
 
- Public Member Functions inherited from edm::EventSetupRecordIntervalFinder
const
eventsetup::ComponentDescription
descriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
std::set
< eventsetup::EventSetupRecordKey
findingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder ()
 

Private Member Functions

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

Private Attributes

CSCNoiseMatrixcnmatrix
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_ptr< eventsetup::ProxyFactoryBase > &iFactory, const std::string &iLabel=std::string())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 
- Protected Member Functions inherited from edm::EventSetupRecordIntervalFinder
template<class T >
void findingRecord ()
 
void findingRecordWithKey (const eventsetup::EventSetupRecordKey &)
 

Detailed Description

Definition at line 20 of file CSCFakeNoiseMatrixConditions.h.

Member Typedef Documentation

Definition at line 27 of file CSCFakeNoiseMatrixConditions.h.

Constructor & Destructor Documentation

CSCFakeNoiseMatrixConditions::CSCFakeNoiseMatrixConditions ( const edm::ParameterSet iConfig)

Definition at line 180 of file CSCFakeNoiseMatrixConditions.cc.

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

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 }
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
ReturnType produceNoiseMatrix(const CSCNoiseMatrixRcd &)
CSCFakeNoiseMatrixConditions::~CSCFakeNoiseMatrixConditions ( )

Definition at line 194 of file CSCFakeNoiseMatrixConditions.cc.

References cnmatrix.

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 }

Member Function Documentation

void CSCFakeNoiseMatrixConditions::prefillNoiseMatrix ( )

Definition at line 4 of file CSCFakeNoiseMatrixConditions.cc.

References cnmatrix, CSCDetId, 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 CSCFakeNoiseMatrixConditions().

4  {
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 }
static int minRingId()
Definition: CSCDetId.h:253
static int minEndcapId()
Definition: CSCDetId.h:249
static int maxStationId()
Definition: CSCDetId.h:252
static int maxRingId()
Definition: CSCDetId.h:254
static int minChamberId()
Definition: CSCDetId.h:255
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
static int maxLayerId()
Definition: CSCDetId.h:258
CSCFakeNoiseMatrixConditions::ReturnType CSCFakeNoiseMatrixConditions::produceNoiseMatrix ( const CSCNoiseMatrixRcd iRecord)

Definition at line 207 of file CSCFakeNoiseMatrixConditions.cc.

References cnmatrix.

Referenced by CSCFakeNoiseMatrixConditions().

208 {
209  return cnmatrix;
210 }
void CSCFakeNoiseMatrixConditions::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey ,
const edm::IOVSyncValue ,
edm::ValidityInterval oValidity 
)
privatevirtual

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 212 of file CSCFakeNoiseMatrixConditions.cc.

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

214 {
216 
217 }
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:97
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:19
static const IOVSyncValue & beginOfTime()

Member Data Documentation

CSCNoiseMatrix* CSCFakeNoiseMatrixConditions::cnmatrix
private