-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCRecon.C
82 lines (61 loc) · 1.93 KB
/
CRecon.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#include <stdlib.h>
#include <vector>
#include <algorithm>
#include <functional>
#include <array>
#include <utility>
#include "Riostream.h"
#include "TROOT.h"
#include "TFile.h"
#include "TTree.h"
#include "TBranch.h"
#include "TObject.h"
#include "TF1.h"
#include "TH1F.h"
#include "TH2F.h"
#include "TMath.h"
#include "TArrow.h"
#include "CHit2D.hxx"
#include "CHit3D.hxx"
#include "CBond3D.hxx"
#include "CCluster3D.hxx"
#include "CInputRead_CT.hxx"
#include "CCreate3DHits.hxx"
#include "CSharedCharge.hxx"
#include "CCluster3DHits.hxx"
int CRecon(){
if (!TClass::GetDict("CHit2D")) {
gROOT->ProcessLine(".L CHit2D.cxx++");
}
if (!TClass::GetDict("CHit3D")) {
gROOT->ProcessLine(".L CHit3D.cxx++");
}
if (!TClass::GetDict("CBond3D")) {
gROOT->ProcessLine(".L CBond3D.cxx++");
}
if (!TClass::GetDict("CCluster3D")) {
gROOT->ProcessLine(".L CCluster3D.cxx++");
}
/*TFile* hfile = new TFile("full3DST.neutrino.eleSim.file0_qe.root","READ");
TTree* tree = (TTree*)hfile->Get("EDepSimTree");*/
TFile* hfile = new TFile("/Users/sergey/Desktop/DUNE/work/Reconstruction/Cesar/rec/MC_output.root","READ");
TTree* tree = (TTree*)hfile->Get("AllEvents");
int nprocessEvents = 300;
int skip=1;
nprocessEvents+=skip;
CInputRead(tree,nprocessEvents,skip);
hfile->Close();
delete hfile;
TFile* hfile2D = new TFile("FileWith2DHits.root","READ");
TTree* tree2D = (TTree*)hfile2D->Get("treeWith2DHits");
CCreate3DHits(tree2D);
hfile2D->Close();
delete hfile2D;
CSharedCharge("FileWith2DHits.root","FileWith3DHits.root","FileWith3DHits_SharedCharge.root");
TFile* hfile3D = new TFile("FileWith3DHits_SharedCharge.root","READ");
TTree* tree3D = (TTree*)hfile3D->Get("treeWith3DHits");
CCluster3DHits(tree3D);
hfile3D->Close();
delete hfile3D;
return 0;
}