EtMissAnalysis.cc

Go to the documentation of this file.
00001 #include <iostream>
00002 #include <stdio.h>
00003 #include "HepMC/GenEvent.h"
00004 #include "HepMC/IO_GenEvent.h"
00005 #include "HepMC/GenParticle.h"
00006 #include "HepMC/GenVertex.h"
00007 #include "HepMC/IO_AsciiParticles.h"
00008 #include "HepMC/SimpleVector.h"
00009 #include "HepPDT/ParticleData.hh"
00010 #include "CLHEP/Vector/LorentzVector.h"
00011 using namespace std;
00012 
00013 // ROOT headers
00014 #include "TH1.h"
00015 #include "TH2.h"
00016 #include "TFile.h"
00017 #include "TMath.h"
00018 #include "TLorentzVector.h"
00019 
00020 #include "fastjet/PseudoJet.hh"
00021 #include "fastjet/ClusterSequence.hh"
00022 #include "fastjet/JetDefinition.hh"
00023 #include "fastjet/SISConePlugin.hh"
00024 
00025 //EtMiss analysis header
00026 #include "../include/EtMissAnalysis.h"
00027 
00028 //**********************
00029 
00030 /// empty default constructor
00031 EtMissAnalysis::EtMissAnalysis()
00032 {
00033 }
00034 
00035 /// empty default destructor
00036 EtMissAnalysis::~EtMissAnalysis()
00037 {
00038 }
00039 
00040 int EtMissAnalysis::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="EtMissAnalysis.root";
00050   m_outputRootDir="EtMiss";
00051  
00052   m_METTruthX =  baseAnalysis::initHist( string("METTruthX"), string("METTruthX"), string("MissingEtTruthX"), 400, -1000, 1000);
00053   m_METTruthY =  baseAnalysis::initHist( string("METTruthY"), string("METTruthY"), string("MissingEtTruthY"), 400, -1000, 1000);
00054   m_METTruth =   baseAnalysis::initHist( string("METTruth"), string("METTruth"), string("MissingEtTruth"), 200, 0, 1000);
00055   m_METSumTruth =  baseAnalysis::initHist( string("METSumTruth"), string("METSumTruth"), string("MissingSumEtTruth"), 200, 0, 1000);
00056   
00057   return true; 
00058 }
00059 
00060 
00061 int EtMissAnalysis::Process(HepMC::GenEvent* hepmcevt){ 
00062 
00063   //calculate the missing energy with function from baseAnalysis
00064   FindMissingEt(hepmcevt);
00065 
00066   m_METTruthX->Fill(exMissTruth);
00067   m_METTruthY->Fill(eyMissTruth);
00068   m_METTruth->Fill(etMissTruth);
00069   m_METSumTruth->Fill(etsumMissTruth);
00070 
00071   return true;
00072 
00073 } //end of Process

Generated on Wed Aug 31 09:44:48 2011 for HepMCAnalysis by  doxygen 1.4.7