Commit fd4f3a80 authored by Christos Anastopoulos's avatar Christos Anastopoulos
Browse files

clang-tidy related fixes to DerivationFrameworkTools,...

clang-tidy related  fixes to DerivationFrameworkTools, DerivationFrameworkMCTruth , DerivationFrameworkInDet , DerivationFrameworkHiggs , DerivationFrameworkCore DerivationFrameworkCalo
parent a1408770
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
......@@ -35,8 +35,8 @@ namespace DerivationFramework {
private:
std::string m_SGKey_photons;
std::string m_SGKey_electrons;
int m_eta_size;
int m_phi_size;
int m_eta_size = 0;
int m_phi_size = 0;
std::vector<unsigned int> m_layers;
ToolHandle<CaloClusterProcessor> m_caloFillRectangularTool {this,
......
......@@ -46,7 +46,7 @@ namespace DerivationFramework {
void setJetClustersMask(std::vector<bool>&, const xAOD::JetContainer*, const xAOD::CaloClusterContainer*) const;
void setJetClustersMask(std::vector<bool>&, std::vector<const xAOD::Jet*>&, const xAOD::CaloClusterContainer*) const;
void select(const xAOD::Jet* particle, float coneSize, const xAOD::CaloClusterContainer* clusters, std::vector<bool> &mask) const;
static void select(const xAOD::Jet* particle, float coneSize, const xAOD::CaloClusterContainer* clusters, std::vector<bool> &mask) ;
};
}
......
......@@ -70,7 +70,7 @@ StatusCode DerivationFramework::CaloClusterThinning::initialize()
return StatusCode::FAILURE;
}
if (m_sgKey=="") {
if (m_sgKey.empty()) {
ATH_MSG_FATAL("No particle collection provided for thinning.");
return StatusCode::FAILURE;
} else { ATH_MSG_INFO("Calo clusters associated with objects in " << m_sgKey << " will be retained in this format with the rest being thinned away");}
......@@ -133,7 +133,7 @@ StatusCode DerivationFramework::CaloClusterThinning::doThinning() const
m_ntotTopo += nTopoClusters;
// Retrieve particle container
const xAOD::IParticleContainer* importedParticles(0);
const xAOD::IParticleContainer* importedParticles(nullptr);
if (evtStore()->retrieve(importedParticles,m_sgKey).isFailure()) {
ATH_MSG_ERROR("No collection with name " << m_sgKey << " found in StoreGate!");
return StatusCode::FAILURE;
......@@ -181,12 +181,12 @@ StatusCode DerivationFramework::CaloClusterThinning::doThinning() const
std::vector< const xAOD::IParticle* > particlesToCheck ={};
// identify which e-gammas to keep for the thinning check
for (unsigned int i=0; i<nEgammas; ++i) {
if (entries[i]==true) {
if (static_cast<bool>(entries[i])) {
particlesToCheck.push_back((*importedParticles)[i]);
}
}
////
for (auto particle : particlesToCheck){
for (const auto *particle : particlesToCheck){
if(m_run_calo) {
// Always keep own particle clusters
if( particleCluster(mask, particle, importedCaloCluster.cptr(), is_muons, is_egamma, is_tau) != StatusCode::SUCCESS ) {
......@@ -207,7 +207,7 @@ StatusCode DerivationFramework::CaloClusterThinning::doThinning() const
}
}
else{//No selection string provided
for (auto particle : *importedParticles){
for (const auto *particle : *importedParticles){
if(m_run_calo) {
if( particleCluster(mask, particle, importedCaloCluster.cptr(), is_muons, is_egamma, is_tau) != StatusCode::SUCCESS ) {
return StatusCode::FAILURE;
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#include "CaloUtils/CaloCellList.h"
......@@ -45,7 +45,7 @@ void DerivationFramework::CellsInCone::egammaSelect(xAOD::CaloCluster* inputCl,
cells.insert(cells.end(), myList.begin(), myList.end());
}
for ( auto cell : cells ) {
for ( const auto *cell : cells ) {
if( !cell || !cell->caloDDE() ) continue;
int index = inputcells->findIndex(cell->caloDDE()->calo_hash());
if( index == -1 ) continue;
......
......@@ -73,7 +73,7 @@ StatusCode DerivationFramework::CellsInConeThinning::addBranches() const{
//Loop over the egammas, pick the selected ones and fill the cluster
int index(0);
for (const xAOD::Egamma* eg : *egammas){
if(entries.at(index)==true){
if(static_cast<bool>(entries.at(index))){
xAOD::CaloCluster *dummy = CaloClusterStoreHelper::makeCluster(cells);
DerivationFramework::CellsInCone::egammaSelect(dummy,cells,eg,m_dr);
dclHdl->push_back(dummy);
......
......@@ -40,7 +40,7 @@ StatusCode DerivationFramework::ClusterEnergyPerLayerDecorator::initialize()
{
ATH_MSG_VERBOSE("initialize() ...");
if(m_SGKey_photons == "" and m_SGKey_electrons == ""){
if(m_SGKey_photons.empty() and m_SGKey_electrons.empty()){
ATH_MSG_FATAL("No e-gamma collection provided");
return StatusCode::FAILURE;
}
......@@ -63,10 +63,10 @@ StatusCode DerivationFramework::ClusterEnergyPerLayerDecorator::addBranches() co
const EventContext& ctx=Gaudi::Hive::currentContext();
for (const std::string& SGkey : {m_SGKey_photons, m_SGKey_electrons})
{
if (SGkey == "") continue;
const xAOD::EgammaContainer *container(0);
if (SGkey.empty()) continue;
const xAOD::EgammaContainer *container(nullptr);
ATH_CHECK( evtStore()->retrieve(container, SGkey) );
for (auto egamma : *container){
for (const auto *egamma : *container){
decorateObject(ctx, egamma);
}
}
......@@ -82,8 +82,8 @@ DerivationFramework::ClusterEnergyPerLayerDecorator::decorateObject(
if (not egamma or not egamma->caloCluster()) return;
const CaloCellContainer* cellCont(0);
xAOD::CaloCluster* egcClone(0);
const CaloCellContainer* cellCont(nullptr);
xAOD::CaloCluster* egcClone(nullptr);
if (evtStore()->retrieve(cellCont,m_CellCollectionName).isFailure())
ATH_MSG_WARNING(m_CellCollectionName<< " not found");
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#include "xAODMuon/Muon.h"
......@@ -45,7 +45,7 @@ void DerivationFramework::ClustersInCone::select(const xAOD::Egamma* particle,
//Helper for the muon overload
bool DerivationFramework::ClustersInCone::GetExtrapEtaPhi(const xAOD::Muon* mu, float& eta, float& phi){
auto cluster = mu->cluster();
const auto *cluster = mu->cluster();
if(cluster){
float etaT = 0, phiT = 0;
int nSample = 0;
......
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
/////////////////////////////////////////////////////////////////
......@@ -53,8 +53,8 @@ DerivationFramework::GainDecorator::GainDecorator(const std::string& t,
m_names_nCells[ key ] = name_nCells;
}
for (auto kv : m_names_E) ATH_MSG_DEBUG("Decorating (layer, gain): " << kv.first << " " << kv.second );
for (auto kv : m_names_nCells) ATH_MSG_DEBUG("Decorating (layer, gain): " << kv.first << " " << kv.second );
for (const auto& kv : m_names_E) ATH_MSG_DEBUG("Decorating (layer, gain): " << kv.first << " " << kv.second );
for (const auto& kv : m_names_nCells) ATH_MSG_DEBUG("Decorating (layer, gain): " << kv.first << " " << kv.second );
}
......@@ -68,16 +68,16 @@ StatusCode DerivationFramework::GainDecorator::initialize()
// Decide which collections need to be checked for ID TrackParticles
ATH_MSG_VERBOSE("initialize() ...");
if(m_SGKey_photons == "" && m_SGKey_electrons == "" ){
if(m_SGKey_photons.empty() && m_SGKey_electrons.empty() ){
ATH_MSG_FATAL("No e-gamma collection provided for thinning. At least one egamma collection (photon/electrons) must be provided!");
return StatusCode::FAILURE;
}
if (m_SGKey_electrons!="") {
if (!m_SGKey_electrons.empty()) {
ATH_MSG_INFO("Using "<< m_SGKey_electrons <<" for electrons");
}
if (m_SGKey_photons!="") {
if (!m_SGKey_photons.empty()) {
ATH_MSG_INFO("Using "<< m_SGKey_photons <<" for photons");
}
......@@ -94,24 +94,24 @@ StatusCode DerivationFramework::GainDecorator::finalize()
StatusCode DerivationFramework::GainDecorator::addBranches() const
{
// Retrieve photon container
const xAOD::EgammaContainer* importedPhotons(0);
if(m_SGKey_photons != ""){
const xAOD::EgammaContainer* importedPhotons(nullptr);
if(!m_SGKey_photons.empty()){
if (evtStore()->retrieve(importedPhotons,m_SGKey_photons).isFailure()) {
ATH_MSG_ERROR("No e-gamma collection with name " << m_SGKey_photons << " found in StoreGate!");
return StatusCode::FAILURE;
}
for (auto photon : *importedPhotons) {
for (const auto *photon : *importedPhotons) {
decorateObject(photon);
}
}
// Retrieve electron container
const xAOD::EgammaContainer* importedElectrons(0);
if(m_SGKey_electrons != ""){
const xAOD::EgammaContainer* importedElectrons(nullptr);
if(!m_SGKey_electrons.empty()){
if (evtStore()->retrieve(importedElectrons,m_SGKey_electrons).isFailure()) {
ATH_MSG_ERROR("No e-gamma collection with name " << m_SGKey_electrons << " found in StoreGate!");
return StatusCode::FAILURE;
}
for (auto electron : *importedElectrons) {
for (const auto *electron : *importedElectrons) {
decorateObject(electron);
}
}
......@@ -133,7 +133,7 @@ void DerivationFramework::GainDecorator::decorateObject(const xAOD::Egamma*& ega
// Skip the computation for missing cell links (like topo-seeded photons)
// but decorate anyway
const CaloClusterCellLink* cellLinks = egamma->caloCluster() ? egamma->caloCluster()->getCellLinks() : 0;
const CaloClusterCellLink* cellLinks = egamma->caloCluster() ? egamma->caloCluster()->getCellLinks() : nullptr;
if (cellLinks)
{
for (const CaloCell *cell : *cellLinks)
......
......@@ -47,7 +47,7 @@ StatusCode DerivationFramework::JetCaloClusterThinning::initialize()
ATH_MSG_VERBOSE("initialize() ...");
ATH_CHECK( m_TopoClSGKey.initialize (m_streamName) );
ATH_MSG_INFO("Using " << m_TopoClSGKey.key() << "as the source collection for topo calo clusters");
if (m_sgKey=="") {
if (m_sgKey.empty()) {
ATH_MSG_FATAL("No jet collection provided for thinning.");
return StatusCode::FAILURE;
} else { ATH_MSG_INFO("Calo clusters associated with objects in " << m_sgKey << " will be retained in this format with the rest being thinned away");}
......@@ -87,7 +87,7 @@ StatusCode DerivationFramework::JetCaloClusterThinning::doThinning() const
m_ntotTopo += nTopoClusters;
// Retrieve e-gamma container
const xAOD::JetContainer* importedJet(0);
const xAOD::JetContainer* importedJet(nullptr);
if (evtStore()->retrieve(importedJet,m_sgKey).isFailure()) {
ATH_MSG_ERROR("No jet collection with name " << m_sgKey << " found in StoreGate!");
return StatusCode::FAILURE;
......@@ -111,7 +111,7 @@ StatusCode DerivationFramework::JetCaloClusterThinning::doThinning() const
}
// Set elements in the mask to true if there is a corresponding ElementLink from a reconstructed object
if (m_selectionString=="") { // check all objects as user didn't provide a selection string
if (m_selectionString.empty()) { // check all objects as user didn't provide a selection string
setJetClustersMask(topomask, importedJet, importedTopoCaloCluster.cptr());
} else {
setJetClustersMask(topomask, jetToCheck, importedTopoCaloCluster.cptr());
......@@ -154,7 +154,7 @@ void DerivationFramework::JetCaloClusterThinning::setJetClustersMask(std::vector
void DerivationFramework::JetCaloClusterThinning::select(const xAOD::Jet* particle,
float coneSize,
const xAOD::CaloClusterContainer* clusters,
std::vector<bool> &mask) const {
std::vector<bool> &mask) {
xAOD::JetConstituentVector vec = particle->getConstituents();
xAOD::JetConstituentVector::iterator it = vec.begin();
xAOD::JetConstituentVector::iterator itE = vec.end();
......
......@@ -42,16 +42,16 @@ StatusCode DerivationFramework::MaxCellDecorator::initialize(){
CHECK( m_cablingKey.initialize() );
if(m_SGKey_photons == "" && m_SGKey_electrons == "" ){
if(m_SGKey_photons.empty() && m_SGKey_electrons.empty() ){
ATH_MSG_FATAL("No e-gamma collection provided. At least one egamma collection (photon/electrons) must be provided!");
return StatusCode::FAILURE;
}
if (m_SGKey_electrons!="") {
if (!m_SGKey_electrons.empty()) {
ATH_MSG_INFO("Using "<< m_SGKey_electrons <<" for electrons");
}
if (m_SGKey_photons!="") {
if (!m_SGKey_photons.empty()) {
ATH_MSG_INFO("Using "<< m_SGKey_photons <<" for photons");
}
......@@ -65,13 +65,13 @@ StatusCode DerivationFramework::MaxCellDecorator::finalize(){
// The decoration itself
StatusCode DerivationFramework::MaxCellDecorator::addBranches() const{
// Retrieve photon container
const xAOD::EgammaContainer* importedPhotons(0);
if(m_SGKey_photons != ""){
const xAOD::EgammaContainer* importedPhotons(nullptr);
if(!m_SGKey_photons.empty()){
if (evtStore()->retrieve(importedPhotons,m_SGKey_photons).isFailure()) {
ATH_MSG_ERROR("No e-gamma collection with name " << m_SGKey_photons << " found in StoreGate!");
return StatusCode::FAILURE;
}
for (auto photon : *importedPhotons) {
for (const auto *photon : *importedPhotons) {
if(photon->author() != 128) {
decorateObject(photon);
}
......@@ -79,13 +79,13 @@ StatusCode DerivationFramework::MaxCellDecorator::addBranches() const{
}
// Retrieve electron container
const xAOD::EgammaContainer* importedElectrons(0);
if(m_SGKey_electrons != ""){
const xAOD::EgammaContainer* importedElectrons(nullptr);
if(!m_SGKey_electrons.empty()){
if (evtStore()->retrieve(importedElectrons,m_SGKey_electrons).isFailure()) {
ATH_MSG_ERROR("No e-gamma collection with name " << m_SGKey_electrons << " found in StoreGate!");
return StatusCode::FAILURE;
}
for (auto electron : *importedElectrons) {
for (const auto *electron : *importedElectrons) {
decorateObject(electron);
}
}
......@@ -119,7 +119,7 @@ void DerivationFramework::MaxCellDecorator::decorateObject(const xAOD::Egamma*&
float emax = -9999.;
const CaloCell* cell_maxE = 0;
const CaloCell* cell_maxE = nullptr;
for( const CaloCell* cell : *cluster ){
int sampling = cell->caloDDE()->getSampling();
if( sampling== CaloCell_ID::EMB2 || sampling== CaloCell_ID::EME2 ){
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
......@@ -46,7 +46,7 @@ namespace DerivationFramework {
ServiceHandle<IIncidentSvc> m_incidentSvc;
std::map<std::string,unsigned int> m_algNames;
std::map<std::pair<std::string,std::string> , unsigned int> m_overlapMap;
unsigned int m_totalEvents;
unsigned int m_totalEvents = 0U;
//m_algCounts,
//m_overlapCounts,
......
......@@ -31,14 +31,14 @@ StatusCode GoodRunsListFilterAlgorithm::initialize() {
CHECK( AAH::setProperty( m_brlTool , "GoodRunsListVec", m_blackRunsListVec ) );
//determine the maxGRLRunNumber ...
if(m_goodRunsListVec.size()) {
if(!m_goodRunsListVec.empty()) {
CHECK( m_grlTool.retrieve() ); //will check the files are ok ..
Root::TGoodRunsListReader reader;
for(auto& f : m_goodRunsListVec) {
std::string path = PathResolverFindXMLFile( f );
if(path=="") path = PathResolverFindCalibFile( f );
if(path=="") continue; //skip this file .. should never happen
if(path.empty()) path = PathResolverFindCalibFile( f );
if(path.empty()) continue; //skip this file .. should never happen
reader.AddXMLFile( path );
}
......@@ -74,17 +74,17 @@ StatusCode GoodRunsListFilterAlgorithm::execute() {
//will be passed (unless it fails the BRL requirement)
const xAOD::EventInfo* ei = 0;
const xAOD::EventInfo* ei = nullptr;
CHECK( evtStore()->retrieve( ei, "EventInfo" ) );
bool decision(true);
if( ei->eventType( xAOD::EventInfo::IS_SIMULATION ) ) {
decision=true; //pass for MC
} else if( m_blackRunsListVec.size()>0 && m_brlTool->passRunLB( *ei ) ) {
} else if( !m_blackRunsListVec.empty() && m_brlTool->passRunLB( *ei ) ) {
decision=false; //fail because in black list
} else if(ei->runNumber() > m_maxGRLRunNumber) {
decision=true; //pass because run number is past end of GRL
} else if( m_goodRunsListVec.size()==0 || m_grlTool->passRunLB( *ei ) ) {
} else if( m_goodRunsListVec.empty() || m_grlTool->passRunLB( *ei ) ) {
decision=true; //pass: either there is no GRL given, or the event is in the GRL
} else {
decision=false; //event is not in the GRL
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
/////////////////////////////////////////////////////////////////
......@@ -53,15 +53,15 @@ namespace DerivationFramework {
CHECK( m_trigDec.retrieve() );
CHECK( m_matchTool.retrieve() );
if (m_photonContainerName=="") {
if (m_photonContainerName.empty()) {
ATH_MSG_ERROR("No Photons collection provided for TriggerMatchingAugmentation!");
return StatusCode::FAILURE;
}
if (m_electronContainerName=="") {
if (m_electronContainerName.empty()) {
ATH_MSG_ERROR("No Electrons collection provided for TriggerMatchingAugmentation!");
return StatusCode::FAILURE;
}
if (m_muonContainerName=="") {
if (m_muonContainerName.empty()) {
ATH_MSG_ERROR("No Muon collection provided for TriggerMatchingAugmentation!");
return StatusCode::FAILURE;
}
......@@ -112,17 +112,17 @@ namespace DerivationFramework {
{
// Retrieve the containers to decorate
const xAOD::PhotonContainer* photons = 0;
const xAOD::PhotonContainer* photons = nullptr;
if (evtStore()->retrieve(photons, m_photonContainerName).isFailure()) {
ATH_MSG_WARNING("Couldn't retrieve " << m_photonContainerName << " from TEvent");
return StatusCode::FAILURE;
}
const xAOD::MuonContainer* muons = 0;
const xAOD::MuonContainer* muons = nullptr;
if (evtStore()->retrieve(muons, m_muonContainerName).isFailure()) {
ATH_MSG_WARNING("Couldn't retrieve " << m_muonContainerName << " from TEvent");
return StatusCode::FAILURE;
}
const xAOD::ElectronContainer* electrons = 0;
const xAOD::ElectronContainer* electrons = nullptr;
if (evtStore()->retrieve(electrons, m_electronContainerName).isFailure()) {
ATH_MSG_WARNING("Couldn't retrieve " << m_electronContainerName << " from TEvent");
return StatusCode::FAILURE;
......@@ -179,7 +179,7 @@ namespace DerivationFramework {
const decor_t& decor) const {
std::vector<const xAOD::IParticle*> particles;
bool fired=m_trigDec->isPassed( trigger );
for(auto p : *collection) {
for(const auto *p : *collection) {
// Avoid repeating if decoration was already attached
if(!decor.isAvailable(*p)) {
if(fired){
......@@ -202,8 +202,8 @@ namespace DerivationFramework {
std::vector<const xAOD::IParticle*> particles;
bool matched=false;
bool fired=m_trigDec->isPassed( trigger );
for(auto p1 : *collection1) {
for(auto p2: *collection2){
for(const auto *p1 : *collection1) {
for(const auto *p2: *collection2){
// Avoid repeating if decoration was already attached
if(!decor.isAvailable(*p1) && !decor.isAvailable(*p2)) {
if (fired){
......
......@@ -45,10 +45,10 @@ namespace DerivationFramework {
private:
void fillMatchDetails( std::vector<float>& trkMatchTrk, const xAOD::TrackParticle* tp, const xAOD::CaloCluster* cluster) const;
int nSiHits( const xAOD::TrackParticle * tp ) const;
static int nSiHits( const xAOD::TrackParticle * tp ) ;
void fillTrackDetails(const xAOD::Electron* el, bool isMC) const;
void fillVertexDetails(const xAOD::Electron* el) const;
void fillClusterDetails(const xAOD::Electron* el) const;
static void fillClusterDetails(const xAOD::Electron* el) ;
void fillTruthDetails( std::vector<float>& trkMatchTrk, const xAOD::TrackParticle* tp, const xAOD::CaloCluster* cluster) const;
ToolHandle<IEMExtrapolationTools> m_emExtrapolationTool;
......
......@@ -144,9 +144,9 @@ namespace DerivationFramework {
bool MuonPreselect(const xAOD::Muon *mu) const;
void CalculateInvariantMass() const;
void GetDiphotonVertex() const;
double CorrectedEnergy(const xAOD::Photon *ph) const;
static double CorrectedEnergy(const xAOD::Photon *ph) ;
double CorrectedEta(const xAOD::Photon *ph) const;
double ReturnRZ_1stSampling_cscopt2(double eta1) const;
static double ReturnRZ_1stSampling_cscopt2(double eta1) ;
///////////////
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
......@@ -80,7 +80,7 @@ namespace DerivationFramework {
unsigned int m_nElectrons;
unsigned int m_nMuons;
unsigned int m_nJets;
unsigned int m_nMergedJets[NUMBER_OF_MERGED_JET_TYPES];
unsigned int m_nMergedJets[NUMBER_OF_MERGED_JET_TYPES]{};
unsigned int m_nPhotons;
unsigned int m_nTracks;
......@@ -105,7 +105,7 @@ namespace DerivationFramework {
double m_tightElectronEtCut;
double m_tightMuonPtCut;
double m_jetPtCut;
double m_mergedJetPtCut[NUMBER_OF_MERGED_JET_TYPES];
double m_mergedJetPtCut[NUMBER_OF_MERGED_JET_TYPES]{};
double m_photonPtCut;
double m_trackPtCut;
......@@ -113,7 +113,7 @@ namespace DerivationFramework {
double m_muonEtaCut;
double m_caloMuonEtaCut;
double m_jetEtaCut;
double m_mergedJetEtaCut[NUMBER_OF_MERGED_JET_TYPES];
double m_mergedJetEtaCut[NUMBER_OF_MERGED_JET_TYPES]{};
double m_photonEtaCut;
double m_invariantMassCut;
......@@ -157,10 +157,10 @@ namespace DerivationFramework {
bool checkPHI() const;
TLorentzVector electronFourMomentum(const xAOD::Electron *el) const;
TLorentzVector muonFourMomentum(const xAOD::Muon *mu) const;
static TLorentzVector muonFourMomentum(const xAOD::Muon *mu) ;
TLorentzVector jetFourMomentum(const xAOD::Jet *jet) const;
double getDeltaR(const double eta1, const double phi1, const double eta2, const double phi2) const;
static double getDeltaR(const double eta1, const double phi1, const double eta2, const double phi2) ;
static const double s_MZ;
static const double s_MKplus;
......
......@@ -59,14 +59,14 @@ namespace DerivationFramework {
bool fileExists(TString fileName) { return gSystem->AccessPathName(fileName) == false; }
// Converts a string to a vector of integers
std::vector<int> vectorize(TString string, TString sep=" ") const;
static std::vector<int> vectorize(const TString& string, const TString& sep=" ") ;
// Method to access the production mode for a given MC channel number
HTXS::HiggsProdMode getHiggsProductionMode(uint32_t mc_channel_number,HTXS::tH_type &th_type) const;
// Methods for decoration of four vectors
void decorateFourVec ( const xAOD::EventInfo *eventInfo, TString prefix, const TLorentzVector p4 ) const;
void decorateFourVecs ( const xAOD::EventInfo *eventInfo, TString prefix, const std::vector<TLorentzVector> p4s ) const;
static void decorateFourVec ( const xAOD::EventInfo *eventInfo, const TString& prefix, const TLorentzVector& p4 ) ;
static void decorateFourVecs ( const xAOD::EventInfo *eventInfo, const TString& prefix, const std::vector<TLorentzVector>& p4s ) ;
}; /// class
......
......@@ -69,7 +69,7 @@ StatusCode DerivationFramework::DiphotonVertexDecorator::addBranches() const
SG::ReadHandle<xAOD::VertexContainer> PV (m_primaryVertexKey);
if (PV->size() && PV->at(0)) {
if (!PV->empty() && PV->at(0)) {
ATH_MSG_DEBUG( "Default PV " << PV->at(0) << ", type = " << PV->at(0)->vertexType() << " , z = " << PV->at(0)->z() );
}
......@@ -101,12 +101,12 @@ StatusCode DerivationFramework::DiphotonVertexDecorator::addBranches() const
const xAOD::Vertex *newPV = nullptr;
SG::ReadHandle<xAOD::FlowElementContainer> FEHandle(m_FEContainerHandleKey);