2 #ifndef STAR_EEmcTower_h
3 #define STAR_EEmcTower_h
12 #if !defined(ST_NO_NAMESPACES)
23 EEmcTower(
int s,
int ss,
int e,
float adc=0.0,
float ene=0.0) {
32 EEmcTower(
const char *label,
float adc=0.0,
float ene=0.0);
36 mSec = (char) t.
Sec();
38 mEta = (char) t.
Eta();
47 float ADC()
const {
return mADC; }
49 float ADC(
float d) { mADC=d;
return mADC; }
52 float dE()
const {
return mEdep; }
54 float dE(
float e) { mEdep=e;
return mEdep; }
57 int Sec ()
const {
return mSec; }
59 int Sec (
int s) { mSec=(char)s;
return s; }
64 int SubSec(
int s) { mSub=(char)s;
return s; }
67 int Eta ()
const {
return mEta; }
69 int Eta (
int e) { mEta=(char)e;
return e; }
75 int SecLabel (
int s) { mSec=(char)(s-1 );
return s; }
85 int EtaLabel (
int e) { mEta=(char)(e-1 );
return e; }
91 ostream&
Out ( ostream &out )
const ;
95 if(mSec!=t.
Sec())
return false;
96 if(mSub!=t.
SubSec())
return false;
97 if(mEta!=t.
Eta())
return false;
103 if(mSec==t.
Sec())
return false;
104 if(mSub==t.
SubSec())
return false;
105 if(mEta==t.
Eta())
return false;
113 bool ParseLabel(
const char* label);
128 ostream& operator<<(ostream &out,
const EEmcTower &t );
float ADC() const
gets adc value associated with the tower (pedestal adjusted)
bool operator==(const EEmcTower &t)
compare two towers
EEmcTower()
the default constructor
EEmcTower(const EEmcTower &t)
a copy constructor
const char * TowerLabel() const
returns tower label, e.g. "05TB09"
int Sec(int s)
sets tower sector index, computer offset [0,....)
int SubSecLabel() const
gets tower subsector label, human offset [A..E]
float ADC(float d)
sets adc value associated with the tower (pedestal adjusted)
float dE() const
gets calibrated energy loss value associated with the tower
~EEmcTower()
the destructor
float dE(float e)
sets calibrated energy loss value associated with the tower
int EtaLabel(int e)
sets tower eta label, human offset [1..12]
int Eta(int e)
sets tower eta index, computer offset [0,....)
int SubSec() const
gets tower subsector index, computer offset [0,....)
ostream & Out(ostream &out) const
print tower hit info in xml-like style
bool operator!=(const EEmcTower &t)
compare two towers
int Sec() const
gets tower sector index, computer offset [0,....)
int SubSec(int s)
sets tower subsector index, computer offset [0,....)
int SecLabel(int s)
sets tower sector label, human offset [1..12]
EEmcTower(int s, int ss, int e, float adc=0.0, float ene=0.0)
the explicit constructor
int SecLabel() const
gets tower sector label, human offset [1..12]
int SubSecLabel(int s)
sets tower subsector label, human offset [A..E]
int EtaLabel() const
gets tower eta label, human offset [1..12]
int Eta() const
gets tower eta index, computer offset [0,....)
EEmcTower holds information about an EEMC tower 'hit'.