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::auto_ptr<std::vector<math::XYZTLorentzVector> > secMom(
new std::vector<math::XYZTLorentzVector>);
43 e.
put(secMom,
"SecondaryMomenta");
45 std::auto_ptr<std::vector<int> > secNumber(
new std::vector<int>);
47 e.
put(secNumber,
"SecondaryParticles");
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.size() == 0 && 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
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