ATTPCROOT  0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
AtTpc.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence version 3 (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 #ifndef AtTPC_H
9 #define AtTPC_H
10 
11 #include <FairDetector.h>
12 
13 #include <Rtypes.h>
14 #include <TLorentzVector.h>
15 #include <TString.h>
16 #include <TVector3.h>
17 
18 #include <string>
19 #include <utility>
20 
21 class AtMCPoint;
22 class FairVolume;
23 class TClonesArray;
24 class TBuffer;
25 class TClass;
26 class TList;
27 class TMemberInspector;
28 
29 class AtTpc : public FairDetector {
30 private:
34  TLorentzVector fPos;
35  TLorentzVector fMom;
36 
37  Int_t fTrackID;
38  Int_t fVolumeID;
39  Int_t fDetCopyID{};
40  Int_t fsector{};
41  TLorentzVector fPosIn, fPosOut;
42  TLorentzVector fMomIn, fMomOut;
43  Double32_t fTime_in{};
44  Double32_t fTime_out{};
45  Double32_t fTime;
46  Double32_t fLength_in{};
47  Double32_t fLength_out{};
48  Double32_t fLength;
49  Double32_t fELoss;
50  Int_t fPosIndex;
51  TClonesArray *fTraCollection{};
52  Bool_t kGeoSaved{};
53  TList *flGeoPar{};
54  TString fVolName;
55  Double32_t fELossAcc;
56  TLorentzVector InPos;
57 
60  TClonesArray *fAtTpcPointCollection;
61 
62 public:
67  AtTpc(const char *Name, Bool_t Active);
68  AtTpc();
69  virtual ~AtTpc();
70 
72  virtual void Initialize() override;
73  virtual Bool_t ProcessHits(FairVolume *v = 0) override;
74  virtual void Register() override;
75  virtual TClonesArray *GetCollection(Int_t iColl) const override;
76  virtual void Reset() override;
77  virtual void Print(Option_t *option = "") const override;
78  virtual void EndOfEvent() override;
79 
81  virtual void ConstructGeometry() override;
82  virtual Bool_t CheckIfSensitive(std::string name) override;
83 
84  AtMCPoint *
85  AddHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss);
86 
87  AtMCPoint *AddHit(Int_t trackID, Int_t detID, TString VolName, Int_t detCopyID, TVector3 pos, TVector3 mom,
88  Double_t time, Double_t length, Double_t eLoss, Double_t EIni, Double_t AIni, Int_t A, Int_t Z);
89 
90 private:
91  std::pair<Int_t, Int_t> DecodePdG(Int_t PdG_Code);
92 
93  void trackEnteringVolume();
94  void getTrackParametersFromMC();
95  void getTrackParametersWhileExiting();
96  void correctPosOut();
97  void resetVertex();
98  void addHit();
99  bool reactionOccursHere();
100  void startReactionEvent();
101 
102  AtTpc(const AtTpc &);
103  AtTpc &operator=(const AtTpc &);
104 
105  ClassDefOverride(AtTpc, 2)
106 };
107 
108 #endif // NEWDETECTOR_H
AtTpc::Initialize
virtual void Initialize() override
Definition: AtTpc.cxx:56
AtTpc::CheckIfSensitive
virtual Bool_t CheckIfSensitive(std::string name) override
Definition: AtTpc.cxx:289
AtTpc::AtTpc
AtTpc()
Definition: AtTpc.cxx:40
AtTpc
Definition: AtTpc.h:29
AtTpc::AddHit
AtMCPoint * AddHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss)
Definition: AtTpc.cxx:301
AtTpc::ProcessHits
virtual Bool_t ProcessHits(FairVolume *v=0) override
Definition: AtTpc.cxx:174
AtTpc::Register
virtual void Register() override
Definition: AtTpc.cxx:250
AtTpc::EndOfEvent
virtual void EndOfEvent() override
Definition: AtTpc.cxx:244
AtTpc::Print
virtual void Print(Option_t *option="") const override
Definition: AtTpc.cxx:269
AtTpc::~AtTpc
virtual ~AtTpc()
Definition: AtTpc.cxx:48
AtMCPoint
Definition: AtMCPoint.h:26
AtTpc::ConstructGeometry
virtual void ConstructGeometry() override
Definition: AtTpc.cxx:275
AtTpc::GetCollection
virtual TClonesArray * GetCollection(Int_t iColl) const override
Definition: AtTpc.cxx:255
AtTpc::Reset
virtual void Reset() override
Definition: AtTpc.cxx:264