Changeset 574 in svn
- Timestamp:
- Nov 16, 2011, 3:46:45 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 10 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Utilities/HepMC/VERSION
r363 r574 1 2.0 4.011 2.06.05 -
trunk/interface/HepMCConverter.h
r443 r574 41 41 #include "GenVertex.h" 42 42 #include "GenEvent.h" 43 #include "IO_Ascii .h"43 #include "IO_AsciiParticles.h" 44 44 45 45 using namespace std; -
trunk/src/HepMCConverter.cc
r480 r574 44 44 #include "GenParticle.h" 45 45 #include "GenVertex.h" 46 #include "IO_Ascii .h"46 #include "IO_AsciiParticles.h" 47 47 #include "IO_GenEvent.h" 48 48 … … 136 136 if (index_to_particle[j]->end_vertex()) 137 137 { 138 // find # of 1. daughter138 // make sure first and last daughter are indeed the first and last 139 139 int first_daughter = find_in_map( particle_to_index,*(index_to_particle[j]->end_vertex()->particles_begin(HepMC::children))); 140 //cout <<"first_daughter "<< first_daughter << "num_daughters " << num_daughters << endl; 140 int last_daughter = 0; 141 141 142 HepMC::GenVertex::particle_iterator ic; 142 int last_daughter=0; 143 //find # of last daughter 144 for (ic = index_to_particle[j]->end_vertex()->particles_begin(HepMC::children);ic != index_to_particle[j]->end_vertex()->particles_end(HepMC::children); ++ic) 145 last_daughter= find_in_map( particle_to_index,*ic); 146 143 for (ic = index_to_particle[j]->end_vertex()->particles_begin(HepMC::children);ic != index_to_particle[j]->end_vertex()->particles_end(HepMC::children); ++ic) { 144 int current_daughter = find_in_map( particle_to_index,*ic) ; 145 if (current_daughter < first_daughter) 146 first_daughter = current_daughter; 147 if (current_daughter > last_daughter) 148 last_daughter = current_daughter; 149 } 147 150 if (first_daughter== 0) last_daughter = 0; 148 151 da1=first_daughter; 149 152 da2=last_daughter; 153 150 154 } 151 155 else … … 194 198 element->PID = pid; 195 199 element->Status = status; 196 element->M1 = mo1 ;197 element->M2 = mo2 ;198 element->D1 = da1 ;199 element->D2 = da2 ;200 element->M1 = mo1 - 1; // added -1 as the numbering in the tree starts from 0 201 element->M2 = mo2 - 1; 202 element->D1 = da1 - 1; 203 element->D2 = da2 - 1; 200 204 201 205 element->E = index_to_particle[n]->momentum().e();
Note:
See TracChangeset
for help on using the changeset viewer.