00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef GEOMETRY_H
00011 #define GEOMETRY_H
00012
00013 #include <list>
00014 #include <map>
00015 #include <string>
00016 #include <sstream>
00017 #include <vector>
00018 #include <TObject.h>
00019
00020 #include "Detector.h"
00021
00022 #define CONVF 1000
00023
00024 namespace monicelli
00025 {
00026
00027 class Geometry : public TObject
00028 {
00029 public:
00030
00031 Geometry(void);
00032 ~Geometry(void);
00033
00034 Detector * addDetector (std::string plaqID,
00035 bool isDUT = false );
00036
00037 void clear (void ) {detectorsMap_.clear() ;}
00038 bool empty (void ) {return detectorsMap_.empty();}
00039
00040 Detector * getDetector (std::string plaqID );
00041 Detector * getDetector (int station,
00042 int plaq );
00043 std::vector<Detector*> getDUTs (void );
00044 std::string getDetectorID (int Station, int Plaq );
00045 unsigned int getDetectorsNumber (bool excludeDUT = false);
00046 std::string getGeometryFileName (void ) {return geometryFileName_ ;}
00047 double getMaxDetectorsLength (void );
00048 unsigned int getMaxRowsNum (void );
00049 unsigned int getMaxColsNum (void );
00050 bool calibrationDone (void ){return calibrationDone_ ;}
00051
00052 void setDUTnumbers (unsigned int dutNumbers ) {dutNumbers_ = dutNumbers ;}
00053 void setGeometryFileName (std::string fileName ) ;
00054 void setCalibrationDone (bool done ) {calibrationDone_ = done ;}
00055
00056 void dump (void );
00057
00058 typedef std::map< std::string , Detector* >::iterator iterator;
00059 iterator begin() {return detectorsMap_.begin() ;}
00060 iterator end() {return detectorsMap_.end() ;}
00061
00062 private:
00063
00064 typedef std::map< std::string , Detector* > detectorsMapDef;
00065
00066 bool compare_zPosition (std::string first, std::string second);
00067
00068 detectorsMapDef detectorsMap_ ;
00069 std::vector<int> runNumbers_ ;
00070 unsigned int dutNumbers_ ;
00071 std::string geometryFileName_ ;
00072 bool calibrationDone_ ;
00073
00074
00075
00076 ClassDef(Geometry,5)
00077
00078 } ;
00079 }
00080
00081 #endif // GEOMETRY_H