CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/CondFormats/Calibration/interface/big.h

Go to the documentation of this file.
00001 #ifndef big_h
00002 #define big_h 1
00003 #include <vector>
00004 #include <string>
00005 #include "CondFormats/Calibration/interface/TensorIndex.h"
00006 class big{
00007  public:
00008   big():id_current(-1),index_id(-1),cota_current(0.),cotb_current(0.),fpix_current(false){
00009     //constructor
00010     tVector_.reserve(1000);
00011     thVector_.reserve(1000);
00012     sVector_.reserve(1000);
00013   }
00014   void fill(size_t tVectorSize,size_t thVectorSize,size_t sVectorSize,
00015             const std::string& atitle);
00016   
00018   class bigEntry{
00019   public:
00020     //constructor
00021     bigEntry(){
00022       par.reserve(parIDX::SIZE);
00023       ytemp.reserve(ytempIDX::SIZE);
00024       xtemp.reserve(xtempIDX::SIZE);
00025       avg.reserve(avgIDX::SIZE);
00026       aqfl.reserve(aqflIDX::SIZE);
00027       chi2.reserve(chi2IDX::SIZE);
00028       spare.reserve(spareIDX::SIZE);  
00029     }
00030     void fill(int runnum,float seed);
00031   public:  
00032     int runnum;
00033     float alpha;
00034     float cotalpha;
00035     float beta;
00036     float cotbeta ;
00037     float costrk[3];
00038     float qavg;
00039     float symax;  
00040     float dyone;  
00041     float syone;
00042     float sxmax;
00043     float dxone;   
00044     float sxone; 
00045     float dytwo;  
00046     float sytwo;      
00047     float dxtwo; 
00048     float sxtwo;     
00049     float qmin;   
00050     //projected pixel uncertainty parameterization, first dimension x,y; 
00051     typedef TensorIndex<2,2,5> parIDX;
00052     std::vector<float> par; 
00053     //templates for y-reconstruction (binned over 1 central pixel)
00054     typedef TensorIndex<9,21> ytempIDX;
00055     std::vector<float> ytemp;
00056     //templates for x-reconstruction (binned over 1 central pixel)
00057     typedef TensorIndex<9,7> xtempIDX;
00058     std::vector<float> xtemp;
00059     //average parameters (binned in 4 charge bins ), first dimention x,y; second dimention bias,rms,g0,sigma; 
00060     typedef TensorIndex<2,4,4> avgIDX;
00061     std::vector<float> avg;
00062     //Aqfl-parameterized x,y-correction (in 4 charge bins), first dimension x,y
00063     typedef TensorIndex<2,4,6> aqflIDX;
00064     std::vector<float> aqfl;
00065     //chi^2 (in 4 charge bins), first dimension x,y; second dimension average, minimum; 
00066     typedef TensorIndex<2,2,4> chi2IDX;
00067     std::vector<float> chi2;
00068     //spare entries, first dimension x,y
00069     typedef TensorIndex<2,10> spareIDX;
00070     std::vector<float> spare;  
00071   };//inline class bigEntry
00072   
00073   //inline class bigHeader
00074   class bigHeader{
00075   public:
00076     bigHeader():title(""){}
00077     void fill (const std::string& atitle);
00079     std::string title;      
00080     int ID;                 
00081     int NBy;                
00082     int NByx;               
00083     int NBxx;               
00084     int NFy;                
00085     int NFyx;               
00086     int NFxx;               
00087     float vbias;            
00088     float temperature;      
00089     float fluence;          
00090     float qscale;           
00091     float s50;              
00092     int templ_version;      
00093 
00094   };//end inline class bigHeader
00095 
00096   //inline class bigStore
00097   class bigStore{
00098   public:
00099     //constructor
00100     bigStore(){
00101       entby.reserve(entbyIDX::SIZE);
00102       entbx.reserve(entbxIDX::SIZE);
00103       entfy.reserve(entfyIDX::SIZE);
00104       entfx.reserve(entfxIDX::SIZE);
00105     }
00106     //dummy filler
00107     void fill( const std::string& atitle  );
00108     //data members
00109     bigHeader head;
00110     typedef  TensorIndex<60> entbyIDX;
00111     std::vector<bigEntry> entby;
00112     typedef  TensorIndex<5,9> entbxIDX;
00113     std::vector<bigEntry> entbx;
00114     typedef  TensorIndex<5> entfyIDX;
00115     std::vector<bigEntry> entfy;
00116     typedef  TensorIndex<2,9> entfxIDX;
00117     std::vector<bigEntry> entfx;
00118   };//end inline class bigStore
00119 
00120 
00121   typedef std::vector<bigEntry> entryVector;
00122   typedef std::vector<bigHeader> headVector;
00123   typedef std::vector<bigStore> storeVector;
00124  private:
00125   entryVector tVector_;
00126   headVector thVector_;
00127   storeVector sVector_;
00128   int id_current;           
00129   int index_id;             
00130   float cota_current;       
00131   float cotb_current;       
00132   float abs_cotb;           
00133   bool fpix_current;        
00134 };//end big
00135 #endif