Skip to content
Snippets Groups Projects
Commit 509eabd3 authored by John Chapman's avatar John Chapman
Browse files

Migrate Frozen Showers packages to use (Const)GenParticlePtr

parent 996c1537
No related branches found
No related tags found
No related merge requests found
Showing
with 26 additions and 24 deletions
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#include "LArFastShower.h"
......@@ -9,6 +9,8 @@
#include "LArG4Code/EnergySpot.h"
#include "AtlasHepMC/GenEvent.h"
#include "AtlasHepMC/GenParticle.h"
#include "AtlasHepMC/GenVertex.h"
#include "AtlasHepMC/IO_GenEvent.h"
#include <stdexcept>
......@@ -339,11 +341,11 @@ HepMC::GenEvent * LArFastShower::GetGenEvent(const G4FastTrack &fastTrack)
// new event. Signal processing = 0, event number "next"
HepMC::GenEvent* ge = new HepMC::GenEvent( 0, ++m_eventNum);
// vertex. Position of the shower, time = 0
HepMC::GenVertex* gv = new HepMC::GenVertex(
HepMC::GenVertexPtr gv = HepMC::newGenVertexPtr(
HepMC::FourVector(showerPos.x(), showerPos.y(), showerPos.z(), 0) );
ge->add_vertex(gv);
// particle. FourVector of the shower, pdgcode, status = 1
HepMC::GenParticle* gp = new HepMC::GenParticle(
HepMC::GenParticlePtr gp = HepMC::newGenParticlePtr(
HepMC::FourVector(showerMom.x(), showerMom.y(), showerMom.z(), energy),
pdgcode, 1 );
gv->add_particle_out(gp);
......
......@@ -64,7 +64,7 @@ namespace ShowerLib {
//! get average lateral spread of the showers for the given energy
virtual double getContainmentR(const G4Track* track) const;
//! store shower in the library
virtual bool storeShower(const HepMC::GenParticle* genParticle,const Shower* shower);
virtual bool storeShower(HepMC::ConstGenParticlePtr genParticle,const Shower* shower);
//! write library to ROOT file
virtual bool writeToROOT(TFile* dest);
......
......@@ -65,7 +65,7 @@ namespace ShowerLib {
//! get average lateral spread of the showers for the given energy
virtual double getContainmentR(const G4Track* track) const;
//! store shower in the library
virtual bool storeShower(const HepMC::GenParticle* genParticle,const Shower* shower);
virtual bool storeShower(HepMC::ConstGenParticlePtr genParticle,const Shower* shower);
//! write library to ROOT file
virtual bool writeToROOT(TFile* dest);
......
......@@ -67,7 +67,7 @@ namespace ShowerLib {
//! get average lateral spread of the showers for the given energy
virtual double getContainmentR(const G4Track* track) const;
//! store shower in the library
virtual bool storeShower(const HepMC::GenParticle* genParticle,const Shower* shower);
virtual bool storeShower(HepMC::ConstGenParticlePtr genParticle,const Shower* shower);
//! write library to ROOT file
virtual bool writeToROOT(TFile* dest);
......
......@@ -51,7 +51,7 @@ namespace ShowerLib {
//! get average lateral spread of the showers for the given energy
virtual double getContainmentR(const G4Track* track) const = 0;
//! store shower in the library
virtual bool storeShower(const HepMC::GenParticle* genParticle,const Shower* shower) = 0;
virtual bool storeShower(HepMC::ConstGenParticlePtr genParticle,const Shower* shower) = 0;
//! write library to ROOT file
virtual bool writeToROOT(TFile* dest) = 0;
......
......@@ -52,7 +52,7 @@ namespace ShowerLib {
//! get average lateral spread of the showers for the given energy
virtual double getContainmentR(const G4Track* track) const;
//! store shower in the library
virtual bool storeShower(const HepMC::GenParticle* genParticle,const Shower* shower);
virtual bool storeShower(HepMC::ConstGenParticlePtr genParticle,const Shower* shower);
//! write library to ROOT file
virtual bool writeToROOT(TFile* dest);
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
// this header file
#include "LArG4ShowerLib/EtaEnergyShowerLib.h"
#include <HepMC/GenParticle.h>
#include <HepMC/GenVertex.h>
#include "AtlasHepMC/GenParticle.h"
#include "AtlasHepMC/GenVertex.h"
#include <sstream>
#include <fstream>
......@@ -356,7 +356,7 @@ namespace ShowerLib {
return rezR/actualNumFS; //average Z size
}
bool EtaEnergyShowerLib::storeShower(const HepMC::GenParticle* genParticle, const Shower* shower)
bool EtaEnergyShowerLib::storeShower(HepMC::ConstGenParticlePtr genParticle, const Shower* shower)
{
if (m_filled) {
std::cout << "ERROR: filled" << std::endl;
......
......@@ -6,8 +6,8 @@
// this header file
#include "LArG4ShowerLib/FCALDistEnergyShowerLib.h"
#include <HepMC/GenParticle.h>
#include <HepMC/GenVertex.h>
#include "AtlasHepMC/GenParticle.h"
#include "AtlasHepMC/GenVertex.h"
#include <sstream>
#include <fstream>
......@@ -439,7 +439,7 @@ namespace ShowerLib {
return rezR/actualNumFS; //average Z size
}
bool FCALDistEnergyShowerLib::storeShower(const HepMC::GenParticle* genParticle, const Shower* shower)
bool FCALDistEnergyShowerLib::storeShower(HepMC::ConstGenParticlePtr genParticle, const Shower* shower)
{
if (m_filled) {
std::cout << "ERROR: filled" << std::endl;
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
// this header file
#include "LArG4ShowerLib/FCALDistEtaEnergyShowerLib.h"
#include <HepMC/GenParticle.h>
#include <HepMC/GenVertex.h>
#include "AtlasHepMC/GenParticle.h"
#include "AtlasHepMC/GenVertex.h"
#include <sstream>
#include <fstream>
......@@ -548,7 +548,7 @@ namespace ShowerLib {
return rezR/actualNumFS; //average Z size
}
bool FCALDistEtaEnergyShowerLib::storeShower(const HepMC::GenParticle* genParticle, const Shower* shower)
bool FCALDistEtaEnergyShowerLib::storeShower(HepMC::ConstGenParticlePtr genParticle, const Shower* shower)
{
if (m_filled) {
std::cout << "ERROR: filled" << std::endl;
......
......@@ -7,7 +7,7 @@
#include "LArG4ShowerLib/IShowerLib.h"
#include "TTree.h"
#include "G4Track.hh"
#include <HepMC/GenParticle.h>
#include "AtlasHepMC/GenParticle.h"
#include <sstream>
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
......@@ -7,8 +7,8 @@
#include "LArG4ShowerLib/TestShowerLib.h"
// CLHEP incldues
#include <HepMC/GenParticle.h>
#include <HepMC/GenVertex.h>
#include "AtlasHepMC/GenParticle.h"
#include "AtlasHepMC/GenVertex.h"
//#include <algorithm>
//#include <functional>
......@@ -153,7 +153,7 @@ namespace ShowerLib {
return 0.0;
}
bool TestShowerLib::storeShower(const HepMC::GenParticle* genParticle, const Shower* shower)
bool TestShowerLib::storeShower(HepMC::ConstGenParticlePtr genParticle, const Shower* shower)
{
if (m_filled) {
std::cout << "ERROR: filled" << std::endl;
......
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