CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions
CSCFakeNoiseMatrixConditions Class Reference

#include <CSCFakeNoiseMatrixConditions.h>

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

Public Types

typedef std::unique_ptr< CSCNoiseMatrixReturnType
 

Public Member Functions

 CSCFakeNoiseMatrixConditions (const edm::ParameterSet &)
 
CSCNoiseMatrixprefillNoiseMatrix ()
 
ReturnType produceNoiseMatrix (const CSCNoiseMatrixRcd &)
 
 ~CSCFakeNoiseMatrixConditions () 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::ComponentDescriptiondescriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
 EventSetupRecordIntervalFinder (const EventSetupRecordIntervalFinder &)=delete
 
std::set< eventsetup::EventSetupRecordKeyfindingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
bool nonconcurrentAndIOVNeedsUpdate (const eventsetup::EventSetupRecordKey &key, const IOVSyncValue &syncValue) const
 
const EventSetupRecordIntervalFinderoperator= (const EventSetupRecordIntervalFinder &)=delete
 
void resetInterval (const eventsetup::EventSetupRecordKey &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder () noexcept(false)
 

Private Member Functions

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

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- 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 char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &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 CSCFakeNoiseMatrixConditions.h.

Member Typedef Documentation

◆ ReturnType

Definition at line 26 of file CSCFakeNoiseMatrixConditions.h.

Constructor & Destructor Documentation

◆ CSCFakeNoiseMatrixConditions()

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

Definition at line 192 of file CSCFakeNoiseMatrixConditions.cc.

192  {
193  // tell the framework what data is being produced
195 
196  findingRecord<CSCNoiseMatrixRcd>();
197 
198  // now do what ever other initialization is needed
199 }

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

◆ ~CSCFakeNoiseMatrixConditions()

CSCFakeNoiseMatrixConditions::~CSCFakeNoiseMatrixConditions ( )
override

Definition at line 201 of file CSCFakeNoiseMatrixConditions.cc.

201  {
202  // do anything here that needs to be done at destruction time
203  // (e.g. close files, deallocate resources etc.)
204 }

Member Function Documentation

◆ prefillNoiseMatrix()

CSCNoiseMatrix * CSCFakeNoiseMatrixConditions::prefillNoiseMatrix ( )

Definition at line 4 of file CSCFakeNoiseMatrixConditions.cc.

4  {
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 }

References 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().

◆ produceNoiseMatrix()

CSCFakeNoiseMatrixConditions::ReturnType CSCFakeNoiseMatrixConditions::produceNoiseMatrix ( const CSCNoiseMatrixRcd iRecord)

◆ setIntervalFor()

void CSCFakeNoiseMatrixConditions::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey ,
const edm::IOVSyncValue ,
edm::ValidityInterval oValidity 
)
overrideprivatevirtual
CSCDetId::maxStationId
static int maxStationId()
Definition: CSCDetId.h:237
CSCNoiseMatrix
Definition: CSCNoiseMatrix.h:10
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
CSCDetId::minChamberId
static int minChamberId()
Definition: CSCDetId.h:240
CSCFakeNoiseMatrixConditions::ReturnType
std::unique_ptr< CSCNoiseMatrix > ReturnType
Definition: CSCFakeNoiseMatrixConditions.h:26
CSCDetId::minStationId
static int minStationId()
Definition: CSCDetId.h:236
CSCFakeNoiseMatrixConditions::produceNoiseMatrix
ReturnType produceNoiseMatrix(const CSCNoiseMatrixRcd &)
Definition: CSCFakeNoiseMatrixConditions.cc:211
CSCDetId::minEndcapId
static int minEndcapId()
Definition: CSCDetId.h:234
CSCDetId::maxRingId
static int maxRingId()
Definition: CSCDetId.h:239
CSCDetId::minLayerId
static int minLayerId()
Definition: CSCDetId.h:242
CSCNoiseMatrix::matrix
NoiseMatrixMap matrix
Definition: CSCNoiseMatrix.h:26
edm::IOVSyncValue::endOfTime
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:82
CSCFakeNoiseMatrixConditions::prefillNoiseMatrix
CSCNoiseMatrix * prefillNoiseMatrix()
Definition: CSCFakeNoiseMatrixConditions.cc:4
CSCDetId
Definition: CSCDetId.h:26
CSCDetId::maxChamberId
static int maxChamberId()
Definition: CSCDetId.h:241
CSCDetId::maxEndcapId
static int maxEndcapId()
Definition: CSCDetId.h:235
cond::ValidityInterval
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:17
CSCDetId::maxLayerId
static int maxLayerId()
Definition: CSCDetId.h:243
edm::IOVSyncValue::beginOfTime
static const IOVSyncValue & beginOfTime()
Definition: IOVSyncValue.cc:88
CSCDetId::minRingId
static int minRingId()
Definition: CSCDetId.h:238