42 if(nProducts!=1)
throw G4HadronicException(__FILE__, __LINE__,
"More than one product in SampleOne");
47 while(temp == 0) temp = theProducts[i++].
Sample(anEnergy);
50 if(temp->size()!=1)
throw G4HadronicException(__FILE__, __LINE__,
"SampleOne: Yield not correct");
53 result = temp->operator[](0);
71 if(frameFlag==2||frameFlag==3)
81 G4double cmsMom = std::sqrt(the3CMS*the3CMS);
82 G4double sqrts = std::sqrt((totE-cmsMom)*(totE+cmsMom));
86 aNeutron.
Lorentz(theNeutron, theCMS);
101 for(i=0; i<nProducts; i++)
103 it = theProducts[i].
Sample(anEnergy);
107 theTotalMeanEnergy += aMeanEnergy;
111 theTotalMeanEnergy = anEnergy/nProducts+theProducts[i].
GetQValue();
115 for(
unsigned int ii=0; ii<it->size(); ii++)
118 it->operator[](ii)->GetTotalEnergy());
120 it->operator[](ii)->SetMomentum(pTmp1.
vect());
121 it->operator[](ii)->SetTotalEnergy(pTmp1.
e());
124 it->operator[](ii)->Lorentz(*(it->operator[](ii)), -1.*theTarget);
126 else if(frameFlag==2)
129 cout <<
"G4NeutronHPEnAngCorrelation: "<<
130 it->at(ii)->GetTotalEnergy()<<
" "<<
131 it->at(ii)->GetMomentum()<<
G4endl;
133 it->operator[](ii)->Lorentz(*(it->operator[](ii)), -1.*theCMS);
136 else if(frameFlag==3)
138 if ( theProducts[i].GetMassCode() > 4 )
141 it->operator[](ii)->Lorentz(*(it->operator[](ii)), -1.*theTarget);
146 it->operator[](ii)->Lorentz(*(it->operator[](ii)), -1.*theCMS);
151 throw G4HadronicException(__FILE__, __LINE__,
"G4NeutronHPEnAngCorrelation::Sample: The frame of the finalstate is not specified");
153 result->push_back(it->operator[](ii));
std::vector< G4ReactionProduct * > G4ReactionProductVector
HepLorentzRotation & rotateY(double delta)
HepLorentzRotation & rotateZ(double delta)
HepLorentzRotation inverse() const
G4ReactionProduct * SampleOne(G4double anEnergy)
G4ReactionProductVector * Sample(G4double anEnergy)
G4double MeanEnergyOfThisInteraction()
G4ReactionProductVector * Sample(G4double anEnergy)
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetTotalEnergy(const G4double en)
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
G4ThreeVector GetMomentum() const
void Lorentz(const G4ReactionProduct &p1, const G4ReactionProduct &p2)
void SetMass(const G4double mas)