StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPicoBbcHit.cxx
1 // C++ headers
2 #include <cstdlib>
3 
4 // PicoDst headers
5 #include "StPicoMessMgr.h"
6 #include "StPicoBbcHit.h"
7 
8 // \class StPicoBbcHit
9 // \author Mike Lisa
10 // \date 6 March 2018
11 // \brief Holds signals for ***phototubes*** in INNER STAR
12 // Beam-beam counter (BBC)
13 
14 /*************************************************
15  * Hit Class for the STAR Beam-Beam Counter (BBC)
16  * There is one "hit" for each (good) *phototube* in the detector
17  * that has a nonzero ADC value
18  *
19  * Total size of this object is 6 bytes
20  * This object contains only
21  * 1) the id of the PMT, compacted into a Short_t
22  * 2) the QT information (ADC, TDC, TAC, hasTac flag, status flag)
23  * compacted into 32 bits (Int_t)
24  *
25  *
26  * The BBC is a painful detector, because it has 16 phototubes
27  * distributed to 18 tiles, per side. This class stores the
28  * data by phototube (as it must).
29  *
30  * To access GEOMETRICAL information (e.g. location of a tile, etc)
31  * use the StBbcGeom class. All you have to do is send StBbcGeom
32  * the StPicoBbcHit::id(), and you'll get all you want.
33  *
34  * - Mike Lisa March 2018
35  ************************************************/
36 
37 ClassImp(StPicoBbcHit)
38 
39 //_________________
40 StPicoBbcHit::StPicoBbcHit() : StPicoBbcHit(0, 0, 0, 0, 0, false, false) {
41  /* no-op */
42 }
43 
44 //_________________
46  Int_t EW, Int_t ADC, Int_t TAC,
47  Int_t TDC, Bool_t hasTAC,
48  Bool_t statusIsGood) : TObject(),
49  mQTdata( (ADC & 0x0FFF) | (TAC & 0x0FFF) << 12 | (TDC & 0x001F) << 24 | hasTAC << 29 | statusIsGood << 30 ) {
50  mId = std::abs(PMTnumber) * EW;
51 }
52 
53 //_________________
55  mId = hit.mId;
56  mQTdata = hit.mQTdata;
57 }
58 
59 //_________________
61  /* no-op */
62 }
63 
64 //_________________
65 void StPicoBbcHit::Print(const Char_t* option __attribute__((unused)) ) const {
66  LOG_INFO << "BBC hit index: " << mId << " QT data: " << mQTdata << endm;
67 
68 }
virtual ~StPicoBbcHit()
Destructor.
Short_t mId
Definition: StPicoBbcHit.h:99
StPicoBbcHit()
Default constructor. sets all values empty.