Skip to content

Commit

Permalink
fix compilation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
egamberini authored and olantwin committed Jun 26, 2024
1 parent af5c7b0 commit 1530a3c
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 28 deletions.
24 changes: 12 additions & 12 deletions UpstreamTagger/UpstreamTaggerHit.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ std::vector<double> UpstreamTaggerHit::GetTime(Double_t x){
Dist(x, lpos, lneg);
Double_t dt = T_resol;
Double_t t = ( (t_1-lneg/v_drift) + (t_2-lpos/v_drift) )/2;
std::vector<double> m;
m.push_back(t);
m.push_back(dt);
return m;
std::vector<double> retVal;
retVal.push_back(t);
retVal.push_back(dt);
return retVal;
}
// ---- return mean time information
std::vector<double> UpstreamTaggerHit::GetTime(){
Expand All @@ -80,17 +80,17 @@ std::vector<double> UpstreamTaggerHit::GetTime(){
else
t0 = (t_1+t_2)/2. - 55.5/v_drift;// strip length = 111 cm in y
Double_t dt = T_resol;
std::vector<double> m;
m.push_back(t0);
m.push_back(dt);
return m;
std::vector<double> retVal;
retVal.push_back(t0);
retVal.push_back(dt);
return retVal;
}

std::vector<double> UpstreamTaggerHit::GetMeasurements(){
std::vector<double> m;
m.push_back( t_1);
m.push_back( t_2);
return m;
std::vector<double> retVal;
retVal.push_back( t_1);
retVal.push_back( t_2);
return retVal;
}

// distance to edges
Expand Down
1 change: 0 additions & 1 deletion charmdet/ShipPixelHit.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class ShipPixelHit : public ShipHit {
ShipPixelHit(const ShipPixelHit &other);
ShipPixelHit operator=(const ShipPixelHit &other);

int32_t detID;
uint16_t tot;

ClassDef(ShipPixelHit, 3);
Expand Down
1 change: 0 additions & 1 deletion ecal/ecalStructure.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ void ecalStructure::CreateNLists(ecalCell* cell)
cerr << "Cell: CenterX=" << x << ", CenterY=" << y << "." << endl;
return;
}
tl.empty();
for(ptml=tml.begin();ptml!=tml.end();++ptml) {
_add_not_null((*ptml)->GetCellsY(y-dy-d),tl);
_add_not_null((*ptml)->GetCellsY(y+dy+d),tl);
Expand Down
2 changes: 1 addition & 1 deletion passive/ShipMuonShield.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ShipMuonShield : public FairModule

void SetSupports(Bool_t supports) {
fSupport = supports;
LOG(WARNING) <<"Setting supports to %s. This will not have any effect if called after the geometry has been constructed.", fSupport ? "true" : "false";
LOG(WARNING) <<"Setting supports to "<< (fSupport ? "true" : "false") << ". This will not have any effect if called after the geometry has been constructed.";
}

protected:
Expand Down
26 changes: 13 additions & 13 deletions shipgen/FixedTargetGenerator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -70,24 +70,24 @@ Bool_t FixedTargetGenerator::InitForCharmOrBeauty(TString fInName, Int_t nev, Do
nTree->SetBranchAddress("mpz",&n_mpz);
nTree->SetBranchAddress("mE",&n_mE);
if (nTree->GetBranch("k")){
fLogger->Info(MESSAGE_ORIGIN,"+++has branch+++");
LOG(INFO) << "+++has branch+++";
nTree->SetBranchAddress("k",&ck);}
// check if we deal with charm or beauty:
nTree->GetEvent(0);
if (!setByHand and n_M>5){
chicc = chibb;
fLogger->Info(MESSAGE_ORIGIN,"automatic detection of beauty, configured for beauty");
fLogger->Info(MESSAGE_ORIGIN,"bb cross section / mbias %f",chicc);
LOG(INFO) << "automatic detection of beauty, configured for beauty";
LOG(INFO) << "bb cross section / mbias " << chicc;
}else{
fLogger->Info(MESSAGE_ORIGIN,"cc cross section / mbias %f",chicc);
LOG(INFO) << "cc cross section / mbias " << chicc;
}
// convert pot to weight corresponding to one spill of 5e13 pot
// get histogram with number of pot to normalise
// pot are counted double, i.e. for each signal, i.e. pot/2.
Int_t nrcpot=((TH1F*)fin->Get("2"))->GetBinContent(1)/2.; // number of primary interactions
wspill = nrpotspill*chicc/nrcpot*nEvents/nev;
fLogger->Info(MESSAGE_ORIGIN,"Input file: %s with %i entries, corresponding to nr-pot=%f",fInName.Data(),nEvents,nrcpot/chicc);
fLogger->Info(MESSAGE_ORIGIN,"weight %f corresponding to %f p.o.t. per spill for %i events to process",wspill,nrpotspill,nev);
LOG(INFO) << "Input file: " << fInName.Data() << " with " << nEvents << " entries, corresponding to nr-pot=" << (nrcpot/chicc);
LOG(INFO) << "weight " << wspill << " corresponding to " << nrpotspill << " p.o.t. per spill for " << nev << " events to process";

pot=0.;
//Determine fDs on this file for primaries
Expand All @@ -103,7 +103,7 @@ Bool_t FixedTargetGenerator::Init()
if (Option == "Primary" && !G4only){
fPythiaN = new Pythia8::Pythia();
}else if (Option != "charm" && Option != "beauty" && !G4only) {
fLogger->Error(MESSAGE_ORIGIN,"Option not known %s, abort",Option.Data());
LOG(ERROR) << "Option not known "<< Option.Data() << ", abort";
}
if (fUseRandom1) fRandomEngine = new PyTr1Rng();
if (fUseRandom3) fRandomEngine = new PyTr3Rng();
Expand Down Expand Up @@ -171,18 +171,18 @@ Bool_t FixedTargetGenerator::Init()
if (p->tau0()>1){
string particle = std::to_string(n)+":mayDecay = false";
fPythia->readString(particle);
fLogger->Info(MESSAGE_ORIGIN,"Made %s stable for Pythia, should decay in Geant4",p->name().c_str());
LOG(INFO) << "Made " << p->name().c_str() << " stable for Pythia, should decay in Geant4";
}
}
// boost branching fraction of rare di-muon decays
// eta omega rho0 eta' phi
if (fBoost != 1.){
fLogger->Info(MESSAGE_ORIGIN,"Rescale BRs of dimuon decays in Pythia: %f",fBoost);
LOG(INFO) << "Rescale BRs of dimuon decays in Pythia: " << fBoost;
for (unsigned int i=0; i<r.size(); ++i) {
Pythia8::ParticleDataEntry* V = fPythia->particleData.particleDataEntryPtr(r[i]);
Pythia8::DecayChannel ch = V->channel(c[i]);
if (TMath::Abs(ch.product(0))!=13 || TMath::Abs(ch.product(1))!=13){
fLogger->Info(MESSAGE_ORIGIN,"this is not the right decay channel: %i %i",r[i],c[i]);
LOG(INFO) << "this is not the right decay channel: " << r[i] << " " << c[i];
}else{
TString tmp="";
tmp+=r[i];tmp+=":";tmp+= c[i];
Expand Down Expand Up @@ -254,7 +254,7 @@ Bool_t FixedTargetGenerator::Init()
TGeoVolume* top = gGeoManager->GetTopVolume();
TGeoNode* target = top->FindNode(targetName);
if (!target){
fLogger->Error(MESSAGE_ORIGIN,"target not found, %s, program will crash",targetName.Data());
LOG(ERROR) << "target not found, " << targetName.Data() << ", program will crash";
}
Double_t z_middle = target->GetMatrix()->GetTranslation()[2];
TGeoBBox* sha = (TGeoBBox*)target->GetVolume()->GetShape();
Expand Down Expand Up @@ -343,7 +343,7 @@ Bool_t FixedTargetGenerator::ReadEvent(FairPrimaryGenerator* cpg)
}
}else{
if (nEntry==nEvents){
fLogger->Info(MESSAGE_ORIGIN,"Rewind input file: %i",nEntry);
LOG(INFO) << "Rewind input file: " << nEntry;
nEntry=0;}
nTree->GetEvent(nEntry);
nEntry+=1;
Expand All @@ -363,7 +363,7 @@ Bool_t FixedTargetGenerator::ReadEvent(FairPrimaryGenerator* cpg)
cpg->AddTrack(int(n_mid),n_mpx,n_mpy,n_mpz, xOff/cm,yOff/cm,zinter/cm,-1,kFALSE,n_mE,0.,wspill,procID);
// second charm hadron in the event
nTree->GetEvent(nEntry);
if (nID1 * n_id > 0){fLogger->Info(MESSAGE_ORIGIN,"same sign charm: %i, %i, %i",nEntry,nID1,n_id);}
if (nID1 * n_id > 0){LOG(INFO) << "same sign charm: " << nEntry << ", " << nID1 << ", " << n_id;}
nEntry+=1;
fPythiaP->event.append(int(n_id),1,0,0,n_px,n_py,n_pz,n_E,n_M,0.,9.);
fPythiaP->next();
Expand Down

0 comments on commit 1530a3c

Please sign in to comment.