BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
TofHitCount Class Reference

#include <TofHitCount.h>

Public Member Functions

 TofHitCount ()
 
 ~TofHitCount ()
 
void setTofDigi (std::vector< int > &vtofHit)
 
std::vector< int > & GetbarrelHit1 ()
 
std::vector< int > & GetbarrelHit2 ()
 
std::vector< int > & GetecapHit ()
 
std::vector< int > & GetwcapHit ()
 

Static Public Member Functions

static TofHitCountget_Tof (void)
 

Detailed Description

Definition at line 7 of file TofHitCount.h.

Constructor & Destructor Documentation

◆ TofHitCount()

TofHitCount::TofHitCount ( )

Definition at line 31 of file TofHitCount.cxx.

32{
33}

Referenced by get_Tof().

◆ ~TofHitCount()

TofHitCount::~TofHitCount ( )

Definition at line 34 of file TofHitCount.cxx.

35{
36}

Member Function Documentation

◆ get_Tof()

TofHitCount * TofHitCount::get_Tof ( void  )
static

Definition at line 26 of file TofHitCount.cxx.

26 {
27 if(!tof_Pointer) tof_Pointer = new TofHitCount();
28 return tof_Pointer;
29}

Referenced by BesTofTrig::BesTofTrig(), and BesTrigL1::initialize().

◆ GetbarrelHit1()

std::vector< int > & TofHitCount::GetbarrelHit1 ( )
inline

Definition at line 12 of file TofHitCount.h.

12{ return barrelHit1; }

Referenced by BesTofTrig::startTofTrig().

◆ GetbarrelHit2()

std::vector< int > & TofHitCount::GetbarrelHit2 ( )
inline

Definition at line 13 of file TofHitCount.h.

13{ return barrelHit2; }

Referenced by BesTofTrig::startTofTrig().

◆ GetecapHit()

std::vector< int > & TofHitCount::GetecapHit ( )
inline

Definition at line 14 of file TofHitCount.h.

14{ return ecapHit; }

Referenced by BesTofTrig::startTofTrig().

◆ GetwcapHit()

std::vector< int > & TofHitCount::GetwcapHit ( )
inline

Definition at line 15 of file TofHitCount.h.

15{ return wcapHit; }

Referenced by BesTofTrig::startTofTrig().

◆ setTofDigi()

void TofHitCount::setTofDigi ( std::vector< int > &  vtofHit)

Definition at line 37 of file TofHitCount.cxx.

38{
39 barrelHit1.clear();
40 barrelHit2.clear();
41 ecapHit.clear();
42 wcapHit.clear();
43
44 for(std::vector<int>::iterator iter = vtofHit.begin(); iter != vtofHit.end(); iter++) {
45 int tofId = (*iter);
46 int part, layer, im;
47 part = int (tofId/10000.);
48 layer = int ((tofId - part*10000)/1000.);
49 im = int ((tofId - part*10000 - layer*1000)/10.);
50 if(part == 0) {
51 // east end cap: 0-47
52 if(find(ecapHit.begin(),ecapHit.end(),im) == ecapHit.end()) {
53 ecapHit.push_back(im);
54 }
55 }
56 else if (part == 2) {
57 // west end cap: 0-47
58 if(find(wcapHit.begin(),wcapHit.end(),im) == wcapHit.end()) {
59 wcapHit.push_back(im);
60 }
61 }
62 else {
63 if(layer == 0) {
64 //the 1st layer in barrel: 0-87
65 if(find(barrelHit1.begin(),barrelHit1.end(),im) == barrelHit1.end()) {
66 barrelHit1.push_back(im);
67 }
68 }
69 if(layer == 1) {
70 //the 2nd layer in barrel: 0-87
71 if(find(barrelHit2.begin(),barrelHit2.end(),im) == barrelHit2.end()) {
72 barrelHit2.push_back(im);
73 }
74 }
75 }
76 }
77}
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)

Referenced by BesTrigL1::runAclock_tof().


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