Skip to content

Commit

Permalink
Delete warinings BTofSimMaker.cxx (#675)
Browse files Browse the repository at this point in the history
This branch is to address mentioned here: [Issue
149](#149)

---------

Co-authored-by: Daniel Torres Valladares <[email protected]>
Co-authored-by: Dmitri Smirnov <[email protected]>
  • Loading branch information
3 people authored Mar 27, 2024
1 parent ffa7b94 commit 2e60a9d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
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

0 comments on commit 2e60a9d

Please sign in to comment.