UserAnalysis.cc

Go to the documentation of this file.
00001 
00002 // header for this analysis class
00003 #include "../include/UserAnalysis.h"
00004 
00005 #include <iostream>
00006 
00007 #include "HepMC/GenEvent.h"
00008 #include "HepMC/IO_GenEvent.h"
00009 #include "HepMC/GenParticle.h"
00010 #include "HepMC/GenVertex.h"
00011 #include "HepMC/IO_AsciiParticles.h"
00012 #include "HepMC/SimpleVector.h"
00013 #include "HepPDT/ParticleData.hh"
00014 #include "CLHEP/Vector/LorentzVector.h"
00015 
00016 // ROOT headers
00017 #include "TH1.h"
00018 #include "TMath.h"
00019 #include "TLorentzVector.h"
00020 
00021 // fastjet headers
00022 #include "fastjet/PseudoJet.hh"
00023 #include "fastjet/ClusterSequence.hh"
00024 #include "fastjet/JetDefinition.hh"
00025 #include "fastjet/SISConePlugin.hh"
00026 
00027 //**********************
00028 
00029 /// empty default constructor
00030 UserAnalysis::UserAnalysis()
00031 {
00032 }
00033 
00034 /// empty default destructor
00035 UserAnalysis::~UserAnalysis()
00036 {
00037 }
00038 
00039 
00040 int UserAnalysis::Init(double tr_max_eta, double tr_min_pt)
00041 {
00042   // specify default eta cut
00043   m_max_eta=tr_max_eta;
00044   
00045   // specify default pt cut
00046   m_min_pt=tr_min_pt;
00047   
00048   // default Output file name
00049   m_outputFileName="UserAnalysis.root";
00050   m_outputRootDir="User";
00051  
00052   m_h_njets   = initHist("njets", "N_jets", "Number of Jets", 15, 0., 15.);
00053 
00054   return true; 
00055 }
00056 
00057 
00058 int UserAnalysis::Process(HepMC::GenEvent* hepmcevt){ 
00059 
00060 //   // print number of events
00061 //   if (hepmcevt->event_number()%1 == 0) {
00062 //     std::cout << "Processing event " << hepmcevt->event_number() << std::endl;
00063 //   }
00064   
00065   // fill number of jets
00066   m_h_njets->Fill(m_inclusive_jets.size());
00067   
00068   return true;
00069 
00070 } //end of Process

Generated on Mon Jan 4 15:22:34 2010 for HepMCAnalysis by  doxygen 1.4.7