CbmRoot
Loading...
Searching...
No Matches
CbmKFMaterial.h
Go to the documentation of this file.
1/* Copyright (C) 2006-2015 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Denis Bertini [committer], Sergey Gorbunov */
4
15#ifndef CBMKFMATERIAL_H
16#define CBMKFMATERIAL_H 1
17
18#include "CbmKFTrackInterface.h"
19class TString;
20
21class CbmKFMaterial : public TObject {
22 public:
23 CbmKFMaterial() : ID(-1), ZReference(-1), ZThickness(-1), RadLength(-1), F(1), Fe(0.02145) {}
24 virtual ~CbmKFMaterial(){};
25
26 Int_t ID;
27 Double_t ZReference;
28 Double_t ZThickness;
29 Double_t RadLength;
30 Double_t F;
31 Double_t Fe;
32 virtual Bool_t IsOutside(Double_t, Double_t) { return 0; }
33
34 virtual Int_t Pass(Double_t ZCross, Double_t ZThick, CbmKFTrackInterface& track, Bool_t downstream, Double_t& QP0);
35
36 virtual Int_t Pass(CbmKFTrackInterface& track, Bool_t downstream, Double_t& QP0)
37 {
38 return Pass(ZReference, ZThickness, track, downstream, QP0);
39 }
40
41 virtual Int_t Pass(CbmKFTrackInterface& track, Bool_t downstream)
42 {
43 Double_t QP0 = track.GetTrack()[4];
44 return Pass(ZReference, ZThickness, track, downstream, QP0);
45 }
46
47 virtual TString KFInfo() const;
48
49 static Bool_t comparePDown(const CbmKFMaterial* a, const CbmKFMaterial* b) { return a->ZReference < b->ZReference; }
50
51 static Bool_t compareP_z(const CbmKFMaterial* a, Double_t z) { return (a->ZReference + a->ZThickness / 2) < z; }
52
53 static Bool_t compareP_Z(Double_t z, const CbmKFMaterial* a) { return z < (a->ZReference + a->ZThickness / 2); }
54
55 ClassDef(CbmKFMaterial, 1)
56};
57
58class CbmKFWall : public CbmKFMaterial {
59 public:
62
63 ClassDef(CbmKFWall, 1)
64};
65
66class CbmKFTube : public CbmKFMaterial {
67 public:
68 CbmKFTube() : x(0), y(0), z(0), dz(0), r(0), R(0), rr(0), RR(0) {}
69 CbmKFTube(Int_t ID, Double_t x, Double_t y, Double_t z, Double_t dz, Double_t r, Double_t R, Double_t radL);
71
72 TString KFInfo() const;
73
74 Double_t x, y, z, dz;
75 Double_t r, R, rr, RR;
76
77 Bool_t IsOutside(Double_t X, Double_t Y)
78 {
79 X -= x;
80 Y -= y;
81 Double_t r2 = X * X + Y * Y;
82 return (r2 < rr || RR < r2);
83 }
84 ClassDef(CbmKFTube, 1)
85};
86
87class CbmKFBox : public CbmKFMaterial {
88 public:
89 CbmKFBox() : x(0), y(0), z(0), dx05(0), dy05(0), dz(0) {}
90 CbmKFBox(Int_t ID, Double_t x, Double_t y, Double_t z, Double_t dx, Double_t dy, Double_t dz, Double_t radL);
92
93 TString KFInfo() const;
94
95 Double_t x, y, z, dx05, dy05, dz;
96
97 Bool_t IsOutside(Double_t X, Double_t Y);
98
99 ClassDef(CbmKFBox, 1)
100};
101
102class CbmKFCone : public CbmKFMaterial {
103 public:
104 CbmKFCone() : z1(0), z2(0), r1(0), R1(0), r2(0), R2(0){};
106
107 Double_t z1, z2;
108 Double_t r1, R1, r2, R2;
109
110 Int_t Pass(Double_t ZCross, Double_t ZThick, CbmKFTrackInterface& track, Bool_t downstream, Double_t& QP0);
111
112 Int_t Pass(CbmKFTrackInterface& track, Bool_t downstream, Double_t& QP0)
113 {
114 return Pass(ZReference, ZThickness, track, downstream, QP0);
115 }
116
117 Int_t Pass(CbmKFTrackInterface& track, Bool_t downstream)
118 {
119 Double_t QP0 = track.GetTrack()[4];
120 return Pass(ZReference, ZThickness, track, downstream, QP0);
121 }
122 ClassDef(CbmKFCone, 1)
123};
124
125
126#endif /* !CBMKFMATERIAL_H */
Double_t x
Double_t z
Bool_t IsOutside(Double_t X, Double_t Y)
Double_t dx05
Double_t y
Double_t dz
Double_t dy05
TString KFInfo() const
Double_t R2
Double_t z2
Double_t R1
Int_t Pass(CbmKFTrackInterface &track, Bool_t downstream)
Double_t r1
Double_t r2
Int_t Pass(Double_t ZCross, Double_t ZThick, CbmKFTrackInterface &track, Bool_t downstream, Double_t &QP0)
Int_t Pass(CbmKFTrackInterface &track, Bool_t downstream, Double_t &QP0)
Double_t z1
virtual TString KFInfo() const
Double_t ZReference
virtual Int_t Pass(Double_t ZCross, Double_t ZThick, CbmKFTrackInterface &track, Bool_t downstream, Double_t &QP0)
Double_t RadLength
static Bool_t comparePDown(const CbmKFMaterial *a, const CbmKFMaterial *b)
static Bool_t compareP_z(const CbmKFMaterial *a, Double_t z)
virtual Bool_t IsOutside(Double_t, Double_t)
virtual Int_t Pass(CbmKFTrackInterface &track, Bool_t downstream, Double_t &QP0)
virtual ~CbmKFMaterial()
Double_t ZThickness
virtual Int_t Pass(CbmKFTrackInterface &track, Bool_t downstream)
static Bool_t compareP_Z(Double_t z, const CbmKFMaterial *a)
virtual Double_t * GetTrack()
Is it electron.
Double_t R
Double_t rr
Bool_t IsOutside(Double_t X, Double_t Y)
Double_t RR
Double_t x
TString KFInfo() const
Double_t r
Double_t dz
Double_t y
Double_t z