Kontakt

AG Prof. Dr. Karl Jakobs
Universität Freiburg
Physikalisches Institut
Hermann-Herder-Str. 3

79104 Freiburg

Tel. 0761-203 5715 (Sekretariat)
Email   skorek AT uni-freiburg.de
 

Uni-Logo

GammaJetAnalysis.C

GammaJetAnalysis.C

GammaJetAnalysis.C — C source code, 0Kb

Dateiinhalt

#define GammaJetAnalysis_cxx
#include "GammaJetAnalysis.h"
#include <TH2.h>
#include <TStyle.h>
#include <TCanvas.h>

void GammaJetAnalysis::Loop()
{
   if (fChain == 0) return;

  //create output file
  TFile* outputfile = new TFile("GammaJetPlots.root", "RECREATE");

  //book histograms
  TH1F* h_ptGamma = new TH1F("ptGamma", ";p_{T}^{#gamma};a.u.", 100, 0, 100);
 
   Long64_t nentries = fChain->GetEntriesFast();

   Long64_t nbytes = 0, nb = 0;
   for (Long64_t jentry=0; jentry<nentries;jentry++) {
      Long64_t ientry = LoadTree(jentry);
      if (ientry < 0) break;
      nb = fChain->GetEntry(jentry);   nbytes += nb;
      // if (Cut(ientry) < 0) continue;


      if(photon_pt->size() < 1)
	continue;

      h_ptGamma->Fill(photon_pt->at(0));
   }

   outputfile->Write();
   outputfile->Close();
}

Benutzerspezifische Werkzeuge