BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcHitUse.cxx
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: MdcHitUse.cxx,v 1.2 2011/09/26 00:55:50 zhangy Exp $
4//
5// Description:
6//
7//
8// Environment:
9// Software developed for the BaBar Detector at the SLAC B-Factory.
10//
11// Author(s): Steve Schaffner
12//
13//------------------------------------------------------------------------
14
15//#include "BaBar/BaBar.h"
16#include "MdcData/MdcHitUse.h"
17#include "MdcData/MdcRecoHitOnTrack.h"
18#include "MdcData/MdcHit.h"
19
20
21MdcHitUse::MdcHitUse(const MdcHit& thehit, double flt, int amb,
22 bool active, int usable) :
23 TrkHitUse(thehit, flt, active, usable)
24{
25 _ambig = amb;
26}
27
29{ }
30
33//MdcHitUse::createHitOnTrk(const TrkRep& rep, bool maintainAmbiguity) const
34{
35 // This is a kludge -- fix once MdcHitOnTrack gets more cleaned up
36 // (time should not be used for anything (I hope)
37 // Also note that I temporarily have to cast off const from TrkRep
38 const MdcHit *h=mdcHit(); assert(h!=0);
39 MdcRecoHitOnTrack tempHot(*h, ambig(), 0.);
40 TrkHitOnTrk* newHot = tempHot.clone(&const_cast<TrkRep&>(rep));
41 newHot->setFltLen( fltLen() );
42 updateMeasurement(*newHot);
43 /*
44 //yzhang changed 2011-05-04
45 std::cout<< __FILE__ << " " << __LINE__ << " maintainAmbiguity "<<maintainAmbiguity<<std::endl;
46 if( maintainAmbiguity )
47 {
48 std::cout<< __FILE__ << " " << __LINE__ << " 2d "<<false<<std::endl;
49 updateMeasurement(*newHot,0, false); //2d maintainAmbiguity = false
50 }else{
51 std::cout<< __FILE__ << " " << __LINE__ << " 3d "<<true<<std::endl;
52 updateMeasurement(*newHot,0, true); //3d maintainAmbiguity = true
53 }
54 */
55 //zhangy
56 return newHot;
57}
58
59bool
61{
62 // This is not going to win any design prizes:
63 if (mdcHit() == 0 || rhs.mdcHit() ==0) return false;
64 const MdcHitUse& x = static_cast<const MdcHitUse&>(rhs);
65 return ( ambig() == x.ambig() && TrkHitUse::operator==(x) );
66}
67
68const MdcHit*
70{
71 return static_cast<const MdcHit*>(&(hit()));
72}
Double_t x[10]
virtual bool operator==(const TrkHitUse &) const
Definition: MdcHitUse.cxx:60
virtual TrkHitOnTrk * createHitOnTrk(const TrkRep &) const
Definition: MdcHitUse.cxx:32
const MdcHit * mdcHit() const
Definition: MdcHitUse.cxx:69
MdcHitUse(const MdcHit &, double fltLen, int ambig, bool active=true, int usable=1)
Definition: MdcHitUse.cxx:21
virtual ~MdcHitUse()
Definition: MdcHitUse.cxx:28
virtual TrkHitOnTrk * clone(TrkRep *, const TrkDifTraj *trkTraj=0) const
virtual bool operator==(const TrkHitUse &) const =0
Definition: TrkHitUse.cxx:47
virtual const MdcHit * mdcHit() const
Definition: TrkHitUse.cxx:33