#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 TofHitCount * | get_Tof (void) |
Private Attributes | |
std::vector< int > | barrelHit1 |
std::vector< int > | barrelHit2 |
std::vector< int > | ecapHit |
std::vector< int > | wcapHit |
Static Private Attributes | |
static TofHitCount * | tof_Pointer = 0 |
Definition at line 7 of file TofHitCount.h.
TofHitCount::TofHitCount | ( | ) |
TofHitCount::~TofHitCount | ( | ) |
TofHitCount * TofHitCount::get_Tof | ( | void | ) | [static] |
Definition at line 26 of file TofHitCount.cxx.
References tof_Pointer, and TofHitCount().
Referenced by BesTofTrig::BesTofTrig(), and BesTrigL1::initialize().
00026 { 00027 if(!tof_Pointer) tof_Pointer = new TofHitCount(); 00028 return tof_Pointer; 00029 }
std::vector<int>& TofHitCount::GetbarrelHit1 | ( | ) | [inline] |
Definition at line 12 of file TofHitCount.h.
References barrelHit1.
Referenced by BesTofTrig::startTofTrig().
00012 { return barrelHit1; }
std::vector<int>& TofHitCount::GetbarrelHit2 | ( | ) | [inline] |
Definition at line 13 of file TofHitCount.h.
References barrelHit2.
Referenced by BesTofTrig::startTofTrig().
00013 { return barrelHit2; }
std::vector<int>& TofHitCount::GetecapHit | ( | ) | [inline] |
Definition at line 14 of file TofHitCount.h.
References ecapHit.
Referenced by BesTofTrig::startTofTrig().
00014 { return ecapHit; }
std::vector<int>& TofHitCount::GetwcapHit | ( | ) | [inline] |
Definition at line 15 of file TofHitCount.h.
References wcapHit.
Referenced by BesTofTrig::startTofTrig().
00015 { return wcapHit; }
void TofHitCount::setTofDigi | ( | std::vector< int > & | vtofHit | ) |
Definition at line 37 of file TofHitCount.cxx.
References barrelHit1, barrelHit2, ecapHit, iter(), and wcapHit.
Referenced by BesTrigL1::runAclock_tof().
00038 { 00039 barrelHit1.clear(); 00040 barrelHit2.clear(); 00041 ecapHit.clear(); 00042 wcapHit.clear(); 00043 00044 for(std::vector<int>::iterator iter = vtofHit.begin(); iter != vtofHit.end(); iter++) { 00045 int tofId = (*iter); 00046 int part, layer, im; 00047 part = int (tofId/10000.); 00048 layer = int ((tofId - part*10000)/1000.); 00049 im = int ((tofId - part*10000 - layer*1000)/10.); 00050 if(part == 0) { 00051 // east end cap: 0-47 00052 if(find(ecapHit.begin(),ecapHit.end(),im) == ecapHit.end()) { 00053 ecapHit.push_back(im); 00054 } 00055 } 00056 else if (part == 2) { 00057 // west end cap: 0-47 00058 if(find(wcapHit.begin(),wcapHit.end(),im) == wcapHit.end()) { 00059 wcapHit.push_back(im); 00060 } 00061 } 00062 else { 00063 if(layer == 0) { 00064 //the 1st layer in barrel: 0-87 00065 if(find(barrelHit1.begin(),barrelHit1.end(),im) == barrelHit1.end()) { 00066 barrelHit1.push_back(im); 00067 } 00068 } 00069 if(layer == 1) { 00070 //the 2nd layer in barrel: 0-87 00071 if(find(barrelHit2.begin(),barrelHit2.end(),im) == barrelHit2.end()) { 00072 barrelHit2.push_back(im); 00073 } 00074 } 00075 } 00076 } 00077 }
std::vector<int> TofHitCount::barrelHit1 [private] |
std::vector<int> TofHitCount::barrelHit2 [private] |
std::vector<int> TofHitCount::ecapHit [private] |
TofHitCount * TofHitCount::tof_Pointer = 0 [static, private] |
std::vector<int> TofHitCount::wcapHit [private] |