BmnRoot
Loading...
Searching...
No Matches
CbmMvdDetectorId.h
Go to the documentation of this file.
1// -------------------------------------------------------------------------
2// ----- CbmMvdDetectorId header file -----
3// ----- Created 22/04/09 by V. Friese -----
4// -------------------------------------------------------------------------
5
12#ifndef CBMMVDDETECTORID_H
13#define CBMMVDDETECTORID_H 1
14
15#include "BmnDetectorList.h"
16
17#include <iostream>
18#include "TObject.h"
19
20using std::cerr;
21using std::endl;
22
23
25{
26 public:
29
30
32 virtual ~CbmMvdDetectorId() {}
33
34
36 Int_t DetectorId(Int_t iStation) const {
37 return ( kSSD | (iStation << 5) );
38 }
39
40
42 Int_t SystemId(Int_t detectorId) const {
43 Int_t iSystem = detectorId & 31;
44 if ( iSystem != kSSD ) {
45 cerr << "-E- CbmMvdDetectorId::GetSystemId : "
46 << "wrong system ID " << iSystem << endl;
47 return -1;
48 }
49 return iSystem;
50 }
51
52
54 Int_t StationNr(Int_t detectorId) const {
55 return ( ( detectorId & ( ~31 ) ) >> 5 );
56 }
57
58
59
61
62};
63
64
65#endif
@ kSSD
virtual ~CbmMvdDetectorId()
Int_t StationNr(Int_t detectorId) const
Int_t SystemId(Int_t detectorId) const
ClassDef(CbmMvdDetectorId, 1)
Int_t DetectorId(Int_t iStation) const