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
15
16#ifndef ALICEO2_FDD_DETECTOR_H_
17#define ALICEO2_FDD_DETECTOR_H_
18
21#include "DataFormatsFDD/Hit.h"
22#include "FDDBase/Geometry.h"
23
24class FairModule;
25class FairVolume;
26class TGeoVolume;
27
28namespace o2
29{
30namespace fdd
31{
32class Geometry;
33class Hit;
34class Detector : public o2::base::DetImpl<Detector>
35{
36 public:
37 Detector(Bool_t Active);
38
40 Detector() = default;
41
43 ~Detector() override;
44
45 void InitializeO2Detector() override;
46
47 Bool_t ProcessHits(FairVolume* v = nullptr) override;
48
50 void Register() override;
51
52 o2::fdd::Hit* addHit(int trackID, unsigned short detID, const TVector3& Pos, double Time, double eLoss, int nPhot);
53
54 std::vector<o2::fdd::Hit>* getHits(Int_t iColl)
55 {
56 if (iColl == 0) {
57 return mHits;
58 }
59 return nullptr;
60 }
61
62 void Reset() override;
63 void EndOfEvent() override { Reset(); }
64
65 void CreateMaterials();
66 void ConstructGeometry() override;
67
68 private:
70 Detector(const Detector& rhs);
71
73 std::vector<o2::fdd::Hit>* mHits = nullptr;
74
75 Detector& operator=(const Detector&);
76
77 Geometry* mGeometry = nullptr;
78
79 template <typename Det>
80 friend class o2::base::DetImpl;
81 ClassDefOverride(Detector, 1);
82};
83
84// Input and output function for standard C++ input/output.
85std::ostream& operator<<(std::ostream& os, Detector& source);
86std::istream& operator>>(std::istream& os, Detector& source);
87
88} // namespace fdd
89} // namespace o2
90
91#ifdef USESHM
92namespace o2
93{
94namespace base
95{
96template <>
97struct UseShm<o2::fdd::Detector> {
98 static constexpr bool value = true;
99};
100} // namespace base
101} // namespace o2
102#endif
103#endif
Definition of the Detector class.
Base definition of FIT-FDD geometry.
~Detector() override
Default destructor.
Definition Detector.cxx:73
void InitializeO2Detector() override
Definition Detector.cxx:82
void Register() override
Registers the produced collections in FAIRRootManager.
Definition Detector.cxx:359
Bool_t ProcessHits(FairVolume *v=nullptr) override
Definition Detector.cxx:103
void ConstructGeometry() override
Definition Detector.cxx:353
Detector()=default
Default constructor.
std::vector< o2::fdd::Hit > * getHits(Int_t iColl)
Definition Detector.h:54
void EndOfEvent() override
Definition Detector.h:63
void Reset() override
Definition Detector.cxx:371
o2::fdd::Hit * addHit(int trackID, unsigned short detID, const TVector3 &Pos, double Time, double eLoss, int nPhot)
Definition Detector.cxx:177
FIT-FDD Geometry.
Definition Geometry.h:30
const GLdouble * v
Definition glcorearb.h:832
GLsizei GLsizei GLchar * source
Definition glcorearb.h:798
GLsizei const GLfloat * value
Definition glcorearb.h:819
std::ostream & operator<<(std::ostream &os, Detector &source)
std::istream & operator>>(std::istream &os, Detector &source)
struct o2::upgrades_utils::@459 fdd
Collision labels.
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...