Skip to content

Commit 0c902c7

Browse files
mconcasshahor02
authored andcommitted
Filter topologies
1 parent abb836b commit 0c902c7

1 file changed

Lines changed: 18 additions & 7 deletions

File tree

Detectors/ITSMFT/ITS/macros/test/CheckClusters.C

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void CheckClusters(std::string clusfile = "o2clus_its.root", std::string hitfile
4343
std::vector<MC2HITS_map> mc2hitVec;
4444

4545
TFile fout("CheckClusters.root", "recreate");
46-
TNtuple nt("ntc", "cluster ntuple", "ev:lab:hlx:hlz:tx:tz:cgx:cgy:cgz:dx:dy:dz:ex:ez:rof:npx:id");
46+
TNtuple nt("ntc", "cluster ntuple", "ev:lab:hlx:hlz:tx:tz:cgx:cgy:cgz:dx:dy:dz:ex:ez:patid:rof:npx:id");
4747

4848
// Geometry
4949
o2::base::GeometryManager::loadGeometry(inputGeom);
@@ -195,11 +195,11 @@ void CheckClusters(std::string clusfile = "o2clus_its.root", std::string hitfile
195195
auto r = (0.5 * (Segmentation::SensorLayerThickness - Segmentation::SensorLayerThicknessEff) - y0) / dlty;
196196
locH.SetXYZ(x0 + r * dltx, y0 + r * dlty, z0 + r * dltz);
197197
//locH.SetXYZ(0.5 * (locH.X() + locHsta.X()), 0.5 * (locH.Y() + locHsta.Y()), 0.5 * (locH.Z() + locHsta.Z()));
198-
std::array<float, 17> data = {(float)lab.getEventID(), (float)trID,
198+
std::array<float, 18> data = {(float)lab.getEventID(), (float)trID,
199199
locH.X(), locH.Z(), dltx / dlty, dltz / dlty,
200200
gloC.X(), gloC.Y(), gloC.Z(),
201201
locC.X() - locH.X(), locC.Y() - locH.Y(), locC.Z() - locH.Z(),
202-
errX, errZ,
202+
errX, errZ, (float)pattID,
203203
(float)rofRec.getROFrame(), (float)npix, (float)chipID};
204204
nt.Fill(data.data());
205205
}
@@ -211,14 +211,25 @@ void CheckClusters(std::string clusfile = "o2clus_its.root", std::string hitfile
211211
nt.Draw("dz:dx", "abs(dz)<0.01 && abs(dx)<0.01");
212212
new TCanvas;
213213
nt.Draw("dz:tz", "abs(dz)<0.005 && abs(tz)<2");
214-
auto c1 = new TCanvas("p1","pullX");
214+
215+
auto c1 = new TCanvas("p1", "pullX");
215216
c1->cd();
216217
c1->SetLogy();
217-
nt.Draw("dx/ex", "abs(dx/ex)<10");
218-
auto c2 = new TCanvas("p2","pullZ");
218+
nt.Draw("dx/ex", "abs(dx/ex)<10&&patid<10");
219+
auto c2 = new TCanvas("p2", "pullZ");
219220
c2->cd();
220221
c2->SetLogy();
221-
nt.Draw("dz/ez", "abs(dz/ez)<10");
222+
nt.Draw("dz/ez", "abs(dz/ez)<10&&patid<10");
223+
224+
auto d1 = new TCanvas("d1", "deltaX");
225+
d1->cd();
226+
d1->SetLogy();
227+
nt.Draw("dx", "abs(dx)<5");
228+
auto d2 = new TCanvas("d2", "deltaZ");
229+
d2->cd();
230+
d2->SetLogy();
231+
nt.Draw("dz", "abs(dz)<5");
232+
222233
fout.cd();
223234
nt.Write();
224235
}

0 commit comments

Comments
 (0)