PandaRoot
PndHypGe.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 // ----- CbmHypGe header file -----
15 
16 // -------------------------------------------------------------------------
17 
18 #ifndef PNDHYPGE_H
19 #define PNDHYPGE_H
20 
21 #include "TClonesArray.h"
22 #include "TVector3.h"
23 #include "TLorentzVector.h"
24 #include "FairDetector.h"
25 //#include "PndGeoHypGePar.h"
26 //#include "GeCluster.h"
27 
28 using namespace std;
29 
30 class TClonesArray;
31 class PndHypGePoint;
32 // class PndHypGesciPoint;
33 class FairVolume;
34 
35 class PndHypGe : public FairDetector {
36 
37  public:
39  PndHypGe();
40 
45  PndHypGe(const char *name, Bool_t active);
46 
48  virtual ~PndHypGe();
49 
53  virtual void Initialize();
54 
62  virtual Bool_t ProcessHits(FairVolume *vol = 0);
63 
69  virtual void EndOfEvent();
70 
71  virtual void BeginEvent();
76  virtual void Register();
77 
79  virtual TClonesArray *GetCollection(Int_t iColl) const;
80 
85  virtual void Print() const;
86 
91  virtual void Reset();
92 
100  virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset);
101 
106  virtual void ConstructGeometry();
107 
108  void ConstructHPGeGeometry();
109 
110  PndHypGePoint *AddHit(Int_t trackID, Int_t evtID, Int_t pdgCode, Int_t charge, TVector3 pos, TVector3 mom, Double_t tof, Double_t length, Double_t eLoss, Short_t copy);
111 
112  PndHypGePoint *AddGeAlHit(Int_t trackID, Int_t evtID, Int_t pdgCode, Int_t charge, TVector3 pos, TVector3 mom, Double_t tof, Double_t length, Double_t eLoss, Short_t copy);
113 
116  void SetDisIP(Double_t dist)
117  {
118  fdist = dist; // cm
119  }
120 
121  void SetPathGeo(TString pgeo) { fPathGeo = pgeo.Data(); }
122 
123  private:
124  std::vector<std::string> fListOfSensitives;
125  bool CheckIfSensitive(std::string name);
126 
127  // PndGeoHypGePar *par;
128  Int_t fpdgCode;
129  Int_t fcharge;
130 
131  Int_t fTrackID; // track index
132  Int_t fVolumeID; // volume id
133  Int_t fEventID; // event id
134  TLorentzVector fPos; // position
135  TLorentzVector fMom; // momentum
136  Double32_t fTime; // time
137  Double32_t fLength; // length
138  Double32_t fELoss; // energy loss
139  Int_t fPosIndex; //
140  Short_t fnCopy;
141  Double_t fdist;
142  TString fPathGeo;
143 
144  // Int_t volDetector; // MC volume ID of MUO
145 
146  TClonesArray *fHypGeCollection; // Hit collection
147  TClonesArray *fHypGeAlCollection; // Hit collection
148  // TClonesArray* fHypGecapCollection; // Hit collection
149  // reset all parameters
150  void ResetParameters();
151 
152  ClassDef(PndHypGe, 3)
153 };
154 
155 #endif
STL namespace.
void SetDisIP(Double_t dist)
Definition: PndHypGe.h:116
void SetPathGeo(TString pgeo)
Definition: PndHypGe.h:121