8 #include "StEEmcEnergyMaker.h"
10 #include "StRoot/StEEmcPool/./EEmcTreeContainers/EEmcEnergy.h"
11 #include "StRoot/StEEmcPool/StEEmcA2EMaker/StEEmcA2EMaker.h"
15 mNumTowers( 0 ), mTowerThres( 1 ), mStripThres( 0.0005 ) { };
24 mA2EMkr =
static_cast< StEEmcA2EMaker*
>( GetMaker( mA2EMkrName.data() ) );
27 LOG_ERROR <<
"Cannot find maker with the name '" << mA2EMkrName <<
"'" << endm;
47 cout << GetEventNumber() <<
" Number of towers/strips in A2CMaker? ";
48 for( Int_t i=0; i<4; ++i )
49 cout << mA2EMkr->
towers( i ).size() <<
' ';
51 for( Int_t layer = 0; layer < 2; ++layer ){
52 for( Int_t sector = 0; sector < kEEmcNumSectors; ++sector )
53 cout << mA2EMkr->
strips( sector, layer ).size() <<
' ';
60 for( Int_t iLayer=0; iLayer<4; ++iLayer ){
61 StEEmcTowerVec_t& towVec = mA2EMkr->
towers( iLayer );
64 if( !towVec.empty() ){
65 StEEmcTowerVec_t::iterator towIter;
67 for( towIter = towVec.begin(); towIter != towVec.end(); ++towIter ){
68 EEmcElement_t& element = etowEptr->getByIdx( towIter->index() );
69 element.energy = towIter->energy();
70 element.fail = towIter->fail() || towIter->stat();
72 if( iLayer == 0 && element.energy > mTowerThres && !element.fail )
76 cout <<
"Tower Layer " << iLayer <<
", idx " << towIter->index() <<
", E = " << element.energy <<
", num = " <<
mEEmcEnergy.nTowers << endl;
81 if( iLayer == 0 &&
mEEmcEnergy.nTowers < mNumTowers )
85 for( Int_t sector = 0; sector < kEEmcNumSectors; ++sector ){
86 for( Int_t layer = 0; layer < 2; ++layer ){
87 StEEmcStripVec_t &stripVec = mA2EMkr->
strips( sector, layer );
89 if( !stripVec.empty() ){
91 esmdLayer.nStrips = 0;
92 StEEmcStripVec_t::iterator stripIter;
94 for( stripIter = stripVec.begin(); stripIter != stripVec.end(); ++stripIter ){
95 EEmcElement_t& element = esmdLayer.strip[ stripIter->index() ];
97 element.energy = stripIter->energy();
98 element.fail = stripIter->fail() || stripIter->stat();
100 if( element.energy > mStripThres && !element.fail ){
106 cout <<
"SMD Sector/Layer " << sector << (layer ?
'v' :
'u' )
107 <<
", idx " << stripIter->index() <<
", E = " << element.energy <<
", num = " <<
mEEmcEnergy.nStrips << endl;
EEmc ADC –> energy maker.
StEEmcTowerVec_t & towers(Int_t layer=0)
void Clear(Option_t *opts="")
Clear for next event.
StEEmcStripVec_t & strips(Int_t sec, Int_t pln)
Returns a vector of hit strips, given the sector and plane.
StEEmcEnergyMaker_t(const Char_t *myName, const Char_t *a2EMakerName)
constructor
virtual ~StEEmcEnergyMaker_t()
deconstructor
Int_t Make()
Build an event.