00001 #include <MUIOO.h>
00002 #include <TMuiMCHitO_v1.h>
00003 #include <TMutMCTrkMap.h>
00004 #include<PHKeyIterator.h>
00005 #include<PHConstKeyIterator.h>
00006
00007
00008 ClassImp(TMuiMCHitO_v1)
00009
00011 TMuiMCHitO_v1::TMuiMCHitO_v1() : _arm(0),
00012 _plane(0),
00013 _index(0),
00014 _track_id(0),
00015 _x(0),
00016 _y(0),
00017 _z(0),
00018 _px(0),
00019 _py(0),
00020 _pz(0),
00021 _pid(0),
00022 _file_key(0)
00023 {
00024
00025 }
00026
00027 TMuiMCHitO_v1::TMuiMCHitO_v1(const Key& key,
00028 UShort_t arm,
00029 UShort_t plane,
00030 UShort_t index) :
00031 TMuiMCHitO(key),
00032 _arm(arm),
00033 _plane(plane),
00034 _index(index),
00035 _track_id(0),
00036 _x(0),
00037 _y(0),
00038 _z(0),
00039 _px(0),
00040 _py(0),
00041 _pz(0),
00042 _pid(0),
00043 _file_key(0)
00044 {
00045
00046 }
00047
00048 TMuiMCHitO_v1::TMuiMCHitO_v1(const TMuiMCHitO* base_ptr) :
00049 TMuiMCHitO(*base_ptr),
00050 _arm(base_ptr->get_arm()),
00051 _plane(base_ptr->get_plane()),
00052 _index(base_ptr->get_index()),
00053 _track_id(base_ptr->get_track_id()),
00054 _x(base_ptr->get_x()),
00055 _y(base_ptr->get_y()),
00056 _z(base_ptr->get_z()),
00057 _px(base_ptr->get_px()),
00058 _py(base_ptr->get_py()),
00059 _pz(base_ptr->get_pz()),
00060 _pid(base_ptr->get_pid()),
00061 _file_key(base_ptr->get_file_key()),
00062 _twopack_list(*(base_ptr->get_twopack_list()))
00063 {
00064 }
00065
00066 TMuiMCHitO_v1::TMuiMCHitO_v1(const TMuiMCHitO& base_ref) :
00067 TMuiMCHitO(base_ref),
00068 _arm(base_ref.get_arm()),
00069 _plane(base_ref.get_plane()),
00070 _index(base_ref.get_index()),
00071 _track_id(base_ref.get_track_id()),
00072 _x(base_ref.get_x()),
00073 _y(base_ref.get_y()),
00074 _z(base_ref.get_z()),
00075 _px(base_ref.get_px()),
00076 _py(base_ref.get_py()),
00077 _pz(base_ref.get_pz()),
00078 _pid(base_ref.get_pid()),
00079 _file_key(base_ref.get_file_key()),
00080 _twopack_list(*(base_ref.get_twopack_list()))
00081 {
00082
00083 }
00084
00085 void TMuiMCHitO_v1::print(std::ostream& os) const {
00086
00087 MUIOO::PRINT(os,GetName());
00088 os << " arm: " << _arm
00089 << " plane: " << _plane
00090 << " index: " << _index << std::endl;
00091 os << " trk_index : " << _track_id << std::endl;
00092 os << " p = {" << _px << "," << _py << "," << _pz << "}" << std::endl;
00093 os << " x = {" << _x << "," << _y << "," << _z << "}" << std::endl;
00094 os << " pid : " << _pid << std::endl;
00095 os << " file_key : " << _file_key << std::endl;
00096
00097
00098
00099 const twopack_list* twopack = get_twopack_list();
00100 twopack_iterator twopack_iter = twopack->begin();
00101 for(;twopack_iter!=twopack->end();++twopack_iter){
00102 twopack_iter->print();
00103 }
00104
00105 TMutMCTrkMap::const_key_iterator mc_trk_iter = get_associated<TMutMCTrk>();
00106 os << " number of associated mctrk : " << mc_trk_iter.count() << endl;
00107
00108
00109
00110 MUIOO::PRINT(os,"**");
00111 }
00112
00113
00114
00115
00116
00117
00118
00119
00120