12 #include "CLHEP/Units/GlobalPhysicalConstants.h"
13 #include "CLHEP/Units/GlobalSystemOfUnits.h"
14 #include "G4HCofThisEvent.hh"
26 produces<std::vector<math::XYZTLorentzVector>>(
"SecondaryMomenta");
27 produces<std::vector<int>>(
"SecondaryParticles");
29 edm::LogInfo(
"CheckSecondary") <<
"Instantiate StoreSecondary to store "
30 <<
"secondaries after 1st hadronic inelastic"
37 std::unique_ptr<std::vector<math::XYZTLorentzVector>> secMom(
new std::vector<math::XYZTLorentzVector>);
41 std::unique_ptr<std::vector<int>> secNumber(
new std::vector<int>);
45 LogDebug(
"CheckSecondary") <<
"StoreSecondary:: Event " << e.
id() <<
" with " <<
nsecs.size()
46 <<
" hadronic collisions with "
47 <<
"secondaries produced in each step";
48 for (
unsigned int i = 0;
i <
nsecs.size();
i++) {
52 <<
" produced in the first interactions:";
64 const G4Track *thTk = (*trk)();
66 if (
nsecs.empty() && thTk->GetParentID() <= 0)
83 int sec = (int)(tracks.size());
85 procs.push_back(name);
87 for (
int i = 0;
i < sec;
i++)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
~StoreSecondary() override
void update(const BeginOfEvent *evt) override
This routine will be called when the appropriate signal arrives.
StoreSecondary(const edm::ParameterSet &p)
auto const & tracks
cannot be loose
std::vector< math::XYZTLorentzVector > tracks(const G4Step *step, std::string &procName, int &procID, bool &intr, double &deltaE, std::vector< int > &charges)
std::vector< math::XYZTLorentzVector > secondaries
std::vector< std::string > procs
Log< level::Info, false > LogInfo
T getParameter(std::string const &) const
void initTrack(const G4Track *trk)
TreatSecondary * treatSecondary
void produce(edm::Event &, const edm::EventSetup &) override