CbmRoot
Loading...
Searching...
No Matches
CbmRichDetectorData.h
Go to the documentation of this file.
1/* Copyright (C) 2015-2023 GSI/JINR-LIT, Darmstadt/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Semen Lebedev, Andrey Lebedev [committer], Florian Uhlig */
4
5/*detector
6 * CbmRichData.h
7 *
8 * Created on: Dec 17, 2015
9 * Author: slebedev
10 */
11
12#ifndef RICH_DETECTOR_CBMRICHDETECTORDATA_H_
13#define RICH_DETECTOR_CBMRICHDETECTORDATA_H_
14
15#include <RtypesCore.h> // for Double_t, Int_t, Bool_t
16
17#include <algorithm> // for find
18#include <string> // for string, to_string
19#include <vector> // for vector
20
22 public:
23 Int_t fAddress;
24 Double_t fX; // global x coordinate
25 Double_t fY; // global y coordinate
26 Double_t fZ; // global z coordinate
27 Int_t fPixelId; // pixel index [0, 63] row major, view from z to -z
28 Int_t fPmtId;
29};
30
32 public:
33 Bool_t ContainsPixel(Int_t address)
34 {
35 return std::find(fPixelAddresses.begin(), fPixelAddresses.end(), address) != fPixelAddresses.end();
36 }
37
38 std::string ToString()
39 {
40 return "id:" + std::to_string(fId) + " nofPixels:" + std::to_string(fPixelAddresses.size())
41 + " x:" + std::to_string(fX) + " y:" + std::to_string(fY) + " z:" + std::to_string(fZ)
42 + " W:" + std::to_string(fWidth) + " H:" + std::to_string(fHeight);
43 }
44 Int_t fId;
45 std::vector<Int_t> fPixelAddresses;
46 Double_t fX;
47 Double_t fY;
48 Double_t fZ;
49 Double_t fWidth;
50 Double_t fHeight;
51};
52
53#endif /* RICH_DETECTOR_CBMRICHDETECTORDATA_H_ */
Bool_t ContainsPixel(Int_t address)
std::string ToString()
std::vector< Int_t > fPixelAddresses