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 #include <boost/shared_ptr.hpp>
20 
22  public:
25 
26  inline static CSCDBNoiseMatrix * prefillDBNoiseMatrix();
27 
28  typedef boost::shared_ptr<CSCDBNoiseMatrix> Pointer;
29 
31 
32  private:
33  // ----------member data ---------------------------
36 
37 };
38 
39 #include<fstream>
40 #include<vector>
41 #include<iostream>
42 
43 // to workaround plugin library
45 {
46  int seed;
47  long int M;
48  float mean,min, minchi;
49  const int MAX_SIZE = 252288; //or 252288 for ME4/2 chambers
50  const int FACTOR=1000;
51 
52  CSCDBNoiseMatrix * cndbmatrix = new CSCDBNoiseMatrix();
53  cndbmatrix->matrix.resize(MAX_SIZE);
54 
55  seed = 10000;
56  srand(seed);
57  mean=6.8, min=-10.0, minchi=1.0, M=1000;
58  cndbmatrix->factor_noise = int (FACTOR);
59 
60  for(int i=0; i<MAX_SIZE;i++){
61  cndbmatrix->matrix[i].elem33 = (short int) (10.0*FACTOR+0.5);
62  cndbmatrix->matrix[i].elem34 = (short int) (4.0*FACTOR+0.5);
63  cndbmatrix->matrix[i].elem35 = (short int) (3.0*FACTOR+0.5);
64  cndbmatrix->matrix[i].elem44 = (short int) (10.0*FACTOR+0.5);
65  cndbmatrix->matrix[i].elem45 = (short int) (8.0*FACTOR+0.5);
66  cndbmatrix->matrix[i].elem46 = (short int) (2.0*FACTOR+0.5);
67  cndbmatrix->matrix[i].elem55 = (short int) (10.0*FACTOR+0.5);
68  cndbmatrix->matrix[i].elem56 = (short int) (5.0*FACTOR+0.5);
69  cndbmatrix->matrix[i].elem57 = (short int) (3.0*FACTOR+0.5);
70  cndbmatrix->matrix[i].elem66 = (short int) (10.0*FACTOR+0.5);
71  cndbmatrix->matrix[i].elem67 = (short int) (4.0*FACTOR+0.5);
72  cndbmatrix->matrix[i].elem77 = (short int) (10.0*FACTOR+0.5);
73  }
74  return cndbmatrix;
75 }
76 
77 #endif
78 
int i
Definition: DBlmapReader.cc:9
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)
#define min(a, b)
Definition: mlp_lapack.h:161
static CSCDBNoiseMatrix * prefillDBNoiseMatrix()
CSCFakeDBNoiseMatrix(const edm::ParameterSet &)
boost::shared_ptr< CSCDBNoiseMatrix > Pointer
Pointer produceDBNoiseMatrix(const CSCDBNoiseMatrixRcd &)
NoiseMatrixContainer matrix