forked from FairRootGroup/FairRoot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFairTutorialDet4.h
More file actions
132 lines (100 loc) · 4.06 KB
/
Copy pathFairTutorialDet4.h
File metadata and controls
132 lines (100 loc) · 4.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/********************************************************************************
* Copyright (C) 2014-2024 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#ifndef FAIRTUTORIALDET4_H
#define FAIRTUTORIALDET4_H
#include "FairDetector.h" // for FairDetector
#include <Rtypes.h> // for Int_t, Bool_t, Double32_t, etc
#include <TArrayD.h> // for TArrayD
#include <TClonesArray.h>
#include <TLorentzVector.h> // for TLorentzVector
#include <TVector3.h> // for TVector3
#include <map>
#include <string>
class FairTutorialDet4Point;
class FairTutorialDet4GeoHandler;
class FairTutorialDet4MisalignPar;
class FairTutorialDet4Geo;
class FairVolume;
class FairModule;
class TGeoHMatrix;
class FairTutorialDet4 : public FairDetector
{
public:
/** Name : Detector Name
* Active: kTRUE for active detectors (ProcessHits() will be called)
* kFALSE for inactive detectors
*/
FairTutorialDet4(const char* Name, Bool_t Active);
/** default constructor */
FairTutorialDet4();
/** destructor */
virtual ~FairTutorialDet4();
/** Initialization of the detector is done here */
virtual void Initialize();
/** Init parameter containers */
virtual void InitParContainers();
/** this method is called for each step during simulation
* (see FairMCApplication::Stepping())
*/
virtual Bool_t ProcessHits(FairVolume* v = 0);
/** Registers the produced collections in FAIRRootManager. */
virtual void Register();
/** Gets the produced collections */
virtual TClonesArray* GetCollection(Int_t iColl) const;
/** has to be called after each event to reset the containers */
virtual void Reset();
/** Create the detector geometry */
void ConstructGeometry();
void SetParContainers();
/** This method is an example of how to add your own point
* of type FairTutorialDet4Point to the clones array
*/
FairTutorialDet4Point*
AddHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss);
/** The following methods can be implemented if you need to make
* any optional action in your detector during the transport.
*/
virtual void EndOfEvent();
void SetModifyGeometry(Bool_t val) { fModifyGeometry = val; }
void SetGlobalCoordinates(Bool_t val) { fGlobalCoordinates = val; }
virtual FairModule* CloneModule() const;
std::map<std::string, TGeoHMatrix> getMisalignmentMatrices();
virtual void RegisterAlignmentMatrices();
private:
/** Track information to be stored until the track leaves the
active volume.
*/
Int_t fTrackID; //! track index
Int_t fVolumeID; //! volume id
TLorentzVector fPos; //! position at entrance
TLorentzVector fMom; //! momentum at entrance
Double32_t fTime; //! time
Double32_t fLength; //! length
Double32_t fELoss; //! energy loss
/** container for data points */
TClonesArray* fFairTutorialDet4PointCollection;
FairTutorialDet4GeoHandler* fGeoHandler;
FairTutorialDet4MisalignPar* fMisalignPar;
Int_t fNrOfDetectors;
TArrayD fShiftX;
TArrayD fShiftY;
TArrayD fShiftZ;
TArrayD fRotX;
TArrayD fRotY;
TArrayD fRotZ;
Bool_t fModifyGeometry;
Bool_t fGlobalCoordinates;
/** Method to construct the ascii geometry
**
**/
void ConstructASCIIGeometry();
FairTutorialDet4(const FairTutorialDet4&);
FairTutorialDet4& operator=(const FairTutorialDet4&);
ClassDef(FairTutorialDet4, 3);
};
#endif // FAIRTUTORIALDET_H