Fork me on GitHub

Changeset 486c4c3 in git for display


Ignore:
Timestamp:
Apr 23, 2015, 5:45:42 PM (10 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
4a93785
Parents:
e024347
Message:

fix particle vertices in Event Display

File:
1 edited

Legend:

Unmodified
Added
Removed
  • display/DelphesBranchElement.cc

    re024347 r486c4c3  
    155155  trkProp->SetMaxR(tkRadius_);
    156156  trkProp->SetMaxZ(tkHalfLength_);
     157  GenParticle *particle;
    157158  if(type=="Track") { // CASE 1: TRACKS
    158159    Track *track;
     
    161162                   track->P4().Px(), track->P4().Py(),
    162163                   track->P4().Pz(), track->P4().E(),
    163                    track->X, track->Y, track->Z, 0.0);
     164                   track->X/10.0, track->Y/10.0, track->Z/10.0, track->T/10.0);
    164165      eveTrack = new TEveTrack(&pb, counter, trkProp);
    165166      eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++));
     
    173174    Electron *electron;
    174175    while((electron = (Electron *) itTrack.Next())) {
     176      particle = (GenParticle*) electron->Particle.GetObject();
    175177      TParticle pb(electron->Charge<0?11:-11, 1, 0, 0, 0, 0,
    176178                   electron->P4().Px(), electron->P4().Py(),
    177179                   electron->P4().Pz(), electron->P4().E(),
    178                    0., 0., 0., 0.);
     180                   particle->X/10.0, particle->Y/10.0, particle->Z/10.0, particle->T/10.0);
    179181      eveTrack = new TEveTrack(&pb, counter, trkProp);
    180182      eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++));
     
    188190    Muon *muon;
    189191    while((muon = (Muon *) itTrack.Next())) {
     192      particle = (GenParticle*) muon->Particle.GetObject();
    190193      TParticle pb(muon->Charge<0?13:-13, 1, 0, 0, 0, 0,
    191194                   muon->P4().Px(), muon->P4().Py(),
    192195                   muon->P4().Pz(), muon->P4().E(),
    193                    0., 0., 0., 0.);
     196                   particle->X/10.0, particle->Y/10.0, particle->Z/10.0, particle->T/10.0);
    194197      eveTrack = new TEveTrack(&pb, counter, trkProp);
    195198      eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++));
     
    206209                   photon->P4().Px(), photon->P4().Py(),
    207210                   photon->P4().Pz(), photon->P4().E(),
    208                    0., 0., 0., 0.);
     211                   0.0, 0.0, 0.0, 0.0);
    209212      eveTrack = new TEveTrack(&pb, counter, trkProp);
    210213      eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++));
     
    223226                   particle->P4().Px(), particle->P4().Py(),
    224227                   particle->P4().Pz(), particle->P4().E(),
    225                    particle->X, particle->Y, particle->Z, particle->T);
     228                   particle->X/10.0, particle->Y/10.0, particle->Z/10.0, particle->T/10.0);
    226229      eveTrack = new TEveTrack(&pb, counter, trkProp);
    227230      eveTrack->SetName(Form("%s [%d]", pb.GetName(), counter++));
Note: See TracChangeset for help on using the changeset viewer.