GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TRcmpHit.h
Go to the documentation of this file.
1/// \author Dhruval Shah <dsi491@uregina.ca>, University of Regina
2
3#ifndef RCMPHIT_H
4#define RCMPHIT_H
5
6/** \addtogroup Detectors
7 * @{
8 */
9
10#include <cstdio>
11#include <cmath>
12#include <vector>
13
14#include "TVector3.h"
15
16#include "TFragment.h"
17#include "TChannel.h"
18
19#include "TDetectorHit.h"
20
21class TRcmpHit : public TDetectorHit {
22public:
23 // constructors and destructors
24 TRcmpHit() = default; ///< default constructor
25 TRcmpHit(const TRcmpHit&); ///< copy constructor
26 TRcmpHit(TRcmpHit&&) noexcept = default;
27 TRcmpHit& operator=(const TRcmpHit&) = default;
28 TRcmpHit& operator=(TRcmpHit&&) noexcept = default;
29 // TRcmpHit(const TRcmpHit& front, const TRcmpHit& back); ///< dual parameter constructor for front and back hits
30 explicit TRcmpHit(const TFragment& frag); ///< single fragment constructor (either front or back)
31 TRcmpHit(const TFragment& fragFront, const TFragment& fragBack); ///< dual parameter constructor for front and back fragments
32 ~TRcmpHit() override = default; ///< destructor
33
34 void Clear(Option_t* opt = "") override; //!<!
35 void Print(Option_t* opt = "") const override; //!<!
36 void Print(std::ostream& out) const override; //!<!
37 void Copy(TObject&) const override; //!<!
38 void Copy(TObject&, bool) const override; //!<!
39
40 inline Short_t GetFrontStripNumber() const { return fFrontStrip; } ///< RcmpHit vector elements can access this
41 inline Short_t GetBackStripNumber() const { return fBackStrip; } ///< RcmpHit vector elements can access this
42 inline Short_t GetStripNumber() const { return fStrip; } ///< RcmpFrontHit or RcmpBackHit vector elements can access this
43 inline UShort_t GetArrayNumber() const override { return (32 * (GetDetector() - 1) + GetSegment()); } //!<! //function to plot all front strips or back strips for energy vs channel histograms
44
45private:
46 Double_t GetDefaultDistance() const { return 0.0; }
47
48 // data members for front and back strips, the values for these will be set in the constructors
49 Short_t fFrontStrip = -1; ///< this corresponds to the front strip number for a Pixel Hit
50 Short_t fBackStrip = -1; ///< this corresponds to the back strip number for a Pixel Hit
51 Short_t fStrip = -1; ///< this corresponds to the front strip number for a front hit and the back strip number for a back hit
52
53 /// \cond CLASSIMP
54 ClassDefOverride(TRcmpHit, 1); // NOLINT
55 /// \endcond
56};
57
58/*! @} */
59#endif
virtual Int_t GetDetector() const
!
virtual Int_t GetSegment() const
!
Short_t GetBackStripNumber() const
RcmpHit vector elements can access this.
Definition TRcmpHit.h:41
UShort_t GetArrayNumber() const override
! //function to plot all front strips or back strips for energy vs channel histograms
Definition TRcmpHit.h:43
Short_t fBackStrip
this corresponds to the back strip number for a Pixel Hit
Definition TRcmpHit.h:50
Short_t fFrontStrip
this corresponds to the front strip number for a Pixel Hit
Definition TRcmpHit.h:49
void Copy(TObject &) const override
!
Definition TRcmpHit.cxx:33
Double_t GetDefaultDistance() const
Definition TRcmpHit.h:46
void Print(Option_t *opt="") const override
!
Definition TRcmpHit.cxx:62
Short_t GetFrontStripNumber() const
RcmpHit vector elements can access this.
Definition TRcmpHit.h:40
Short_t fStrip
this corresponds to the front strip number for a front hit and the back strip number for a back hit
Definition TRcmpHit.h:51
void Clear(Option_t *opt="") override
!
Definition TRcmpHit.cxx:52
Short_t GetStripNumber() const
RcmpFrontHit or RcmpBackHit vector elements can access this.
Definition TRcmpHit.h:42
TRcmpHit()=default
default constructor
TRcmpHit(TRcmpHit &&) noexcept=default