PandaRoot
PndFts.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 // ----- PndFts header file -----
15 // -------------------------------------------------------------------------
16 
17 #ifndef PNDFTS_H
18 #define PNDFTS_H
19 
20 #include "TClonesArray.h"
21 #include "TLorentzVector.h"
22 #include "TVector3.h"
23 #include "FairDetector.h"
24 #include "PndGeoFtsPar.h"
25 #include "FairRun.h"
26 #include "PndFtsPoint.h"
27 #include "PndFtsMapCreator.h"
28 
29 #include <string>
30 #include <sstream>
31 
32 class TClonesArray;
33 class FairVolume;
34 
35 class PndFts : public FairDetector {
36 
37  public:
39  PndFts();
40 
45  PndFts(const char *name, Bool_t active);
46 
48  virtual ~PndFts();
49 
57  virtual Bool_t ProcessHits(FairVolume *vol = 0);
58 
64  virtual void EndOfEvent();
65 
70  virtual void Register();
71 
73  virtual TClonesArray *GetCollection(Int_t iColl) const;
74 
79  virtual void Print() const;
80 
85  virtual void Reset();
86 
87  void Initialize();
88 
96  virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset);
97 
102  virtual void ConstructGeometry();
103 
104  private:
107  Int_t fTrackID;
108  Int_t fVolumeID;
109  TLorentzVector fPos;
110  TLorentzVector fPosIn;
111  TLorentzVector fPosOut;
112  TLorentzVector fPosInLocal;
113  TLorentzVector fPosOutLocal;
114  TLorentzVector fMomIn;
115  TLorentzVector fMomOut;
116  Double_t fTime;
117  Double_t fLength;
118  Double_t fELoss;
119  Double_t fMass;
120  Bool_t fIsInitialized;
121 
122  Int_t fPosIndex;
123  TClonesArray *fFtsCollection;
124  TLorentzVector fpostot; // global frame hit position (in)// da cancellare
125  TLorentzVector fpostotin; // global frame hit position (in)// da cancellare
126  TLorentzVector fpostotout; // global frame hit position (in)// da cancellare
127 
128  TObjArray *fPassNodes;
129  // geometry type
130  Bool_t valid;
131  Int_t fGeoType;
132 
133  PndFtsMapCreator *fMapper;
134 
139  PndFtsPoint *AddHit(Int_t trackID, Int_t detID, Int_t tubeID, Int_t chamberID, Int_t layerID, TVector3 pos, TVector3 posInLocal, TVector3 posOutLocal, TVector3 momIn,
140  TVector3 momOut, Double_t time, Double_t length, Double_t eLoss, Double_t mass);
141 
142  std::string GetStringPart(std::string &aSrc, Int_t part, char aDelim);
143  bool Split(std::string &aDest, std::string &aSrc, char aDelim);
144 
149  void ResetParameters();
150 
156  float GetSquaredDistanceFromWire();
157 
158  PndFts(const PndFts &L);
159  PndFts &operator=(const PndFts &) { return *this; }
160 
161  ClassDef(PndFts, 1)
162 };
163 
164 inline void PndFts::ResetParameters()
165 {
166  fTrackID = fVolumeID = 0;
167  fPos.SetXYZM(0.0, 0.0, 0.0, 0.0);
168  fPosInLocal.SetXYZM(0.0, 0.0, 0.0, 0.0);
169  fPosOutLocal.SetXYZM(0.0, 0.0, 0.0, 0.0);
170  fMomIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
171  fMomOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
172  fTime = fLength = fELoss = 0;
173  fPosIndex = 0;
174  fpostot.SetXYZM(0.0, 0.0, 0.0, 0.0); // da cancellare
175  fpostotin.SetXYZM(0.0, 0.0, 0.0, 0.0); // da cancellare
176  fpostotout.SetXYZM(0.0, 0.0, 0.0, 0.0); // da cancellare
177  fPosIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
178  fPosOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
179  fMass = 0;
180  fIsInitialized = kFALSE;
181  valid = kFALSE;
182 }
183 
184 #endif
virtual void EndOfEvent()
virtual void Print() const
virtual void Register()
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
void Initialize()
virtual void Reset()
virtual Bool_t ProcessHits(FairVolume *vol=0)
virtual void ConstructGeometry()
virtual ~PndFts()
Definition: PndFts.h:35
virtual TClonesArray * GetCollection(Int_t iColl) const