PandaRoot
BSEmcDetectorID.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 // -------------------------------------------------------------------------
14 // ----- BSEmcDetectorID
15 // -----DetectorID class to bundle relative positioning info contained in an Integer
16 // ----- Created 25/03/2019 by B. Salisbury <salisbury@hiskp.uni-bonn.de>
17 // -------------------------------------------------------------------------
18 #ifndef BSEMCDETECTORID_HH
19 #define BSEMCDETECTORID_HH
20 
21 #include "Rtypes.h"
22 #include "RtypesCore.h"
23 #include "TObject.h"
24 
25 class TBuffer;
26 class TClass;
27 class TMemberInspector;
28 
38  public:
39  BSEmcDetectorID(Int_t t_detectorId = 0);
40  virtual ~BSEmcDetectorID();
41 
42  Short_t GetModule() const { return (fDetectorId / 100000000); };
43  Short_t GetRow() const { return ((fDetectorId / 1000000) % 100); };
44  Short_t GetColumn() const { return (fDetectorId % 10000); };
45  Short_t GetCopy() const { return ((fDetectorId / 10000) % 100); };
46  Short_t GetXPad() const;
47  Short_t GetYPad() const;
48  Int_t GetDetectorId() const { return fDetectorId; };
49 
50  private:
51  Int_t fDetectorId{-1};
52 
53  ClassDef(BSEmcDetectorID, 1);
54 };
55 
56 #endif /*BSEMCDETECTORID_HH*/
Short_t GetRow() const
Short_t GetYPad() const
Short_t GetXPad() const
virtual ~BSEmcDetectorID()
BSEmcDetectorID(Int_t t_detectorId=0)
Int_t GetDetectorId() const
Short_t GetModule() const
Short_t GetColumn() const
Short_t GetCopy() const