PandaRoot
BSEmcMCPoint.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 // ------------------------------------------------------------------------
14 // ----- BSEmcMCPoint header file -----
15 // ----- Created 14/08/06 by S.Spataro -----
16 // ------------------------------------------------------------------------
17 #ifndef BSEMCMCPOINT_HH
18 #define BSEMCMCPOINT_HH
19 
20 #include <string> // for string
21 
22 #include "Rtypes.h" // for BSEmcMCPoint::Class, BSEmcMCPoint::Streamer
23 #include "RtypesCore.h" // for Int_t, kFALSE, Bool_t, Double_t, Option_t
24 #include "TVector3.h" // for TVector3
25 
26 #include "FairLink.h" // for FairLink
27 #include "FairMCPoint.h" // for FairMCPoint
28 
29 #include "BSEmcDataBranchNames.h"
30 
31 class TBuffer;
32 class TClass;
33 class TMemberInspector;
34 
40 class BSEmcMCPoint : public FairMCPoint {
41 
42  public:
44  BSEmcMCPoint();
45 
59  BSEmcMCPoint(Int_t t_trackID, Int_t t_detID, Int_t t_evtID, const TVector3 &t_pos, const TVector3 &t_mom, Double_t t_tof, Double_t t_length, Double_t t_eLoss,
60  Bool_t t_entering = kFALSE, Bool_t t_exiting = kFALSE);
61 
63  BSEmcMCPoint(const BSEmcMCPoint &t_point);
64 
66  virtual ~BSEmcMCPoint();
67 
68  Bool_t GetEntering() const { return fEntering; }
69  Bool_t GetExiting() const { return fExiting; }
72  virtual void SetTrackID(Int_t t_trackId)
73  {
74  FairMCPoint::SetTrackID(t_trackId);
75  SetLink(FairLink("MCTrack", t_trackId));
76  } // 14.09.10 Stefano FIX
77 
79  virtual void Print(const Option_t *t_opt) const;
80 
81  Bool_t operator<(const BSEmcMCPoint &t_rhs) const;
82 
83  Int_t GetDetectorId() const { return fDetectorID; }
84  void SetDetectorId(Int_t t_detectorId) { fDetectorID = t_detectorId; }
85  TVector3 GetPosition() const { return TVector3{GetX(), GetY(), GetZ()}; }
86 
87  Int_t GetClusterID() const { return fClusterID; }
88  void SetClusterID(Int_t t_clusterId) { fClusterID = t_clusterId; }
89 
90  protected:
91  Bool_t fEntering{kFALSE}; //< Is particle entering into crystal
92  Bool_t fExiting{kFALSE}; //< Is particle exiting the crystal
93  Int_t fClusterID{-1};
94  ClassDef(BSEmcMCPoint, 1)
95 };
96 
97 #endif /*BSEMCMCPOINT_HH*/
Int_t fClusterID
Definition: BSEmcMCPoint.h:93
Bool_t fExiting
Definition: BSEmcMCPoint.h:92
void SetDetectorId(Int_t t_detectorId)
Definition: BSEmcMCPoint.h:84
Bool_t GetExiting() const
Definition: BSEmcMCPoint.h:69
Bool_t operator<(const BSEmcMCPoint &t_rhs) const
virtual void Print(const Option_t *t_opt) const
represents a mc hit in an emc crystal
Definition: BSEmcMCPoint.h:40
virtual ~BSEmcMCPoint()
Int_t GetClusterID() const
Definition: BSEmcMCPoint.h:87
Bool_t GetEntering() const
Definition: BSEmcMCPoint.h:68
Int_t GetDetectorId() const
Definition: BSEmcMCPoint.h:83
virtual void SetTrackID(Int_t t_trackId)
Definition: BSEmcMCPoint.h:72
void SetClusterID(Int_t t_clusterId)
Definition: BSEmcMCPoint.h:88
TVector3 GetPosition() const
Definition: BSEmcMCPoint.h:85
Bool_t fEntering
Definition: BSEmcMCPoint.h:91