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

TMui1DRoadO.cxx

Go to the documentation of this file.
00001 #include<TMui1DRoadO.h>
00002 #include<TDataType.h>
00003 #include<algorithm>
00004 #include<TMuiKeyGen.h>
00005 
00006 ClassImp(TMui1DRoadO)
00007 ClassImp(TMui1DRoadO_v1)
00008   
00009 TMui1DRoadO_v1::TMui1DRoadO_v1() :
00010   _arm(0),
00011   _panel(0),
00012   _orientation(0),
00013   _index(0),
00014   _fit_par(),
00015   _depth(0),
00016   _nhit(0),
00017   _max_hit_plane(0),
00018   _road_quality(0),
00019   _freedom(0),
00020   _ghost_flag(0),
00021   _gapbit(0)
00022 {;}
00023 
00024 TMui1DRoadO_v1::TMui1DRoadO_v1(const Key& key,
00025                                UShort_t arm,
00026                                UShort_t panel,
00027                                UShort_t orientation,
00028                                UShort_t index) :
00029   TMui1DRoadO(key),
00030   _arm(arm),
00031   _panel(panel),
00032   _orientation(orientation),
00033   _index(index),
00034   _fit_par(),
00035   _depth(0),
00036   _nhit(0),
00037   _max_hit_plane(0),
00038   _road_quality(0),
00039   _freedom(0),
00040   _ghost_flag(0),
00041   _gapbit(0)
00042 {
00043     std::fill(_fitweight,
00044               _fitweight+FITWEIGHT_SIZE,
00045               0.0);
00046 }
00047 
00048 
00049 TMui1DRoadO_v1::TMui1DRoadO_v1(const TMui1DRoadO* base_ptr) :
00050   TMui1DRoadO(*base_ptr),
00051   _arm(base_ptr->get_arm()),
00052   _panel(base_ptr->get_panel()),
00053   _orientation(base_ptr->get_orientation()),
00054   _index(base_ptr->get_index()),
00055   _fit_par(base_ptr->get_fit_par()),
00056   _depth(base_ptr->get_depth()),
00057   _nhit(base_ptr->get_nhit()),
00058   _max_hit_plane(base_ptr->get_max_hit_plane()),
00059   _road_quality(base_ptr->get_road_quality()),
00060   _freedom(base_ptr->get_freedom()),
00061   _ghost_flag(base_ptr->get_ghost_flag()),
00062   _gapbit(base_ptr->get_gapbit())
00063 {
00064     for(int rowid = 0; rowid < FITWEIGHT_SIZE; rowid++)
00065     {
00066       _fitweight[rowid]=base_ptr->get_fitweight(rowid);
00067     }
00068 }
00069 
00070 
00071 TMui1DRoadO_v1::TMui1DRoadO_v1(const TMui1DRoadO& base_ref) :
00072   TMui1DRoadO(base_ref),
00073   _arm(base_ref.get_arm()),
00074   _panel(base_ref.get_panel()),
00075   _orientation(base_ref.get_orientation()),
00076   _index(base_ref.get_index()),
00077   _fit_par(base_ref.get_fit_par()),
00078   _depth(base_ref.get_depth()),
00079   _nhit(base_ref.get_nhit()),
00080   _max_hit_plane(base_ref.get_max_hit_plane()),
00081   _road_quality(base_ref.get_road_quality()),
00082   _freedom(base_ref.get_freedom()),
00083   _ghost_flag(base_ref.get_ghost_flag()),
00084   _gapbit(base_ref.get_gapbit())
00085 {
00086     for(int rowid = 0; rowid < FITWEIGHT_SIZE; rowid++)
00087     {
00088       _fitweight[rowid]=base_ref.get_fitweight(rowid);
00089     }
00090 }
00091 
00092 TMui1DRoadO_v1::TMui1DRoadO_v1(const Key& baseKey, const TMui1DRoadO* base_ptr) :
00093 TMui1DRoadO(baseKey),
00094 _arm(base_ptr->get_arm()),
00095 _panel(base_ptr->get_panel()),
00096 _orientation(base_ptr->get_orientation()),
00097 _index(TMuiKeyGen::get_index(baseKey.get_obj_key())),
00098 _fit_par(base_ptr->get_fit_par()),
00099 _depth(base_ptr->get_depth()),
00100 _nhit(base_ptr->get_nhit()),
00101 _max_hit_plane(base_ptr->get_max_hit_plane()),
00102 _road_quality(base_ptr->get_road_quality()),
00103 _freedom(base_ptr->get_freedom()),
00104 _ghost_flag(base_ptr->get_ghost_flag()),
00105 _gapbit(base_ptr->get_gapbit())
00106 {
00107 
00108   // Since we initialized with an "empty" key,
00109   // our associations have not been copy constructed
00110   // we'll do this in the IOC that calls this method
00111   
00112   for(int rowid = 0; rowid < FITWEIGHT_SIZE; rowid++)
00113   {
00114     _fitweight[rowid]=base_ptr->get_fitweight(rowid);
00115   }
00116 }
00117 
00118 int TMui1DRoadO_v1::get_numfired() const
00119 {
00120   int num_fired = 0;
00121   for(int i = 0; i <= _depth; i++)
00122   {
00123     num_fired+=0x1&(_gapbit>>i);
00124   }
00125   return num_fired;
00126 }
00127 
00128 int TMui1DRoadO_v1::get_numskipped() const
00129 {
00130   return (_depth + 1 - get_numfired() );
00131 }
00132 

MUIOO: PHENIX Muon Identifier Analysis Framework. Documentation by doxygen
Last modified: