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
16
17#ifndef ALICEO2_ECAL_DETECTOR_H
18#define ALICEO2_ECAL_DETECTOR_H
19
21#include <ECalBase/Hit.h>
23#include <TLorentzVector.h>
24#include <TString.h>
25
26namespace o2
27{
28namespace ecal
29{
30class Detector : public o2::base::DetImpl<Detector>
31{
32 public:
33 Detector(bool active = 1);
34 ~Detector();
35
36 // Mandatory overrides
37 void ConstructGeometry() override;
38 void BeginPrimary() override {}
39 void FinishPrimary() override {}
40 void InitializeO2Detector() override;
41 void PostTrack() override {}
42 void PreTrack() override {}
43 bool ProcessHits(FairVolume* v = nullptr) override;
44 void EndOfEvent() override { Reset(); }
45 void Register() override;
46 void Reset() override;
47 std::vector<o2::ecal::Hit>* getHits(int iColl) const { return !iColl ? mHits : nullptr; }
48
49 private:
50 void createMaterials();
51 void createGeometry();
52 void defineSamplingFactor();
53 std::unordered_map<int, int> mSuperParentIndices;
54 int currentTrackId = -1; // current track index
55 int superparentId = -1; // superparent index
56 GeometryTGeo* mGeometryTGeo;
57 std::vector<o2::ecal::Hit>* mHits;
58 double mSamplingFactorTransportModel = 1.;
59
60 protected:
61 template <typename Det>
62 friend class o2::base::DetImpl;
64};
65} // namespace ecal
66} // namespace o2
67
68#ifdef USESHM
69namespace o2
70{
71namespace base
72{
73template <>
74struct UseShm<o2::ecal::Detector> {
75 static constexpr bool value = true;
76};
77} // namespace base
78} // namespace o2
79#endif
80
81#endif // ALICEO2_ECAL_DETECTOR_H
Definition of the Detector class.
MC hit class to store energy loss per cell and per superparent.
Class containing ECal volume naming patterns.
Detector()
Default Constructor.
Definition Detector.cxx:36
void Register() override
Definition Detector.cxx:137
bool ProcessHits(FairVolume *v=nullptr) override
Definition Detector.cxx:328
void BeginPrimary() override
Definition Detector.h:38
void PostTrack() override
Definition Detector.h:41
void EndOfEvent() override
Definition Detector.h:44
void ConstructGeometry() override
Definition Detector.cxx:54
ClassDefOverride(Detector, 1)
void InitializeO2Detector() override
Definition Detector.cxx:119
void PreTrack() override
Definition Detector.h:42
void FinishPrimary() override
Definition Detector.h:39
void Reset() override
Definition Detector.cxx:126
std::vector< o2::ecal::Hit > * getHits(int iColl) const
Definition Detector.h:47
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 ...