{
TFile theFile("/data/BA6CD421-E0A5-DD11-89E1-001617E30F58.root");
TFile histofile("track_hists.root","RECREATE");
TH1F* pttr = new TH1F("pttr","Track pT (GeV)",100,8.0,12.0);
TTree *events = (TTree*)theFile.Get("Events"); 
events->GetEntry(); 
std::vector<reco::Track> trackCollection;
TBranch *branch = events->GetBranch("recoTracks_ctfWithMaterialTracksP5__Rec.obj");
branch->SetAddress(&trackCollection);
for( unsigned int index = 0;
        index < events.GetEntries();
        ++index) {
        branch->GetEntry(index);
         if(trackCollection.size()>0)std::cout << "Event = " << index << " " << trackCollection.size()<<std::endl;
        for ( unsigned int bindex = 0; bindex < trackCollection.size(); ++bindex ) {
            reco::Track* track = (reco::Track*)trackCollection[bindex];
            std::cout << track->pt() << std::endl;
            pttr->Fill(track->pt());
            }
        }
 histofile.Write();
 histofile.Close();
}
