Project
Loading...
Searching...
No Matches
Detector.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11//
12// Design and equations: Nicola Nicassio nicola.nicassio@cern.ch
13//
14
15#ifndef ALICEO2_RICH_DETECTOR_H
16#define ALICEO2_RICH_DETECTOR_H
17
20
23
24#include <TLorentzVector.h>
25#include <TString.h>
26
27namespace o2
28{
29namespace rich
30{
31
32class Detector : public o2::base::DetImpl<Detector>
33{
34 public:
35 Detector(bool active);
36 Detector();
37 ~Detector();
38
39 void ConstructGeometry() override;
40
41 o2::itsmft::Hit* addHit(int trackID, int detID, const TVector3& startPos, const TVector3& endPos,
42 const TVector3& startMom, double startE, double endTime, double eLoss,
43 unsigned char startStatus, unsigned char endStatus);
44
45 // Mandatory overrides
46 void BeginPrimary() override { ; }
47 void FinishPrimary() override { ; }
48 void InitializeO2Detector() override;
49 void PostTrack() override { ; }
50 void PreTrack() override { ; }
51 bool ProcessHits(FairVolume* v = nullptr) override;
52 void EndOfEvent() override;
53 void Register() override;
54 void Reset() override;
55
56 // Custom memer functions
57 std::vector<o2::itsmft::Hit>* getHits(int iColl) const
58 {
59 if (!iColl) {
60 return mHits;
61 }
62 return nullptr;
63 }
64
65 void createMaterials();
66 void createGeometry();
67 void prepareLayout();
68 void createRings(TGeoVolume*);
69
70 private:
71 // Transient data about track passing the sensor
72 struct TrackData {
73 bool mHitStarted; // hit creation started
74 unsigned char mTrkStatusStart; // track status flag
75 TLorentzVector mPositionStart; // position at entrance
76 TLorentzVector mMomentumStart; // momentum
77 double mEnergyLoss; // energy loss
78 } mTrackData;
79
80 GeometryTGeo* mGeometryTGeo;
81 std::vector<o2::itsmft::Hit>* mHits; // ITSMFT ones for the moment
82 std::vector<o2::rich::Ring> mRings;
83
84 void defineSensitiveVolumes();
85
86 protected:
87 int mNumberOfRings; // 21 for |eta|<1.82, 23 for eta|<2.00
89 // Vessel
90 float mMaximumHalfLength = 350; // cm
91
92 std::vector<double> mThetaBi;
93 std::vector<double> mR0Tilt;
94 std::vector<double> mZ0Tilt;
95 std::vector<double> mLAerogelZ;
96 std::vector<double> mTRplusG;
97 std::vector<double> mMinRadialMirror;
98 std::vector<double> mMaxRadialMirror;
99 std::vector<double> mMaxRadialRadiator;
100 std::vector<double> mVMirror1;
101 std::vector<double> mVMirror2;
102 std::vector<double> mVTile1;
103 std::vector<double> mVTile2;
104 std::vector<double> mR0Radiator;
105 std::vector<double> mR0PhotoDet;
106 template <typename Det>
107 friend class o2::base::DetImpl;
108
109 // FWD and BWD RICH
112
114};
115} // namespace rich
116} // namespace o2
117
118#ifdef USESHM
119namespace o2
120{
121namespace base
122{
123template <>
124struct UseShm<o2::rich::Detector> {
125 static constexpr bool value = true;
126};
127} // namespace base
128} // namespace o2
129#endif
130#endif
Definition of the Detector class.
Definition of the ITSMFT Hit class.
void InitializeO2Detector() override
Definition Detector.cxx:181
std::vector< double > mZ0Tilt
Definition Detector.h:94
ClassDefOverride(Detector, 1)
float mMaximumHalfLength
Definition Detector.h:90
void BeginPrimary() override
Definition Detector.h:46
std::vector< double > mLAerogelZ
Definition Detector.h:95
std::vector< double > mR0PhotoDet
Definition Detector.h:105
void FinishPrimary() override
Definition Detector.h:47
void PreTrack() override
Definition Detector.h:50
std::vector< double > mVTile2
Definition Detector.h:103
std::vector< double > mR0Radiator
Definition Detector.h:104
std::vector< double > mThetaBi
Definition Detector.h:92
bool ProcessHits(FairVolume *v=nullptr) override
Definition Detector.cxx:226
void Register() override
Definition Detector.cxx:208
std::vector< double > mR0Tilt
Definition Detector.h:93
std::vector< double > mMaxRadialMirror
Definition Detector.h:98
std::vector< double > mVMirror2
Definition Detector.h:101
std::vector< double > mMaxRadialRadiator
Definition Detector.h:99
void PostTrack() override
Definition Detector.h:49
std::vector< double > mTRplusG
Definition Detector.h:96
std::vector< double > mMinRadialMirror
Definition Detector.h:97
o2::itsmft::Hit * addHit(int trackID, int detID, const TVector3 &startPos, const TVector3 &endPos, const TVector3 &startMom, double startE, double endTime, double eLoss, unsigned char startStatus, unsigned char endStatus)
Definition Detector.cxx:311
std::vector< double > mVTile1
Definition Detector.h:102
void ConstructGeometry() override
Definition Detector.cxx:56
void createRings(TGeoVolume *)
std::vector< o2::itsmft::Hit > * getHits(int iColl) const
Definition Detector.h:57
void EndOfEvent() override
Definition Detector.cxx:206
void Reset() override
Definition Detector.cxx:219
std::vector< double > mVMirror1
Definition Detector.h:100
const GLdouble * v
Definition glcorearb.h:832
GLsizei const GLfloat * value
Definition glcorearb.h:819
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...