13 #include "StEEmcTreeMaker.h"
14 #include "StEEmcEnergyMaker.h"
16 #include "StMuDSTMaker/COMMON/StMuDst.h"
17 #include "StMuDSTMaker/COMMON/StMuEvent.h"
18 #include "StMuDSTMaker/COMMON/StMuPrimaryVertex.h"
19 #include "StarClassLibrary/StThreeVectorF.hh"
21 #include "StRoot/StEEmcPool/EEmcTreeContainers/EEmcEnergy.h"
22 #include "StRoot/StEEmcPool/EEmcTreeContainers/EEmcSmdCluster.h"
23 #include "StRoot/StEEmcPool/EEmcTreeContainers/EEmcHit.h"
24 #include "StRoot/StEEmcPool/EEmcTreeContainers/EEmcParticleCandidate.h"
25 #include "StRoot/StEEmcPool/EEmcTreeContainers/EEmc2ParticleCandidate.h"
26 #include "StRoot/StEEmcPool/EEmcTreeContainers/TrigSet.h"
28 #include "StRoot/StEEmcPool/StEEmcTreeMaker/StSpinInfoMaker.h"
29 #include "StRoot/StEEmcPool/StEEmcTreeMaker/StTrigCounter.h"
30 #include "StRoot/StEEmcPool/EEmcTreeContainers/StSpinInfo.h"
31 #include "StRoot/StEEmcPool/StEEmcHitMaker/StEEmcHitMaker.h"
32 #include "StRoot/StEEmcPool/StEEmcHitMaker/StESMDClustersPerSector.h"
34 #include "StRoot/StEEmcUtil/EEmcGeom/EEmcGeomSimple.h"
37 mSpinInfoIO(1), mEventHddrIO(1),
38 mDoMakePairs(1), mNumTowers( 0 ), mHTthres( 2 ), mTPthres( 4 ),
39 mEventHddr(0), mSpinInfo(0), mEEmcEnergy(0),
40 mBbcOnlineTimeDiff(0), mVertexRank(-999), mVertex(0), mHrdTrigSet(0), mSftTrigSet(0), mClusArr(0), mHitArr(0),
41 mParticleArr1(0), mParticleArr2(0), mET0ht(0), mET0tp(0),
42 mSpinInfoMkr(0), mEnMkr(0), mHitMkr(0) {
43 for( Int_t i=0; i<NUM_TREE_PARTS; ++i ){
51 mVertex->SetXYZ( -999, -999, -999 );
66 if( mHitArr &&
mIOStat[ PART_2 ] != IGNORE )
87 for( Int_t i=0; i<NUM_TREE_PARTS; ++i ){
104 for( Int_t i=0; i<NUM_TREE_PARTS; ++i ){
105 LOG_INFO <<
GetName() <<
": Part " << i+1 <<
" set to "
106 << (
mIOStat[i] == IGNORE ?
"IGNORE" : ( mIOStat[i] == READ ?
"READ" :
"WRITE" ) )
111 if(
mIOStat[ PART_1 ] == READ ){
112 ierr = openForRead( PART_1 );
117 mTree[PART_1]->SetBranchAddress(
"eemcEnergy", &mEEmcEnergy );
118 mTree[PART_1]->SetBranchAddress(
"vertex", &
mVertex );
119 mTree[PART_1]->SetBranchAddress(
"vertexRank", &mVertexRank );
121 mTree[PART_1]->SetBranchAddress(
"hardwareTriggers", &mHrdTrigSet );
122 mTree[PART_1]->SetBranchAddress(
"softwareTriggers", &mSftTrigSet );
125 TObjArray *branchArray = mTree[PART_1]->GetListOfBranches();
128 TObject *objPtr = branchArray->FindObject(
"evtHddr");
130 mTree[PART_1]->SetBranchStatus(
"evtHddr", 0 );
133 mTree[PART_1]->SetBranchStatus(
"evtHddr", 1 );
135 mTree[PART_1]->SetBranchAddress(
"evtHddr", &
mEventHddr );
137 }
else if ( mEventHddrIO ){
138 LOG_ERROR <<
"Requested EventHeaderIO, but event header branch not present in tree from file '" << mFilename[PART_1] <<
"'" << endm;
143 objPtr = branchArray->FindObject(
"spinInfo");
145 mTree[PART_1]->SetBranchStatus(
"spinInfo", 0 );
148 mTree[PART_1]->SetBranchStatus(
"spinInfo", 1 );
150 mTree[PART_1]->SetBranchAddress(
"spinInfo", &mSpinInfo );
153 LOG_ERROR <<
"Requested SpinInfoIO, but spin info branch not present in tree from file '" << mFilename[PART_1] <<
"'" << endm;
157 }
else if(
mIOStat[ PART_1 ] == WRITE ){
158 ierr = openForWrite( PART_1,
"EEmcTreePart1" );
162 mTree[PART_1]->Branch(
"evtHddr", &
mEventHddr );
166 mTree[PART_1]->Branch(
"spinInfo", &mSpinInfo );
168 mTree[PART_1]->Branch(
"vertex", &
mVertex );
169 mTree[PART_1]->Branch(
"vertexRank", &mVertexRank );
171 mTree[PART_1]->Branch(
"hardwareTriggers", &mHrdTrigSet, 32000, 1 );
172 mTree[PART_1]->Branch(
"softwareTriggers", &mSftTrigSet, 32000, 1 );
177 mTree[PART_1]->Branch(
"eemcEnergy", &mEEmcEnergy );
179 }
else if(
mIOStat[ PART_1 ] == IGNORE ){
180 if( !mTreeRdr && !mEnMkr ){
181 LOG_FATAL <<
"If this StEEmcTreeMaker is ignoring Part 1, then one must set a pointer to a StEEmcTreeMaker with a valid EEmcEnergy_t or" << endm;
182 LOG_FATAL <<
"by setting a pointer to an EEmcEnergyMaker_t. This is done via calling StEEmcTreeMaker_t::setEEmcTreeReader(...) or " << endm;
183 LOG_FATAL <<
"StEEmcTreeMaker_t::setEEmcEnergyMaker(...) on this class before ::Init is called." << endm;
190 if(
mIOStat[ PART_2 ] != IGNORE ){
191 mClusArr =
new TClonesArray(
"EEmcSmdCluster_t", 100 );
192 mHitArr =
new TClonesArray(
"EEmcHit_t", 50 );
194 if(
mIOStat[ PART_2 ] == READ ){
195 ierr = openForRead( PART_2 );
198 mTree[ PART_2 ]->SetBranchStatus(
"eemcClusArr", 1 );
199 mTree[ PART_2 ]->SetBranchStatus(
"eemcHitArr", 1 );
201 mTree[ PART_2 ]->SetBranchAddress(
"eemcClusArr", &mClusArr );
202 mTree[ PART_2 ]->SetBranchAddress(
"eemcHitArr", &mHitArr );
205 ierr = openForWrite( PART_2,
"EEmcTreePart2" );
207 mTree[ PART_2 ]->Branch(
"eemcClusArr", &mClusArr );
208 mTree[ PART_2 ]->Branch(
"eemcHitArr", &mHitArr );
215 if(
mIOStat[ PART_3 ] != IGNORE ){
216 mParticleArr1 =
new TClonesArray(
"EEmcParticleCandidate_t", 10 );
217 mParticleArr2 =
new TClonesArray(
"EEmc2ParticleCandidate_t", 10 );
219 if(
mIOStat[ PART_3 ] == READ ){
220 ierr = openForRead( PART_3 );
223 mTree[ PART_3 ]->SetBranchStatus(
"photon", 1 );
224 mTree[ PART_3 ]->SetBranchStatus(
"pi0", 1 );
225 mTree[ PART_3 ]->SetBranchAddress(
"photon", &mParticleArr1 );
226 mTree[ PART_3 ]->SetBranchAddress(
"pi0", &mParticleArr2 );
229 ierr = openForWrite( PART_3,
"EEmcTreePart3" );
231 mTree[ PART_3 ]->Branch(
"photon", &mParticleArr1 );
232 mTree[ PART_3 ]->Branch(
"pi0", &mParticleArr2 );
238 if( !ierr &&
mIOStat[ PART_4 ] != IGNORE ){
239 mET0ht =
new TArrayF(5);
240 mET0tp =
new TArrayF(5);
242 if(
mIOStat[ PART_4 ] == READ ){
243 ierr = openForRead( PART_4 );
247 mTree[ PART_4 ]->SetBranchAddress(
"htET0", &mET0ht );
248 mTree[ PART_4 ]->SetBranchAddress(
"tpET0", &mET0tp );
251 ierr = openForWrite( PART_4,
"EEmcTreePart4" );
253 mTree[ PART_4 ]->Branch(
"htET0", &mET0ht );
254 mTree[ PART_4 ]->Branch(
"tpET0", &mET0tp );
259 Int_t treeMax = -1111;
260 if(
mIOStat[ PART_1 ] == READ &&
mChain[ PART_1 ]->GetEntries() > treeMax )
261 treeMax =
mChain[ PART_1 ]->GetEntries();
263 if(
mIOStat[ PART_2 ] == READ &&
mChain[ PART_2 ]->GetEntries() > treeMax )
264 treeMax =
mChain[ PART_2 ]->GetEntries();
266 if(
mIOStat[ PART_3 ] == READ &&
mChain[ PART_3 ]->GetEntries() > treeMax )
267 treeMax =
mChain[ PART_3 ]->GetEntries();
269 if(
mIOStat[ PART_4 ] == READ &&
mChain[ PART_4 ]->GetEntries() > treeMax )
270 treeMax =
mChain[ PART_4 ]->GetEntries();
272 if( mMaxNumEvents < 0 || mMaxNumEvents > treeMax )
289 if(
mIOStat[ PART_1 ] == READ ){
291 }
else if(
mIOStat[ PART_1 ] == WRITE ){
293 }
else if(
mIOStat[ PART_1 ] == IGNORE ){
295 mEEmcEnergy = mTreeRdr->getEEmcEnergy();
296 }
else if ( mEnMkr ){
297 mEEmcEnergy = mEnMkr->getEEmcEnergyPtr();
299 LOG_FATAL <<
"Cannot find valid pointer for EEmcEnergy_t" << endm;
304 if( !ierr &&
mIOStat[ PART_2 ] == READ ){
306 }
else if(
mIOStat[ PART_2 ] == IGNORE &&
mIOStat[ PART_3 ] != IGNORE ){
308 mHitArr = mTreeRdr->getHitArray();
311 LOG_FATAL <<
"Cannot find valid pointer for the hit array" << endm;
314 }
else if(
mIOStat[ PART_2 ] == WRITE ){
318 if( !ierr &&
mIOStat[ PART_3 ] == READ ){
320 }
else if(
mIOStat[ PART_3 ] == WRITE ){
324 if( !ierr &&
mIOStat[ PART_4 ] == READ ){
326 }
else if(
mIOStat[ PART_4 ] == WRITE ){
337 Int_t StEEmcTreeMaker_t::fillPart1(){
341 LOG_ERROR <<
"Must set energy maker pointer to write out Part 1" << endm;
345 mEEmcEnergy = mEnMkr->getEEmcEnergyPtr();
346 assert( mEEmcEnergy );
357 mHrdTrigSet->insert( event->triggerIdCollection().nominal().triggerIds() );
364 std::vector< UInt_t > trigIds;
365 const std::vector< int >& trigL0 = trgSimMkr->triggerIds();
368 for( UInt_t i=0; i<trigL0.size(); ++i ){
370 if( trgSimMkr->isTrigger( (
id = trigL0[i] ) ) )
371 trigIds.push_back( static_cast< UInt_t >(
id ) );
374 mSftTrigSet->insert( trigIds );
382 LOG_ERROR <<
"Requested to write SpinInfo, but pointer to maker not provided" << endm;
391 mVertex->SetXYZ( -999, -999, -999 );
399 mVertex->SetXYZ( v.x(), v.y(), v.z() );
404 cout <<
"vertex at " << v.x() <<
' ' << v.y() <<
' ' << v.z() <<
" | " <<
mVertex->X() <<
' ' <<
mVertex->Y() <<
' ' <<
mVertex->Z() << endl;
411 mTree[ PART_1 ]->Fill();
412 ++mNumPart1EventsWritten;
420 Int_t StEEmcTreeMaker_t::fillPart2(){
424 LOG_ERROR <<
"Cannot fill Part 2, as no StEEmcHitMaker pointer was provided." << endm;
431 mClusArr->Clear(
"C");
435 std::map< Int_t, Int_t > clusMapU, clusMapV;
437 if( mHitMkr->getIfClusteredSMD() ){
442 const StESMDClustersVec_t& clusVec = mHitMkr->getESMDClustersVec();
445 for( UInt_t i = 0; i<clusVec.size(); ++i ){
446 Short_t sector = clusVec[i].getSector();
448 const StSimpleClusterVec_t& clusVecU = clusVec[i].getClusterVecU();
449 const StSimpleClusterVec_t& clusVecV = clusVec[i].getClusterVecV();
451 Float_t *blah =
new Float_t[12];
455 for( UInt_t j=0; j<clusVecU.size(); ++j ){
457 copySimpleClusterToSmdCluster( *mEEmcEnergy, sector, 0, clusVecU[j], *static_cast< EEmcSmdCluster_t* >( mClusArr->UncheckedAt( clusIdx ) ) );
458 clusMapU[ clusVecU[j].getID() ] = clusIdx;
461 for( UInt_t j=0; j<clusVecV.size(); ++j ){
463 copySimpleClusterToSmdCluster( *mEEmcEnergy, sector, 1, clusVecV[j], *static_cast< EEmcSmdCluster_t* >( mClusArr->UncheckedAt( clusIdx ) ) );
464 clusMapV[ clusVecV[j].getID() ] = clusIdx;
470 const StEEmcHitVec_t& hitVec = mHitMkr->
getHitVec();
471 if( mHitArr->GetEntries() < (Int_t)hitVec.size() )
472 mHitArr->Expand( hitVec.size() );
475 for( UInt_t i=0; i<hitVec.size(); ++i ){
476 if( hitVec[i].mUsedTowerIndices.GetSize() && hitVec[i].mUsedTowerWeights.GetSize() ){
478 copyStEEmcHitToEEmcHit( *mEEmcEnergy, clusMapU[ hitVec[i].getClusIDu() ], clusMapV[ hitVec[i].getClusIDv() ], hitVec[i],
479 *static_cast< EEmcHit_t* >( mHitArr->UncheckedAt( hitIdx ) ) );
485 cout <<
"Filling part 2 with " << mClusArr->GetEntriesFast() <<
" clusters and " << mHitArr->GetEntriesFast() <<
" hits." << endl;
487 mTree[ PART_2 ]->Fill();
492 Int_t StEEmcTreeMaker_t::fillPart3(){
496 mParticleArr1->Clear();
497 mParticleArr2->Clear();
501 Int_t numHits = mHitArr->GetEntriesFast();
504 if( mParticleArr1->GetSize() < numHits )
505 mParticleArr1->Expand( numHits );
509 numPairs = TMath::Binomial( numHits, 2 );
510 if( mParticleArr2->GetSize() < numPairs )
511 mParticleArr2->Expand( numPairs );
514 TIter hitIter1 = mHitArr;
516 TVector3* vertexPtr = mTreeRdr->getVertex();
525 vertexPtr->SetX( 0 );
526 vertexPtr->SetY( 0 );
528 if( bbcTimeBin <= 2 )
529 vertexPtr->SetZ( 40.1377 );
530 else if( bbcTimeBin == 3 )
531 vertexPtr->SetZ( 54.1733 );
532 else if( bbcTimeBin == 4 )
533 vertexPtr->SetZ( 75.2597 );
534 else if( bbcTimeBin == 5 )
535 vertexPtr->SetZ( 66.9572 );
536 else if( bbcTimeBin == 6 )
537 vertexPtr->SetZ( 38.324 );
538 else if( bbcTimeBin == 7 )
539 vertexPtr->SetZ( 5.83516 );
540 else if( bbcTimeBin == 8 )
541 vertexPtr->SetZ( -27.6028 );
542 else if( bbcTimeBin == 9 )
543 vertexPtr->SetZ( -60.6408 );
544 else if( bbcTimeBin == 10 )
545 vertexPtr->SetZ( -91.4053 );
546 else if( bbcTimeBin == 11 )
547 vertexPtr->SetZ( -105.579 );
548 else if( bbcTimeBin == 12 )
549 vertexPtr->SetZ( -95.7182 );
550 else if( bbcTimeBin == 13 )
551 vertexPtr->SetZ( -85.9305 );
552 else if( bbcTimeBin >= 14 )
553 vertexPtr->SetZ( -87.5347 );
559 while(( hitPtr1 = static_cast< EEmcHit_t* >(hitIter1.Next()) )){
566 TIter pIter = mParticleArr1;
568 while( (p2 = static_cast< EEmcParticleCandidate_t* >(pIter.Next())) && p2->hitIdx1 != p1->hitIdx1 )
575 cout <<
"Filling part 3 with " << mParticleArr1->GetEntriesFast() <<
" + " << mParticleArr2->GetEntriesFast() <<
" particle candidates." << endl;
577 mTree[ PART_3 ]->Fill();
582 Int_t StEEmcTreeMaker_t::fillPart4(){
583 assert( mEEmcEnergy );
585 std::vector< std::pair< Float_t, Float_t > > httpVec;
589 std::vector< Int_t > neighbors;
590 neighbors.reserve(9);
593 for( Int_t idx=0; idx<720; ++idx ){
596 Int_t etabin = idx%12;
597 Double_t cosHeta = TMath::CosH( 0.5*( mEta[etabin]+mEta[etabin+1] ) );
600 Double_t htET = elem.energy/cosHeta;
601 if( htET > mHTthres && !elem.fail ){
605 Int_t phiBin = idx/12;
606 Int_t phiBinLow = ( phiBin > 0 ? phiBin-1 : 59 );
607 Int_t phiBinHigh = ( phiBin < 59 ? phiBin+1 : 0 );
611 neighbors.push_back(idx);
612 neighbors.push_back(etabin+12*phiBinLow);
613 neighbors.push_back(etabin+12*phiBinHigh);
616 neighbors.push_back(idx-1);
617 neighbors.push_back(etabin+12*phiBinLow-1);
618 neighbors.push_back(etabin+12*phiBinHigh-1);
622 neighbors.push_back(idx+1);
623 neighbors.push_back(etabin+12*phiBinLow+1);
624 neighbors.push_back(etabin+12*phiBinHigh+1);
628 for( UInt_t i = 0; i<neighbors.size(); ++i ){
629 Int_t idx2 = neighbors[i];
632 tpET += elem.energy / TMath::CosH( 0.5*( mEta[idx2%12]+mEta[idx2%12+1] ) );
637 if( tpET > mTPthres )
638 httpVec.push_back( std::make_pair( htET, tpET ) );
643 mET0ht->Set( httpVec.size() );
644 mET0tp->Set( httpVec.size() );
646 for( UInt_t i=0; i<httpVec.size(); ++i ){
647 const std::pair< Float_t, Float_t >& http = httpVec[i];
650 mET0ht->AddAt( http.first, i);
651 mET0tp->AddAt( http.second, i);
654 mTree[ PART_4 ]->Fill();
661 if(
mIOStat[ PART_1 ] != IGNORE ){
667 mEEmcEnergy->Clear();
669 mVertex->SetXYZ( -999, -999, -999 );
674 if(
mIOStat[ PART_2 ] != IGNORE ){
675 mClusArr->Clear(
"C");
679 if(
mIOStat[ PART_3 ] != IGNORE ){
680 mParticleArr1->Clear();
681 mParticleArr2->Clear();
691 if(
mIOStat[ PART_1 ] == WRITE ){
694 LOG_WARN <<
"ERROR cannot find the trigger counter" << endl;
696 TArrayI trigArray(3);
698 trigArray[1] = trigCounter->getNumEventsTot();
699 trigArray[2] = trigCounter->getNumEventsInCut();
701 cout <<
"Writing trigger counts " << trigArray[0] <<
' ' << trigArray[1] <<
' ' << trigArray[2] << endl;
702 mFile[ PART_1 ]->WriteObject( &trigArray,
"trigCounts" );
706 for( Int_t ipart=0; ipart<NUM_TREE_PARTS; ++ipart ){
707 if(
mIOStat[ ipart ] == WRITE ){
708 mFile[ ipart ]->Write();
709 mFile[ ipart ]->Close();
719 mFilename[ type ] = fileName;
722 void StEEmcTreeMaker_t::setMaxNumEvents( Int_t maxNum ){
727 mSpinInfoMkr = spinInfoMkr;
742 void StEEmcTreeMaker_t::doSpinInfoIO( Bool_t doIt ){
mSpinInfoIO = doIt; };
743 void StEEmcTreeMaker_t::doEvtHddrIO( Bool_t doIt ){ mEventHddrIO = doIt; };
745 Int_t StEEmcTreeMaker_t::openForRead( treeTypeEnum_t type ){
748 mChain[type] =
new TChain(
"tree");
749 Int_t nFiles =
mChain[type]->Add( mFilename[type].
data(), 1 );
752 LOG_INFO <<
"Opened " << nFiles <<
" based on '" << mFilename[type] << endm;
754 LOG_ERROR <<
"Opened " << nFiles <<
" based on '" << mFilename[type] << endm;
757 mTree[type] =
mChain[type];
762 Int_t StEEmcTreeMaker_t::openForWrite( treeTypeEnum_t type,
const Char_t *name ){
765 mFile[type] =
new TFile( mFilename[type].
data(),
"RECREATE" );
766 if(
mFile[type]->IsOpen() ){
767 LOG_INFO <<
"Opened file '" << mFilename[type] <<
"' for writing" << endm;
769 LOG_FATAL <<
"Error opening file '" << mFilename[type] <<
"'" << endm;
774 mTree[type] =
new TTree(
"tree", name );
780 clus.sector = sector;
781 clus.inLayerV = inLayerV;
782 clus.seedStripIdx = other.getSeedMember();
788 const TArrayS& iArr = other.getMemberArray();
789 const TArrayF& wArr = other.getWeightArray();
791 clus.numUsedStrips = wArr.GetSize();
792 if( iArr.GetSize() < wArr.GetSize() )
793 clus.numUsedStrips = iArr.GetSize();
795 if( clus.numUsedStrips > EEmcSmdCluster_t::kMaxClusterSize )
796 clus.numUsedStrips = EEmcSmdCluster_t::kMaxClusterSize;
799 for( Int_t i=0; i<clus.numUsedStrips; ++i ){
801 Int_t idx = clus.usedStripIdx[i] = iArr[i];
802 Float_t weight = clus.usedStripWeight[i] = wArr[i];
805 const EEmcElement_t& element = eemcEnergy.eSmd.sec[sector].layer[inLayerV].strip[ idx ];
806 Float_t energy = ( element.fail ? 0 : element.energy );
809 clus.energy += energy;
810 clus.meanPos += energy*idx;
811 clus.width += energy*idx*idx;
814 clus.meanPos /= clus.energy;
815 clus.width /= clus.energy;
816 clus.width = sqrt( clus.width - clus.meanPos*clus.meanPos );
821 hit.uClusIdx = uClusIdx;
822 hit.vClusIdx = vClusIdx;
824 const TVector3& position = other.getPosition();
825 hit.x = position.X();
826 hit.y = position.Y();
827 hit.eta = position.Eta();
828 hit.phi = position.Phi();
830 hit.centralTowerIdx = other.getTowerIdx();
834 const TArrayF& wArr = other.mUsedTowerWeights;
837 hit.numUsedTowers = wArr.GetSize();
838 if( hit.numUsedTowers > iArr.GetSize() )
839 hit.numUsedTowers = iArr.GetSize();
841 if( hit.numUsedTowers > EEmcHit_t::kMaxNumTowers )
842 hit.numUsedTowers = EEmcHit_t::kMaxNumTowers;
845 hit.eTow = hit.ePre1 = hit.ePre2 = hit.ePost = 0;
848 Float_t centralTowerWeight = 0;
853 for( Int_t i = 0; i < hit.numUsedTowers; ++i ){
855 Short_t idx = hit.usedTowerIdx[i] = iArr[i];
856 Float_t weight = hit.usedTowerWeight[i] = wArr[i];
858 const EEmcElement_t& towElement = eemcEnergy.eTow.getByIdx( idx );
859 const EEmcElement_t& pstElement = eemcEnergy.ePost.getByIdx( idx );
861 hit.eTow += ( towElement.fail ? 0 : towElement.energy )*weight;
862 hit.ePost += ( pstElement.fail ? 0 : pstElement.energy )*weight;
866 if( idx == hit.centralTowerIdx )
867 centralTowerWeight = weight;
873 if( !centralTowerWeight )
874 centralTowerWeight = 1;
879 const EEmcElement_t& pr1Element = eemcEnergy.ePre1.getByIdx( hit.centralTowerIdx );
880 const EEmcElement_t& pr2Element = eemcEnergy.ePre2.getByIdx( hit.centralTowerIdx );
883 hit.ePre1 = ( pr1Element.fail ? -1 : pr1Element.energy )*centralTowerWeight;
884 hit.ePre2 = ( pr2Element.fail ? -1 : pr2Element.energy )*centralTowerWeight;
iostatus_t mIOStat[NUM_TREE_PARTS]
filenames
virtual TObject * Clone(const char *name=0) const
the custom implementation fo the TObject::Clone
static StMuPrimaryVertex * primaryVertex()
return pointer to current primary vertex
Int_t mMaxNumEvents
max number of events
StEvtHddr * mEventHddr
The data.
static EEmcGeomSimple & Instance()
returns a reference to a static instance of EEmcGeomSimple
UInt_t getTrigID() const
get values
TFile * mFile[NUM_TREE_PARTS]
TFiles/TTrees for writing.
UInt_t mNumTowers
thresholds for keeping the event
virtual ~StEEmcTreeMaker_t()
deconstructor
void setTreeStatus(treeTypeEnum_t type, iostatus_t iostatus, const Char_t *fileName)
modifiers
Int_t mNumEvents
number of events processed / written outt
UInt_t mBbcOnlineTimeDiff
BBC time difference.
const StEEmcHitVec_t & getHitVec() const
const accessors
StEEmcTreeMaker_t(const Char_t *myName)
constructor
void Clear(Option_t *opts="")
Clear for next event.
Bool_t mSpinInfoIO
whether to save various things
TChain * mChain[NUM_TREE_PARTS]
TChains for reading.
TVector3 * mVertex
the following pointers are owned by the class
TArrayS mUsedTowerIndices
just a flag whether to keep in vector
static StMuEvent * event()
returns pointer to current StMuEvent (class holding the event wise information, e.g. event number, run number)
virtual const char * GetName() const
special overload
Int_t Make()
Build an event.
Int_t Finish()
Write everything to file.
StSpinInfo_t * getSpinInfoPtr()
Accessors.