23 #ifndef StVpdSimMaker_HH
24 #define StVpdSimMaker_HH
27 #include "St_DataSet.h"
36 #include "tables/St_g2t_vpd_hit_Table.h"
37 #include "StMcEvent/StMcEvent.hh"
38 #include "StMcEvent/StMcBTofHitCollection.hh"
39 #include "StBTofUtil/StVpdSimConfig.h"
42 #ifndef ST_NO_NAMESPACES
66 string pullHistFileName();
68 void setParamsFile(
string fileName =
"db/vpdSimParams/vpdSimParams.dat") {
mParamsFileName = fileName; }
69 void setBookHisto(
bool bookHist) {
mBookHisto = bookHist; }
71 virtual const char *GetCVS()
const{
72 static const char cvs[] =
"Tag $Name: $ $Id: StVpdSimMaker.h,v 1.2 2021/01/27 04:33:30 geurts Exp $ built " __DATE__
" " __TIME__;
return cvs;
83 std::map<int, StVpdSimConfig::SingleTubeParams>
mSimParams;
138 double thresholdCut(std::vector<VpdSingleHit> Hits, std::vector<int> Tube_Counts, TH1F* TubeHits, TH1F* NHits);
StMcBTofHitCollection * mMcBTofHitCollection
The Mc hit collection.
string mParamsFileName
path/name of the calibration file to be passed
string mHistoFileName
histogram file name
int tubeId
The tube id of a given Vpd, with values [1,19].
double mTStart
Start time for an event.
TH1F * mZVertexHist
Histogram of the provided Mc Vertices for all events.
StBTofCollection * mVpdCollection
The StBTofCollection of StBTofHit's (in this case, vpd hits)
std::map< int, StVpdSimConfig::SingleTubeParams > mSimParams
Map of the calibration parameters to be applied.
bool mUseFileParameters
Default is kFALSE.
double t0
Time offset (currently unused)
TH1F * mVpdResHist
Histogram of the difference between Mc and calculated vertices.
StVpdSimConfig * mSimConfig
The calibration parameters for Vpd.
VpdSingleHit contains the parameters that describe a vpd hit.
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)
int fillEvent()
Fill StEvent from the McBTofCollection.
StMcEvent * mMcEvent
The McEvent info.
StMcBTofHitCollection * GetMcBTofHitCollection() const
Returns the StMcBTofHitCollection of Mc Vpd hits.
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.
double q
Charge (currently set to 0 for Vpd hits)
double mTubeTAvgWest
Corrected event time for the west Vpd.
StBTofCollection * GetVpdCollection() const
Returns the StBTofCollection of Vpd hits.
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.
StVpdSimMaker(const char *name="VpdSim")
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.
TH1F * mNHitsEast
Number of tubes hit across events for east Vpd.
StEvent * mEvent
The StEvent info.
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.
TH1F * mLeTimeWest
Leading edge times (currently equal to Time of Flight) for west Vpd.
St_DataSet * mGeantData
Geant data passed into the StVpdSimMaker.
TH1F * mNHitsWest
Number of tubes hit across events for west Vpd.
double de
Energy deposition in GeV.
Event data structure to hold all information from a Monte Carlo simulation. This class is the interfa...
TH1F * mVpdVertexHist
Histogram of the calculated Vpd vertices for all events.
double tof
Time of flight given in ns.
double pathL
Path length in cm (currently set to -9999)