~jan.greis/maus/1811

« back to all changes in this revision

Viewing changes to src/common/Interface/VirtualHit.cc

  • Committer: Chris Rogers
  • Date: 2011-05-11 09:33:14 UTC
  • mfrom: (340.1.92 devel)
  • mto: This revision was merged to the branch mainline in revision 490.
  • Revision ID: chris.rogers@stfc.ac.uk-20110511093314-fcxrl52ve3pwnr6s
Virtual Planes and cpplint stuff

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
 
10
10
#include "VirtualHit.hh"
11
11
 
12
 
using namespace std;
13
 
 
14
12
VirtualHit::VirtualHit()
15
13
{
16
 
  miceMemory.addNew( Memory::VirtualHit );
17
 
 
18
 
  setEdep(0);
19
 
  _stationNumber = -1;
20
 
  _bField = ThreeVector(0., 0., 0.);
21
 
        _eField = ThreeVector(0., 0., 0.);
22
 
}
23
 
 
24
 
VirtualHit::VirtualHit(const VirtualHit& rhs)
25
 
{
26
 
  miceMemory.addNew( Memory::VirtualHit );
27
 
        
28
 
        _stationNumber=rhs._stationNumber;
29
 
        _bField=rhs._bField;
30
 
        _eField=rhs._eField;
31
 
}
32
 
 
33
 
const VirtualHit& VirtualHit::operator=(const VirtualHit& rhs)
34
 
{
35
 
        if(&rhs==this) return *this;
36
 
 
37
 
        _stationNumber=rhs._stationNumber;
38
 
        _bField=rhs._bField;
39
 
        _eField=rhs._eField;
40
 
        return *this;
41
 
}
42
 
 
43
 
int VirtualHit::operator==(const VirtualHit& rhs) const
44
 
{
45
 
        bool a=( trackID() == rhs.trackID() );
46
 
        bool b=( charge() == rhs.charge() );
47
 
        bool c=(_stationNumber==rhs._stationNumber);
48
 
        bool d=( mass() == rhs.mass() );
49
 
        bool e=( position() == rhs.position() );
50
 
        bool f=( time() == rhs.time() );
51
 
        bool g=( momentum() == rhs.momentum() );
52
 
        bool h=( energy() == rhs.energy() );
53
 
        bool i=( pdg() == rhs.pdg() );
54
 
        bool j=(_bField==rhs._bField);
55
 
        bool k=(_eField==rhs._eField);
56
 
 
57
 
        return a*b*c*d*e*f*g*h*i*j*k;
58
 
 
59
 
}
 
14
}
 
15
 
 
16