1 #include "StjFCSMuDst.h"
5 #include "StMuDSTMaker/COMMON/StMuDst.h"
6 #include "StMuDSTMaker/COMMON/StMuEvent.h"
7 #include "StMuDSTMaker/COMMON/StMuEmcCollection.h"
9 #include "StMuDSTMaker/COMMON/StMuFcsCollection.h"
10 #include "StMuDSTMaker/COMMON/StMuFcsHit.h"
12 #include "StFcsDbMaker/StFcsDbMaker.h"
13 #include "StFcsDbMaker/StFcsDb.h"
14 #include "StEventTypes.h"
15 #include "StEvent/StEvent.h"
16 #include "StEvent/StFcsCollection.h"
17 #include "StEvent/StFcsHit.h"
18 #include "StEvent/StFcsPoint.h"
19 #include "StMuDSTMaker/COMMON/StMuTypes.hh"
23 #include "StMessMgr.h"
24 #include "StEventTypes.h"
27 StjFCSMuDst::StjFCSMuDst()
39 StMaker* chain = StMaker::GetChain();
41 if(chain->GetDataSet(
"fcsDb")){
42 mFcsDb =
static_cast<StFcsDb*
>(chain->GetDataSet(
"fcsDb"));
45 LOG_ERROR <<
"No fcdDb found in chain. Please initialize StFcsDbMaker within your chain." << endm;
49 LOG_ERROR <<
"StjFCSMuDst Initializing failed due to missing chain." << endm;
53 StjTowerEnergyList StjFCSMuDst::getEnergyList(){
54 StjTowerEnergyList fcsEnergyList;
58 if(mMuFcsColl->numberOfHits()!=0){
61 for(
int det = 0; det <= kFcsHcalSouthDetId; det++){
63 int nhits = mMuFcsColl->numberOfHits(det);
64 int det_hit_index = mMuFcsColl->indexOfFirstHit(det);
66 for(
int hit_i = 0 ; hit_i < nhits; hit_i++){
68 int hit_index = hit_i + det_hit_index;
71 if(det <= 1 && useECal){
72 fcsEnergyList.push_back(hitenergyDeposit(*hit));
74 if(det >= 2 && useHCal){
75 fcsEnergyList.push_back(hitenergyDeposit(*hit));
98 energyDeposit.towerId = hit.id();
99 energyDeposit.detectorId = hit.detectorId();
100 energyDeposit.towerR = TMath::Sqrt(x*x + y*y);
101 energyDeposit.towerEta = xyz.pseudoRapidity();
102 energyDeposit.towerPhi = xyz.phi();
103 energyDeposit.vertexX = _vx;
104 energyDeposit.vertexY = _vy;
105 energyDeposit.vertexZ = _vz;
106 energyDeposit.energy = hit.energy();
107 energyDeposit.adc = hit.adcSum();
108 energyDeposit.pedestal = 0;
109 energyDeposit.rms = 0;
110 energyDeposit.status = 1;
112 return energyDeposit;
static StMuFcsCollection * muFcsCollection()
returns pointer to current StMuFcsCollection
StThreeVectorD getStarXYZ(int det, float FcsX, float FcsY, float FcsZ=-1.0, float zVertex=0.0) const
get the STAR frame cooridnates from local XYZ [cm]
void setDbAccess(int v=1)
debug level
static StMuEvent * event()
returns pointer to current StMuEvent (class holding the event wise information, e.g. event number, run number)