diff --git a/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/ICandidateSearch.h b/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/ICandidateSearch.h index e30e0c343dccd2e92352236ead62c8c932c2bdfc..779a425ed0d5a48a1c7fbfab23d820ac43f8936e 100644 --- a/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/ICandidateSearch.h +++ b/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/ICandidateSearch.h @@ -11,7 +11,7 @@ static const InterfaceID IID_ICandidateSearch("ICandidateSearch", 1, 0); class ICandidateSearch : virtual public IAlgTool { public: - virtual StatusCode performSearch(xAOD::VertexContainer*& , xAOD::VertexAuxContainer*& ) = 0; + virtual StatusCode performSearch(xAOD::VertexContainer*& , xAOD::VertexAuxContainer*& ) const = 0; /** AlgTool interface methods */ static const InterfaceID& interfaceID() { return IID_ICandidateSearch; } }; diff --git a/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/JpsiFinder.h b/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/JpsiFinder.h index c5f5b1abbe36a89a8598d93a3681ec846c885faa..cc7f6257754516a000eecc53d7c60af1ad3e69fa 100644 --- a/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/JpsiFinder.h +++ b/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/JpsiFinder.h @@ -58,14 +58,13 @@ namespace Analysis { JpsiFinder(const std::string& t, const std::string& n, const IInterface* p); ~JpsiFinder(); virtual StatusCode initialize() override; - virtual StatusCode finalize() override; static const InterfaceID& interfaceID() { return IID_JpsiFinder;} //------------------------------------------------------------------------------------- //Doing Calculation and inline functions - virtual StatusCode performSearch(xAOD::VertexContainer*& vxContainer, xAOD::VertexAuxContainer*& vxAuxContainer) override; + virtual StatusCode performSearch(xAOD::VertexContainer*& vxContainer, xAOD::VertexAuxContainer*& vxAuxContainer) const override; std::vector<JpsiCandidate> getPairs(const std::vector<const xAOD::TrackParticle*>&) const; std::vector<JpsiCandidate> getPairs(const std::vector<const xAOD::Muon*>&) const; std::vector<JpsiCandidate> getPairs2Colls(const std::vector<const xAOD::TrackParticle*>&, const std::vector<const xAOD::Muon*>&, bool) const; @@ -89,7 +88,6 @@ namespace Analysis { bool m_diMuons; double m_trk1M; double m_trk2M; - const HepPDT::ParticleDataTable *m_particleDataTable; double m_thresholdPt; double m_higherPt; double m_trkThresholdPt; diff --git a/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/JpsiFinder_ee.h b/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/JpsiFinder_ee.h index aaca4f83c95898b934007f147781f5b7a128c18c..caee0b2f6b666392103527a11806683e982cdf7f 100644 --- a/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/JpsiFinder_ee.h +++ b/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/JpsiFinder_ee.h @@ -59,18 +59,17 @@ namespace Analysis { JpsiFinder_ee(const std::string& t, const std::string& n, const IInterface* p); ~JpsiFinder_ee(); virtual StatusCode initialize() override; - virtual StatusCode finalize() override; static const InterfaceID& interfaceID() { return IID_JpsiFinder_ee;} //------------------------------------------------------------------------------------- //Doing Calculation and inline functions - virtual StatusCode performSearch(xAOD::VertexContainer*& vxContainer, xAOD::VertexAuxContainer*& vxAuxContainer) override; + virtual StatusCode performSearch(xAOD::VertexContainer*& vxContainer, xAOD::VertexAuxContainer*& vxAuxContainer) const override; std::vector<JpsiEECandidate> getPairs(const std::vector<const xAOD::TrackParticle*>&) const; std::vector<JpsiEECandidate> getPairs(const std::vector<const xAOD::Electron*>&) const; std::vector<JpsiEECandidate> getPairs2Colls(const std::vector<const xAOD::TrackParticle*>&, const std::vector<const xAOD::Electron*>&, bool) const; double getInvariantMass(const JpsiEECandidate&, const std::vector<double>& ) const; - std::vector<JpsiEECandidate> selectCharges(const std::vector<JpsiEECandidate>& , const std::string&); + std::vector<JpsiEECandidate> selectCharges(const std::vector<JpsiEECandidate>& , const std::string&) const; xAOD::Vertex* fit(const std::vector<const xAOD::TrackParticle*>&, const xAOD::TrackParticleContainer* importedTrackCollection) const; bool passesEgammaCuts(const xAOD::Electron*) const; bool isContainedIn(const xAOD::TrackParticle*, const xAOD::TrackParticleContainer*) const; @@ -87,7 +86,6 @@ namespace Analysis { bool m_diElectrons; double m_trk1M; double m_trk2M; - const HepPDT::ParticleDataTable *m_particleDataTable; double m_thresholdPt; double m_higherPt; double m_trkThresholdPt; @@ -108,7 +106,6 @@ namespace Analysis { bool m_egammaCuts; std::string m_elSelection; bool m_doTagAndProbe; - int m_numberOfEventsWithJpsi; }; } // end of namespace #endif diff --git a/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/JpsiPlus1Track.h b/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/JpsiPlus1Track.h index 63f852bb456d2f0cf837769bddb146276556874e..74f9b6c4b5b8d0146dc906b5b3ce67982accb0c3 100644 --- a/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/JpsiPlus1Track.h +++ b/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/JpsiPlus1Track.h @@ -42,7 +42,6 @@ namespace Analysis { JpsiPlus1Track(const std::string& t, const std::string& n, const IInterface* p); ~JpsiPlus1Track(); virtual StatusCode initialize() override; - virtual StatusCode finalize() override; static const InterfaceID& interfaceID() { return IID_JpsiPlus1Track;}; static double getInvariantMass(const std::vector<const xAOD::TrackParticle*> &trk, double mass1, @@ -52,7 +51,7 @@ namespace Analysis { //------------------------------------------------------------------------------------- //Doing Calculation and inline functions - virtual StatusCode performSearch(xAOD::VertexContainer*& , xAOD::VertexAuxContainer*& ) override; + virtual StatusCode performSearch(xAOD::VertexContainer*& , xAOD::VertexAuxContainer*& ) const override; xAOD::Vertex* fit(const std::vector<const xAOD::TrackParticle*>&, const xAOD::TrackParticleContainer*, const xAOD::TrackParticleContainer*) const; //------------------------------------------------------------------------------------- diff --git a/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/JpsiPlus2Tracks.h b/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/JpsiPlus2Tracks.h index 8693590bcaa8f9585efc0880a948fc85732ec732..e297f381ed83762af887eaa4f469414db19b9a6d 100644 --- a/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/JpsiPlus2Tracks.h +++ b/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/JpsiPlus2Tracks.h @@ -47,13 +47,12 @@ namespace Analysis { JpsiPlus2Tracks(const std::string& t, const std::string& n, const IInterface* p); ~JpsiPlus2Tracks(); virtual StatusCode initialize() override; - virtual StatusCode finalize() override; static const InterfaceID& interfaceID() { return IID_JpsiPlus2Tracks;}; //------------------------------------------------------------------------------------- //Doing Calculation and inline functions - virtual StatusCode performSearch(xAOD::VertexContainer*& , xAOD::VertexAuxContainer*& ) override; + virtual StatusCode performSearch(xAOD::VertexContainer*& , xAOD::VertexAuxContainer*& ) const override; static double getInvariantMass(const xAOD::TrackParticle*, double, const xAOD::TrackParticle*, double); static double getInvariantMass(const std::vector<const xAOD::TrackParticle*> &trk, const std::vector<double>&); diff --git a/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/PrimaryVertexRefitter.h b/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/PrimaryVertexRefitter.h index f8070a27ce9b0f1579c51b3874a9c2187a64dc8e..70862611f9027c70629e1c319553726900cf7937 100644 --- a/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/PrimaryVertexRefitter.h +++ b/PhysicsAnalysis/JpsiUpsilonTools/JpsiUpsilonTools/PrimaryVertexRefitter.h @@ -32,7 +32,6 @@ public: PrimaryVertexRefitter(const std::string& t, const std::string& n, const IInterface* p); ~PrimaryVertexRefitter(); StatusCode initialize(); - StatusCode finalize(); static const InterfaceID& interfaceID() { return IID_PrimaryVertexRefitter;}; diff --git a/PhysicsAnalysis/JpsiUpsilonTools/src/JpsiFinder.cxx b/PhysicsAnalysis/JpsiUpsilonTools/src/JpsiFinder.cxx index 0119945131cc23a52a5152094c917b4232d779f9..deef76de197f690597a784d1936eb7070cc6536b 100644 --- a/PhysicsAnalysis/JpsiUpsilonTools/src/JpsiFinder.cxx +++ b/PhysicsAnalysis/JpsiUpsilonTools/src/JpsiFinder.cxx @@ -57,8 +57,8 @@ namespace Analysis { ATH_MSG_ERROR("Could not initialize Particle Properties Service"); return StatusCode::SUCCESS; } else { - m_particleDataTable = partPropSvc->PDT(); - const HepPDT::ParticleData* pd_mu = m_particleDataTable->particle(PDG::mu_minus); + auto particleDataTable = partPropSvc->PDT(); + const HepPDT::ParticleData* pd_mu = particleDataTable->particle(PDG::mu_minus); if (m_diMuons) {m_trk1M = pd_mu->mass(); m_trk2M = pd_mu->mass();} } @@ -98,16 +98,13 @@ namespace Analysis { if (illogicalOptions) return StatusCode::FAILURE;; - ATH_MSG_INFO("Initialize successful"); + ATH_MSG_DEBUG("Initialize successful"); return StatusCode::SUCCESS; } - StatusCode JpsiFinder::finalize() { - return StatusCode::SUCCESS; - - } + JpsiFinder::JpsiFinder(const std::string& t, const std::string& n, const IInterface* p) : AthAlgTool(t,n,p), m_mumu(true), m_mutrk(false), @@ -120,7 +117,6 @@ namespace Analysis { m_diMuons(true), m_trk1M(105.66), m_trk2M(105.66), - m_particleDataTable(0), m_thresholdPt(0.0), m_higherPt(0.0), m_trkThresholdPt(0.0), @@ -177,7 +173,7 @@ namespace Analysis { //------------------------------------------------------------------------------------- // Find the candidates //------------------------------------------------------------------------------------- - StatusCode JpsiFinder::performSearch(xAOD::VertexContainer*& vxContainer, xAOD::VertexAuxContainer*& vxAuxContainer) + StatusCode JpsiFinder::performSearch(xAOD::VertexContainer*& vxContainer, xAOD::VertexAuxContainer*& vxAuxContainer) const { ATH_MSG_DEBUG( "JpsiFinder::performSearch" ); vxContainer = new xAOD::VertexContainer; diff --git a/PhysicsAnalysis/JpsiUpsilonTools/src/JpsiFinder_ee.cxx b/PhysicsAnalysis/JpsiUpsilonTools/src/JpsiFinder_ee.cxx index 556261dbe5034e23bf698079552625ade6be753b..b089b01dca4d7b90d4fb4c2d477258936598766d 100644 --- a/PhysicsAnalysis/JpsiUpsilonTools/src/JpsiFinder_ee.cxx +++ b/PhysicsAnalysis/JpsiUpsilonTools/src/JpsiFinder_ee.cxx @@ -51,8 +51,8 @@ namespace Analysis { ATH_MSG_ERROR("Could not initialize Particle Properties Service"); return StatusCode::FAILURE; } else { - m_particleDataTable = partPropSvc->PDT(); - const HepPDT::ParticleData* pd_el = m_particleDataTable->particle(PDG::e_minus); + auto particleDataTable = partPropSvc->PDT(); + const HepPDT::ParticleData* pd_el = particleDataTable->particle(PDG::e_minus); if (m_diElectrons) {m_trk1M = pd_el->mass(); m_trk2M = pd_el->mass();} } @@ -87,12 +87,7 @@ namespace Analysis { } - StatusCode JpsiFinder_ee::finalize() { - - ATH_MSG_DEBUG("Finalize successful, i ran on " << m_numberOfEventsWithJpsi << " events that had jpis from Bs"); - return StatusCode::SUCCESS; - - } + JpsiFinder_ee::JpsiFinder_ee(const std::string& t, const std::string& n, const IInterface* p) : AthAlgTool(t,n,p), m_elel(true), m_eltrk(false), @@ -103,7 +98,6 @@ namespace Analysis { m_diElectrons(true), m_trk1M(0.511), m_trk2M(0.511), - m_particleDataTable(0), m_thresholdPt(0.0), m_higherPt(0.0), m_trkThresholdPt(0.0), @@ -123,8 +117,7 @@ namespace Analysis { m_vertexEstimator("InDet::VertexPointEstimator"), m_egammaCuts(true), m_elSelection("LHLoose"), - m_doTagAndProbe(false), - m_numberOfEventsWithJpsi(0) + m_doTagAndProbe(false) { declareInterface<JpsiFinder_ee>(this); @@ -167,7 +160,7 @@ namespace Analysis { //------------------------------------------------------------------------------------- - StatusCode JpsiFinder_ee::performSearch(xAOD::VertexContainer*& vxContainer, xAOD::VertexAuxContainer*& vxAuxContainer) + StatusCode JpsiFinder_ee::performSearch(xAOD::VertexContainer*& vxContainer, xAOD::VertexAuxContainer*& vxAuxContainer) const { ATH_MSG_DEBUG( "JpsiFinder_ee::performSearch" ); vxContainer = new xAOD::VertexContainer; @@ -242,7 +235,6 @@ namespace Analysis { if (m_elel) jpsiCandidates = getPairs(theElectronsAfterSelection); if (m_trktrk) jpsiCandidates = getPairs(theIDTracksAfterSelection); if (m_eltrk) jpsiCandidates = getPairs2Colls(theIDTracksAfterSelection,theElectronsAfterSelection,m_doTagAndProbe); - if (jpsiCandidates.size() > 0) m_numberOfEventsWithJpsi++; ATH_MSG_DEBUG("Number of pairs with ee from a B decay: " << jpsiCandidates.size() ); @@ -582,7 +574,7 @@ namespace Analysis { // particles (true for oppositely charged) // --------------------------------------------------------------------------------- - std::vector<JpsiEECandidate> JpsiFinder_ee::selectCharges(const std::vector<JpsiEECandidate> &jpsisIn, const std::string &selection) { + std::vector<JpsiEECandidate> JpsiFinder_ee::selectCharges(const std::vector<JpsiEECandidate> &jpsisIn, const std::string &selection) const { bool opposite(false),same(false),all(false); if (selection=="OPPOSITE") opposite=true; diff --git a/PhysicsAnalysis/JpsiUpsilonTools/src/JpsiPlus1Track.cxx b/PhysicsAnalysis/JpsiUpsilonTools/src/JpsiPlus1Track.cxx index 75fde2d6d5d48a0ba358c310bda18aa810ce08fc..61d763bde11fab905cad52653e108081422b087b 100644 --- a/PhysicsAnalysis/JpsiUpsilonTools/src/JpsiPlus1Track.cxx +++ b/PhysicsAnalysis/JpsiUpsilonTools/src/JpsiPlus1Track.cxx @@ -57,17 +57,13 @@ namespace Analysis { m_useGSFTrack.reset(); for(int i : m_useGSFTrackIndices) m_useGSFTrack.set(i, true); - ATH_MSG_INFO("Initialize successful"); + ATH_MSG_DEBUG("Initialize successful"); return StatusCode::SUCCESS; } - StatusCode JpsiPlus1Track::finalize() { - return StatusCode::SUCCESS; - - } - + JpsiPlus1Track::JpsiPlus1Track(const std::string& t, const std::string& n, const IInterface* p) : AthAlgTool(t,n,p), m_piMassHyp(false), m_kMassHyp(true), @@ -135,7 +131,7 @@ namespace Analysis { //------------------------------------------------------------------------------------- // Find the candidates //------------------------------------------------------------------------------------- - StatusCode JpsiPlus1Track::performSearch(xAOD::VertexContainer*& bContainer, xAOD::VertexAuxContainer*& bAuxContainer) + StatusCode JpsiPlus1Track::performSearch(xAOD::VertexContainer*& bContainer, xAOD::VertexAuxContainer*& bAuxContainer) const { ATH_MSG_DEBUG( "JpsiPlus1Track::performSearch" ); bContainer = new xAOD::VertexContainer; diff --git a/PhysicsAnalysis/JpsiUpsilonTools/src/JpsiPlus2Tracks.cxx b/PhysicsAnalysis/JpsiUpsilonTools/src/JpsiPlus2Tracks.cxx index 4f4a24d89b620fc9210cfd68e30b7fbcbbad07cd..c3ec88a7bda2b2d6becc437eb6117d9333153531 100644 --- a/PhysicsAnalysis/JpsiUpsilonTools/src/JpsiPlus2Tracks.cxx +++ b/PhysicsAnalysis/JpsiUpsilonTools/src/JpsiPlus2Tracks.cxx @@ -78,17 +78,12 @@ namespace Analysis { m_useGSFTrack.reset(); for(int i : m_useGSFTrackIndices) m_useGSFTrack.set(i, true); - ATH_MSG_INFO("Initialize successful"); + ATH_MSG_DEBUG("Initialize successful"); return StatusCode::SUCCESS; } - StatusCode JpsiPlus2Tracks::finalize() { - return StatusCode::SUCCESS; - - } - JpsiPlus2Tracks::JpsiPlus2Tracks(const std::string& t, const std::string& n, const IInterface* p) : AthAlgTool(t,n,p), m_pipiMassHyp(true), m_kkMassHyp(true), @@ -180,7 +175,7 @@ namespace Analysis { //------------------------------------------------------------------------------------- // Find the candidates //------------------------------------------------------------------------------------- - StatusCode JpsiPlus2Tracks::performSearch(xAOD::VertexContainer*& bContainer, xAOD::VertexAuxContainer*& bAuxContainer) + StatusCode JpsiPlus2Tracks::performSearch(xAOD::VertexContainer*& bContainer, xAOD::VertexAuxContainer*& bAuxContainer) const { ATH_MSG_DEBUG( "JpsiPlus2Tracks::performSearch" ); bContainer = new xAOD::VertexContainer; diff --git a/PhysicsAnalysis/JpsiUpsilonTools/src/PrimaryVertexRefitter.cxx b/PhysicsAnalysis/JpsiUpsilonTools/src/PrimaryVertexRefitter.cxx index 0775049c125e2b84b47801f9fa055c756e4e18b0..5eb5a15973774056826067ccfd72950ff7bca67a 100644 --- a/PhysicsAnalysis/JpsiUpsilonTools/src/PrimaryVertexRefitter.cxx +++ b/PhysicsAnalysis/JpsiUpsilonTools/src/PrimaryVertexRefitter.cxx @@ -23,19 +23,12 @@ StatusCode PrimaryVertexRefitter::initialize() { CHECK( m_trackToVertexIPEstimator.retrieve() ); - ATH_MSG_INFO("Initialize successful"); + ATH_MSG_DEBUG("Initialize successful"); return StatusCode::SUCCESS; } -StatusCode PrimaryVertexRefitter::finalize() { - - ATH_MSG_INFO("Finalize successful"); - return StatusCode::SUCCESS; - -} - PrimaryVertexRefitter::PrimaryVertexRefitter(const std::string& t, const std::string& n, const IInterface* p) : AthAlgTool(t,n,p), m_ntrk_min(2), m_trackToVertexIPEstimator("Trk::TrackToVertexIPEstimator")