BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnNdetCluster.h
Go to the documentation of this file.
1/** \file BmnNdetCluster.h
2 ** \author Arseniy Shabanov <arseniy.shabanov@phystech.edu>
3 ** \date 19.01.2024
4 **/
5
6/** \class BmnNdetCluster
7 ** \brief Class for description of recognized cluster in Bmn Ndet detector
8 ** \details BmnNdetCluster contains information about position, time and deposited energies
9 ** of all cells belonging to the cluster.
10 ** this information is filled when BmnClusterFinder::FindClusters() method is run.
11 ** \version 1.0
12 **/
13
14#ifndef BMNNDETCLUSTER_H
15#define BMNNDETCLUSTER_H
16
17#include "TObject.h"
18
19#include <iostream>
20
21using namespace std;
22
23// #include "TClonesArray.h"
24
25class BmnNdetCluster : public TObject
26{
27 private:
28 //! number of cells in this cluster
30 //! Index of a cell in BmnNdetCell array in BmnNdetEvent object.
31 vector<Int_t> fCell;
32 //! Column number of a cell. It must be proportional to X coordinate in self coordinate system of a detector
33 vector<Int_t> fColumn;
34 //! Row number of a cell. It must be proportional to Y coordinate in self coordinate system of a detector
35 vector<Int_t> fRow;
36 //! Layer number of a cell. It must be proportional to Z coordinate in self coordinate system of a detector
37 vector<Int_t> fLayer;
38 //! X coordinate [cm]
39 vector<Double_t> fXcoord;
40 //! Y coordinate [cm]
41 vector<Double_t> fYcoord;
42 //! Z coordinate [cm]
43 vector<Double_t> fZcoord;
44 //! Time of actuation of the cell [ns]
45 vector<Double_t> fTime;
46 //! Energy deposited in the cell [GeV]
47 vector<Double_t> fEdep;
48 //! beta=v/c calculated from the time of flight to this cell
49 vector<Double_t> fBeta;
50
51 public:
52 //! Default constructor
54 //! Default destructor
56 /*! Сonstructor
57 * @param size expected number of cells in cluster
58 */
59 BmnNdetCluster(size_t size);
60
61 /*! Add cell to the cluster
62 * @param cell Index of a cell in BmnNdetCell array in BmnNdetEvent object.
63 * @param column Column index of a cell
64 * @param row Row index of a cell
65 * @param layer Layer index of a cell
66 * @param x X coordinate of a cell [cm]
67 * @param y Y coordinate of a cell [cm]
68 * @param z Z coordinate of a cell [cm]
69 * @param t Time of actuation of the cell [ns]
70 * @param e_dep Deposited energy in scintillator of a cell [GeV]
71 * @param beta Beta calculated from distance to target and time of flight. If beta < 0 it is calculated while
72 * filling from x,y,z,t.
73 */
74 void AddCell(Int_t cell,
75 Int_t column,
76 Int_t row,
77 Int_t layer,
78 Double_t x,
79 Double_t y,
80 Double_t z,
81 Double_t t,
82 Double_t e_dep,
83 Double_t beta = -1.);
84
85 //! @returns Number of cells in cluster
87 /*! Number of cells in cluster with deposited energy > threshold
88 * @param threshold Energy threshold [GeV]
89 * @returns Number of cells in cluster with energy higher than threshold
90 */
92
93 //! @returns vector of cell indices
94 vector<Int_t> GetCells();
95 //! @returns vector of column indices of cells
96 vector<Int_t> GetColumns();
97 //! @returns vector of row indices of cells
98 vector<Int_t> GetRows();
99 //! @returns vector of layer indices of cells
100 vector<Int_t> GetLayers();
101 //! @returns vector of X coordinates of cells [cm]
102 vector<Double_t> GetX();
103 //! @returns vector of Y coordinates of cells [cm]
104 vector<Double_t> GetY();
105 //! @returns vector of Z coordinates of cells [cm]
106 vector<Double_t> GetZ();
107 //! @returns vector of time of actuation of cells [ns]
108 vector<Double_t> GetTime();
109 //! @returns vector of energies deposited in cells [GeV]
110 vector<Double_t> GetEdep();
111 //! @returns vector of beta calculated for every cell
112 vector<Double_t> GetBeta();
113
114 /*! Function for selection of charged particles. If the particle is charged, it has hit in veto layer.
115 * @param veto_layer Index of veto layer. It depends on enumeration of layers while BmnNdetClusterFinder::Fill() is
116 * called. By default veto_layer=0.
117 * @returns kTRUE if the cluster contains any cells of veto layer
118 */
120
121 /*!Function for selection of particles coming from side. If the first hit in cluster is a cell on side border of the
122 * detector, it's probably secondary scattered charged particle.
123 * @param size_x number of cells along x axis. It is assumed, enumeration of cells starts from 0.
124 * @param size_y number of cells along y axis. It is assumed, enumeration of cells starts from 0.
125 * @param size_z number of cells along z axis. It is assumed, enumeration of cells starts from 0.
126 * @returns kTRUE if the first hit in cluster is a cell on border.
127 */
128 Bool_t StartsOnBorder(Int_t size_x = 11, Int_t size_y = 11, Int_t size_z = 8);
129
130 /*! Average deposited energy per cell in cluster [GeV]. Only the cells with energy > threshold are taken into
131 * account.
132 * @param threshold Energy threshold [GeV]
133 * @returns Average deposited energy per cell [GeV]. The expected value for neutrons is 0.01 GeV.
134 */
136
137 /*! Energy deposited in cluster [GeV]. Only the cells with energy > threshold are taken into account.
138 * @param threshold Energy threshold [GeV]
139 * @returns deposited energy [GeV]. The expected value for neutrons is nCells * 0.01 GeV.
140 */
142
143 /*! Returns index of the first fired cell in cluster
144 */
146
147 /*! Returns index of the fastest fired cell in cluster
148 */
150
151 /*! Beta calculated for first fired cell in cluster\n
152 * beta = v / c \n
153 * v = d / t \n
154 * d = sqrt(x^2+y^2+z^2)\n
155 * @returns v/c. In case of negative time return -1. \n
156 * NOTE: In case beta>1 return beta
157 */
159
160 /*! Beta calculated for the cell with highest beta\n
161 * beta = v / c \n
162 * v = d / t \n
163 * d = sqrt(x^2+y^2+z^2)\n
164 * @returns v/c. In case of negative time return -1. \n
165 * NOTE: In case beta>1 return beta
166 */
168
169 /*! Kinetic energy calculated by the time of flight.
170 * Distance from target and time of flight are taken from the first fired cell.
171 * @param mass Mass of a particle [GeV/c]. Default value is mass of neutron.
172 * @returns Kinetic energy [GeV]
173 */
174 Double_t EnergyTofFirst(Double_t mass = 0.939565420);
175
176 /*! Kinetic energy calculated by the time of flight.
177 * Distance from target and time of flight are taken from the fastest fired cell (with biggest d/t).
178 * @param mass Mass of a particle [GeV/c]. Default value is mass of neutron.
179 * @returns Kinetic energy [GeV]
180 */
181 Double_t EnergyTofFastest(Double_t mass = 0.939565420);
182
183 /*! Kinetic energy calculated by the time of flight.
184 * Distance from target and time of flight are taken as average values in cluster.
185 * @param mass Mass of a particle [GeV/c]. Default value is mass of neutron.
186 * @returns Kinetic energy [GeV]
187 */
188 Double_t EnergyTofAverage(Double_t mass = 0.939565420);
189
190 /*! Angle between direction to first cell and average direction of cluster\n
191 * Direction of cluster is sum of vectors, which connect first cell and other cells.
192 * @returns angle in degrees in the range 0 - 180
193 */
195
196 /*! Angle between vector (x,y,z) and average direction of cluster\n
197 * Direction of cluster is sum of vectors, which connect first cell and other cells.
198 * @param x X coordinate of vector
199 * @param y Y coordinate of vector
200 * @param z Z coordinate of vector
201 * @returns angle in degrees in the range 0 - 180
202 */
204
205 //! Merging of clusters
207
208 //! Copy constructor
210
211 //! Move constructor
213
214 //! Clear all cell contents, set fNCells=0
215 void Clear();
216
217 //! Print
218 virtual void Print(const Option_t* option = "");
219
220 virtual const char* GetClassName() { return "BmnNdetCluster"; }
222};
223
224#endif /* BMNNDETCLUSTER_H */
bool Bool_t
int Int_t
double Double_t
const char Option_t
#define ClassDef(name, id)
Class for description of recognized cluster in Bmn Ndet detector.
Double_t EnergyTofFastest(Double_t mass=0.939565420)
Kinetic energy calculated by the time of flight.
Int_t GetNCells(Double_t threshold)
Number of cells in cluster with deposited energy > threshold.
vector< Double_t > GetZ()
vector< Int_t > fRow
Row number of a cell. It must be proportional to Y coordinate in self coordinate system of a detector...
vector< Int_t > fCell
Index of a cell in BmnNdetCell array in BmnNdetEvent object.
Int_t GetNCells()
Double_t AngleToDirection(Double_t x=0, Double_t y=0, Double_t z=1)
Angle between vector (x,y,z) and average direction of cluster Direction of cluster is sum of vectors,...
Double_t EnergyDeposited(Double_t threshold=0.003)
Energy deposited in cluster [GeV].
vector< Double_t > GetBeta()
Double_t BetaFastest()
Beta calculated for the cell with highest beta beta = v / c v = d / t d = sqrt(x^2+y^2+z^2) .
void Clear()
Clear all cell contents, set fNCells=0.
Int_t fNCells
number of cells in this cluster
virtual void Print(const Option_t *option="")
Print.
vector< Int_t > GetLayers()
Int_t FirstCell()
Returns index of the first fired cell in cluster.
void AddCell(Int_t cell, Int_t column, Int_t row, Int_t layer, Double_t x, Double_t y, Double_t z, Double_t t, Double_t e_dep, Double_t beta=-1.)
Add cell to the cluster.
BmnNdetCluster(size_t size)
Сonstructor.
BmnNdetCluster * AddCluster(BmnNdetCluster *other)
Merging of clusters.
vector< Int_t > fLayer
Layer number of a cell. It must be proportional to Z coordinate in self coordinate system of a detect...
vector< Double_t > GetTime()
Int_t FastestCell()
Returns index of the fastest fired cell in cluster.
Double_t EnergyTofFirst(Double_t mass=0.939565420)
Kinetic energy calculated by the time of flight.
vector< Int_t > fColumn
Column number of a cell. It must be proportional to X coordinate in self coordinate system of a detec...
vector< Double_t > GetY()
virtual const char * GetClassName()
vector< Double_t > GetEdep()
Double_t BetaFirst()
Beta calculated for first fired cell in cluster beta = v / c v = d / t d = sqrt(x^2+y^2+z^2) .
vector< Int_t > GetColumns()
vector< Double_t > fXcoord
X coordinate [cm].
BmnNdetCluster()
Default constructor.
vector< Double_t > fZcoord
Z coordinate [cm].
Bool_t ContainsVetoCells(Int_t veto_layer=0)
Function for selection of charged particles.
BmnNdetCluster(BmnNdetCluster &&) noexcept
Move constructor.
vector< Int_t > GetCells()
vector< Double_t > fEdep
Energy deposited in the cell [GeV].
Double_t EnergyTofAverage(Double_t mass=0.939565420)
Kinetic energy calculated by the time of flight.
vector< Double_t > fBeta
beta=v/c calculated from the time of flight to this cell
~BmnNdetCluster()
Default destructor.
Double_t AngleToTarget()
Angle between direction to first cell and average direction of cluster Direction of cluster is sum of...
vector< Double_t > fYcoord
Y coordinate [cm].
vector< Double_t > GetX()
Double_t EnergyDepositedAverage(Double_t threshold=0.003)
Average deposited energy per cell in cluster [GeV].
vector< Double_t > fTime
Time of actuation of the cell [ns].
Bool_t StartsOnBorder(Int_t size_x=11, Int_t size_y=11, Int_t size_z=8)
Function for selection of particles coming from side.
BmnNdetCluster(const BmnNdetCluster &)
Copy constructor.
vector< Int_t > GetRows()
double beta(double x, double y)
Definition json.hpp:4446
*brief exchanges the values of two JSON objects *sa nlohmann::NLOHMANN_BASIC_JSON_TPL &j2 noexcept(is_nothrow_move_constructible< nlohmann::NLOHMANN_BASIC_JSON_TPL >::value &&is_nothrow_move_assignable< nlohmann::NLOHMANN_BASIC_JSON_TPL >::value)
Definition json.hpp:20347