Fork me on GitHub

Ticket #923: jetMass_s.cpp

File jetMass_s.cpp, 2.2 KB (added by Michele Selvaggi, 9 years ago)
Line 
1/*
2Cut Functions: Return 1 when cut is passed. Return 0 when cut is failed.
3*/
4
5#ifdef __CLING__
6#include <map>
7#include <vector>
8R__LOAD_LIBRARY(libDelphes)
9#include "classes/DelphesClasses.h"
10#include "external/ExRootAnalysis/ExRootTreeReader.h"
11#endif
12
13#include <iostream>
14#include <algorithm>
15#include <fstream>
16#include <sstream>
17#include <iomanip>
18#include <utility>
19#include "TString.h"
20#include "TApplication.h"
21#include "TChain.h"
22#include "TFile.h"
23#include "TObject.h"
24
25#include <string>
26#include "TMath.h"
27#include "TH1F.h"
28#include "TH2F.h"
29
30#include "ExRootTreeReader.h"
31#include "ExRootTreeWriter.h"
32#include "ExRootTreeBranch.h"
33#include "ExRootResult.h"
34
35#include "DelphesClasses.h"
36#include "TClonesArray.h"
37
38#include "external/fastjet/internal/base.hh"
39#include "external/fastjet/internal/numconsts.hh"
40#include "external/fastjet/PseudoJet.hh"
41#include "external/fastjet/JetDefinition.hh"
42#include "external/fastjet/ClusterSequence.hh"
43
44using namespace fastjet;
45
46using namespace std;
47
48
49int main()
50{
51
52
53 TChain chain("Delphes");
54
55 chain.Add("test.root");
56
57 ExRootTreeReader *treeReader = new ExRootTreeReader(&chain);
58 Long64_t numberOfEntries = treeReader->GetEntries();
59
60 TClonesArray *branchEvent = treeReader->UseBranch("Event");
61 TClonesArray *branchJet = treeReader->UseBranch("Jet");
62 //TClonesArray *branchEFlowMuon = treeReader->UseBranch("EFlowMuon");
63 TClonesArray *branchMuon = treeReader->UseBranch("Muon");
64 TClonesArray *branchElectron = treeReader->UseBranch("Electron");
65 TClonesArray *branchParticle = treeReader->UseBranch("Particle");
66 TClonesArray *branchMissingET = treeReader->UseBranch("MissingET");
67 TClonesArray *branchScalarHT = treeReader->UseBranch("ScalarHT");
68
69
70 const double inclusive_jet_pt = 0.0;
71 const double PI = 3.14159265359;
72 const double jetR = 0.5;
73
74 const double scalarHTcut = 3500;
75 const double missingETcut = 500;
76
77
78 // Loop over all events
79 for(Int_t entry = 0; entry < numberOfEntries; ++entry){
80 treeReader->ReadEntry(entry);
81 //do stuff with fastjet
82
83 JetDefinition *definition;
84 definition = new JetDefinition(cambridge_algorithm, 0.5);
85
86 }
87}
88
89
90