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_MID_SIMULATION_DETECTOR_H
13#define O2_MID_SIMULATION_DETECTOR_H
14
15#include <vector>
18#include "MIDSimulation/Hit.h"
20
21namespace o2
22{
23namespace mid
24{
25
26class Detector : public o2::base::DetImpl<Detector>
27{
28 public:
29 Detector(bool active = true);
30
31 void InitializeO2Detector() override;
32 bool isMTSafe() const override { return true; }
33
34 bool ProcessHits(FairVolume* vol = nullptr) override;
35
36 void Register() override;
37
38 std::vector<o2::mid::Hit>* getHits(int iColl);
39
40 void Reset() override {}
41
42 void ConstructGeometry() override;
43
44 void EndOfEvent() override;
45
46 private:
48 Detector(const Detector& rhs);
49
50 void defineSensitiveVolumes();
51
52 bool setHits(int iColl, std::vector<o2::mid::Hit>* ptr);
53
54 o2::mid::Stepper mStepper;
55
56 template <typename Det>
57 friend class o2::base::DetImpl;
58 ClassDefOverride(Detector, 1);
59};
60
61} // namespace mid
62} // namespace o2
63
64#ifdef USESHM
65namespace o2
66{
67namespace base
68{
69template <>
70struct UseShm<o2::mid::Detector> {
71 static constexpr bool value = true;
72};
73} // namespace base
74} // namespace o2
75#endif
76
77#endif
Definition of the Detector class.
Hit for MID.
TBranch * ptr
Detector()
Default Constructor.
Definition Detector.cxx:36
void ConstructGeometry() override
Definition Detector.cxx:82
void Register() override
Definition Detector.cxx:73
void Reset() override
Definition Detector.h:40
bool ProcessHits(FairVolume *vol=nullptr) override
Definition Detector.cxx:48
void EndOfEvent() override
Definition Detector.cxx:80
std::vector< o2::mid::Hit > * getHits(int iColl)
Definition Detector.cxx:57
bool isMTSafe() const override
whether this detector may run in multithreaded Geant4, with one clone per worker thread
Definition Detector.h:32
void InitializeO2Detector() override
Definition Detector.cxx:43
GLsizei const GLfloat * value
Definition glcorearb.h:819
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...