er  dev
ERNDTrack.cxx
1 /********************************************************************************
2  * Copyright (C) Joint Institute for Nuclear Research *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence version 3 (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 #include "ERNDTrack.h"
9 
10 #include "FairLogger.h"
11 
12 ERNDTrack::ERNDTrack(const TVector3& detectorVertex, const TVector3& targetVertex,
13  float edep, float time, float tac)
14  : fTargetVertex(targetVertex)
15  , fDetectorVertex(detectorVertex)
16  , fEdep(edep)
17  , fTime(time)
18  , fTAC(tac)
19 {
20 }
21 
22 TVector3 ERNDTrack::Direction() const {
23  TVector3 direction = fDetectorVertex - fTargetVertex;
24  direction.SetMag(1.);
25  return direction;
26 }
27 
28 ClassImp(ERNDTrack)