FairShip
Loading...
Searching...
No Matches
UpstreamTagger.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 UPSTREAMTAGGER_UPSTREAMTAGGER_H_
6#define UPSTREAMTAGGER_UPSTREAMTAGGER_H_
7
8#include <vector>
9
10#include "Detector.h"
11#include "TLorentzVector.h"
12#include "TVector3.h"
13
15class FairVolume;
16class TClonesArray;
17
31
32class UpstreamTagger : public SHiP::Detector<UpstreamTaggerPoint> {
33 public:
38 UpstreamTagger(const char* Name, Bool_t Active);
39
42
46 Bool_t ProcessHits(FairVolume* v = nullptr) override;
47
49 void SetZposition(Double_t z) { det_zPos = z; }
50 void SetBoxDimensions(Double_t x, Double_t y, Double_t z) {
51 fSizeX = x;
52 fSizeY = y;
53 fEnvelopeZ = z;
54 }
55 void SetBoxCenter(Double_t x, Double_t y) {
56 fCenterX = x;
57 fCenterY = y;
58 }
59
65 void AddRegion(Int_t id, Double_t x, Double_t y, Double_t sizeX,
66 Double_t sizeY, Double_t constituentTileSize,
67 Double_t thickness) {
68 fRegions.push_back(
69 {id, x, y, sizeX, sizeY, constituentTileSize, thickness});
70 }
71
73 void ConstructGeometry() override;
74
76
77 Double_t det_zPos;
78
79 private:
80 struct Region {
81 Int_t id;
82 Double_t x;
83 Double_t y;
84 Double_t sizeX;
85 Double_t sizeY;
87 Double_t thickness;
88 };
89
90 // Sizes are set from the geometry configuration (python/geometry_config.py)
91 std::vector<Region> fRegions;
92 Double_t fSizeX = 0.;
93 Double_t fSizeY = 0.;
94 Double_t fCenterX = 0.;
95 Double_t fCenterY = 0.;
96 Double_t fEnvelopeZ = 0.;
97 Bool_t fEntered =
98 kFALSE;
99
102};
103
104#endif // UPSTREAMTAGGER_UPSTREAMTAGGER_H_
Double_t fSizeX
coarse regions loaded from detector map
UpstreamTagger(const UpstreamTagger &)=delete
current track entered the region (not born in it)
Double_t fCenterY
detector centre x
Double_t fCenterX
detector height
Bool_t ProcessHits(FairVolume *v=nullptr) override
UpstreamTagger(const char *Name, Bool_t Active)
void SetBoxCenter(Double_t x, Double_t y)
std::vector< Region > fRegions
void ConstructGeometry() override
Double_t fSizeY
detector width
void SetBoxDimensions(Double_t x, Double_t y, Double_t z)
void SetZposition(Double_t z)
Double_t fEnvelopeZ
detector centre y
UpstreamTagger & operator=(const UpstreamTagger &)=delete
Bool_t fEntered
allocated longitudinal space
void AddRegion(Int_t id, Double_t x, Double_t y, Double_t sizeX, Double_t sizeY, Double_t constituentTileSize, Double_t thickness)
z-position of the active tile plane