00001
00002 #ifndef CAL_MODULES_H
00003 #define CAL_MODULES_H 1
00004 #include <iostream>
00005 #include <vector>
00006
00007 #include "geometry/Point.h"
00008 #include "idents/ModuleId.h"
00009
00010
00011 class CalModules_Data
00012 {
00013 private:
00014 friend class CalModules;
00015 ;
00016
00017
00018 public:
00019 CalModules_Data ()
00020 {
00021 }
00022
00023 CalModules_Data (Point p, float e, int n, idents::ModuleId m, float c, int t)
00024 : energy(e), numXtals(n), corelCoef(c), type(t), pos(p), module(m)
00025 {
00026 }
00027 private:
00028 float energy;
00029 int numXtals;
00030 float corelCoef;
00031 int type;
00032 Point pos;
00033 idents::ModuleId module;
00034
00035 };
00036
00037 #if 0 //still needed? def _MSC_VER
00038 # pragma warning(disable:4786)
00039 bool operator<(const CalModules_Data&, const CalModules_Data&);
00040 bool operator==(const CalModules_Data&, const CalModules_Data&);
00041 #endif
00042
00043
00044 class CsIData;
00045
00046
00047 class CalModules
00048 {
00049 public:
00050
00051
00052 enum ShowerType {NOT_HIT, SPATTER, QED_SHOWER, MIP};
00053
00054 public:
00055 CalModules ();
00056 ~CalModules ();
00057
00058 float energy (unsigned int n) const;
00059
00060 int nMods () const;
00061
00062
00063 Point calPos (unsigned int n) const;
00064
00065
00066 enum CalModules::ShowerType responseType (unsigned int n) const;
00067
00068
00069 idents::ModuleId moduleId (unsigned int n) const;
00070
00071 void load (const CsIData& data);
00072
00073 void clear ();
00074
00075 void printOn (std::ostream& cout) const;
00076
00077 private:
00078
00079 std::vector< CalModules_Data > calorList;
00080
00081
00082 };
00083
00084 #endif