FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairTutorialDet2Point.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 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 FAIRTUTORIALDET2POINT_H
9 #define FAIRTUTORIALDET2POINT_H 1
10 
11 #include "FairMCPoint.h"
12 
13 #include <Rtypes.h>
14 #include <TVector3.h>
15 
17 {
18  public:
21 
31  FairTutorialDet2Point(Int_t trackID,
32  Int_t detID,
33  TVector3 pos,
34  TVector3 mom,
35  Double_t tof,
36  Double_t length,
37  Double_t eLoss);
38 
40  // FairTutorialDet2Point(const FairTutorialDet2Point& point) { *this = point; };
41 
44 
46  virtual void Print(const Option_t* opt) const;
47 
49 };
50 
51 // a custom class holding some data
52 // mainly to demonstrate that we don't need TObject inheritance
54 {
55  public:
57  CustomClass(double x, int q)
58  : fX(x)
59  , fQ(q)
60  {}
61  double GetX() const { return fX; }
62  int GetQ() const { return fQ; }
63 
64  private:
65  double fX = 0.; // x position
66  int fQ = 0; // charge
67  ClassDefNV(CustomClass, 1);
68 };
69 
70 #endif
double GetX() const
int GetQ() const
ClassDef(FairTutorialDet2Point, 1)
virtual void Print(const Option_t *opt) const
CustomClass(double x, int q)