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 const TVector3& pos, const TVector3& mom,
12 Double_t tof, Double_t length,
13 Double_t eLoss, Int_t pdgcode,
14 const TVector3& Lpos, const TVector3& Lmom)
15 : FairMCPoint(trackID, detID, pos, mom, tof, length, eLoss, eventID),
16 fPdgCode(pdgcode),
17 fLpos{Lpos.X(), Lpos.Y(), Lpos.Z()},
18 fLmom{Lmom.X(), Lmom.Y(), Lmom.Z()} {}
20// ----- Standard constructor ----------------
21SHiP::DetectorPoint::DetectorPoint(Int_t eventID, Int_t trackID, Int_t detID,
22 const TVector3& pos, const TVector3& mom,
23 Double_t tof, Double_t length,
24 Double_t eLoss, Int_t pdgcode)
25 : FairMCPoint(trackID, detID, pos, mom, tof, length, eLoss, eventID),
26 fPdgCode(pdgcode),
27 fLpos{pos.X(), pos.Y(), pos.Z()},
28 fLmom{mom.X(), mom.Y(), mom.Z()} {}
29
30// ----- Public method Print -------------------------------------------
32 LOG(info) << "-I- " << ClassName() << " point for track " << fTrackID
33 << " in detector " << fDetectorID;
34 LOG(info) << " Position (" << fX << ", " << fY << ", " << fZ << ") cm";
35 LOG(info) << " Momentum (" << fPx << ", " << fPy << ", " << fPz << ") GeV";
36 LOG(info) << " Time " << fTime << " ns, Length " << fLength
37 << " cm, Energy loss " << fELoss * 1.0e06 << " keV";
39}
40// -------------------------------------------------------------------------
41
43 LOG(info) << "Nothing to see here";
44}
DetectorPoint()=default
std::array< Double_t, 3 > fLmom
virtual void Print() const
virtual void extraPrintInfo() const
std::array< Double_t, 3 > fLpos