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_PHOS_DETECTOR_H_
13#define ALICEO2_PHOS_DETECTOR_H_
14
16#include "MathUtils/Cartesian.h"
17#include "PHOSBase/Hit.h"
18#include "RStringView.h"
19#include "Rtypes.h"
20
21#include <map>
22#include <vector>
23
24class FairVolume;
25
26namespace o2
27{
28namespace phos
29{
30class Hit;
31class Geometry;
32class GeometryParams;
33
41class Detector : public o2::base::DetImpl<Detector>
42{
43 public:
44 // PHOS materials/media
45 enum {
46 ID_PWO = 1,
47 ID_AL = 2,
50 ID_APD = 5,
54 ID_FE = 9,
57 ID_AIR = 12
58 };
59
63 Detector() = default;
64
69 Detector(Bool_t isActive);
70
74 ~Detector() override;
75
79 void InitializeO2Detector() final;
80
85 Bool_t ProcessHits(FairVolume* v = nullptr) final;
86
99 Hit* addHit(Int_t trackID, Int_t detID, const math_utils::Point3D<float>& pos, const math_utils::Vector3D<float>& mom, Double_t totE,
100 Double_t time, Double_t eLoss);
101
105 void Register() override;
106
110 std::vector<Hit>* getHits(Int_t iColl) const
111 {
112 if (iColl == 0) {
113 return mHits;
114 } else {
115 return nullptr;
116 }
117 }
118
123 void Reset() final;
124
126 void FinishEvent() final;
127
132 void EndOfEvent() final;
133
140
144 void addAlignableVolumes() const override;
145
146 protected:
150 void CreateMaterials();
151
155 void ConstructGeometry() override;
156
159
162
163 /*
164
173 Double_t CalculateLightYield(Double_t energydeposit, Double_t tracklength, Int_t charge) const;
174 */
175 private:
177 Detector(const Detector& rhs);
178 Detector& operator=(const Detector&);
179
181 void defineSensitiveVolumes();
182
183 // Geometry parameters
184 Bool_t mCreateHalfMod; // Should we create 1/2 filled module
185 Bool_t mActiveModule[6]; // list of modules to create
186
187 // Simulation
188 std::map<int, int> mSuperParents;
189 std::vector<Hit>* mHits = nullptr;
190 Int_t mCurrentTrackID = 0;
191 Int_t mCurrentCellID = 0;
192 Int_t mCurentSuperParent = 0;
193 Hit* mCurrentHit = nullptr;
194
195 template <typename Det>
196 friend class o2::base::DetImpl;
197 ClassDefOverride(Detector, 1);
198};
199} // namespace phos
200} // namespace o2
201
202#ifdef USESHM
203namespace o2
204{
205namespace base
206{
207template <>
208struct UseShm<o2::phos::Detector> {
209 static constexpr bool value = true;
210};
211} // namespace base
212} // namespace o2
213#endif
214
215#endif // Detector.h
Definition of the Detector class.
int16_t time
Definition RawEventData.h:4
#define protected
uint16_t pos
Definition RawData.h:3
Detector class for the PHOS detector.
Definition Detector.h:42
~Detector() override
Definition Detector.cxx:61
void ConstructSupportGeometry()
Creating PHOS/support description for Geant.
Definition Detector.cxx:803
Hit * addHit(Int_t trackID, Int_t detID, const math_utils::Point3D< float > &pos, const math_utils::Vector3D< float > &mom, Double_t totE, Double_t time, Double_t eLoss)
Definition Detector.cxx:220
void Register() override
Definition Detector.cxx:128
void ConstructGeometry() override
Definition Detector.cxx:230
void InitializeO2Detector() final
Definition Detector.cxx:66
std::vector< Hit > * getHits(Int_t iColl) const
Definition Detector.h:110
void ConstructEMCGeometry()
Creating calo for Geant.
Definition Detector.cxx:437
void addAlignableVolumes() const override
Definition Detector.cxx:921
Bool_t ProcessHits(FairVolume *v=nullptr) final
Definition Detector.cxx:130
void EndOfEvent() final
Definition Detector.cxx:74
Geometry * getGeometry()
void FinishEvent() final
Sort final hist.
Definition Detector.cxx:78
void Reset() final
Definition Detector.cxx:116
friend class o2::base::DetImpl
current Hit
Definition Detector.h:196
PHOS simulation hit information.
Definition Hit.h:25
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 ...
Defining DataPointCompositeObject explicitly as copiable.