test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCFakeDBNoiseMatrix.h
Go to the documentation of this file.
1 #ifndef _CSCFAKEDBNOISEMATRIX_H
2 #define _CSCFAKEDBNOISEMATRIX_H
3 
4 #include <memory>
13 
15 
19 
21  public:
24 
25  inline static CSCDBNoiseMatrix * prefillDBNoiseMatrix();
26 
27  typedef std::shared_ptr<CSCDBNoiseMatrix> Pointer;
28 
30 
31  private:
32  // ----------member data ---------------------------
35 
36 };
37 
38 #include<fstream>
39 #include<vector>
40 #include<iostream>
41 
42 // to workaround plugin library
44 {
45  int seed;
46  const int MAX_SIZE = 252288; //or 252288 for ME4/2 chambers
47  const int FACTOR=1000;
48 
49  CSCDBNoiseMatrix * cndbmatrix = new CSCDBNoiseMatrix();
50  cndbmatrix->matrix.resize(MAX_SIZE);
51 
52  seed = 10000;
53  srand(seed);
54  cndbmatrix->factor_noise = int (FACTOR);
55 
56  for(int i=0; i<MAX_SIZE;i++){
57  cndbmatrix->matrix[i].elem33 = (short int) (10.0*FACTOR+0.5);
58  cndbmatrix->matrix[i].elem34 = (short int) (4.0*FACTOR+0.5);
59  cndbmatrix->matrix[i].elem35 = (short int) (3.0*FACTOR+0.5);
60  cndbmatrix->matrix[i].elem44 = (short int) (10.0*FACTOR+0.5);
61  cndbmatrix->matrix[i].elem45 = (short int) (8.0*FACTOR+0.5);
62  cndbmatrix->matrix[i].elem46 = (short int) (2.0*FACTOR+0.5);
63  cndbmatrix->matrix[i].elem55 = (short int) (10.0*FACTOR+0.5);
64  cndbmatrix->matrix[i].elem56 = (short int) (5.0*FACTOR+0.5);
65  cndbmatrix->matrix[i].elem57 = (short int) (3.0*FACTOR+0.5);
66  cndbmatrix->matrix[i].elem66 = (short int) (10.0*FACTOR+0.5);
67  cndbmatrix->matrix[i].elem67 = (short int) (4.0*FACTOR+0.5);
68  cndbmatrix->matrix[i].elem77 = (short int) (10.0*FACTOR+0.5);
69  }
70  return cndbmatrix;
71 }
72 
73 #endif
74 
int i
Definition: DBlmapReader.cc:9
std::shared_ptr< CSCDBNoiseMatrix > Pointer
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)
static CSCDBNoiseMatrix * prefillDBNoiseMatrix()
CSCFakeDBNoiseMatrix(const edm::ParameterSet &)
Pointer produceDBNoiseMatrix(const CSCDBNoiseMatrixRcd &)
NoiseMatrixContainer matrix