Fork me on GitHub

Ignore:
Timestamp:
Oct 25, 2014, 11:32:13 PM (10 years ago)
Author:
Christophe Delaere <christophe.delaere@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
ad015db
Parents:
2ca23b5
Message:

First incomplete version with summary plots

Most of the functionalities are there, but it is not yet properly
integrated in the GUI.
Known issues:

  • size of the event markers
  • all markers appear the same (missing index?)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • display/DelphesBranchElement.cc

    r2ca23b5 r3f51314  
    2626#include <iostream>
    2727
     28//TODO implement GetVectors()
     29
    2830// special case for calo towers
    2931template<> DelphesBranchElement<DelphesCaloData>::DelphesBranchElement(const char* name, TClonesArray* branch, const enum EColor color, Float_t maxPt):DelphesBranchBase(name, branch, color, maxPt) {
     
    4648    data_->DataChanged();
    4749  }
     50}
     51template<> std::vector<TLorentzVector> DelphesBranchElement<DelphesCaloData>::GetVectors() {
     52  std::vector<TLorentzVector> output;
     53  if(TString(GetType())=="Tower") {
     54    TIter itTower(branch_);
     55    Tower *tower;
     56    while((tower = (Tower *) itTower.Next())) {
     57      TLorentzVector v;
     58      v.SetPtEtaPhiM(tower->Eem+tower->Ehad,(tower->Edges[0]+tower->Edges[1])/2.,(tower->Edges[2]+tower->Edges[3])/2.,0.);
     59      output.push_back(v);
     60    }
     61  }
     62  return output;
    4863}
    4964
     
    91106  }
    92107}
     108template<> std::vector<TLorentzVector> DelphesBranchElement<TEveElementList>::GetVectors() {
     109  std::vector<TLorentzVector> output;
     110  if(TString(GetType())=="Jet") {
     111    TIter itJet(branch_);
     112    Jet *jet;
     113    // Loop over all jets
     114    while((jet = (Jet *) itJet.Next())) {
     115      TLorentzVector v;
     116      v.SetPtEtaPhiM(jet->PT, jet->Eta, jet->Phi, jet->Mass);
     117      output.push_back(v);
     118    }
     119  } else if(TString(GetType())=="MissingET") {
     120    TIter itMet(branch_);
     121    MissingET *MET;
     122    // Missing Et
     123    while((MET = (MissingET*) itMet.Next())) {
     124      TLorentzVector v;
     125      v.SetPtEtaPhiM(MET->MET,MET->Eta,MET->Phi,0.);
     126      output.push_back(v);
     127    }
     128  }
     129  return output;
     130}
    93131
    94132// special case for track lists
     
    199237  }
    200238}
     239template<> std::vector<TLorentzVector> DelphesBranchElement<TEveTrackList>::GetVectors() {
     240  std::vector<TLorentzVector> output;
     241  TString type = GetType();
     242  TIter itTrack(branch_);
     243  if(type=="Track") { // CASE 1: TRACKS
     244    Track *track;
     245    while((track = (Track *) itTrack.Next())) {
     246      output.push_back(track->P4());
     247    }
     248  } else if(type=="Electron") { // CASE 2: ELECTRONS
     249    Electron *electron;
     250    while((electron = (Electron *) itTrack.Next())) {
     251      output.push_back(electron->P4());
     252    }
     253  } else if(type=="Muon") { // CASE 3: MUONS
     254    Muon *muon;
     255    while((muon = (Muon *) itTrack.Next())) {
     256      output.push_back(muon->P4());
     257    }
     258  } else if(type=="Photon") { // CASE 4: PHOTONS
     259    Photon *photon;
     260    while((photon = (Photon *) itTrack.Next())) {
     261      output.push_back(photon->P4());
     262    }
     263  } else if(type=="GenParticle") { // CASE 5: GENPARTICLES
     264    GenParticle *particle;
     265    while((particle = (GenParticle *) itTrack.Next())) {
     266      if(particle->Status != 1) continue;
     267        output.push_back(particle->P4());
     268    }
     269  }
     270  return output;
     271}
Note: See TracChangeset for help on using the changeset viewer.