14 #include "G4HCofThisEvent.hh" 15 #include "CLHEP/Units/GlobalSystemOfUnits.h" 16 #include "CLHEP/Units/GlobalPhysicalConstants.h" 27 produces<std::vector<math::XYZTLorentzVector> >(
"SecondaryMomenta");
28 produces<std::vector<int> >(
"SecondaryParticles");
30 edm::LogInfo(
"CheckSecondary") <<
"Instantiate StoreSecondary to store " 31 <<
"secondaries after 1st hadronic inelastic" 41 std::unique_ptr<std::vector<math::XYZTLorentzVector> > secMom(
new std::vector<math::XYZTLorentzVector>);
45 std::unique_ptr<std::vector<int> > secNumber(
new std::vector<int>);
49 LogDebug(
"CheckSecondary") <<
"StoreSecondary:: Event " << e.
id() <<
" with " 50 <<
nsecs.size() <<
" hadronic collisions with " 51 <<
"secondaries produced in each step";
52 for (
unsigned int i= 0;
i <
nsecs.size();
i++) {
56 <<
" produced in the first interactions:";
70 const G4Track * thTk = (*trk)();
72 if (
nsecs.empty() && thTk->GetParentID() <= 0)
storeIt =
true;
93 int sec = (
int)(tracks.size());
95 procs.push_back(name);
97 for (
int i=0;
i<sec;
i++)
T getParameter(std::string const &) const
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)
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
void initTrack(const G4Track *trk)
TreatSecondary * treatSecondary
void produce(edm::Event &, const edm::EventSetup &) override