BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
CbmStsCluster.cxx
Go to the documentation of this file.
1//* $Id:
2
3// -------------------------------------------------------------------------
4// ----- CbmStsCluster source file -----
5// ----- Created 25/06/2008 by R. Karabowicz -----
6// -------------------------------------------------------------------------
7#include "CbmStsCluster.h"
8
9#include <iostream>
10
11using std::cout;
12using std::endl;
13
14// ----- Default constructor -------------------------------------------
17 , fDetectorId(0)
18 , fDigis()
19 , fNofDigis(0)
20 , fChannel(0.)
21 , fError(0.)
22{
23 // fDetectorId = 0;
24
25 // for now i limit the size to 99...
26 for (Int_t itemp = 100; itemp > 0;)
27 fDigis[--itemp] = -1;
28 // fDigis = new Int_t[100];
29 /*
30 fNofDigis = 0;
31 fChannel = 0.;
32 fError = 0.;
33 */
34}
35// -------------------------------------------------------------------------
36
37// ----- Standard constructor ------------------------------------------
38CbmStsCluster::CbmStsCluster(Double_t digiSig, Int_t iStation, Int_t iSector, Int_t iSide)
40 , fDetectorId(0)
41 , fDigis()
42 , fNofDigis(0)
43 , fChannel(0.)
44 , fError(0.)
45{
46
47 // Check range for station, sector and side
48 if (!(iStation >= 0 && iStation <= 255)) {
49 cout << "-E- CbmStsCluster: Illegal station number " << iStation << endl;
50 Fatal("", "Illegal station number");
51 }
52 if (!(iSector >= 0 && iSector <= 4095)) {
53 cout << "-E- CbmStsCluster: Illegal sector number " << iSector << endl;
54 Fatal("", "Illegal sector number");
55 }
56 if (!(iSide >= 0 && iSide <= 1)) {
57 cout << "-E- CbmStsCluster: Illegal side number " << iSide << endl;
58 Fatal("", "Illegal side number");
59 }
60 // AddIndex(index, digiSig);
61 // System id is set by the base class constructor on bits 0-4
62 fDetectorId = 2 << 24; // station nr. on bits 5-12
63 fDetectorId |= (iStation << 16); // station nr. on bits 5-12
64 fDetectorId |= (iSector << 4); // sector nr. on bits 13-27
65 fDetectorId |= (iSide << 0); // side on bit 28
66 // Channel number is set by the base class constructor
67
68 // fDigis = new Int_t[19];
69 for (Int_t itemp = 100; itemp > 0;)
70 fDigis[--itemp] = -1;
71 // fDigis = new Int_t[100];
72 /*
73 fNofDigis = 0;
74 fChannel = 0.;
75 fError = 0.;
76 */
77}
78// -------------------------------------------------------------------------
79
80// ----- Destructor ----------------------------------------------------
82// -------------------------------------------------------------------------
int Int_t
double Double_t
void Fatal(const char *location, const char *msgfmt,...)
Double_t fChannel
Int_t fDigis[100]
CbmStsCluster()
Default constructor.
virtual ~CbmStsCluster()
Destructor.
Double_t fError