Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F7879465
D122.id513.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
14 KB
Subscribers
None
D122.id513.diff
View Options
diff --git a/EvtGenBase/EvtVectorParticle.hh b/EvtGenBase/EvtVectorParticle.hh
--- a/EvtGenBase/EvtVectorParticle.hh
+++ b/EvtGenBase/EvtVectorParticle.hh
@@ -40,13 +40,13 @@
const EvtVector4C&, const EvtVector4C& );
EvtVector4C epsParent( int i ) const override
{
- assert( i >= 0 && i < m_eps.size() );
+ assert( i >= 0 && static_cast<std::size_t>( i ) < m_eps.size() );
return boostTo( m_eps[i], this->getP4() );
}
EvtVector4C eps( int i ) const override
{
- assert( i >= 0 && i < m_eps.size() );
+ assert( i >= 0 && static_cast<std::size_t>( i ) < m_eps.size() );
return m_eps[i];
}
diff --git a/History.md b/History.md
--- a/History.md
+++ b/History.md
@@ -11,6 +11,9 @@
===
## R02-0X-00
+20 June 2024 Thomas Latham
+* D122: Fix compilation warnings under gcc13 and clang16
+
20 June 2024 Fernando Abudinen
* D121: Introduced function `setSeed` to set seed for random number engines.
diff --git a/src/EvtGenBase/EvtDecayBase.cpp b/src/EvtGenBase/EvtDecayBase.cpp
--- a/src/EvtGenBase/EvtDecayBase.cpp
+++ b/src/EvtGenBase/EvtDecayBase.cpp
@@ -579,12 +579,6 @@
double EvtDecayBase::getArg( unsigned int j )
{
// Verify string
-
- if ( getParentId().getId() == 25 ) {
- int i = 0;
- ++i;
- }
-
const char* str = m_args[j].c_str();
int i = 0;
while ( str[i] != 0 ) {
diff --git a/src/EvtGenBase/EvtTensorParticle.cpp b/src/EvtGenBase/EvtTensorParticle.cpp
--- a/src/EvtGenBase/EvtTensorParticle.cpp
+++ b/src/EvtGenBase/EvtTensorParticle.cpp
@@ -85,14 +85,14 @@
EvtTensor4C EvtTensorParticle::epsTensorParent( int i ) const
{
- assert( i >= 0 && i < m_eps.size() );
+ assert( i >= 0 && static_cast<std::size_t>( i ) < m_eps.size() );
return boostTo( m_eps[i], this->getP4() );
}
EvtTensor4C EvtTensorParticle::epsTensor( int i ) const
{
- assert( i >= 0 && i < m_eps.size() );
+ assert( i >= 0 && static_cast<std::size_t>( i ) < m_eps.size() );
return m_eps[i];
}
diff --git a/src/EvtGenModels/EvtBtoXsll.cpp b/src/EvtGenModels/EvtBtoXsll.cpp
--- a/src/EvtGenModels/EvtBtoXsll.cpp
+++ b/src/EvtGenModels/EvtBtoXsll.cpp
@@ -214,7 +214,6 @@
double ml = mass[1];
double pb( 0. );
- int im = 0;
static int nmsg = 0;
double xhadronMass = -999.0;
@@ -230,8 +229,6 @@
// (JETSET gets caught in an infinite loop)
// so we choose a lightly larger value for the threshold
while ( xhadronMass < m_mxmin ) {
- im++;
-
// Apply Fermi motion and determine effective b-quark mass
// Old BaBar MC parameters
@@ -375,8 +372,6 @@
p4xhadron = p4s + p4q;
xhadronMass = p4xhadron.mass();
-
- // cout << "Xs mass = " << xhadronMass << " trial " << im << endl;
}
// initialize the decay products
diff --git a/src/EvtGenModels/EvtSSD_DirectCP.cpp b/src/EvtGenModels/EvtSSD_DirectCP.cpp
--- a/src/EvtGenModels/EvtSSD_DirectCP.cpp
+++ b/src/EvtGenModels/EvtSSD_DirectCP.cpp
@@ -111,13 +111,13 @@
rho.setDiag( parent.getSpinStates() );
// Momentum of daughters in parent's frame
- const double m_parent = EvtPDL::getMass( getParentId() );
- const double m_sd = EvtPDL::getMass( getDaug( scalarDaughterIndex ) );
- const double m_nd = EvtPDL::getMass( getDaug( nonScalarDaughterIndex ) );
+ const double parentMass = EvtPDL::getMass( getParentId() );
+ const double sdMass = EvtPDL::getMass( getDaug( scalarDaughterIndex ) );
+ const double ndMass = EvtPDL::getMass( getDaug( nonScalarDaughterIndex ) );
const double pstar =
- sqrt( pow( m_parent, 2 ) - pow( ( m_sd + m_nd ), 2 ) ) *
- sqrt( pow( m_parent, 2 ) - pow( ( m_nd - m_sd ), 2 ) ) /
- ( 2 * m_parent );
+ sqrt( pow( parentMass, 2 ) - pow( ( sdMass + ndMass ), 2 ) ) *
+ sqrt( pow( parentMass, 2 ) - pow( ( ndMass - sdMass ), 2 ) ) /
+ ( 2 * parentMass );
EvtVector4R p4_sd, p4_nd;
@@ -129,10 +129,10 @@
for ( int i = 0; i <= nsteps; i++ ) {
const double theta = i * EvtConst::pi / nsteps;
- p4_sd.set( sqrt( pow( pstar, 2 ) + pow( m_sd, 2 ) ), 0,
+ p4_sd.set( sqrt( pow( pstar, 2 ) + pow( sdMass, 2 ) ), 0,
+pstar * sin( theta ), +pstar * cos( theta ) );
- p4_nd.set( sqrt( pow( pstar, 2 ) + pow( m_nd, 2 ) ), 0,
+ p4_nd.set( sqrt( pow( pstar, 2 ) + pow( ndMass, 2 ) ), 0,
-pstar * sin( theta ), -pstar * cos( theta ) );
scalarDaughter->init( getDaug( scalarDaughterIndex ), p4_sd );
diff --git a/src/EvtGenModels/EvtVPHOtoVISRHi.cpp b/src/EvtGenModels/EvtVPHOtoVISRHi.cpp
--- a/src/EvtGenModels/EvtVPHOtoVISRHi.cpp
+++ b/src/EvtGenModels/EvtVPHOtoVISRHi.cpp
@@ -284,20 +284,6 @@
if ( sigma < 0 )
sigma = 0.0;
- // static double sigmax=sigma;
- // if (sigma>sigmax){
- // sigmax=sigma;
- // }
-
- static int count = 0;
-
- count++;
-
- // if (count%10000==0){
- // std::cout << "sigma :"<<sigma<<std::endl;
- // std::cout << "sigmax:"<<sigmax<<std::endl;
- // }
-
double norm = sqrt( sigma );
// EvtParticle* d=p->getDaug(0);
diff --git a/src/EvtGenModels/EvtXPsiGamma.cpp b/src/EvtGenModels/EvtXPsiGamma.cpp
--- a/src/EvtGenModels/EvtXPsiGamma.cpp
+++ b/src/EvtGenModels/EvtXPsiGamma.cpp
@@ -116,16 +116,16 @@
rho.setDiag( parent.getSpinStates() );
// Momentum of daughters in parent's frame
- const double m_parent = EvtPDL::getMass( getParentId() );
+ const double parentMass = EvtPDL::getMass( getParentId() );
// The daughter CMS momentum pstar (and thus the phase space) is larger if the mass of the daughters is lower.
// Thus the probability is maximal for the minimal resonance mass for rho0 and omega resonances.
// For photons the minimal mass is always zero.
- const double m_1 = EvtPDL::getMinMass( getDaug( 0 ) );
+ const double d1Mass = EvtPDL::getMinMass( getDaug( 0 ) );
- const double m_2 = EvtPDL::getMass( getDaug( 1 ) );
+ const double d2Mass = EvtPDL::getMass( getDaug( 1 ) );
- const double pstar = calcPstar( m_parent, m_1, m_2 );
+ const double pstar = calcPstar( parentMass, d1Mass, d2Mass );
EvtVector4R p4_1, p4_2;
@@ -137,10 +137,10 @@
for ( int i = 0; i <= nsteps; i++ ) {
const double theta = i * EvtConst::pi / nsteps;
- p4_1.set( sqrt( pow( pstar, 2 ) + pow( m_1, 2 ) ), 0,
+ p4_1.set( sqrt( pow( pstar, 2 ) + pow( d1Mass, 2 ) ), 0,
+pstar * sin( theta ), +pstar * cos( theta ) );
- p4_2.set( sqrt( pow( pstar, 2 ) + pow( m_2, 2 ) ), 0,
+ p4_2.set( sqrt( pow( pstar, 2 ) + pow( d2Mass, 2 ) ), 0,
-pstar * sin( theta ), -pstar * cos( theta ) );
child1->init( getDaug( 0 ), p4_1 );
@@ -260,11 +260,13 @@
}
}
-double EvtXPsiGamma::calcPstar( double m_parent, double m_1, double m_2 ) const
+double EvtXPsiGamma::calcPstar( double parentMass, double d1Mass,
+ double d2Mass ) const
{
- const double pstar = sqrt( pow( m_parent, 2 ) - pow( ( m_1 + m_2 ), 2 ) ) *
- sqrt( pow( m_parent, 2 ) - pow( ( m_2 - m_1 ), 2 ) ) /
- ( 2 * m_parent );
+ const double pstar =
+ sqrt( pow( parentMass, 2 ) - pow( ( d1Mass + d2Mass ), 2 ) ) *
+ sqrt( pow( parentMass, 2 ) - pow( ( d2Mass - d1Mass ), 2 ) ) /
+ ( 2 * parentMass );
return pstar;
}
diff --git a/src/EvtGenModels/EvtbTosllAmp.cpp b/src/EvtGenModels/EvtbTosllAmp.cpp
--- a/src/EvtGenModels/EvtbTosllAmp.cpp
+++ b/src/EvtGenModels/EvtbTosllAmp.cpp
@@ -650,8 +650,8 @@
double c9c9plusc10c10 = pow( abs( c9eff ), 2 ) + pow( abs( c10eff ), 2 );
c9c9plusc10c10 *= pow( eta9, 2 );
- double c9c9minusc10c10 = pow( abs( c9eff ), 2 ) - pow( abs( c10eff ), 2 );
- c9c9minusc10c10 *= pow( eta9, 2 );
+ //double c9c9minusc10c10 = pow( abs( c9eff ), 2 ) - pow( abs( c10eff ), 2 );
+ //c9c9minusc10c10 *= pow( eta9, 2 );
double c7c10 = abs( c7eff ) * real( c10eff );
c7c10 *= eta7;
c7c10 *= eta9;
diff --git a/test/evtgenlhc_test1.cc b/test/evtgenlhc_test1.cc
--- a/test/evtgenlhc_test1.cc
+++ b/test/evtgenlhc_test1.cc
@@ -4298,7 +4298,7 @@
//tuple->column("genergy", genergy);
//HTValOrderedVector<int> XDaugId, XDaugNephewId;
//HTValOrderedVector<float> XsDaugMass, XsDaugNephewMass;
- int nTot( 0 );
+ //int nTot( 0 );
for ( int i = 0; i < Xsmulti; i++ ) {
EvtParticle* XsDaug = Xs->getDaug( i );
//EvtVector4R p4XsDaug = XsDaug->getP4Lab();
@@ -4311,7 +4311,7 @@
EvtPDL::getStdHep( XsDaugId ) == 310 ||
EvtPDL::getStdHep( XsDaugId ) == 111 ||
abs( EvtPDL::getStdHep( XsDaugId ) ) == 211 || Daumulti == 0 ) {
- nTot++;
+ //nTot++;
//EvtVector4R p4XsDaugNephew = XsDaug->getP4Lab();
//EvtId XsDaugNephewId =XsDaug->getId() ;
//XDaugNephewId.push_back(EvtPDL::getStdHep(XsDaugId));
@@ -4328,13 +4328,13 @@
EvtPDL::getStdHep( XsDaugNephewId ) == 310 ||
EvtPDL::getStdHep( XsDaugNephewId ) == 111 ||
abs( EvtPDL::getStdHep( XsDaugNephewId ) ) == 211 ) {
- nTot++;
+ //nTot++;
//EvtVector4R p4XsDaugNephew = XsDaugNephew->getP4Lab();
//XDaugNephewId.push_back(EvtPDL::getStdHep(XsDaugNephewId));
//XsDaugNephewMass.push_back( p4XsDaugNephew.mass());
} else {
for ( int g = 0; g < Nephmulti; g++ ) {
- nTot++;
+ //nTot++;
//EvtParticle *XsDaugNephewNephew = XsDaugNephew->getDaug(g);
//EvtVector4R p4XsDaugNephewNephew = XsDaugNephewNephew->getP4Lab();
//EvtId XsDaugNephewNephewId = XsDaugNephewNephew->getId();
diff --git a/test/jsonFiles/SVS=PHI_DALITZ__Ds_phipi_pipipi0.json b/test/jsonFiles/SVS=PHI_DALITZ__Ds_phipi_pipipi0.json
--- a/test/jsonFiles/SVS=PHI_DALITZ__Ds_phipi_pipipi0.json
+++ b/test/jsonFiles/SVS=PHI_DALITZ__Ds_phipi_pipipi0.json
@@ -4,6 +4,7 @@
"grand_daughters" : [["pi+", "pi-", "pi0"], []],
"models" : ["SVS", "PHI_DALITZ", ""],
"parameters" : [[], [], []],
+ "extras" : ["noFSR"],
"events" : 10000,
"histograms" : [
{"variable" : "prob", "title" : "Prob(SVS)", "d1" : 0, "d2" : 0, "nbins" : 100, "xmin" : 0.0, "xmax" : 1.0},
diff --git a/test/testDecayModel.cc b/test/testDecayModel.cc
--- a/test/testDecayModel.cc
+++ b/test/testDecayModel.cc
@@ -1115,27 +1115,27 @@
const EvtParticle* daug3 = res->getDaug( 2 );
// 4-momenta in base parent P lab frame
- const EvtVector4R pRes{ res->getP4Lab() };
- const EvtVector4R p4{ bac != nullptr ? bac->getP4Lab()
- : EvtVector4R() };
- const EvtVector4R p1{ daug1 != nullptr ? daug1->getP4Lab()
- : EvtVector4R() };
- const EvtVector4R p3{ daug3 != nullptr ? daug3->getP4Lab()
- : EvtVector4R() };
+ const EvtVector4R p4_Res{ res->getP4Lab() };
+ const EvtVector4R p4_p4{ bac != nullptr ? bac->getP4Lab()
+ : EvtVector4R() };
+ const EvtVector4R p4_p1{ daug1 != nullptr ? daug1->getP4Lab()
+ : EvtVector4R() };
+ const EvtVector4R p4_p3{ daug3 != nullptr ? daug3->getP4Lab()
+ : EvtVector4R() };
// Boost 4-vector for resonance frame
- const EvtVector4R boost{ pRes.get( 0 ), -pRes.get( 1 ),
- -pRes.get( 2 ), -pRes.get( 3 ) };
+ const EvtVector4R boost{ p4_Res.get( 0 ), -p4_Res.get( 1 ),
+ -p4_Res.get( 2 ), -p4_Res.get( 3 ) };
// Momentum of p1 and p3 in resonance frame
- const EvtVector4R p1Res{ boostTo( p1, boost ) };
- const EvtVector4R p3Res{ boostTo( p3, boost ) };
+ const EvtVector4R p1Res{ boostTo( p4_p1, boost ) };
+ const EvtVector4R p3Res{ boostTo( p4_p3, boost ) };
// Plane normal vector (just uses 3-momentum components)
const EvtVector4R norm{ p3Res.cross( p1Res ) };
// Momentum of p4 in resonance frame
- const EvtVector4R p4Res{ boostTo( p4, boost ) };
+ const EvtVector4R p4Res{ boostTo( p4_p4, boost ) };
// Cosine of the angle between the normal and p4 in the resonance frame
const double normMag{ norm.d3mag() };
@@ -1155,23 +1155,23 @@
const EvtParticle* daug3 = selectedParent->getDaug( 2 );
// 4-momenta in base parent frame
- const EvtVector4R p1{ daug1 != nullptr ? daug1->getP4Lab()
- : EvtVector4R() };
- const EvtVector4R p2{ daug2 != nullptr ? daug2->getP4Lab()
- : EvtVector4R() };
- const EvtVector4R p3{ daug3 != nullptr ? daug3->getP4Lab()
- : EvtVector4R() };
+ const EvtVector4R p4_p1{ daug1 != nullptr ? daug1->getP4Lab()
+ : EvtVector4R() };
+ const EvtVector4R p4_p2{ daug2 != nullptr ? daug2->getP4Lab()
+ : EvtVector4R() };
+ const EvtVector4R p4_p3{ daug3 != nullptr ? daug3->getP4Lab()
+ : EvtVector4R() };
// p1 + p2
- const EvtVector4R p12{ p1 + p2 };
+ const EvtVector4R p12{ p4_p1 + p4_p2 };
// Boost 4-vector for p12 frame
const EvtVector4R boost{ p12.get( 0 ), -p12.get( 1 ), -p12.get( 2 ),
-p12.get( 3 ) };
// Momentum of p1 & p3 in p12 frame
- const EvtVector4R p1_12{ boostTo( p1, boost ) };
- const EvtVector4R p3_12{ boostTo( p3, boost ) };
+ const EvtVector4R p1_12{ boostTo( p4_p1, boost ) };
+ const EvtVector4R p3_12{ boostTo( p4_p3, boost ) };
// Cosine of angle between p1 & p3 in p12 frame
const double p1_12Mag{ p1_12.d3mag() };
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 8:28 PM (3 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3804588
Default Alt Text
D122.id513.diff (14 KB)
Attached To
D122: Fix compilation warnings under gcc13 and clang16
Event Timeline
Log In to Comment