//import Geant4 and set the wanted particles in the intended order
//0:e0 1:p0 2:e1 3:p1 4:recoil system (without p1) 5:l1 from 4 6:l2 from 4
inlineautomomenta_sort_sim(conststd::vector<dd4pod::Geant4ParticleData>&parts,std::string_viewmother,std::string_viewdaughter){//mother and daughter are not used yet; will be useful when generater is different and/or when the mcparticles doesn't follow the same order in all events
inlineautomomenta_sort_sim(conststd::vector<edm4hep::MCParticleData>&parts,std::string_viewmother,std::string_viewdaughter){//mother and daughter are not used yet; will be useful when generater is different and/or when the mcparticles doesn't follow the same order in all events
std::vector<ROOT::Math::PxPyPzMVector>momenta{7};
intorder_map[7]={0,3,2,6,5,7,8};
for(inti=0;i<7;i++){
doublepx=parts[order_map[i]].ps.x;
doublepy=parts[order_map[i]].ps.y;
doublepz=parts[order_map[i]].ps.z;
doublepx=parts[order_map[i]].momentum.x;
doublepy=parts[order_map[i]].momentum.y;
doublepz=parts[order_map[i]].momentum.z;
doublemass=parts[order_map[i]].mass;
doublee=sqrt(px*px+py*py+pz*pz+mass*mass);
momenta[i].SetPxPyPzE(px,py,pz,e);
...
...
@@ -43,7 +43,7 @@ namespace util {
}
//import Reconstructed particles and set the wanted particles in the intended order========================