15 #include <TProfile2D.h> 32 #define ND_Cells 344044 38 #define ND_ZActive 1270 42 #define FD_Cells 20192 48 #define FD_ZActive 1270 64 TFile*
fOut =
new TFile(
"mc.root",
"RECREATE");
67 TChain* tInChain =
new TChain(
"muondedxana/fTree");
69 tInChain->Add(
"mc/*.root");
73 TH1D *hPECorrCellPlaneX;
74 TH1D *hPECorrCellPlaneY;
75 TH1D *hTrueCellPlaneX;
76 TH1D *hTrueCellPlaneY;
78 tInChain ->Draw(
"PE/path:cell:plane >> hPECellPlaneX(214/2,0,214,96,0,96)",
"view==0 && (x>100 && x<200)",
"profcolz");
79 tInChain ->Draw(
"PE/path:cell:plane >> hPECellPlaneY(214/2,0,214,96,0,96)",
"view==1 && (x>100 && x<200)",
"profcolz");
80 tInChain ->Draw(
"PECorr/path:cell:plane >> hPECorrCellPlaneX(214/2,0,214,96,0,96)",
"view==0 && (x>100 && x<200)",
"profcolz");
81 tInChain ->Draw(
"PECorr/path:cell:plane >> hPECorrCellPlaneY(214/2,0,214,96,0,96)",
"view==1 && (x>100 && x<200)",
"profcolz");
82 tInChain ->Draw(
"trueE/path:cell:plane >> hTrueCellPlaneX(214/2,0,214,96,0,96)",
"view==0 && (x>100 && x<200)",
"profcolz");
83 tInChain ->Draw(
"trueE/path:cell:plane >> hTrueCellPlaneY(214/2,0,214,96,0,96)",
"view==1 && (x>100 && x<200)",
"profcolz");
94 int hitId,
view, totalPlanes;
97 tInChain->SetBranchAddress(
"PE", &PE);
98 tInChain->SetBranchAddress(
"PECorr", &PECorr);
99 tInChain->SetBranchAddress(
"path", &path);
100 tInChain->SetBranchAddress(
"w", &w);
101 tInChain->SetBranchAddress(
"cell", &cell);
102 tInChain->SetBranchAddress(
"plane", &plane);
103 tInChain->SetBranchAddress(
"view", &view);
104 tInChain->SetBranchAddress(
"x", &x);
105 tInChain->SetBranchAddress(
"trueE", &trueE);
108 unsigned int nEntries = tInChain->GetEntries();
111 TH2D* hPEWX =
new TH2D(
"hPEWX",
"hPEWX",40,-200,200,50,0,100);
112 TH2D* hPEWY =
new TH2D(
"hPEWY",
"hPEWY",40,-200,200,50,0,100);
113 TH2D* hPECorrWX =
new TH2D(
"hPECorrWX",
"hPECorrWX",40,-200,200,50,0,100);
114 TH2D* hPECorrWY =
new TH2D(
"hPECorrWY",
"hPECorrWY",40,-200,200,50,0,100);
115 TH2D* hTrueWX =
new TH2D(
"hTrueWX",
"hTrueWX",40,-200,200,100,0,10);
116 TH2D* hTrueWY =
new TH2D(
"hTrueWY",
"hTrueWY",40,-200,200,100,0,10);
117 TH1D* hWX =
new TH1D(
"hWX",
"hWX",40,-200,200);
118 TH1D* hWY =
new TH1D(
"hWY",
"hWY",40,-200,200);
122 TH3D* hPECorrCellPlaneX_test =
new TH3D(
"hPECorrCellPlaneX_test",
"hPECorrCellPlaneX_test",214/2,0,214,96,0,96,100,0,100);
123 TH3D* hPECorrCellPlaneY_test =
new TH3D(
"hPECorrCellPlaneY_test",
"hPECorrCellPlaneY_test",214/2,0,214,96,0,96,100,0,100);
128 for(
unsigned int i=0;
i<nEntries;
i++){
129 tInChain->GetEntry(
i);
134 hPEWX ->Fill(w,PE/path);
135 hPECorrWX ->Fill(w,PECorr/path);
136 hTrueWX ->Fill(w,trueE/path);
139 hPECorrCellPlaneX_test->Fill(plane,cell,PECorr/path);
143 hPEWY ->Fill(w,PE/path);
144 hPECorrWY ->Fill(w,PECorr/path);
145 hTrueWY ->Fill(w,trueE/path);
148 hPECorrCellPlaneY_test->Fill(plane,cell,PECorr/path);
156 hPEWX ->SetTitle(
"");
157 hPEWY ->SetTitle(
"");
158 hPECorrWX ->SetTitle(
"");
159 hPECorrWY ->SetTitle(
"");
160 hTrueWX ->SetTitle(
"");
161 hTrueWY ->SetTitle(
"");
165 hPECorrCellPlaneX_test->SetTitle(
"");
166 hPECorrCellPlaneY_test->SetTitle(
"");
gargamelle SetTitle("Gargamelle #nu_{e} CC data")