~c-e-pidcott/maus/devel

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// MAUS WARNING: THIS IS LEGACY CODE.
#ifndef _VIRTUALHIT_HH_
#define _VIRTUALHIT_HH_
//----------------------------------------------------------------------------
//
//     File :              VirtualHit.hh
//     Purpose :           Variables used by VirtualHit.  This represents
//                         a sort of generic hit.
//     Created :           29-Sep-2002  by Steve Kahn
//
//----------------------------------------------------------------------------

#include "CLHEP/Vector/ThreeVector.h"
#include <fstream>
#include <string>

#include "MCHit.hh"

typedef Hep3Vector  ThreeVector;

class VirtualHit : public MCHit
{
  private :

    int          _stationNumber;  //  ID assigned to location
    ThreeVector  _bField;         //  magnetic field
    ThreeVector  _eField;         //  electric field
    double       _l;              //  path length
    double       _tau;            //  proper time

  public:

    VirtualHit();

  ~VirtualHit() 	{};

    void SetTrackID   (int tid)        { setTrackID( tid ); }
    void SetStationNumber (int sn)         { _stationNumber = sn; }
    void SetPos  (Hep3Vector xyz){ setPosition( xyz ); }
    void SetMomentum  (Hep3Vector xyz){ setMomentum( xyz ); }
    void SetTime      (double ti)      { setTime( ti ); }
    void SetEnergy    (double en)      { setEnergy( en ); }
    void SetPID       (int id)         { setPdg( id ); }
    void SetMass      (double ma)      { setMass( ma ); }
    void SetCharge    (double ch)      { setCharge( ch ); }
    void SetBField     (Hep3Vector b)  {  _bField = b; }
    void SetBField     ( double b[3]) { _bField.setX( b[0] ); _bField.setY( b[1] ); _bField.setZ( b[2] ); };
    void SetEField     (Hep3Vector e)  {  _eField = e; }
    void SetEField     ( double e[3]) { _eField.setX( e[0] ); _eField.setY( e[1] ); _eField.setZ( e[2] ); };
    void SetProperTime (double tau) { _tau = tau; }
    void SetPathLength (double l) { _l = l; }

    int GetTrackID() const     { return trackID(); }
    int GetStationNumber() const   { return _stationNumber; }
    Hep3Vector GetPos() const  { return position(); }
    Hep3Vector GetMomentum() const { return momentum(); }
    double GetTime() const     { return time(); }
    double GetEnergy() const   { return energy(); }
    int    GetPID() const      { return pdg(); }
    double GetMass() const     { return mass(); }
    double GetCharge() const   { return charge(); }
    Hep3Vector GetBField() const {  return _bField; }
    Hep3Vector GetEField() const {  return _eField; }
    double GetProperTime() const { return _tau; }
    double GetPathLength() const { return _l; }

};
#endif