StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEEmcStrip.cxx
1 
11 #include "StEEmcStrip.h"
12 #include <iostream>
13 
14 ClassImp(StEEmcStrip);
15 
16 // ----------------------------------------------------------------------------
18  : StEEmcElement()
19 {
20  mIndex=-1;
21  mPlane=-1;
22  mSector=-1;
23 }
24 
25 // ----------------------------------------------------------------------------
26 void StEEmcStrip::print() const
27 {
28  std::cout << name() << " " << " " << energy()*1000. << " MeV";
29 }
30 
31 // ----------------------------------------------------------------------------
32 void StEEmcStrip::index(Int_t i)
33 {
34  mIndex=i;
35  mName="";
36 
37  const Char_t *secs[]={"01","02","03","04","05","06","07","08","09","10","11","12"};
38  const Char_t *plns[]={"U","V"};
39 
40  mName="";
41  mName += secs[mSector];
42  mName += plns[mPlane];
43 
44  if ( mIndex+1<100 ) mName += "0";
45  if ( mIndex+1<10 ) mName += "0";
46  mName+=mIndex+1;
47 }
Int_t index() const
Returns the index containing this strip.
Definition: StEEmcStrip.h:28
StEEmcStrip()
Constructor.
Definition: StEEmcStrip.cxx:17
Float_t energy() const
Return the EM energy (towers) or energy deposit for this element (SMD,pre,post). If a fail bit is set...
Definition: StEEmcElement.h:34
void print() const
Prints information about strip.
Definition: StEEmcStrip.cxx:26
const Char_t * name() const
Return the name of this element.
Definition: StEEmcElement.h:40
Base class for EEMC detectors.
Definition: StEEmcElement.h:9
Base class for describing an endcap SMD strip.
Definition: StEEmcStrip.h:8