PandaRoot
PndSciT.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 // ----- PndSciT header file -----
15 // ----- created by A. Sanchez -----
16 // ----- modified by D. Steinschaden -----
17 // ----- last update 06.2015 -----
18 // --------------------------------------------------------------------------
19 
20 #ifndef PNDSCIT_H
21 #define PNDSCIT_H
22 
23 #include "PndGeoSciTPar.h"
24 #include "PndGeoHandling.h"
25 
26 #include "FairDetector.h"
27 
28 //#include "TClonesArray.h"
29 #include "TVector3.h"
30 #include "TLorentzVector.h"
31 
32 #include <string>
33 #include <vector>
34 
35 class TClonesArray;
36 class PndSciTPoint;
37 class FairVolume;
38 
39 class PndSciT : public FairDetector {
40 
41  public:
43  PndSciT();
44 
49  PndSciT(const char *name, Bool_t active);
50 
52  virtual ~PndSciT();
53 
57  virtual void Initialize();
58 
66  virtual Bool_t ProcessHits(FairVolume *vol = 0);
67 
73  virtual void EndOfEvent();
74 
75  virtual void BeginEvent();
80  virtual void Register();
81 
83  virtual TClonesArray *GetCollection(Int_t iColl) const;
84 
89  virtual void Print() const;
90 
95  virtual void Reset();
96 
104  virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset);
105 
109  virtual void ConstructGeometry();
110 
111  // void ConstructASCIIGeometry();
112 
113  void SetThreshold(Double_t val) { fThreshold = val; }; // default value is 0.0001 GeV
114 
115  PndSciTPoint *AddHit(Int_t eventID, Int_t trackID, Int_t sensorID, TString detName, TVector3 posin, TVector3 momin, TVector3 posout, TVector3 momout, Double_t tof,
116  Double_t length, Double_t eLoss);
117 
118  private:
119  std::vector<std::string> fListOfSensitives;
120  bool CheckIfSensitive(std::string name);
121 
122  Int_t fEventID; // event id
123  Int_t fTrackID; // track index
124  Int_t fSensorID; // used as volume ID/ detector ID coming from PndGeoHandling
125  TString fdetPath;
126 
127  TLorentzVector fPosIn; // position
128  TLorentzVector fMomIn; // momentum
129  TLorentzVector fPosOut; // position
130  TLorentzVector fMomOut; // momentum
131 
132  Double32_t fTime; // time
133  Double32_t fLength; // length
134  Double_t fELoss; // energy loss
135  Double_t fThreshold; // energy loss threshold
136 
137  PndGeoHandling *fGeoH;
138  PndGeoSciTPar *par;
139  Int_t fPosIndex; // Used when Copying the TCloneArrays
140  TClonesArray *fSciTCollection; // Hit collection
141 
142  // reset all parameters
143  void ResetParameters();
144 
145  ClassDef(PndSciT, 4)
146 };
147 
148 inline void PndSciT::ResetParameters()
149 {
150  fTrackID = fSensorID = fEventID = -1;
151  fPosIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
152  fPosOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
153  fMomIn.SetPxPyPzE(0.0, 0.0, 0.0, 0.0);
154  fMomOut.SetPxPyPzE(0.0, 0.0, 0.0, 0.0);
155 
156  fTime = fLength = fELoss = 0;
157 };
158 
159 #endif
void SetThreshold(Double_t val)
Definition: PndSciT.h:113
virtual void Initialize()
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
virtual void Reset()
virtual TClonesArray * GetCollection(Int_t iColl) const
virtual void Register()
Class to access the naming information of the MVD.
virtual void Print() const
virtual void BeginEvent()
virtual void ConstructGeometry()
virtual void EndOfEvent()
virtual ~PndSciT()
virtual Bool_t ProcessHits(FairVolume *vol=0)
PndSciTPoint * AddHit(Int_t eventID, Int_t trackID, Int_t sensorID, TString detName, TVector3 posin, TVector3 momin, TVector3 posout, TVector3 momout, Double_t tof, Double_t length, Double_t eLoss)