Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete warinings BTofSimMaker.cxx #675

Merged
merged 4 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions StRoot/StBTofSimMaker/StBTofSimMaker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,10 @@ int StBTofSimMaker::CellResponse(g2t_ctf_hit_st* tofHitsFromGeant,
g2t_track_st *tof_track = g2t_track->GetTable();
int no_tracks= g2t_track->GetNRows();

double beta;
// Initialize beta to be a large negative value. This is a flag in case the following if
// condition is not satisfied and meaning there is something wrong with the beta value.
//
double beta = -999.;
int trackId = -1;
for(int j=0;j<no_tracks;j++){
if(tofHitsFromGeant->track_p==tof_track[j].id){
Expand Down Expand Up @@ -803,7 +806,11 @@ int StBTofSimMaker::FastCellResponse(g2t_ctf_hit_st* tofHitsFromGeant, StBTofCol
int no_tracks= g2t_track->GetNRows();

StMcTrack *partnerTrk = 0;
int partnerTrkId;

// Initialize partnerTrkId to be a negative value. This is a flag in case the following if
// condition is not satisfied and meaning there is something wrong with the track ID.
//
int partnerTrkId = -1;
for(int j=0;j<no_tracks;j++){
if(tofHitsFromGeant->track_p==tof_track[j].id){
partnerTrk = new StMcTrack(&(tof_track[j]));
Expand All @@ -820,15 +827,8 @@ int StBTofSimMaker::FastCellResponse(g2t_ctf_hit_st* tofHitsFromGeant, StBTofCol
double pathL = tofHitsFromGeant->s_track;
double q = 0.;

double Rawtof = tofHitsFromGeant->tof*1000./nanosecond;
float Rawbeta=pathL/Rawtof/3e-2;
double momentum=partnerTrk->momentum().mag();
double mass=partnerTrk->fourMomentum().m();
double calcTof=pathL/(3e-2)/sqrt(1 - mass*mass/(momentum*momentum + mass*mass));

double time_blur = ranGauss.shoot()*mSimResDb->timeres_tof(itray, imodule, icell)*1e-9/nanosecond;
double tof = tofHitsFromGeant->tof*1000./nanosecond + time_blur; //! 85ps per channel

if ( mVpdSim ) { // VpdSimMaker present, assume vpdstart
tof += mVpdSimConfig->getMcClock()*1000;
}
Expand All @@ -851,9 +851,9 @@ int StBTofSimMaker::FastCellResponse(g2t_ctf_hit_st* tofHitsFromGeant, StBTofCol
}
}

// tof = tof - mSimDb->toffset(); // Apply offset correction.
// tof = tof - mSimDb->toffset(); // Apply offset correction.
double t0 = tofHitsFromGeant->tof*1000./nanosecond;
float beta=pathL/tof/3e-2;
// float beta=pathL/tof/3e-2;

StMcBTofHit *mcBTofHit = new StMcBTofHit(itray,imodule,icell,de,pathL,t0,tof,q);
mcBTofHit->setPosition(local);
Expand Down
1 change: 0 additions & 1 deletion mgr/warnoff_dirs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ StRoot/RTS
StRoot/StAnalysisMaker
StRoot/StAssociationMaker
StRoot/StBTofPool.*
StRoot/StBTofSimMaker
StRoot/StChain
StRoot/StDaqLib
StRoot/StDbLib
Expand Down
Loading