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 O2_MCH_SIMULATION_DETECTOR_H
13#define O2_MCH_SIMULATION_DETECTOR_H
14
16#include "MCHSimulation/Hit.h"
17#include <vector>
18#include <memory>
19
20namespace o2
21{
22namespace mch
23{
24
25class Stepper;
26
27class Detector : public o2::base::DetImpl<Detector>
28{
29 public:
30 Detector(bool active = true);
31
32 ~Detector() override;
33
34 Bool_t ProcessHits(FairVolume* v = nullptr) override;
35
36 void InitializeO2Detector() override;
37 bool isMTSafe() const override { return true; }
38
39 void Register() override;
40
41 void Reset() override {}
42
43 void ConstructGeometry() override;
44
46 void addAlignableVolumes() const override;
47
48 std::vector<o2::mch::Hit>* getHits(int);
49
50 void EndOfEvent() override;
51
52 private:
54 Detector(const Detector& rhs);
55
56 void defineSensitiveVolumes();
57
58 bool setHits(int i, std::vector<o2::mch::Hit>* ptr);
59
60 o2::mch::Stepper* mStepper{nullptr};
61
62 template <typename Det>
63 friend class o2::base::DetImpl;
64 ClassDefOverride(Detector, 1);
65};
66
67} // namespace mch
68} // namespace o2
69
70#ifdef USESHM
71namespace o2
72{
73namespace base
74{
75template <>
76struct UseShm<o2::mch::Detector> {
77 static constexpr bool value = true;
78};
79} // namespace base
80} // namespace o2
81#endif
82
83#endif
Definition of the Detector class.
int32_t i
TBranch * ptr
Detector()
Default Constructor.
Definition Detector.cxx:36
Bool_t ProcessHits(FairVolume *v=nullptr) override
Definition Detector.cxx:73
void Reset() override
Definition Detector.h:41
void InitializeO2Detector() override
Definition Detector.cxx:51
void ConstructGeometry() override
Definition Detector.cxx:56
void Register() override
Definition Detector.cxx:96
void EndOfEvent() override
Definition Detector.cxx:103
void addAlignableVolumes() const override
Add alignable top volumes.
Definition Detector.cxx:65
bool isMTSafe() const override
whether this detector may run in multithreaded Geant4, with one clone per worker thread
Definition Detector.h:37
~Detector() override
Definition Detector.cxx:39
std::vector< o2::mch::Hit > * getHits(int)
Definition Detector.cxx:80
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 ...