| 1 |
|
/** |
| 2 |
|
* \file src/AcLevel2.cpp |
| 3 |
|
* \author Petter Hofverberg |
| 4 |
|
**/ |
| 5 |
#include <TObject.h> |
#include <TObject.h> |
| 6 |
#include <AcLevel2.h> |
#include <AcLevel2.h> |
| 7 |
|
|
| 8 |
ClassImp(AcLevel2); |
ClassImp(AcLevel2); |
| 9 |
|
|
| 10 |
|
/** |
| 11 |
|
* AcLevel2 constructor |
| 12 |
|
**/ |
| 13 |
AcLevel2::AcLevel2() { |
AcLevel2::AcLevel2() { |
| 14 |
this->Clear(); |
this->Clear(); |
| 15 |
} |
} |
| 16 |
|
|
| 17 |
void AcLevel2::Clear(){ |
/** |
| 18 |
|
* Clear variables |
| 19 |
|
**/ |
| 20 |
|
void AcLevel2::Clear(Option_t *t){ |
| 21 |
status[0]=0; |
status[0]=0; |
| 22 |
hitmap[0]=0; |
hitmap[0]=0; |
| 23 |
hitstatus[0]=0; |
hitstatus[0]=0; |
| 29 |
unpackError=0; |
unpackError=0; |
| 30 |
} |
} |
| 31 |
|
|
| 32 |
|
/** |
| 33 |
|
* checks if detector what is hit |
| 34 |
|
**/ |
| 35 |
bool AcLevel2::IsHit(TString what){ |
bool AcLevel2::IsHit(TString what){ |
| 36 |
|
|
| 37 |
char* cabl[] = {"CARD4","CAT2","CAS1","ND","CARD2","CAT4","CAS4","ND", |
char* cabl[] = {"CARD4","CAT2","CAS1","ND","CARD2","CAT4","CAS4","ND", |
| 50 |
return answer; |
return answer; |
| 51 |
|
|
| 52 |
} |
} |
| 53 |
|
/** |
| 54 |
|
* is CAS hit? |
| 55 |
|
**/ |
| 56 |
bool AcLevel2::CAShit(TString card) |
bool AcLevel2::CAShit(TString card) |
| 57 |
{ |
{ |
| 58 |
if(card.Contains("main") || card.CompareTo("")==0 ) |
if(card.Contains("main") || card.CompareTo("")==0 ) |
| 72 |
|
|
| 73 |
return false; |
return false; |
| 74 |
} |
} |
| 75 |
|
/** |
| 76 |
|
* is CAT hit? |
| 77 |
|
**/ |
| 78 |
bool AcLevel2::CAThit(TString card) |
bool AcLevel2::CAThit(TString card) |
| 79 |
{ |
{ |
| 80 |
if(card.Contains("main") || card.CompareTo("")==0 ) |
if(card.Contains("main") || card.CompareTo("")==0 ) |
| 94 |
|
|
| 95 |
return false; |
return false; |
| 96 |
} |
} |
| 97 |
|
/** |
| 98 |
|
* is CARD hit? |
| 99 |
|
**/ |
| 100 |
bool AcLevel2::CARDhit(TString card) |
bool AcLevel2::CARDhit(TString card) |
| 101 |
{ |
{ |
| 102 |
if(card.Contains("main") || card.CompareTo("")==0 ) |
if(card.Contains("main") || card.CompareTo("")==0 ) |
| 116 |
|
|
| 117 |
return false; |
return false; |
| 118 |
} |
} |
| 119 |
|
/** |
| 120 |
|
* is AC hit? |
| 121 |
|
**/ |
| 122 |
bool AcLevel2::AChit(TString card) |
bool AcLevel2::AChit(TString card) |
| 123 |
{ |
{ |
| 124 |
if(this->CAThit(card) || this->CARDhit(card) || this->CAShit(card)) return true; |
if(this->CAThit(card) || this->CARDhit(card) || this->CAShit(card)) return true; |