Fork me on GitHub

Changeset f2d7d0c in git for examples


Ignore:
Timestamp:
Apr 17, 2014, 1:41:34 PM (11 years ago)
Author:
pavel <pavel@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
4928eda
Parents:
43c646a
Message:

fix cards and Example3

Location:
examples
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • examples/Example3.C

    r43c646a rf2d7d0c  
    9595  TClonesArray *branchPhoton = treeReader->UseBranch("Photon");
    9696  TClonesArray *branchMuon = treeReader->UseBranch("Muon");
     97
     98  TClonesArray *branchTrack = treeReader->UseBranch("Track");
     99  TClonesArray *branchTower = treeReader->UseBranch("Tower");
    97100
    98101  TClonesArray *branchEFlowTrack = treeReader->UseBranch("EFlowTrack");
     
    167170
    168171    // Loop over all tracks in event
    169     for(i = 0; i < branchEFlowTrack->GetEntriesFast(); ++i)
    170     {
    171       track = (Track*) branchEFlowTrack->At(i);
     172    for(i = 0; i < branchTrack->GetEntriesFast(); ++i)
     173    {
     174      track = (Track*) branchTrack->At(i);
    172175      particle = (GenParticle*) track->Particle.GetObject();
    173176
     
    197200        if(object->IsA() == GenParticle::Class())
    198201        {
    199           cout<<"    GenPart pt: "<<((GenParticle*) object)->PT<<", eta: "<<((GenParticle*) object)->Eta<<", phi: "<<((GenParticle*) object)->Phi<<endl;
    200           momentum += ((GenParticle*) object)->P4();
     202          particle = (GenParticle*) object;
     203          cout << "    GenPart pt: " << particle->PT << ", eta: " << particle->Eta << ", phi: " << particle->Phi << endl;
     204          momentum += particle->P4();
    201205        }
    202206        else if(object->IsA() == Track::Class())
    203207        {
    204           cout<<"    Track pt: "<<((Track*) object)->PT<<", eta: "<<((Track*) object)->Eta<<", phi: "<<((Track*) object)->Phi<<endl;
    205           momentum += ((Track*) object)->P4();
     208          track = (Track*) object;
     209          cout << "    Track pt: " << track->PT << ", eta: " << track->Eta << ", phi: " << track->Phi << endl;
     210          momentum += track->P4();
    206211        }
    207212        else if(object->IsA() == Tower::Class())
    208213        {
    209           cout<<"    Tower pt: "<<((Tower*) object)->ET<<", eta: "<<((Tower*) object)->Eta<<", phi: "<<((Tower*) object)->Phi<<endl;
    210           momentum += ((Tower*) object)->P4();
     214          tower = (Tower*) object;
     215          cout << "    Tower pt: " << tower->ET << ", eta: " << tower->Eta << ", phi: " << tower->Phi << endl;
     216          momentum += tower->P4();
    211217        }
    212218        else if(object->IsA() == Muon::Class())
    213219        {
    214           cout<<"    Muon pt: "<<((Muon*) object)->PT<<", eta: "<<((Muon*) object)->Eta<<", phi: "<<((Muon*) object)->Phi<<endl;
    215           momentum += ((Muon*) object)->P4();
     220          muon = (Muon*) object;
     221          cout << "    Muon pt: " << muon->PT << ", eta: " << muon->Eta << ", phi: " << muon->Phi << endl;
     222          momentum += muon->P4();
    216223        }
    217224      }
  • examples/delphes_card_ATLAS.tcl

    r43c646a rf2d7d0c  
    530530  add Branch Delphes/allParticles Particle GenParticle
    531531
    532 #  add Branch TrackMerger/tracks Track Track
    533 #  add Branch Calorimeter/towers Tower Tower
    534 
    535 #  add Branch Calorimeter/eflowTracks EFlowTrack Track
    536 #  add Branch Calorimeter/eflowPhotons EFlowPhoton Tower
    537 #  add Branch Calorimeter/eflowNeutralHadrons EFlowNeutralHadron Tower
     532  add Branch TrackMerger/tracks Track Track
     533  add Branch Calorimeter/towers Tower Tower
     534
     535  add Branch Calorimeter/eflowTracks EFlowTrack Track
     536  add Branch Calorimeter/eflowPhotons EFlowPhoton Tower
     537  add Branch Calorimeter/eflowNeutralHadrons EFlowNeutralHadron Tower
    538538
    539539  add Branch GenJetFinder/jets GenJet Jet
  • examples/delphes_card_CMS.tcl

    r43c646a rf2d7d0c  
    542542  add Branch Delphes/allParticles Particle GenParticle
    543543
    544 #  add Branch TrackMerger/tracks Track Track
    545 #  add Branch Calorimeter/towers Tower Tower
    546 
    547 #  add Branch Calorimeter/eflowTracks EFlowTrack Track
    548 #  add Branch Calorimeter/eflowPhotons EFlowPhoton Tower
    549 #  add Branch Calorimeter/eflowNeutralHadrons EFlowNeutralHadron Tower
     544  add Branch TrackMerger/tracks Track Track
     545  add Branch Calorimeter/towers Tower Tower
     546
     547  add Branch Calorimeter/eflowTracks EFlowTrack Track
     548  add Branch Calorimeter/eflowPhotons EFlowPhoton Tower
     549  add Branch Calorimeter/eflowNeutralHadrons EFlowNeutralHadron Tower
    550550
    551551  add Branch GenJetFinder/jets GenJet Jet
Note: See TracChangeset for help on using the changeset viewer.