FairShip
Loading...
Searching...
No Matches
DetectorPoint.cxx
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// SPDX-FileCopyrightText: Copyright CERN for the benefit of the SHiP
3// Collaboration
4
5#include "DetectorPoint.h"
6
7#include "FairLogger.h"
8
9// ----- Standard constructor ----------------
10SHiP::DetectorPoint::DetectorPoint(Int_t eventID, Int_t trackID, Int_t detID,
11 TVector3 pos, TVector3 mom, Double_t tof,
12 Double_t length, Double_t eLoss,
13 Int_t pdgcode, TVector3 Lpos, TVector3 Lmom)
14 : FairMCPoint(trackID, detID, pos, mom, tof, length, eLoss, eventID),
15 fPdgCode(pdgcode),
16 fLpos{Lpos.X(), Lpos.Y(), Lpos.Z()},
17 fLmom{Lmom.X(), Lmom.Y(), Lmom.Z()} {}
18
19// ----- Standard constructor ----------------
20SHiP::DetectorPoint::DetectorPoint(Int_t eventID, Int_t trackID, Int_t detID,
21 TVector3 pos, TVector3 mom, Double_t tof,
22 Double_t length, Double_t eLoss,
23 Int_t pdgcode)
24 : FairMCPoint(trackID, detID, pos, mom, tof, length, eLoss, eventID),
25 fPdgCode(pdgcode),
26 fLpos{pos.X(), pos.Y(), pos.Z()},
27 fLmom{mom.X(), mom.Y(), mom.Z()} {}
28
29// ----- Public method Print -------------------------------------------
31 LOG(info) << "-I- " << ClassName() << " point for track " << fTrackID
32 << " in detector " << fDetectorID;
33 LOG(info) << " Position (" << fX << ", " << fY << ", " << fZ << ") cm";
34 LOG(info) << " Momentum (" << fPx << ", " << fPy << ", " << fPz << ") GeV";
35 LOG(info) << " Time " << fTime << " ns, Length " << fLength
36 << " cm, Energy loss " << fELoss * 1.0e06 << " keV";
37 extraPrintInfo();
38}
39// -------------------------------------------------------------------------
40
42 LOG(info) << "Nothing to see here";
43}
44
45ClassImp(SHiP::DetectorPoint)
virtual void Print() const
virtual void extraPrintInfo() const