81 #include "St_ctf_Maker.h"
82 #include "St_DataSetIter.h"
83 #include "ctf/St_ctg_Module.h"
84 #include "ctf/St_ctg_Module.h"
85 #include "ctf/St_cts_Module.h"
86 #include "ctf/St_ctu_Module.h"
88 #include "ctf/St_fill_dst_tof_Module.h"
111 St_ctf_Maker::~St_ctf_Maker(){
114 Int_t St_ctf_Maker::Init(){
121 m_ctb = (St_ctg_geo *) gime(
"ctb");
122 m_ctb_slat_phi = (St_ctg_slat_phi *) gime(
"ctb_slat_phi");
123 m_ctb_slat_eta = (St_ctg_slat_eta *) gime(
"ctb_slat_eta");
124 m_ctb_slat = (St_ctg_slat *) gime(
"ctb_slat");
126 Int_t Res_ctg_ctb = ctg (m_ctb,m_ctb_slat_phi,m_ctb_slat_eta,m_ctb_slat);
127 if (Res_ctg_ctb!=kSTAFCV_OK) iInit =
kStWarn;
128 m_tof = (St_ctg_geo *) gime(
"tof");
129 m_tof_slat_phi = (St_ctg_slat_phi *) gime(
"tof_slat_phi");
130 m_tof_slat_eta = (St_ctg_slat_eta *) gime(
"tof_slat_eta");
131 m_tof_slat = (St_ctg_slat *) gime(
"tof_slat");
133 Int_t Res_ctg_tof = ctg (m_tof,m_tof_slat_phi,m_tof_slat_eta,m_tof_slat);
if(Res_ctg_tof){};
139 m_cts_ctb = (St_cts_mpara *) gime(
"cts_ctb");
140 m_cts_tof = (St_cts_mpara *) gime(
"cts_tof");
142 m_adcc =
new TH1F(
"CtfCtbrawAdc",
"CTB ADCs",128,0.,1024.);
143 m_adct =
new TH1F(
"CtfTofrawAdc",
"TOF ADCs",128,0.,2048.);
144 m_tsvsp =
new TH2F(
"CtfDsttoftrkTsvsp",
"TOF 1/beta vs. Ptrk",80,0.1,4.1,100,0.,10.);
145 m_tsvsp->SetXTitle(
"TPC track momentum (GeV/c)");
146 m_tsvsp->SetYTitle(
"1/beta from TOFp");
147 m_tsvsp1=
new TH2F(
"CtfDsttoftrkTsvsp1",
"TOF 1/beta vs. Ptrk",80,0.1,4.1,100,0.,10.);
148 m_tsvsp1->SetXTitle(
"TPC track momentum (GeV/c)");
149 m_tsvsp1->SetYTitle(
"1/beta from TOFp, slat Nhits=1");
150 return StMaker::Init();
161 St_g2t_track *g2t_track = (St_g2t_track *) geant(
"g2t_track");
162 St_g2t_ctf_hit *g2t_ctb_hit = (St_g2t_ctf_hit *) geant(
"g2t_ctb_hit");
164 St_cts_mslat *ctb_mslat =
new St_cts_mslat(
"ctb_mslat", 240);
AddData(ctb_mslat);
165 St_cts_event *ctb_event =
new St_cts_event(
"ctb_event", 1);
AddData(ctb_event);
166 St_ctu_raw *ctb_raw =
new St_ctu_raw(
"ctb_raw", 240);
AddData(ctb_raw);
167 St_ctu_cor *ctb_cor =
new St_ctu_cor(
"ctb_cor", 240);
AddData(ctb_cor);
168 Int_t Res_cts_ctb = cts(g2t_ctb_hit, g2t_track,
169 m_ctb, m_ctb_slat, m_ctb_slat_phi, m_ctb_slat_eta, m_cts_ctb,
170 ctb_event, ctb_mslat, ctb_raw);
if(Res_cts_ctb){};
171 Int_t Res_ctu_ctb = ctu(m_ctb, m_ctb_slat, ctb_raw, ctb_cor);
if(Res_ctu_ctb){};
172 ctu_raw_st *raw = ctb_raw->GetTable();
173 for (Int_t i=0; i<ctb_raw->GetNRows();i++,raw++){
174 m_adcc->Fill((Float_t) raw->adc);
178 St_g2t_ctf_hit *g2t_tof_hit = (St_g2t_ctf_hit *) geant(
"g2t_tof_hit");
180 St_cts_mslat *tof_mslat =
new St_cts_mslat(
"tof_mslat",500);
AddData(tof_mslat);
181 St_cts_event *tof_event =
new St_cts_event(
"tof_event", 1);
AddData(tof_event);
182 St_ctu_raw *tof_raw =
new St_ctu_raw(
"tof_raw", 50);
AddData(tof_raw);
183 St_ctu_cor *tof_cor =
new St_ctu_cor(
"tof_cor", 50);
AddData(tof_cor);
184 Int_t Res_cts_tof = cts(g2t_tof_hit, g2t_track,
185 m_tof, m_tof_slat, m_tof_slat_phi, m_tof_slat_eta, m_cts_tof,
186 tof_event, tof_mslat, tof_raw);
if(Res_cts_tof){}
188 St_DataSet *tpc_tracks = GetDataSet(
"tpc_tracks");
189 St_tpt_track *tptrack = 0;
190 St_tte_mctrk *mctrk = 0;
193 tptrack = (St_tpt_track *) tpcI[
"tptrack"];
194 mctrk = (St_tte_mctrk *) tpcI[
"mctrk"];
197 St_dst_vertex *
vertex = 0;
200 vertex = (St_dst_vertex *) globalI[
"dst/vertex"];
202 if (g2t_track && tptrack && mctrk && vertex ) {
203 St_dst_tof_trk *dst_tof_trk =
new St_dst_tof_trk(
"dst_tof_trk",250);
205 St_dst_tof_evt *dst_tof_evt =
new St_dst_tof_evt(
"dst_tof_evt",1);
207 Int_t Res_fill_dst_tof = fill_dst_tof(g2t_tof_hit,g2t_track,
208 tptrack,mctrk,vertex,
210 m_tof_slat_phi,m_tof_slat_eta,
212 dst_tof_trk,dst_tof_evt);
if(Res_fill_dst_tof){};
213 dst_tof_trk_st *dst = dst_tof_trk->GetTable();
214 for (Int_t i=0; i<dst_tof_trk->GetNRows();i++,dst++){
215 m_tsvsp->Fill(dst->ptot,dst->ts_mtime);
216 if (dst->n_hits == 1) {
217 m_tsvsp1->Fill(dst->ptot,dst->ts_mtime);
221 Int_t Res_ctu_tof = ctu(m_tof, m_tof_slat, tof_raw, tof_cor);
if(Res_ctu_tof){}
222 ctu_raw_st *raw = tof_raw->GetTable();
223 for (Int_t i=0; i<tof_raw->GetNRows();i++,raw++){
224 m_adct->Fill((Float_t) raw->adc);
virtual void AddData(TDataSet *data, const char *dir=".data")
User methods.