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>);
43 e.put(
std::move(secNumber),
"SecondaryParticles");
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)
87 for (
int i = 0;
i <
sec;
i++)
~StoreSecondary() override
void update(const BeginOfEvent *evt) override
This routine will be called when the appropriate signal arrives.
StoreSecondary(const edm::ParameterSet &p)
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
void initTrack(const G4Track *trk)
TreatSecondary * treatSecondary
void produce(edm::Event &, const edm::EventSetup &) override