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#ifndef ALICEO2_HMPID_DETECTOR_H_
13#define ALICEO2_HMPID_DETECTOR_H_
14
15#include <vector>
17#include "DataFormatsHMP/Hit.h"
18
19class TGeoVolume;
20class TGeoHMatrix;
21
22namespace o2
23{
24namespace hmpid
25{
26class Detector : public o2::base::DetImpl<Detector>
27{
28 public:
29 Detector(Bool_t active = true);
30 ~Detector() override = default;
31
32 std::vector<o2::hmpid::HitType>* getHits(int iColl) const
33 {
34 if (iColl == 0) {
35 return mHits;
36 }
37 return nullptr;
38 }
39
40 void InitializeO2Detector() override;
41 bool ProcessHits(FairVolume* v) override;
42 o2::hmpid::HitType* AddHit(float x, float y, float z, float time, float energy, Int_t trackId, Int_t detId);
43 void GenFee(float qtot);
44 Bool_t IsLostByFresnel();
45 float Fresnel(float ene, float pdoti, Bool_t pola);
46 void Register() override;
47 void Reset() override;
48 // void AddAlignableVolumes() const;
49 void IdealPosition(int iCh, TGeoHMatrix* pMatrix);
50 void IdealPositionCradle(int iCh, TGeoHMatrix* pMatrix);
51 void createMaterials();
52 void ConstructGeometry() override;
53 void ConstructOpGeometry() override;
55 void EndOfEvent() override { Reset(); }
56
57 // for the geometry sub-parts
58 TGeoVolume* createAbsorber(float tickness);
59 TGeoVolume* createChamber(int number);
60 TGeoVolume* CreateCradle();
61 TGeoVolume* CradleBaseVolume(TGeoMedium* med, double l[7], const char* name);
62
63 private:
64 // copy constructor for CloneModule
65 Detector(const Detector&);
66
67 std::vector<o2::hmpid::HitType>* mHits = nullptr;
68 enum EMedia {
69 kAir = 1,
70 kRoha = 2,
71 kSiO2 = 3,
72 kC6F14 = 4,
73 kCH4 = 5,
74 kCsI = 6,
75 kAl = 7,
76 kCu = 8,
77 kW = 9,
78 kNeo = 10,
79 kAr = 11
80 };
81
82 std::vector<TGeoVolume*> mSensitiveVolumes;
83
84 // Define volume IDs
85 int mHpad0VolID = -1;
86 int mHpad1VolID = -1;
87 int mHpad2VolID = -1;
88 int mHpad3VolID = -1;
89 int mHpad4VolID = -1;
90 int mHpad5VolID = -1;
91 int mHpad6VolID = -1;
92
93 int mHcel0VolID = -1;
94 int mHcel1VolID = -1;
95 int mHcel2VolID = -1;
96 int mHcel3VolID = -1;
97 int mHcel4VolID = -1;
98 int mHcel5VolID = -1;
99 int mHcel6VolID = -1;
100
101 template <typename Det>
102 friend class o2::base::DetImpl;
103 ClassDefOverride(Detector, 1);
104};
105
106} // end namespace hmpid
107} // end namespace o2
108
109// enable shared mem for HMPID
110#ifdef USESHM
111namespace o2
112{
113namespace base
114{
115template <>
116struct UseShm<o2::hmpid::Detector> {
117 static constexpr bool value = true;
118};
119} // namespace base
120} // namespace o2
121#endif
122
123#endif /* ALICEO2_HMPID_DETECTOR_H_ */
Definition of the Detector class.
int16_t time
Definition RawEventData.h:4
Detector()
Default Constructor.
Definition Detector.cxx:36
float Fresnel(float ene, float pdoti, Bool_t pola)
Definition Detector.cxx:306
void Register() override
Definition Detector.cxx:364
o2::hmpid::HitType * AddHit(float x, float y, float z, float time, float energy, Int_t trackId, Int_t detId)
Definition Detector.cxx:178
void InitializeO2Detector() override
Definition Detector.cxx:47
Bool_t IsLostByFresnel()
Definition Detector.cxx:282
bool ProcessHits(FairVolume *v) override
Definition Detector.cxx:70
TGeoVolume * createChamber(int number)
Definition Detector.cxx:551
void ConstructOpGeometry() override
TGeoVolume * CreateCradle()
Definition Detector.cxx:858
void EndOfEvent() override
Definition Detector.h:55
void GenFee(float qtot)
Definition Detector.cxx:184
TGeoVolume * createAbsorber(float tickness)
Definition Detector.cxx:541
void IdealPositionCradle(int iCh, TGeoHMatrix *pMatrix)
Definition Detector.cxx:414
TGeoVolume * CradleBaseVolume(TGeoMedium *med, double l[7], const char *name)
void ConstructGeometry() override
void Reset() override
Definition Detector.cxx:366
void IdealPosition(int iCh, TGeoHMatrix *pMatrix)
Definition Detector.cxx:373
void defineOpticalProperties()
~Detector() override=default
std::vector< o2::hmpid::HitType > * getHits(int iColl) const
Definition Detector.h:32
GLint GLenum GLint x
Definition glcorearb.h:403
const GLdouble * v
Definition glcorearb.h:832
GLuint const GLchar * name
Definition glcorearb.h:781
GLsizei const GLfloat * value
Definition glcorearb.h:819
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...