31 if(ntraj>10)ntraj = 10;
32 for(
int itraj=0;itraj<(ntraj-1);itraj++){
34 incP[0] = nu->
pprodpx[itraj+1]/1000.;
35 incP[1] = nu->
pprodpy[itraj+1]/1000.;
36 incP[2] = nu->
pprodpz[itraj+1]/1000.;
38 Int_t itraj_prod = itraj + 1;
39 Int_t pdg_prod = nu->
pdg[itraj_prod];
50 for(
int ifast = itraj_prod + 1; ifast < (ntraj-1); ifast++ ){
51 pdg_prod = nu->
pdg[ifast];
53 pdg_prod = nu->
pdg[itraj_prod];
58 prodP[0] = nu->
startpx[itraj_prod]/1000.;
59 prodP[1] = nu->
startpy[itraj_prod]/1000.;
60 prodP[2] = nu->
startpz[itraj_prod]/1000.;
63 vtx[0]=nu->
startx[itraj_prod];
64 vtx[1]=nu->
starty[itraj_prod];
65 vtx[2]=nu->
startz[itraj_prod];
93 tarP[0]=nu->tgtexit.tpx;
94 tarP[1]=nu->tgtexit.tpy;
95 tarP[2]=nu->tgtexit.tpz;
97 tarV[0]=nu->tgtexit.tvx;
98 tarV[1]=nu->tgtexit.tvy;
99 tarV[2]=nu->tgtexit.tvz;
107 Int_t ntraj = nu->ancestor.size();
108 for(
int itraj=0;itraj<(ntraj-1);itraj++){
110 int pdg_inc=nu->ancestor[itraj].pdg;
112 incP[0]=0.0;incP[1]=0.0;incP[2]=0.0;
131 if( nu->ancestor[itraj].pprodpz != 0){
132 incP[0] = nu->ancestor[itraj].pprodpx;
133 incP[1] = nu->ancestor[itraj].pprodpy;
134 incP[2] = nu->ancestor[itraj].pprodpz;
138 incP[0]=nu->ancestor[itraj].stoppx;
139 incP[1]=nu->ancestor[itraj].stoppy;
140 incP[2]=nu->ancestor[itraj].stoppz;
142 Int_t itraj_prod = itraj + 1;
143 Int_t pdg_prod = nu->ancestor[itraj_prod].pdg;
155 for(
int ifast = itraj_prod + 1; ifast < (ntraj-1); ifast++ ){
158 pdg_prod = nu->ancestor[itraj_prod].pdg;
163 prodP[0] = nu->ancestor[itraj_prod].startpx;
164 prodP[1] = nu->ancestor[itraj_prod].startpy;
165 prodP[2] = nu->ancestor[itraj_prod].startpz;
168 vtx[0]=nu->ancestor[itraj_prod].startx;
169 vtx[1]=nu->ancestor[itraj_prod].starty;
170 vtx[2]=nu->ancestor[itraj_prod].startz;
171 std::string this_vol=nu->ancestor[itraj_prod].ivol;
174 if(pdg_prod == 1000010020 || pdg_inc == 1000010020|| pdg_inc == 1000020030||pdg_prod==1000020030){
180 this_vol,this_proc,vtx);
187 if(meta->vintnames.size()==0){
199 double amount_IC[3],amount_DPIP[3],amount_DVOL[3];
200 for(
int ii=0;ii<3;ii++){
201 pdgs[ii] = 0; moms[ii] = 0;
202 amount_IC[ii] = 0; amount_DPIP[ii] = 0; amount_DVOL[ii] = 0;
205 for(
int ii=0;ii<3;ii++){
206 if(nu->ancestor.size()==3 && ii==2)
continue;
207 pdgs[ii] = nu->ancestor[nu->ancestor.size()-ii-2].pdg;
208 moms[ii] = sqrt(
pow(nu->ancestor[nu->ancestor.size()-ii-2].startpx,2)+
209 pow(nu->ancestor[nu->ancestor.size()-ii-2].startpy,2)+
210 pow(nu->ancestor[nu->ancestor.size()-ii-2].startpz,2));
214 if( (nu->vdbl)[ii] <0 || (nu->vdbl)[ii+3] <0 || (nu->vdbl)[ii+6] <0 || (nu->vdbl)[ii+9] <0){
215 std::cout<<
"ERROR FILLING AMOUNT OF MATERIAL CROSSED (In InteractionChainData) !!!" <<
std::endl;
217 amount_IC[ii] = (nu->vdbl)[ii] + (nu->vdbl)[ii+3];
218 amount_DPIP[ii] = (nu->vdbl)[ii+6];
219 amount_DVOL[ii] = (nu->vdbl)[ii+9];
236 if(meta->vintnames.size()>1){
247 os<<
"==== InteractionChainData ====\n" 249 <<
"\n *target info*\n ";
251 os<<
"\n *ancestors*\n";
256 os<<
"\n *Particlethrough volumes:*\n";
257 for(
size_t i=0; i<
ptv_info.size(); i++){
267 bool fast_decay =
false;
268 if( (pdg==221)||(pdg==331)||(pdg==3212)||(pdg==113)||(pdg==223) )fast_decay =
true;
bool is_fast_decay(int pdg)
std::ostream & print(std::ostream &os=std::cout) const
The information about a hadronic interaction needed to calculate weights.
std::vector< InteractionData > interaction_chain
vector of neutrino ancestors
InteractionChainData()
boring old default constructor
std::ostream & print(std::ostream &os) const
std::vector< ParticlesThroughVolumesData > ptv_info
Information about all particles that pass through volumes without interacting.
std::string getenv(std::string const &name)
std::string horn_config
The horn configuration. Example: 185i.
std::string target_config
The target configuration. Example: le010z.
int playlist
The tgt playlist (exact position of the target after survey)
The information about the hadron that exits the target.
TargetData tar_info
Information about the hadron which exited the target.
QTextStream & endl(QTextStream &s)