CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
TrigTOFT Class Reference

#include <TrigTOFT.h>

Public Member Functions

 TrigTOFT (char *name)
 
virtual ~TrigTOFT ()
 
void setTOFTTrigData (uint32_t boardId, uint32_t window, uint32_t datasize, const uint32_t *data)
 
void initialize ()
 
const std::string & getName () const
 
unsigned int getTimeWindow () const
 
int getTofTrigCondi (int index, int win) const
 
int getBTofHitMap (int index, int win) const
 
int getWETofHitMap (int index, int win) const
 
int getEETofHitMap (int index, int win) const
 

Detailed Description

Definition at line 8 of file TrigTOFT.h.

Constructor & Destructor Documentation

◆ TrigTOFT()

TrigTOFT::TrigTOFT ( char * name)

Definition at line 4 of file TrigTOFT.cxx.

5{
6 m_name = name;
7}

◆ ~TrigTOFT()

virtual TrigTOFT::~TrigTOFT ( )
inlinevirtual

Definition at line 11 of file TrigTOFT.h.

11{}

Member Function Documentation

◆ getBTofHitMap()

int TrigTOFT::getBTofHitMap ( int index,
int win ) const
inline

Definition at line 22 of file TrigTOFT.h.

22{ return m_btofHitMap[index][win]; }

◆ getEETofHitMap()

int TrigTOFT::getEETofHitMap ( int index,
int win ) const
inline

Definition at line 25 of file TrigTOFT.h.

25{ return m_eetofHitMap[index][win]; }

◆ getName()

const std::string & TrigTOFT::getName ( ) const
inline

Definition at line 17 of file TrigTOFT.h.

17{ return m_name; }

◆ getTimeWindow()

unsigned int TrigTOFT::getTimeWindow ( ) const
inline

Definition at line 19 of file TrigTOFT.h.

19{ return m_window; }

◆ getTofTrigCondi()

int TrigTOFT::getTofTrigCondi ( int index,
int win ) const
inline

Definition at line 21 of file TrigTOFT.h.

21{ return m_tofTrigCondi[index][win]; }

◆ getWETofHitMap()

int TrigTOFT::getWETofHitMap ( int index,
int win ) const
inline

Definition at line 24 of file TrigTOFT.h.

24{ return m_wetofHitMap[index][win]; }

◆ initialize()

void TrigTOFT::initialize ( )

Definition at line 9 of file TrigTOFT.cxx.

10{
11 for(int i = 0; i < 176; i++)
12 for(int j = 0; j < 21; j++) {
13 if(i < 6) m_tofTrigCondi[i][j] = 0;
14 if(i < 48) {
15 m_wetofHitMap[i][j] = 0;
16 m_eetofHitMap[i][j] = 0;
17 }
18 m_btofHitMap[i][j] = 0;
19 }
20}

◆ setTOFTTrigData()

void TrigTOFT::setTOFTTrigData ( uint32_t boardId,
uint32_t window,
uint32_t datasize,
const uint32_t * data )

Definition at line 22 of file TrigTOFT.cxx.

22 {
23
24 if(boardId != 0xDA) std::cerr << "ERROR: You set the wrong board data to TrigTOFT!!!" << std::endl;
25
26 m_window = window;
27
28 for (uint32_t i = 0; i < datasize; i++) {
29 int winId = int (i/14);
30 //int id = (i-winId*14)%14;
31 //DW4 trigger conditions
32 if(i==(1+winId*14)) {
33 for(uint32_t condId = 1,loop = 0; loop < 6; condId <<=1,loop++) {
34 if(data[i] & condId) m_tofTrigCondi[loop][winId] = 1;
35 }
36 }
37
38 //DW9-DW12 for inner layer hit, DW13--DW16 outer layer hit
39 if(i >= (6+winId*14) && i <= (13+winId*14)) {
40 if(i == (6+winId*14) || i == (10+winId*14)) {
41 for(uint32_t btofId = 1,loop = 0; loop < 16; btofId <<=1,loop++) {
42 if(data[i] & btofId) {
43 if(i == (6+winId*14)) m_btofHitMap[loop+72][winId] = 1;
44 if(i == (10+winId*14)) m_btofHitMap[loop+72+88][winId] = 1;
45 }
46 }
47 }
48 else {
49 for(uint32_t btofId = 1,loop = 0; loop < 24; btofId <<=1,loop++) {
50 if(data[i] & btofId) {
51 if(i >= (7+winId*14) && i <= (9+winId*14)) m_btofHitMap[loop+(9+winId*14-i)*24][winId] = 1;
52 else m_btofHitMap[loop+(13+winId*14-i)*24+88][winId] = 1;
53 }
54 }
55 }
56 }
57
58 //DW7-DW8 for east end cap hits
59 if(i>=(4+winId*14) && i<=(5+winId*14)) {
60 for(uint32_t eetofId = 1,loop = 0; loop < 24; eetofId <<=1,loop++) {
61 if(data[i] & eetofId) m_eetofHitMap[loop+(5+winId*14-i)*24][winId] = 1;
62 }
63 }
64
65 //DW5-DW6 for east end cap hits
66 if(i>=(2+winId*14) && i<=(3+winId*14)) {
67 for(uint32_t wetofId = 1,loop = 0; loop < 24; wetofId <<=1,loop++) {
68 if(data[i] & wetofId) m_wetofHitMap[loop+(3+winId*14-i)*24][winId] = 1;
69 }
70 }
71 }
72}
TTree * data

The documentation for this class was generated from the following files: