Project
Loading...
Searching...
No Matches
Composition.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_FOCAL_COMPOSITION_H_
13#define ALICEO2_FOCAL_COMPOSITION_H_
14
15#include <string>
16
17namespace o2
18{
19
20namespace focal
21{
22
24{
25 public:
26 Composition() = default;
27 Composition(std::string material, int layer, int stack, int id,
28 float cx, float cy, float cz, float dx, float dy, float dz);
30 Composition(const Composition& comp) = default;
31 ~Composition() = default;
32
33 void setCompositionParameters(std::string material, int layer, int stack, int id,
34 float cx, float cy, float cz, float dx, float dy, float dz)
35 {
36 mMaterial = material;
37 mLayer = layer;
38 mStack = stack;
39 mId = id;
40 mCenterX = cx;
41 mCenterY = cy;
42 mCenterZ = cz;
43 mSizeX = dx;
44 mSizeY = dy;
45 mSizeZ = dz;
46 };
47 void setLayerNumber(int layer) { mLayer = layer; }
48 void setId(int id) { mId = id; }
49 void setCenterZ(float val) { mCenterZ = val; }
50
51 std::string material() const { return mMaterial; }
52 int layer() const { return mLayer; }
53 int stack() const { return mStack; }
54 int id() const { return mId; }
55 float centerX() const { return mCenterX; }
56 float centerY() const { return mCenterY; }
57 float centerZ() const { return mCenterZ; }
58 float sizeX() const { return mSizeX; }
59 float sizeY() const { return mSizeY; }
60 float sizeZ() const { return mSizeZ; }
61 float getThickness(void) const { return mSizeZ; }
62
63 private:
64 std::string mMaterial;
65 int mLayer = 0;
66 int mStack = 0;
67 int mId = 0;
68 float mCenterX = 0.0;
69 float mCenterY = 0.0;
70 float mCenterZ = 0.0;
71 float mSizeX = 0.0;
72 float mSizeY = 0.0;
73 float mSizeZ = 0.0;
74};
75} // end namespace focal
76} // end namespace o2
77#endif
void setLayerNumber(int layer)
Definition Composition.h:47
std::string material() const
Definition Composition.h:51
float centerZ() const
Definition Composition.h:57
float sizeZ() const
Definition Composition.h:60
void setCompositionParameters(std::string material, int layer, int stack, int id, float cx, float cy, float cz, float dx, float dy, float dz)
Definition Composition.h:33
float sizeX() const
Definition Composition.h:58
void setCenterZ(float val)
Definition Composition.h:49
float sizeY() const
Definition Composition.h:59
Composition(const Composition &comp)=default
float centerX() const
Definition Composition.h:55
float centerY() const
Definition Composition.h:56
float getThickness(void) const
Definition Composition.h:61
GLuint GLfloat * val
Definition glcorearb.h:1582
GLenum GLuint GLint GLint layer
Definition glcorearb.h:1310
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...