Fork me on GitHub

Changeset 1385 in svn


Ignore:
Timestamp:
04/17/14 13:41:34 (6 years ago)
Author:
pavel
Message:

fix cards and Example3

Location:
trunk/examples
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/Example3.C

    r1357 r1385  
    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      }
  • trunk/examples/delphes_card_ATLAS.tcl

    r1378 r1385  
    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
  • trunk/examples/delphes_card_CMS.tcl

    r1378 r1385  
    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.