SND@LHC Software
Loading...
Searching...
No Matches
MagneticSpectrometer.h
Go to the documentation of this file.
1#ifndef MAGNETICSPECTROMETER_H
2#define MAGNETICSPECTROMETER_H
3
4#include "FairModule.h" // for FairModule
5#include "FairDetector.h" // for FairDetector
6
7#include "Rtypes.h" // for ShipMuonShield::Class, Bool_t, etc
8
9#include <string> // for string
10
11#include "TVector3.h"
12#include "TLorentzVector.h"
13
14class ShipRpcPoint;
15class FairVolume;
16class TClonesArray;
17
18class MagneticSpectrometer:public FairDetector
19{
20 public:
21 MagneticSpectrometer(const char* name, const Double_t Zcenter, Bool_t Active, const char* Title="MagneticSpectrometer");
23 virtual ~MagneticSpectrometer();
24
25 void SetDesign(Int_t Design);
26 void SetTotDimensions(Double_t X, Double_t Y, Double_t Z);
27 void SetFeDimensions(Double_t X, Double_t Y, Double_t Z);
28 void SetRpcDimensions(Double_t X, Double_t Y, Double_t Z);
29 void SetRpcStripDimensions(Double_t X, Double_t Y, Double_t Z);
30 void SetRpcGasDimensions(Double_t X, Double_t Y, Double_t Z);
31 void SetRpcElectrodeDimensions(Double_t X, Double_t Y, Double_t Z);
32 void SetRpcPETDimensions(Double_t X, Double_t Y, Double_t Z);
33 void SetNFeInArm(Int_t N);
34 void SetNRpcInArm(Int_t N);
35 void SetZDimensionArm(Double_t Z);
36 void SetGapDownstream(Double_t Gap);
37 void SetGapMiddle(Double_t Gap);
38 void SetMagneticField(Double_t B);
39 void SetReturnYokeDimensions(Double_t X, Double_t Y, Double_t Z);
40 void SetSmallerYokeDimensions(Double_t X, Double_t Y, Double_t Z);
41 void SetCoilParameters(Double_t CoilH, Double_t CoilW, Int_t N, Double_t CoilG);
42 void SetPillarDimensions(Double_t X, Double_t Y, Double_t Z);
43
44 void ConstructGeometry();
45
47 virtual void Initialize();
48
52 virtual Bool_t ProcessHits( FairVolume* v=0);
53
55 virtual void Register();
56
58 virtual TClonesArray* GetCollection(Int_t iColl) const ;
59
61 virtual void Reset();
62
67 ShipRpcPoint* AddHit(Int_t trackID, Int_t detID,
68 TVector3 pos, TVector3 mom,
69 Double_t time, Double_t length,
70 Double_t eLoss, Int_t pdgCode);
71
76 virtual void CopyClones( TClonesArray* cl1, TClonesArray* cl2 ,
77 Int_t offset) {;}
78 virtual void SetSpecialPhysicsCuts() {;}
79 virtual void EndOfEvent();
80 virtual void FinishPrimary() {;}
81 virtual void FinishRun() {;}
82 virtual void BeginPrimary() {;}
83 virtual void PostTrack() {;}
84 virtual void PreTrack() {;}
85 virtual void BeginEvent() {;}
86
87 void DecodeVolumeID(Int_t detID,int &nARM,int &nRPC);
88
89private:
90
94 Int_t fTrackID;
95 Int_t fPdgCode;
96 Int_t fVolumeID;
97 TLorentzVector fPos;
98 TLorentzVector fMom;
99 Double32_t fTime;
100 Double32_t fLength;
101 Double32_t fELoss;
102
105
106 Int_t InitMedium(const char* name);
107
108
109
110protected:
111
112 Int_t fDesign;
113 Double_t fZcenter; //z distance of the center of the spectrometer in cm from the center of the vacuum tube
114 Double_t fXtot;
115 Double_t fYtot;
116 Double_t fZtot; //Dimension of the whole magnetic spectrometr (1st + 2nd arm + HPTs) alogn beam axis
117 Int_t fNFe;
118 Int_t fNRpc;
119 Double_t fXFe;
120 Double_t fXRpc;
121 Double_t fYFe;
122 Double_t fYRpc;
123 Double_t fZFe; // Width of the Iron Slabs
124 Double_t fZRpc; // Width of the Rpc planes
125 Double_t fZArm; // Width of the Spectrometer Arms
126 Double_t fGapDown; //distance between the end of the second arm of the spectrometer and the decay vessel
127 Double_t fGapMiddle; // distance between the two arms of the spectrometer
128 Double_t fField;
129 Double_t fXRyoke;
130 Double_t fYRyoke;
131 Double_t fZRyoke;
132
133 //Dimensions of the smaller part of the yoke
134 Double_t fXRyoke_s;
135 Double_t fYRyoke_s;
136 Double_t fZRyoke_s;
137
138 Double_t fCoilGap;
139 Double_t fCoilH;
140 Double_t fCoilW;
141 Int_t fNCoil;
142
143 //Dimension for detailed RPC simulation:
144 Double_t fXStrip;
145 Double_t fYStrip;
146 Double_t fZStrip;
147 Double_t fXPet;
148 Double_t fYPet;
149 Double_t fZPet;
150 Double_t fXEle;
151 Double_t fYEle;
152 Double_t fZEle;
153 Double_t fXGas;
154 Double_t fYGas;
155 Double_t fZGas;
156
157 //Dimension of the pillars
158 Double_t fPillarX;
159 Double_t fPillarY;
160 Double_t fPillarZ;
161
162
165 ClassDef(MagneticSpectrometer,5)
166
167};
168
169
170
171#endif //TAUMAGNETICSPECTROMETER_H
172
void SetReturnYokeDimensions(Double_t X, Double_t Y, Double_t Z)
MagneticSpectrometer & operator=(const MagneticSpectrometer &)
ShipRpcPoint * AddHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss, Int_t pdgCode)
void SetGapDownstream(Double_t Gap)
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
virtual void SetSpecialPhysicsCuts()
void SetMagneticField(Double_t B)
Int_t InitMedium(const char *name)
TClonesArray * fShipRpcPointCollection
energy loss
void SetSmallerYokeDimensions(Double_t X, Double_t Y, Double_t Z)
void SetRpcGasDimensions(Double_t X, Double_t Y, Double_t Z)
virtual Bool_t ProcessHits(FairVolume *v=0)
virtual TClonesArray * GetCollection(Int_t iColl) const
TLorentzVector fMom
position at entrance
TLorentzVector fPos
volume id
void DecodeVolumeID(Int_t detID, int &nARM, int &nRPC)
void SetRpcDimensions(Double_t X, Double_t Y, Double_t Z)
void SetGapMiddle(Double_t Gap)
void SetPillarDimensions(Double_t X, Double_t Y, Double_t Z)
void SetFeDimensions(Double_t X, Double_t Y, Double_t Z)
void SetRpcStripDimensions(Double_t X, Double_t Y, Double_t Z)
void SetDesign(Int_t Design)
void SetTotDimensions(Double_t X, Double_t Y, Double_t Z)
Double32_t fTime
momentum at entrance
MagneticSpectrometer(const MagneticSpectrometer &)
void SetRpcPETDimensions(Double_t X, Double_t Y, Double_t Z)
void SetZDimensionArm(Double_t Z)
void SetCoilParameters(Double_t CoilH, Double_t CoilW, Int_t N, Double_t CoilG)
void SetRpcElectrodeDimensions(Double_t X, Double_t Y, Double_t Z)