I have evrim.C macro and ı am looking for dijet channel. My code is;
[code]void evrim()
{
TH1D* h1 = new TH1D(“Pt”,“histogram”,100,0,1000);
TH1D* h2 = new TH1D(“Eta”,“histogram”,100,4,4);
TH1D* h3 = new TH1D(“Eta”,“histogram”,100,0,6);
TFile file(“foo.root”);
TTree *etree = (TTree *)file.Get(“Event”);
Trigger *trigger = new Trigger();
Jet *jet = new Jet();
Electron *electron =new Electron();
Muon *muon = new Muon();
Tau *tau = new Tau();
Photon *photon = new Photon();
etree->GetBranch("trigger")->SetAddress(&trigger);
etree->GetBranch("jet")->SetAddress(&jet);
etree->GetBranch("electron")->SetAddress(&electron);
etree->GetBranch("muon")->SetAddress(&muon);
etree->GetBranch("tau")->SetAddress(&tau);
etree->GetBranch("photon")->SetAddress(&photon);
int n_event = etree->GetEntries ();
for (int index = 0; index < n_event; ++index){
etree->GetEntry(index);
cout << "# jet : " <n_jet << endl;
vector myJets;
for(int ijet = 0; ijet< jet->n_jet;++ijet){
if(jet->pt[ijet] >50){
cout << "pt: " << jet->pt[ijet] << "
eta: " << jet->eta[ijet] << " phi: " << jet->phi[ijet] << " mass "<<
jet->mass[ijet] <<endl;
TLorentzVector theJet;
theJet.SetPtEtaPhiM(jet->pt[ijet],
jet->eta[ijet], jet->phi[ijet], jet->mass[ijet]);
myJets.push_back(theJet);
}
}
}
file.Close();
}[/code]
when i run this code, i found error as follow;
root [0] .x evrim.C
Warning in TROOT::Append: Replacing existing TH1: Eta (Potential memory
leak).
jet : 12
pt: 451.27 eta: -0.437 phi: -2.38919 mass 39.85
pt: 357.83 eta: -1.988 phi: 0.955 mass 24.22
pt: 231.31 eta: 0.211 phi: 1.22 mass 25.18
pt: 249.26 eta: -1.592 phi: 1.516 mass 22.8
pt: 179.36 eta: 0.96 phi: -0.100185 mass 32.62
pt: 124.38 eta: 0.743 phi: -1.18319 mass 9.39
pt: 54.07 eta: -0.625 phi: -1.65519 mass 10.36
*** Break *** segmentation violation
Attaching to program: /proc/9462/exe, process 9462
[Thread debugging using libthread_db enabled]
0xffffe410 in __kernel_vsyscall ()
#1 0x009f0713 in __waitpid_nocancel () from /lib/libc.so.6
#2 0x0099507b in do_system () from /lib/libc.so.6
#3 0x00b07ead in system () from /lib/libpthread.so.0
#4 0xf7a47b0d in TUnixSystem::Exec(char const*) () from
/afs/cern.ch/cms/slc5_ia32_gcc434/lcg/root/5.22.00d-cms18/lib/libCore.so
#5 0xf7a4cfab in TUnixSystem::StackTrace() () from
/afs/cern.ch/cms/slc5_ia32_gcc434/lcg/root/5.22.00d-cms18/lib/libCore.so
#6 0xf7a4dd7d in TUnixSystem::DispatchSignals(ESignals) () from
/afs/cern.ch/cms/slc5_ia32_gcc434/lcg/root/5.22.00d-cms18/lib/libCore.so
#7 0xf7a4de7d in SigHandler(ESignals) () from
/afs/cern.ch/cms/slc5_ia32_gcc434/lcg/root/5.22.00d-cms18/lib/libCore.so
#8 0xf7a44782 in sighandler(int) () from
/afs/cern.ch/cms/slc5_ia32_gcc434/lcg/root/5.22.00d-cms18/lib/libCore.so
#9
#10 0xf705000d in G__get_ifunc_ref () from
/afs/cern.ch/cms/slc5_ia32_gcc434/lcg/root/5.22.00d-cms18/lib/libCint.so
#11 0xf6fe8591 in G__exec_bytecode () from
/afs/cern.ch/cms/slc5_ia32_gcc434/lcg/root/5.22.00d-cms18/lib/libCint.so
#12 0xf6fc12b6 in Cint::G__ExceptionWrapper(int ()(G__value, char const*,
G__param*, int), G__value*, char*, G__param*, int) () from
/afs/cern.ch/cms/slc5_ia32_gcc434/lcg/root/5.22.00d-cms18/lib/libCint.so
#13 0xf6fe4307 in G__exec_asm () from
/afs/cern.ch/cms/slc5_ia32_gcc434/lcg/root/5.22.00d-cms18/lib/libCint.so
#14 0xf6fe8e07 in G__exec_bytecode () from
/afs/cern.ch/cms/slc5_ia32_gcc434/lcg/root/5.22.00d-cms18/lib/libCint.so
#15 0xf6fc12b6 in Cint::G__ExceptionWrapper(int ()(G__value, char const*,
G__param*, int), G__value*, char*, G__param*, int) () from
/afs/cern.ch/cms/slc5_ia32_gcc434/lcg/root/5.22.00d-cms18/lib/libCint.so
#16 0xf6fe4307 in G__exec_asm () from
/afs/cern.ch/cms/slc5_ia32_gcc434/lcg/root/5.22.00d-cms18/lib/libCint.so
is there any solution for me…?