StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StVpdSimMaker.cxx
1 /***************************************************************************
2  *
3  * $Id: StVpdSimMaker.cxx,v 1.3 2021/01/27 04:33:30 geurts Exp $
4  *
5  * Author: Nickolas Luttrell (Rice University)
6  ***************************************************************************
7  *
8  * Description: StVpdSimMaker.cxx - This simulation maker was adapted from
9  * existing code in the StBTofSimMaker circa 2016. It takes Vpd hits from
10  * geant, determines the earliest hit in each tube, then passes these hits to
11  * StEvent. For QA purposes it also calculates tStart and the Vpd Vertex.
12  *
13  ***************************************************************************
14  *
15  * $Log: StVpdSimMaker.cxx,v $
16  * Revision 1.3 2021/01/27 04:33:30 geurts
17  * move StVpdSimConfig.h to StBTofUtil area for shared used between StBTofCalibMaker and StVpdSimMaker
18  *
19  * Revision 1.2 2017/03/21 23:43:25 nluttrel
20  * Added checks for Mc vertex and tube Id
21  *
22  * Revision 1.1 2017/03/02 18:38:17 jeromel
23  * First version of Vpd simulations
24  *
25  *
26  ***************************************************************************/
27 
28 #include <Stiostream.h>
29 #include <string> // std::string
30 #include <cstddef> // std::size_t
31 #include <math.h>
32 #include "StVpdSimMaker.h"
33 #include "StBTofUtil/StVpdSimConfig.h"
34 
35 #include <TRandom3.h>
36 #include "SystemOfUnits.h"
37 #include "PhysicalConstants.h"
38 #include "phys_constants.h"
39 #include <vector>
40 #include "TH2.h"
41 #include "TH3.h"
42 #include "TFile.h"
43 
44 // Tables
45 #include "tables/St_g2t_vpd_hit_Table.h"
46 
47 #include "Random.h"
48 #include "RanluxEngine.h"
49 #include "RandGauss.h"
50 
51 #include "StMcEvent/StMcVertex.hh"
52 #include "StEvent/StPrimaryVertex.h"
53 #include "StMcEvent/StMcBTofHit.hh"
54 #include "StEventTypes.h"
55 #include "StEvent/StBTofCollection.h"
56 #include "StChain/StChainOpt.h"
57 
58 //static RanluxEngine engine;
59 //static RandGauss ranGauss(engine);
60 
61 ClassImp(StVpdSimMaker)
62 
63 //_____________________________________________________________________________
64 StVpdSimMaker::StVpdSimMaker(const char *name):StMaker(name)
65 {
67  mMcBTofHitCollection = 0;
68  mBookHisto=kFALSE;
69  mUseFileParameters=kFALSE;
70  Reset();
71 }
72 
73 
74 //_____________________________________________________________________________
76 {
78 
82  delete mSimConfig;
83 }
84 
85 //_____________________________________________________________________________
87 {
89 
93  Reset();
94  if (mBookHisto) {
96  }
97  return StMaker::Init();
98 }
99 
100 //_____________________________________________________________________________
102 {
104 
105  mGeantData = 0;
106  mEvent = 0;
107  mMcEvent = 0;
108  mSimConfig = 0;
109  delete mMcBTofHitCollection;
110 }
111 //_____________________________________________________________________________
112 int StVpdSimMaker::InitRun(int runnumber)
113 {
114  LOG_DEBUG << "StVpdSimMaker::InitRun -- reading configuration file --" << endm;
115 
117  if (mUseFileParameters) {
118  setParamsFile();
119  mSimConfig->loadVpdSimParams(getParamsFileName());
120  LOG_DEBUG << "Vpd Simulation Parameters loaded from file." << endm;
121  }
122  else {
124  LOG_DEBUG << "Vpd Simulation Parameters loaded from database." << endm;
125  }
126  mSimParams = mSimConfig->getParams();
127  return kStOK;
128 }
129 
130 //_____________________________________________________________________________
131 int StVpdSimMaker::FinishRun(int runnumber)
132 {
133 
134  return kStOk;
135 }
136 
137 
138 //_____________________________________________________________________________
140 {
141  return kStOK;
142 }
143 
144 
145 //_____________________________________________________________________________
147 {
149 
150  VpdSingleHit singleHit;
151  singleHit.tof = 0;
152  int nWest = 0;
153  int nEast = 0;
154  double tubeTimeWest = 0;
155  double tubeTimeEast = 0;
156  std::vector<VpdSingleHit> hitsWest;
157  std::vector<VpdSingleHit> hitsEast;
158 
159  std::vector<int> tubeCountsWest(19);
160  std::vector<int> tubeCountsEast(19);
161 
163  mGeantData = GetInputDS("geant");
164  if(!mGeantData) {
165  mGeantData = GetInputDS("geantBranch");
166  }
167  if(!mGeantData) {
168  LOG_WARN << " No GEANT data loaded. Exit! " << endm;
169  return kStWarn;
170  }
171  LOG_INFO << " Found GEANT data -- loading Vpd hits... " << endm;
172 
173  mMcEvent = (StMcEvent*)GetInputDS("StMcEvent");
174  if (!mMcEvent) {
175  LOG_ERROR << "No StMcEvent! Bailing out ..." << endm;
176  }
177  else if (mMcEvent->primaryVertex() != NULL){
178  StThreeVectorF Vtx = mMcEvent->primaryVertex()->position();
179  mVz = Vtx.z();
180  LOG_DEBUG << "The simulated vZ is: " << mVz << endm;
181  }
182  else {
183  LOG_WARN << "No primary vertex in McEvent! Bailing out ..." << endm;
184  return kStWarn;
185  }
186 
188  St_g2t_vpd_hit* g2t_vpd_hits = 0;
189  g2t_vpd_hits = dynamic_cast<St_g2t_vpd_hit*>(mGeantData->Find("g2t_vpd_hit"));
190  if(!g2t_vpd_hits){
191  LOG_WARN << " No Vpd hits in GEANT" << endm;
192  }
193  else {
194  int nVpdHits = g2t_vpd_hits->GetNRows();
195  LOG_DEBUG << " Found Vpd hits: " << nVpdHits << endm;
196  g2t_vpd_hit_st* vpd_hit = g2t_vpd_hits->begin();
197 
199  if(!vpd_hit) {
200  LOG_WARN << " No Vpd hit!" << endm;
201  return kStWarn;
202  }
203  else {
204  for(int i=0; i<nVpdHits; i++, vpd_hit++) {
205  int vId = vpd_hit->volume_id;
206  int iTray = vId/1000 + 120;
207  int tubeIndex = (vId % 100)-1;
208 
209  if ( (tubeIndex<0) || (tubeIndex>18) ) {
210  LOG_WARN << "Invalid Vpd Tube Id!" << endm;
211  continue;
212  }
213 
219  if ((iTray == 121) && (mSimParams[tubeIndex].tubeStatusFlag == 1)) {
220  singleHit.tof = mSimConfig->getVpdDistance()*1e9/C_C_LIGHT - mVz*1e9/C_C_LIGHT;
221  vpdResponse(singleHit, vpd_hit, vId);
222  tubeCountsWest[singleHit.tubeId - 1] += 1;
223  hitsWest.push_back(singleHit);
224  if (mBookHisto) { mLeTimeWest->Fill(singleHit.tof); }
225  }
227  else if ((iTray == 122) && (mSimParams[tubeIndex+19].tubeStatusFlag) == 1) {
228  singleHit.tof = mSimConfig->getVpdDistance()*1e9/C_C_LIGHT + mVz*1e9/C_C_LIGHT;
229  vpdResponse(singleHit, vpd_hit, vId);
230  tubeCountsEast[singleHit.tubeId - 1] += 1;
231  hitsEast.push_back(singleHit);
232  if (mBookHisto) { mLeTimeEast->Fill(singleHit.tof); }
233  }
234  }
235  }
236  }
237 
238  if (mBookHisto) {
239  for(unsigned int i = 0; i < tubeCountsWest.size(); i++ ){
240  mNRawHitsWest->Fill( i + 1, tubeCountsWest[i] );
241  mLeTubeHitsWest->Fill(tubeCountsWest[i], singleHit.tof);
242  }
243  for(unsigned int i = 0; i < tubeCountsEast.size(); i++ ){
244  mNRawHitsEast->Fill( i + 1, tubeCountsEast[i] );
245  mLeTubeHitsEast->Fill(tubeCountsEast[i], singleHit.tof);
246  }
247  }
248 
249  if(hitsWest.size() > 0) {
250  mTubeTAvgWest = thresholdCut(hitsWest, tubeCountsWest, mTubeHitsWest, mNHitsWest);
251  tubeTimeWest = mSumTubeTime;
252  nWest = mNHits;
253  }
254  else mTubeTAvgWest = -9999;
255 
256  if(hitsEast.size() > 0) {
257  mTubeTAvgEast = thresholdCut(hitsEast, tubeCountsEast, mTubeHitsEast, mNHitsEast);
258  tubeTimeEast = mSumTubeTime;
259  nEast = mNHits;
260  }
261  else mTubeTAvgEast = -9999;
262 
263  if ((mTubeTAvgEast == -9999) or (mTubeTAvgWest == -9999)) {
264  mVpdVertex = -9999;
265  }
266  else {
267  mVpdVertex = C_C_LIGHT*1.e-9*(mTubeTAvgEast - mTubeTAvgWest)/2;
268  mTStart = ((tubeTimeEast+tubeTimeWest)-(nEast-nWest)*(mVz)/(C_C_LIGHT*1.e9))/(nEast+nWest) - mSimConfig->getVpdDistance()/(C_C_LIGHT*1.e-9);
269  LOG_DEBUG << "The vpdVz is: " << mVpdVertex << " cm" << endm;
270  LOG_DEBUG << "The tStart is " << mTStart << " ns" << endm;
271  }
272 
273  fillEvent();
274 
275  if (mBookHisto) {
276  mTStartHist->Fill(mTStart);
277  mVpdVertexHist->Fill(mVpdVertex);
278  mVpdResHist->Fill(mVz-mVpdVertex);
279  mResVsNumHits->Fill(nWest, nEast, mVz-mVpdVertex);
280  }
281 
282  return kStOK;
283 }
284 
285 
286 
287 //_____________________________________________________________________________
288 // vpdResponse takes a single Vpd hit in a PMT and stores the relevant information
289 // for that hit, including tray, tubeId, and tof
290 //
291 int StVpdSimMaker::vpdResponse(VpdSingleHit &singleHit, g2t_vpd_hit_st* vpd_hit, int vId)
292 {
293  double randNum;
294  TRandom3& randengine = *((TRandom3 *)gRandom);
295 
296  singleHit.tray = vId/1000 + 120;
297  singleHit.tubeId = vId%100;
298 
299  if (singleHit.tray == 122) {
300  randNum = randengine.Gaus(0, mSimParams[singleHit.tubeId-1+19].singleTubeRes);
301  }
302  else {
303  randNum = randengine.Gaus(0, mSimParams[singleHit.tubeId-1].singleTubeRes);
304  }
305 
306  singleHit.tof += randNum/1000; // Applies single-tube resolution smearing
307  singleHit.t0 = vpd_hit->tof*1./nanosecond; // Stores value in nanoseconds.
308 
309  singleHit.de = vpd_hit->de;
310  singleHit.pathL = -9999;
311  singleHit.q = 0.;
312 
313  return kStOK;
314 }
315 
316 
317 
318 //_____________________________________________________________________________
319 // thresholdCut applies cuts on the raw Hits(West/East) based on an assigned threshold value, then finds the earliest time in each tube and returns average time information from a given Vpd.
320 
321 double StVpdSimMaker::thresholdCut(std::vector<VpdSingleHit> singleHitsVec, std::vector<int> tubeCounts, TH1F* TubeHits, TH1F* NHits) {
322 
323  std::vector<double> timesVec;
324  mSumTubeTime = 0;
325  mTubeTAvg = 0;
326 
327  int mCounter = 0;
328 
329  for(int i = 0; i < (int)tubeCounts.size(); i++) {
330  int dex = -1;
331  double lowTime = 1.e+9;
332 
333  if (tubeCounts[i] >= mSimConfig->getThreshold()) {
334  if (mBookHisto) { TubeHits->Fill( i + 1, 1 ); }
335  for(int j = 0; j < (int)singleHitsVec.size(); j++) {
336  if ((i == singleHitsVec[j].tubeId-1) and (singleHitsVec[j].tof > 1.e-4)) {
337  if (singleHitsVec[j].tof < lowTime) {
338  lowTime = singleHitsVec[j].tof;
339  dex = j;
340  }
341  }
342  }
343  }
344  else if (mBookHisto) { NHits->Fill(0); }
345 
346  if (dex >= 0) {
347  StMcBTofHit *mcHit = new StMcBTofHit(singleHitsVec[dex].tray,0,singleHitsVec[dex].tubeId,singleHitsVec[dex].de,singleHitsVec[dex].pathL,singleHitsVec[dex].t0,singleHitsVec[dex].tof,singleHitsVec[dex].q);
348  storeMcVpdHit(mcHit);
349 
350  mCounter += 1;
351  mSumTubeTime += singleHitsVec[dex].tof;
352  timesVec.push_back(singleHitsVec[dex].tof);
353  }
354  }
355 
357  if (timesVec.size() != 0) {
358  mNHits = timesVec.size();
359  mTubeTAvg = mSumTubeTime/mNHits;
360  }
361  else { mTubeTAvg = -9999; }
362 
363  if (mBookHisto) { NHits->Fill(mCounter); }
364 
365  return mTubeTAvg;
366 }
367 
368 
369 
370 //_____________________________________________________________________________
371 // storeMcVpdHit replaces duplicate hits (hits that match the same cell location),
372 // or it stores the new hit (the last part below)
374 {
375 
376  for(size_t j=0;j<mMcBTofHitCollection->hits().size();j++) {
377  StMcBTofHit *tempHit = mMcBTofHitCollection->hits()[j];
378  if(!tempHit) {
379  LOG_DEBUG << " No hit stored in mMcBTofHitCollection." << endm;
380  }
381  if(mcVpdHit->sameCell(*tempHit)) {
382  LOG_WARN << " Multiple hits passed to same cell. Exit! " << endm;
383  return kStWarn;
384  }
385  }
386 
387  LOG_DEBUG << " Storing mcVpdHit to Collection." << endm;
388  mMcBTofHitCollection->addHit(mcVpdHit);
389 
390  return kStOk;
391 }
392 
393 
394 //___________________________________________________________________________
395 // fillEvent stores the btofCollection from McEvent into StEvent
396 //
398 {
399  LOG_DEBUG << "Filling McEvent and Event"<<endm;
400 
401  // send off to StMcEvent
402  mMcEvent = (StMcEvent*)GetInputDS("StMcEvent");
403  if (!mMcEvent) {
404  LOG_ERROR << "No StMcEvent! Bailing out ..." << endm;
405  }
406  else {
407  mMcEvent->setBTofHitCollection(mMcBTofHitCollection); // Replaces existing collection with the passed argument
408  LOG_INFO << " ... StMcVpdHitCollection stored in StMcEvent" << endm;
409  }
410 
411  mEvent = (StEvent*)GetInputDS("StEvent");
412  if (!mEvent) {
413  LOG_ERROR << "No StEvent! Bailing out ..." << endm;
414  }
415  else { // mEvent non-zero
416  LOG_DEBUG << "mEvent = " << mEvent << endm;
417 
419  if (mMcEvent->primaryVertex() != NULL){
420  StThreeVectorF Vtx = mMcEvent->primaryVertex()->position();
421  mVx = Vtx.x();
422  mVy = Vtx.y();
423  mVz = Vtx.z();
424  LOG_DEBUG << " mVx, mVy, vZ: "
425  << mVx << " "
426  << mVy << " "
427  << mVz << " " << endm;
428  if (mBookHisto) { mZVertexHist->Fill(mVz); }
429  }
430 
432  mVpdCollection = mEvent->btofCollection();
433  if(!mVpdCollection) {
434  LOG_INFO << "Creating new StBTofCollection" << endm;
436  mEvent->setBTofCollection(mVpdCollection);
437  }
438 
439  for(int jj = 0; jj < (int)mMcBTofHitCollection->hits().size(); jj++) {
440  StMcBTofHit *aMcVpdHit = mMcBTofHitCollection->hits()[jj];
441 
442  if(!aMcVpdHit) continue;
443 
445  StBTofHit aVpdHit;
446  aVpdHit.Clear();
447 
448  float mcTof = aMcVpdHit->tof();
449 
450  aVpdHit.setHardwarePosition(kBTofId);
451  aVpdHit.setTray((int)aMcVpdHit->tray());
452  aVpdHit.setModule((unsigned char)aMcVpdHit->module());
453  aVpdHit.setCell((int)aMcVpdHit->cell());
454  aVpdHit.setLeadingEdgeTime((double)mcTof);
455  aVpdHit.setTrailingEdgeTime((double)mcTof);
456  aVpdHit.setAssociatedTrack(NULL);
457  aVpdHit.setIdTruth(aMcVpdHit->parentTrackId(), 1);
458  mVpdCollection->addHit(new StBTofHit(aVpdHit));
459 
461  StBTofRawHit aVpdRawHit;
462  aVpdRawHit.Clear();
463  aVpdRawHit.setTray((int)aMcVpdHit->tray());
464  aVpdRawHit.setChannel(6*(aMcVpdHit->module() - 1) + (int)aMcVpdHit->cell());
465  aVpdRawHit.setFlag(1);
466  mVpdCollection->addRawHit(new StBTofRawHit(aVpdRawHit));
467  }
468 
470  StBTofHeader aHead;
471  mVpdCollection->setHeader(new StBTofHeader(aHead));
472 
473  LOG_INFO << "... StBTofCollection Stored in StEvent! " << endm;
474 
475  }
476 
477  return kStOK;
478 }
479 
480 
481 //_____________________________________________________________________________
482 // pullHistFileName uses the string argument from the chain being run to set
483 // the name of the output histogram file.
484 //
485 string StVpdSimMaker::pullHistFileName() {
486 
487  string extension = ".VpdSim.root";
488 
489  if (GetChainOpt()->GetFileOut() != NULL) {
490  TString outFile = GetChainOpt()->GetFileOut();
491  mHistoFileName = (string)outFile;
492  size_t lastindex = mHistoFileName.find_last_of(".");
493  mHistoFileName = mHistoFileName.substr(0, lastindex);
494  lastindex = mHistoFileName.find_last_of("/");
495  mHistoFileName = mHistoFileName.substr(lastindex+1, mHistoFileName.length());
496  mHistoFileName = mHistoFileName + extension;
497  }
498 
499  return mHistoFileName;
500 }
501 
502 
503 
504 //_____________________________________________________________________________
506 {
507  // Create new histograms
508 
509  AddHist( mNRawHitsWest = new TH1F("mNRawHitsWest_tubeId","mNRawHitsWest vs. tubeId; Tube Number; # of Hits", 21, 0, 21) );
510  AddHist( mNRawHitsEast = new TH1F("mNRawHitsEast_tubeId","mNRawHitsEast vs. tubeId; Tube Number; # of Hits",21, 0, 21) );
511 
512  AddHist( mTubeHitsWest = new TH1F("mTubeHitsWest_tubeId","mTubeHitsWest vs. tubeId (Threshold Cut); Tube Number; # of Hits", 21, 0, 21) );
513  AddHist( mTubeHitsEast = new TH1F("mTubeHitsEast_tubeId","mTubeHitsEast vs. tubeId (Threshold Cut); Tube Number; # of Hits",21, 0, 21) );
514 
515  AddHist( mNHitsWest = new TH1F("mNHitsWest","# Tubes Hit per Event West; # Tubes; Counts", 21, 0, 21) );
516  AddHist( mNHitsEast = new TH1F("mNHitsEast","# Tubes Hit per Event East; # Tubes; Counts",21, 0, 21) );
517 
518  AddHist( mLeTimeWest = new TH1F("mLeTimeWest","Leading Edge Times West (No Cuts); LE (ns); Counts", 300, 0, 30) );
519  AddHist( mLeTimeEast = new TH1F("mLeTimeEast","Leading Edge Times East (No Cuts); LE (ns); Counts", 300, 0, 30) );
520  AddHist( mTStartHist = new TH1F("mTStart","mTStart; Time (ns); Counts", 300, -30, 30) );
521 
522  AddHist( mLeTubeHitsWest = new TH2F("mLeTubeHitsWest"," mTubeHitsWest & LE Times (No Cuts); LE (ns); # of Hits; Counts", 300, 0, 30, 25, 0, 25) );
523  AddHist( mLeTubeHitsEast = new TH2F("mLeTubeHitsEast","mTubeHitsEast & LE Times (No Cuts); LE (ns); # of Hits; Counts", 300, 0, 30, 25, 0, 25) );
524 
525  AddHist( mZVertexHist = new TH1F("mZVertexHist","True Vertices; Position (cm); Counts", 300, -50, 50) );
526  AddHist( mVpdVertexHist = new TH1F("mVpdVertexHist","Calculated Vpd Vertices; Position (cm); Counts", 300, -50, 50) );
527  AddHist( mVpdResHist = new TH1F("mVpdResHist","True - Vpd Vertex Position; TruePos - CalcPos (cm); Counts", 300, -15, 15) );
528 
529  AddHist( mResVsNumHits = new TH3F("mResVsNumHits","mResVsNumHits; numTubesWest; numTubesEast; vZ-vpdVz", 21, 0, 21, 21, 0, 21, 300, -10, 10) );
530 
531  return kStOK;
532 }
533 
534 
535 // End StVpdSimMaker.cpp
StMcBTofHitCollection * mMcBTofHitCollection
The Mc hit collection.
Definition: StVpdSimMaker.h:78
string mHistoFileName
histogram file name
int tubeId
The tube id of a given Vpd, with values [1,19].
Definition: StVpdSimMaker.h:88
double mTStart
Start time for an event.
TH1F * mZVertexHist
Histogram of the provided Mc Vertices for all events.
StBTofCollection * mVpdCollection
The StBTofCollection of StBTofHit&#39;s (in this case, vpd hits)
Definition: StVpdSimMaker.h:82
std::map< int, StVpdSimConfig::SingleTubeParams > mSimParams
Map of the calibration parameters to be applied.
Definition: StVpdSimMaker.h:83
bool mUseFileParameters
Default is kFALSE.
double t0
Time offset (currently unused)
Definition: StVpdSimMaker.h:90
TH1F * mVpdResHist
Histogram of the difference between Mc and calculated vertices.
StVpdSimConfig * mSimConfig
The calibration parameters for Vpd.
Definition: StVpdSimMaker.h:98
VpdSingleHit contains the parameters that describe a vpd hit.
Definition: StVpdSimMaker.h:86
int vpdResponse(VpdSingleHit &Hit, g2t_vpd_hit_st *vpd_hit, int vId)
Extracts relevant parameters from a Vpd hit.
TH3F * mResVsNumHits
Histogram fo the difference between Mc and calculated vertices vs. number of hits.
int tray
The vpd tray (121==West, 122==East)
Definition: StVpdSimMaker.h:87
Definition: tof.h:15
virtual int Make()
int fillEvent()
Fill StEvent from the McBTofCollection.
StMcEvent * mMcEvent
The McEvent info.
Definition: StVpdSimMaker.h:81
float mVpdVertex
The calculated vertex as seen by the Vpd.
TH1F * mNRawHitsWest
Number of hits on each west Vpd tube before threshold cuts.
TH1F * mLeTimeEast
Leading edge times (currently equal to Time of Flight) for east Vpd.
TH1F * mTubeHitsWest
Number of hits on each west Vpd tube after threshold cuts.
TH1F * mTStartHist
mTStart times (in ns)
bool mBookHisto
Default is kFALSE.
Definition: StVpdSimMaker.h:99
double q
Charge (currently set to 0 for Vpd hits)
Definition: StVpdSimMaker.h:93
double mTubeTAvgWest
Corrected event time for the west Vpd.
int storeMcVpdHit(StMcBTofHit *mcVpdHit)
Builds the McBTofCollection, insures no duplicate hits.
TH2F * mLeTubeHitsEast
Leading edge times and Number of tubes hit across events for East Vpd.
double mSumTubeTime
Tracks the time measured by each Vpd tube and sums them.
TH2F * mLeTubeHitsWest
Leading edge times and Number of tubes hit across events for West Vpd.
double mTubeTAvgEast
Corrected event time for the east Vpd.
int bookHistograms()
Creat the QA histograms.
double thresholdCut(std::vector< VpdSingleHit > Hits, std::vector< int > Tube_Counts, TH1F *TubeHits, TH1F *NHits)
Determines average time information from East and West Vpd, cuts zero-velocity particles.
double mTubeTAvg
Average time lapse seen by the east or west Vpd.
Definition: Stypes.h:42
Definition: Stypes.h:40
TH1F * mNHitsEast
Number of tubes hit across events for east Vpd.
virtual ~StVpdSimMaker()
StEvent * mEvent
The StEvent info.
Definition: StVpdSimMaker.h:80
TH1F * mNRawHitsEast
Number of hits on each east Vpd tube before threshold cuts.
TH1F * mTubeHitsEast
Number of hits on each east Vpd tube after threshold cuts.
virtual int Init()
TH1F * mLeTimeWest
Leading edge times (currently equal to Time of Flight) for west Vpd.
St_DataSet * mGeantData
Geant data passed into the StVpdSimMaker.
Definition: StVpdSimMaker.h:79
TH1F * mNHitsWest
Number of tubes hit across events for west Vpd.
double de
Energy deposition in GeV.
Definition: StVpdSimMaker.h:91
virtual float tof() const
time of flight geant
Definition: StMcBTofHit.hh:82
Event data structure to hold all information from a Monte Carlo simulation. This class is the interfa...
Definition: StMcEvent.hh:169
virtual int Finish()
void loadVpdSimParams(const int date=20160913, const int time=175725, const char *Default_time="2016-09-13 17:57:25")
Loads Vpd Sim Params from database.
TH1F * mVpdVertexHist
Histogram of the calculated Vpd vertices for all events.
double tof
Time of flight given in ns.
Definition: StVpdSimMaker.h:89
Definition: Stypes.h:41
virtual TDataSet * Find(const char *path) const
Definition: TDataSet.cxx:362
double pathL
Path length in cm (currently set to -9999)
Definition: StVpdSimMaker.h:92