45 #include "StZdcVertexMaker.h"
50 #include "StEventTypes.h"
51 #include "StMessMgr.h"
52 #include "St_DataSet.h"
53 #include "St_DataSetIter.h"
54 #include "ZdcCalPars.h"
55 #include "tables/St_ZdcCalPars_Table.h"
56 #include "tables/St_dst_TrgDet_Table.h"
57 #include "StDaqLib/TRG/trgStructures.h"
62 static const char rcsid[] =
"$Id: StZdcVertexMaker.cxx,v 1.10 2016/12/12 17:18:04 smirnovd Exp $";
66 StZdcVertexMaker::StZdcVertexMaker(
const char *name,
const char *title):
StMaker(name,title)
81 StZdcVertexMaker::~StZdcVertexMaker()
88 void StZdcVertexMaker::Clear(
const char*)
103 Int_t StZdcVertexMaker::Init() {
return StMaker::Init(); }
105 Int_t StZdcVertexMaker::InitRun(
int runumber)
109 St_ZdcCalPars * t = (St_ZdcCalPars *)GetDataBase(
"Calibrations/trg/ZdcCalPars");
111 gMessMgr->Error() <<
"StZdcVertexMaker::Init(): in ZdcVertexMaker did not find ZdcCalPars." << endm;
115 ZdcCalPars_st* s = (ZdcCalPars_st*)t->GetArray();
139 event = (
StEvent *) GetInputDS(
"StEvent");
141 gMessMgr->Error() <<
"StZdcVertexMaker::Make() : unable to get StEvent." << endm;
150 gMessMgr->Error() <<
"StZdcVertexMaker::Make() : unable to get StTriggerData." << endm;
161 float adcE = td->zdcAttenuated(east,0);
162 float adcW = td->zdcAttenuated(west,0);
163 float tdcE = td->zdcTDC(east,0);
164 float tdcW = td->zdcTDC(west,0);
169 float VertexZ = ((tdcW-(mWAP0+(mWAP1*adcW)+(mWAP2*::pow(adcW,2))+(mWAP3*::pow(adcW,3))))-
170 (tdcE-(mEAP0+(mEAP1*adcE)+(mEAP2*::pow(adcE,2))+(mEAP3*::pow(adcE,3)))))*mVPAR + mOFF;
175 td->setZdcVertexZ(VertexZ);
virtual void Clear(Option_t *option="")
User defined functions.