/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Emc/EmcCalib/EmcBhaCalib/EmcBhaCalib-00-00-34/EmcBhaCalib/EmcBhaCalibData.h

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 // Environment:
00003 //      This software was developed for the BESIII collaboration.  If you
00004 //      use all or part of it, please give an appropriate acknowledgement.
00005 //
00006 // Copyright Information:
00007 //      Copyright (C) 2005           IHEP
00008 //
00009 //------------------------------------------------------------------------
00010 
00011 #ifndef EMCBHACALIBDATA_H
00012 #define EMCBHACALIBDATA_H
00013 
00014 //-------------
00015 // C Headers --
00016 //-------------
00017 extern "C" {
00018 }
00019 
00020 //---------------
00021 // C++ Headers --
00022 //---------------
00023 #include <iostream>
00024 #include <fstream>
00025 
00026 //----------------------
00027 // Base Class Headers --
00028 //----------------------
00029 
00030 //-------------------------------
00031 // Collaborating Class Headers --
00032 //-------------------------------
00033 #include "EmcBhaCalib/EmcLSSMatrix.h"
00034 
00035 using namespace std;
00036 
00037 //------------------------------------
00038 // Collaborating Class Declarations --
00039 //------------------------------------
00040 //              ---------------------
00041 //              -- Class Interface --
00042 //              ---------------------
00043 
00063 class EmcBhaCalibData { 
00064 
00065 public:
00066 
00067   // Constructor
00068   EmcBhaCalibData(int numxtals);
00069 
00070   EmcBhaCalibData(int numxtals, int MsgFlag);
00071 
00072   // Destructor
00073   ~EmcBhaCalibData( );
00074 
00075   // access
00076   // calibration matrix element
00077   double& matrixMEle(int row, int column) { return ((*_matrixM)(row,column)); }
00078 
00079   // access
00080   // pointer to calibration matrix
00081   EmcLSSMatrix* getMatrixM() { return _matrixM; }
00082 
00083   // calibration vector 
00084   double& vectorR(int ind) { return (_vectorR[ind]); }
00085 
00086   // pointer to calibration vector 
00087   double* getVectorR() { return _vectorR; }
00088 
00089   // array of xtal indices 
00090   int xtalInd(int ind) { return (_xtalInd[ind]); }
00091 
00092   // number of xtals 
00093   int& nXtals() { return _nXtals; }
00094   // number of xtals hit 
00095   int& nXtalsHit() { return _nXtalsHit; }
00096   // array with number of hits per xtal 
00097   int& xtalHits(int ind) { return (_xtalHits[ind]); }
00098   // array with number of direct hits per xtal 
00099   int& xtalHitsDir(int ind) { return (_xtalHitsMax[ind]); }
00100 
00101   //reduce matrix and vector to an array containing only non zero elements,
00102   //   needed for matrix inversion package slap 
00103   bool reduce();
00104 
00105   //reset all data 
00106   void reset();
00107 
00108   // write matrix and vector to files 
00109   void writeOut(ostream& OutM, ostream& outV);
00110 
00111   // read in matrix and vector from files 
00112   void readIn(istream& InM, istream& InV);
00113 
00114   // output vector element 
00115   void printVec(int number);
00116 
00117  
00118 private:
00119 
00120   // Data members
00121   // calibration matrix 
00122   EmcLSSMatrix* _matrixM;
00123   // calibration vector 
00124   double* _vectorR;
00125   // array of xtal indices 
00126   int* _xtalInd;
00127 
00128   // number of xtals 
00129   int _nXtals;
00130   // number of xtals hit 
00131   int _nXtalsHit;
00132   // array with number of hits per xtal 
00133   int* _xtalHits;
00134   // array with number of direct hits per xtal 
00135   int* _xtalHitsMax;
00136   // message output flag, 
00137   int _MsgFlag;
00138 };
00139 
00140 #endif // EMCBHACALIBDATA_H

Generated on Tue Nov 29 22:58:15 2016 for BOSS_7.0.2 by  doxygen 1.4.7