FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairTutPropHit.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2020 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 #ifndef FAIRTUTPROPHIT_H_
9 #define FAIRTUTPROPHIT_H_
10 
11 #include "FairHit.h" // for FairHit
12 
13 #include <Rtypes.h> // for FairTutPropHit::Class, etc
14 #include <boost/serialization/base_object.hpp>
15 namespace boost {
16 namespace serialization {
17 class access;
18 }
19 } // namespace boost
20 
21 class TVector3;
22 
23 class FairTutPropHit : public FairHit
24 {
25  public:
28 
30  FairTutPropHit(int detID,
31  int mcindex,
32  const TVector3& pos,
33  const TVector3& dpos,
34  int trackID,
35  int pdgCode,
36  double charge,
37  const TVector3& mom,
38  const TVector3& dmom);
39 
41  virtual ~FairTutPropHit();
42 
43  int GetTrackID() { return fTrackID; }
44  int GetPdgCode() { return fPdgCode; }
45  double GetCharge() { return fCharge; }
46  double GetPx() { return fPx; }
47  double GetPy() { return fPy; }
48  double GetPz() { return fPz; }
49  double GetDPx() { return fDPx; }
50  double GetDPy() { return fDPy; }
51  double GetDPz() { return fDPz; }
52 
53  template<class Archive>
54  void serialize(Archive& ar, const unsigned int /*version*/)
55  {
56  ar& boost::serialization::base_object<FairHit>(*this);
57  ar& fTrackID;
58  ar& fPdgCode;
59  ar& fCharge;
60  ar& fPx;
61  ar& fPy;
62  ar& fPz;
63  ar& fDPx;
64  ar& fDPy;
65  ar& fDPz;
66  }
67 
68  private:
70 
71  // magic detector that knows track ids and momenta
72  int fTrackID;
73  int fPdgCode;
74  double fCharge;
75  double fPx, fPy, fPz;
76  double fDPx, fDPy, fDPz;
77 
78  ClassDef(FairTutPropHit, 1);
79 };
80 
81 #endif /* FAIRTUTPROPHIT_H_ */
virtual ~FairTutPropHit()
friend class boost::serialization::access
double GetCharge()
void serialize(Archive &ar, const unsigned int)