Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

TdCsIData.h

Go to the documentation of this file.
00001 //old school version
00002 #ifndef TDCSI_DATA_H
00003 #define TDCSI_DATA_H 1
00004 
00005 
00006 #include <iostream>
00007 #include <iomanip>
00008 #include <map>
00009 #include <vector>
00010 #include "geometry/Point.h"
00011 #include "idents/ModuleId.h"
00012 
00013 #include "GaudiKernel/Kernel.h"
00014 #include "GaudiKernel/DataObject.h"
00015 #include "GaudiKernel/SmartRefVector.h"
00016 #include "GlastEvent/TopLevel/Definitions.h"
00017 #include "GlastEvent/Utilities/CellID.h"
00018 #include "GaudiKernel/ObjectVector.h"
00019 #include "GaudiKernel/ObjectList.h"
00020 
00021 #include "instrument/CsIDetector.h"
00022 
00023 #include "data/CsIData.h"
00024 
00025 class CsIDetector;
00026 
00027 extern const CLID& CLID_TdCsIData;
00028 
00030 
00033 class TdCsIData : virtual public DataObject , virtual public CsIData
00034 {
00035 
00036 public:
00037     virtual const CLID& clID() const   { return TdCsIData::classID(); }
00038     static const CLID& classID()       { return CLID_TdCsIData; }
00039     
00040     
00041 public:
00044     class Xtal 
00045     {
00046         
00047         
00048     private:
00049         friend class TdCsIData;
00050     public:
00051         
00052         Xtal (Point p, float e, idents::ModuleId m, int i, float Left, float Right, std::vector<double> diodes_energy)
00053             : pos(p), energy(e), id(i), Lresp(Left), Rresp(Right), module(m), Diodes_Energy(diodes_energy)
00054         {}
00055         Xtal (Point p, float e, idents::ModuleId m, int i, float Left, float Right)
00056             : pos(p), energy(e), id(i), Lresp(Left), Rresp(Right), module(m), Diodes_Energy(4,0.)
00057         {}
00058         
00059         
00060     private:
00061         
00063         Point pos;
00064         float energy;
00065         int id;
00066         float Lresp;
00067         float Rresp;
00068         idents::ModuleId module;
00069         std::vector<double> Diodes_Energy;
00070     };
00071     
00072     
00073     
00074     public:
00075         TdCsIData(){};
00076         TdCsIData (int numLayers);
00077         void copyUp (TdCsIData* copy, int numLayers);
00078         
00079          ~TdCsIData ();
00080         
00082         int nHits (unsigned int layer) const;
00083         
00085         float energy (unsigned int layer, unsigned int n) const;
00086         
00088         Point xtalPos (unsigned int layer, unsigned int n) const;
00089         
00091         idents::ModuleId moduleId (unsigned int layer, unsigned int n) const;
00092         
00093         
00095         idents::XtalId xtalId (unsigned int layer, unsigned int n) const;
00096         
00097         float Lresp (unsigned int layer, unsigned int n) const;
00098         
00100         float Rresp (unsigned int layer, unsigned int n) const;
00101         
00103         const std::vector<double>& Diodes_Energy(unsigned int layer, unsigned int n) const; 
00104         
00106         void load (const CsIDetector& xtal, idents::ModuleId tower);
00107         
00108         //     const std::vector<double>& Diodes_Energy(unsigned int layer, unsigned int n);
00109         
00110                 
00111         void clear ();
00112         
00113         
00114              
00115         void printOn (std::ostream& cout) const ;
00116 
00117         int count()const;
00118        
00119     private:
00120         
00121         
00123         std::map< idents::XtalId, std::pair< int, int > > m_xtals;
00124         
00126         std::vector< std::vector< class Xtal >* > calorList;
00127         
00128        
00129         
00130 };
00131 
00132         
00133 #endif
00134 

Generated at Wed Nov 21 12:21:13 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000