PandaRoot
PndFts2.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 PNDFTS2_H
18 #define PNDFTS2_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 
28 #include <string>
29 #include <sstream>
30 
31 class TClonesArray;
32 class FairVolume;
33 
34 class PndFts2 : public FairDetector {
35 
36  public:
38  PndFts2();
39 
44  PndFts2(const char *name, Bool_t active);
45 
47  virtual ~PndFts2();
48 
56  virtual Bool_t ProcessHits(FairVolume *vol = 0);
57 
63  virtual void EndOfEvent();
64 
69  virtual void Register();
70 
72  virtual TClonesArray *GetCollection(Int_t iColl) const;
73 
78  virtual void Print() const;
79 
84  virtual void Reset();
85 
86  void Initialize();
87 
95  virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset);
96 
101  virtual void ConstructGeometry();
102 
103  private:
106  Int_t fTrackID;
107  Int_t fVolumeID;
108  TLorentzVector fPos;
109  TLorentzVector fPosIn;
110  TLorentzVector fPosOut;
111  TLorentzVector fPosInLocal;
112  TLorentzVector fPosOutLocal;
113  TLorentzVector fMomIn;
114  TLorentzVector fMomOut;
115  Double_t fTime;
116  Double_t fLength;
117  Double_t fELoss;
118  Double_t fMass;
119  Bool_t fIsInitialized;
120 
121  Int_t fPosIndex;
122  TClonesArray *fFtsCollection;
123  TLorentzVector fpostot; // global frame hit position (in)// da cancellare
124  TLorentzVector fpostotin; // global frame hit position (in)// da cancellare
125  TLorentzVector fpostotout; // global frame hit position (in)// da cancellare
126 
127  TObjArray *fPassNodes;
128  // geometry type
129  Bool_t valid;
130  Int_t fGeoType;
131 
136  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,
137  TVector3 momOut, Double_t time, Double_t length, Double_t eLoss, Double_t mass);
138 
139  std::string GetStringPart(std::string &aSrc, Int_t part, char aDelim);
140  bool Split(std::string &aDest, std::string &aSrc, char aDelim);
141 
146  void ResetParameters();
147 
153  float GetSquaredDistanceFromWire();
154 
155  PndFts2(const PndFts2 &L);
156  PndFts2 &operator=(const PndFts2 &) { return *this; }
157 
158  ClassDef(PndFts2, 1)
159 };
160 
161 inline void PndFts2::ResetParameters()
162 {
163  fTrackID = fVolumeID = 0;
164  fPos.SetXYZM(0.0, 0.0, 0.0, 0.0);
165  fPosInLocal.SetXYZM(0.0, 0.0, 0.0, 0.0);
166  fPosOutLocal.SetXYZM(0.0, 0.0, 0.0, 0.0);
167  fMomIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
168  fMomOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
169  fTime = fLength = fELoss = 0;
170  fPosIndex = 0;
171  fpostot.SetXYZM(0.0, 0.0, 0.0, 0.0); // da cancellare
172  fpostotin.SetXYZM(0.0, 0.0, 0.0, 0.0); // da cancellare
173  fpostotout.SetXYZM(0.0, 0.0, 0.0, 0.0); // da cancellare
174  fPosIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
175  fPosOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
176  fMass = 0;
177  fIsInitialized = kFALSE;
178  valid = kFALSE;
179 }
180 
181 #endif
virtual void Reset()
virtual ~PndFts2()
virtual void EndOfEvent()
virtual void Print() const
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
virtual void Register()
void Initialize()
virtual void ConstructGeometry()
virtual TClonesArray * GetCollection(Int_t iColl) const
virtual Bool_t ProcessHits(FairVolume *vol=0)