PandaRoot
PndEmcApdPoint.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 // ----- PndEmcApdPoint header file -----
15 // ----- Created 07/04/08 by S.Spataro -----
16 // ------------------------------------------------------------------------
17 //#pragma once
18 #ifndef PNDEMCAPDPOINT_H
19 #define PNDEMCAPDPOINT_H
20 
21 #include "TObject.h"
22 #include "TVector3.h"
23 #include "TLorentzVector.h"
24 #include "FairMCPoint.h"
25 
26 class PndEmcApdPoint : public FairMCPoint {
27 
28  public:
31 
44  PndEmcApdPoint(Int_t trackID, Int_t detID, Int_t evtID, TVector3 pos, TVector3 mom, Double_t tof, Double_t length, Double_t eLoss, Short_t mod, Short_t row, Short_t crys,
45  Short_t copy, Short_t flag);
46 
48  PndEmcApdPoint(const PndEmcApdPoint &point);
49 
51  virtual ~PndEmcApdPoint();
52 
54  Double_t GetTheta() const { return fX == 0.0 && fY == 0.0 && fZ == 0.0 ? 0.0 : TMath::ATan2(sqrt(fX * fX + fY * fY), fZ) * TMath::RadToDeg(); };
55  Double_t GetPhi() const { return fX == 0.0 && fY == 0.0 ? 0.0 : TMath::ATan2(fY, fX) * TMath::RadToDeg(); };
56  Short_t GetFlag() const { return fFlag; };
57 
58  Short_t GetXPad() const;
59  Short_t GetYPad() const;
60 
61  void Position(TVector3 &pos) { pos.SetXYZ(fX, fY, fZ); };
62  void Momentum(TVector3 &mom) { mom.SetXYZ(fPx, fPy, fPz); };
63  Short_t GetModule() const { return (fDetectorID / 100000000); };
64  Short_t GetRow() const { return ((fDetectorID / 1000000) % 100); };
65  Short_t GetCrystal() const { return (fDetectorID % 10000); };
66  Short_t GetCopy() const { return ((fDetectorID / 10000) % 100); };
68  void SetModule(Short_t mod) { nModule = mod; };
69  void SetRow(Short_t row) { nRow = row; };
70  void SetCrystal(Short_t crys) { nCrystal = crys; };
71  void SetFlag(Short_t flag) { fFlag = flag; };
72 
74  virtual void Print(const Option_t *opt) const;
75 
76  protected:
77  Short_t nModule; // Module number
78  Short_t nRow; // Row number
79  Short_t nCrystal; // Crystal number
80  Short_t nCopy; // Copy number
81  Short_t fFlag; // MC Flag: -1 entering, 0 crossing, 1 exiting,
82 
83  ClassDef(PndEmcApdPoint, 1)
84 };
85 
86 #endif
Short_t GetCrystal() const
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:40
virtual ~PndEmcApdPoint()
void SetFlag(Short_t flag)
void Position(TVector3 &pos)
Short_t GetCopy() const
Short_t GetRow() const
static T ATan2(const T &y, const T &x)
Double_t GetTheta() const
void SetCrystal(Short_t crys)
Short_t GetXPad() const
Double_t GetPhi() const
void SetModule(Short_t mod)
void SetRow(Short_t row)
void Momentum(TVector3 &mom)
virtual void Print(const Option_t *opt) const
Short_t GetYPad() const
Short_t GetModule() const
Short_t GetFlag() const