FairShip
Loading...
Searching...
No Matches
ShipMuonShield.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// SPDX-FileCopyrightText: Copyright CERN for the benefit of the SHiP
3// Collaboration
4
5#ifndef PASSIVE_SHIPMUONSHIELD_H_
6#define PASSIVE_SHIPMUONSHIELD_H_
7
8#include <vector>
9
10#include "FairLogger.h"
11#include "FairModule.h" // for FairModule
12#include "Rtypes.h" // for ShipMuonShield::Class, Bool_t, etc
13#include "TGeoMedium.h"
14#include "TString.h"
15
16// Muon shield made of one solid iron box per magnet. The magnetic field is
17// not attached to the volumes: it comes from the field map
18// files/<shieldName>.root (see geomGeant4.addVMCFields).
19//
20// in_params holds nParams values per magnet, all in cm:
21// [Zgap, dZ, dX, dY]
22// Zgap: gap upstream of the magnet, dZ: half length, dX/dY: outer half width
23// and half height. n_magnets is the expected number of magnets, so that a
24// parameter list in another format (e.g. from an older geometry file) fails.
25class ShipMuonShield : public FairModule {
26 public:
27 ShipMuonShield(std::vector<double> in_params, size_t n_magnets, Double_t z);
29 ~ShipMuonShield() override;
30 void ConstructGeometry() override;
31 // Cut a hole of half width hole_dx and half height hole_dy for the SND
32 // through the centre of magnets first_magnet..last_magnet (0-based).
33 void SetSNDSpace(Bool_t hole, Double_t hole_dx, Double_t hole_dy,
34 Int_t first_magnet, Int_t last_magnet);
35
36 static constexpr size_t nParams = 4;
37
38 protected:
40 size_t nMagnets{0};
41 std::vector<Double_t> shield_params;
42 Bool_t snd_hole{false};
43 Double_t snd_hole_dx = 0., snd_hole_dy = 0.;
45
46 void CreateMagnet(const TString& magnetName, TGeoMedium* medium,
47 TGeoVolume* tShield, Double_t dX, Double_t dY, Double_t dZ,
48 Double_t Z, Bool_t withSNDHole);
49};
50
51#endif // PASSIVE_SHIPMUONSHIELD_H_
void ConstructGeometry() override
Double_t z_end_of_proximity_shielding
Double_t snd_hole_dy
std::vector< Double_t > shield_params
~ShipMuonShield() override
static constexpr size_t nParams
void SetSNDSpace(Bool_t hole, Double_t hole_dx, Double_t hole_dy, Int_t first_magnet, Int_t last_magnet)
void CreateMagnet(const TString &magnetName, TGeoMedium *medium, TGeoVolume *tShield, Double_t dX, Double_t dY, Double_t dZ, Double_t Z, Bool_t withSNDHole)
Double_t snd_hole_dx
ShipMuonShield(std::vector< double > in_params, size_t n_magnets, Double_t z)