Skip to content

Commit 7a90661

Browse files
committed
ITS3: macro include cluster eta, row, col
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent 1f58b49 commit 7a90661

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

Detectors/Upgrades/ITS3/macros/test/CheckClustersITS3.C

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
void CheckClustersITS3(const std::string& clusfile = "o2clus_its.root",
4343
const std::string& hitfile = "o2sim_HitsIT3.root",
4444
const std::string& inputGeom = "",
45-
std::string dictfile = "./ccdb/IT3/Calib/ClusterDictionary/snapshot.root",
45+
std::string dictfile = "../ccdb/IT3/Calib/ClusterDictionary/snapshot.root",
4646
bool batch = false)
4747
{
4848
gROOT->SetBatch(batch);
@@ -66,7 +66,7 @@ void CheckClustersITS3(const std::string& clusfile = "o2clus_its.root",
6666
ULong_t cPattValid{0}, cPattInvalid{0}, cLabelInvalid{0}, cNoMC{0};
6767

6868
TFile fout("CheckClusters.root", "recreate");
69-
TNtuple nt("ntc", "cluster ntuple", "ev:lab:hlx:hlz:hgx:hgz:tx:tz:cgx:cgy:cgz:clx:cly:clz:dx:dy:dz:ex:ez:patid:rof:npx:id");
69+
TNtuple nt("ntc", "cluster ntuple", "ev:lab:hlx:hlz:hgx:hgz:tx:tz:cgx:cgy:cgz:clx:cly:clz:dx:dy:dz:ex:ez:patid:rof:npx:id:eta:row:col");
7070

7171
// Geometry
7272
o2::base::GeometryManager::loadGeometry(inputGeom);
@@ -252,16 +252,18 @@ void CheckClustersITS3(const std::string& clusfile = "o2clus_its.root",
252252
mSuperSegmentations[layer].curvedToFlat(locC.X(), locC.Y(), xFlatSta, yFlatSta);
253253
locC.SetXYZ(xFlatSta, yFlatSta, locC.Z());
254254
}
255+
float theta = std::acos(gloC.Z() / gloC.Rho());
256+
float eta = -std::log(std::tan(theta / 2));
255257

256-
std::array<float, 23> data = {(float)lab.getEventID(), (float)trID,
258+
std::array<float, 26> data = {(float)lab.getEventID(), (float)trID,
257259
locH.X(), locH.Z(),
258260
gloH.X(), gloH.Z(),
259261
dltx / dlty, dltz / dlty,
260262
gloC.X(), gloC.Y(), gloC.Z(),
261263
locC.X(), locC.Y(), locC.Z(),
262264
locC.X() - locH.X(), locC.Y() - locH.Y(), locC.Z() - locH.Z(),
263265
errX, errZ, (float)pattID,
264-
(float)rofRec.getROFrame(), (float)npix, (float)chipID};
266+
(float)rofRec.getROFrame(), (float)npix, (float)chipID, eta, (float)cluster.getRow(), (float)cluster.getCol()};
265267
nt.Fill(data.data());
266268
}
267269
}
@@ -293,6 +295,18 @@ void CheckClustersITS3(const std::string& clusfile = "o2clus_its.root",
293295
nt.Draw("dx:dz>>h_dx_vs_dz_OB_z(1000, -0.01, 0.01, 1000, -0.01, 0.01)", "id >= 3456 && abs(cgz) < 2", "colz");
294296
canvdXdZ->SaveAs("it3clusters_dx_vs_dz.pdf");
295297

298+
auto canvCHXZ = new TCanvas("canvCHXZ", "", 1600, 1600);
299+
canvCHXZ->Divide(2, 2);
300+
canvCHXZ->cd(1);
301+
nt.Draw("(cgx-hgx)*10000:eta>>h_chx_IB(101,-1.4,1.4,101,-50,50)", "id<3456", "prof");
302+
canvCHXZ->cd(2);
303+
nt.Draw("(cgx-hgx)*10000:eta>>h_chx_OB(101,-1.4,1.4,101,-50,50)", "id>=3456", "prof");
304+
canvCHXZ->cd(3);
305+
nt.Draw("(cgz-hgz)*10000:eta>>h_chz_IB(101,-1.4,1.4,101,-50,50)", "id<3456", "prof");
306+
canvCHXZ->cd(4);
307+
nt.Draw("(cgz-hgz)*10000:eta>>h_chz_OB(101,-1.4,1.4,101,-50,50)", "id>=3456", "prof");
308+
canvCgXCgY->SaveAs("it3clusters_xz_eta.pdf");
309+
296310
auto c1 = new TCanvas("p1", "pullX");
297311
c1->cd();
298312
c1->SetLogy();

0 commit comments

Comments
 (0)