Skip to content
Snippets Groups Projects
Commit 5defbc76 authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch '22.0-cppcheck-InDetValidation' into 'master'

22.0-cppcheck-InDetValidation

See merge request !46506
parents b7f8f627 f08d66d2
No related branches found
No related tags found
7 merge requests!69091Fix correlated smearing bug in JER in JetUncertainties in 22.0,!58791DataQualityConfigurations: Modify L1Calo config for web display,!51674Fixing hotSpotInHIST for Run3 HIST,!50012RecExConfig: Adjust log message levels from GetRunNumber and GetLBNumber,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!4650622.0-cppcheck-InDetValidation
......@@ -26,7 +26,7 @@
using namespace std;
bool file_exists(const string p_name) {
bool file_exists(const string & p_name) {
return (gSystem->AccessPathName(p_name.c_str(), kFileExists))?
false : true;
}
......
......@@ -483,7 +483,7 @@ void InDet::SegmentDriftCircleAssValidation::efficiencyReconstruction()
else if(rd > 0.25) d=3;
else if(rd <= 0.25) d=4;
++m_efficiency[d]; ++m_events;
p++;
++p;
}
}
......@@ -627,7 +627,7 @@ InDet::SegmentDriftCircleAssValidation::findTruth (const InDet::TRT_DriftCircle*
typedef PRD_MultiTruthCollection::const_iterator TruthIter;
std::pair<TruthIter, TruthIter> r = prdCollection->equal_range(d->identify());
for(TruthIter i=r.first; i!=r.second;i++){
for(TruthIter i=r.first; i!=r.second;++i){
if(i==prdCollection->end()) continue;
mc.push_back(i);
}
......
......@@ -358,7 +358,7 @@ StatusCode InDet::SCT_ClusterValidationNtupleWriter::execute() {
ATH_MSG_WARNING("for current track is TrackStateOnSurfaces == Null, no data will be written for this track");
} else {
// Loop over all track states on surfaces
for (DataVector<const Trk::TrackStateOnSurface>::const_iterator it=trackStates->begin(); it!=trackStates->end(); it++) {
for (DataVector<const Trk::TrackStateOnSurface>::const_iterator it=trackStates->begin(); it!=trackStates->end(); ++it) {
// Get pointer to RIO of right type
const InDet::SiClusterOnTrack *clus =
dynamic_cast<const InDet::SiClusterOnTrack*>((*it)->measurementOnTrack());
......@@ -393,14 +393,14 @@ StatusCode InDet::SCT_ClusterValidationNtupleWriter::execute() {
// -----------------------
// get all the RIO_Collections in the container
InDet::SCT_ClusterContainer::const_iterator containerIterator = m_riocontainer->begin();
for( ; containerIterator != m_riocontainer->end(); containerIterator++) {
for( ; containerIterator != m_riocontainer->end(); ++containerIterator) {
ATH_MSG_DEBUG( "There are " << (*containerIterator)->size() << " entries in the PrepRawDataCollection" );
// ---------------------------------
//get all the RIOs in the collection
InDet::SCT_ClusterCollection::const_iterator rioIterator = (*containerIterator)->begin();
for (; rioIterator != (*containerIterator)->end(); rioIterator++) {
for (; rioIterator != (*containerIterator)->end(); ++rioIterator) {
// get the surface center of the RIO
if (!(*rioIterator)) {
ATH_MSG_WARNING( "nullptr to RIO" );
......
......@@ -44,7 +44,7 @@ namespace {
// Needed because the track->truth assoc gives us the particles but they don't store event normally
// Add as decoration to avoid full loop for every track ( this time only once per event )
// Use a vector so any number of truth event collections can be used at once -- but the pointers need to be valid
void createTruthMap(std::vector<const xAOD::TruthEventBaseContainer *> truthEventContainers ) {
void createTruthMap(const std::vector<const xAOD::TruthEventBaseContainer *> & truthEventContainers ) {
static const xAOD::TruthParticle::Decorator<ElementLink<xAOD::TruthEventBaseContainer> > backLinkDecor("TruthEventLink");
......@@ -70,7 +70,7 @@ void createTruthMap(std::vector<const xAOD::TruthEventBaseContainer *> truthEven
}
void createTrackTruthMap(std::vector<const xAOD::TruthEventBaseContainer *> truthEventContainers,
void createTrackTruthMap(const std::vector<const xAOD::TruthEventBaseContainer *> & truthEventContainers,
const xAOD::TrackParticleContainer & trackParticleContainer,
float matchCut)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment