13 #include "G4VProcess.hh"
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");
31 edm::LogInfo(
"CheckSecondary") <<
"Instantiate StoreSecondary to store "
32 <<
"secondaries after 1st hadronic inelastic"
42 std::auto_ptr<std::vector<math::XYZTLorentzVector> > secMom(
new std::vector<math::XYZTLorentzVector>);
44 e.
put(secMom,
"SecondaryMomenta");
46 std::auto_ptr<std::vector<int> > secNumber(
new std::vector<int>);
48 e.
put(secNumber,
"SecondaryParticles");
56 LogDebug(
"CheckSecondary") <<
"StoreSecondary:: Event " << e.
id() <<
" with "
57 <<
nsecs.size() <<
" hadronic collisions with "
58 <<
"secondaries produced in each step";
59 for (
unsigned int i= 0;
i <
nsecs.size();
i++)
62 <<
" produced in the first interactions:";
76 const G4Track * thTk = (*trk)();
78 if (
nsecs.size() == 0 && thTk->GetParentID() <= 0)
storeIt =
true;
99 int sec = (int)(tracks.size());
100 nsecs.push_back(sec);
101 procs.push_back(name);
103 for (
int i=0;
i<sec;
i++)
T getParameter(std::string const &) const
virtual ~StoreSecondary()
void update(const BeginOfEvent *evt)
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
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::vector< std::string > procs
void produce(edm::Event &, const edm::EventSetup &)
void initTrack(const G4Track *trk)
TreatSecondary * treatSecondary