Skip to content

Commit d455f4f

Browse files
committed
fix chip positioning and update macro
1 parent 48a4fd6 commit d455f4f

3 files changed

Lines changed: 28 additions & 18 deletions

File tree

‎Detectors/Upgrades/ALICE3/IOTOF/base/include/IOTOFBase/IOTOFBaseParam.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ struct IOTOFBaseParam : public o2::conf::ConfigurableParamHelper<IOTOFBaseParam>
5656
float sensorThickness = 0.0050f; // thickness of the sensor in cm, for all layers for the moment, the default is set to 50 microns
5757

5858
// ITOF segmentation parameters
59-
float itofRadius = 21.f; // ITOF radius (cm)
59+
float itofRadius = 21.38f; // ITOF radius (cm)
6060
float itofLength = 126.82f; // ITOF length (cm)
61-
int itofNStaves = 24; // ITOF number of staves
62-
float itofStaveTilt = 3; // ITOF stave tilt angle (deg)
61+
int itofNStaves = 28; // ITOF number of staves
62+
float itofStaveTilt = 6.63; // ITOF stave tilt angle (deg)
6363

6464
// OTOF segmentation parameters
6565
float otofRadius = 92.f; // OTOF radius (cm)

‎Detectors/Upgrades/ALICE3/IOTOF/macros/CheckDigitsIOTOF.C‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -240,21 +240,21 @@ void CheckDigitsIOTOF(std::string digifile = "tf3digits.root", std::string hitfi
240240
auto canvXY = new TCanvas("canvXY", "", 1600, 800);
241241
canvXY->Divide(2, 1);
242242
canvXY->cd(1);
243-
nt->Draw("y:x>>h_y_vs_x_IOTOF(1000, -100, 100, 1000, -100, 100)", "id >= 0 && id < 55488", "colz");
243+
nt->Draw("y:x>>h_y_vs_x_IOTOF(1000, -100, 100, 1000, -100, 100)", "id >= 0 && id < 58896", "colz");
244244
canvXY->cd(2);
245-
nt->Draw("y:z>>h_y_vs_z_IOTOF(1000, -400, 400, 1000, -100, 100)", "id >= 0 && id < 55488", "colz");
245+
nt->Draw("y:z>>h_y_vs_z_IOTOF(1000, -400, 400, 1000, -100, 100)", "id >= 0 && id < 58896", "colz");
246246
canvXY->SaveAs("tf3digits_y_vs_x_vs_z.pdf");
247247

248248
// z distributions
249249
auto canvZ = new TCanvas("canvZ", "", 800, 800);
250250
canvZ->cd();
251-
nt->Draw("z>>h_z_IOTOF(500, -70, 70)", "id >= 0 && id < 55488 ");
251+
nt->Draw("z>>h_z_IOTOF(500, -70, 70)", "id >= 0 && id < 58896 ");
252252
canvZ->SaveAs("tf3digits_z.pdf");
253253

254254
// dz distributions (difference between local position of digits and hits in x and z)
255255
auto canvdZ = new TCanvas("canvdZ", "", 800, 800);
256256
canvdZ->cd();
257-
nt->Draw("dz>>h_dz_ML(500, -0.05, 0.05)", "id >= 0 && id < 55488 ");
257+
nt->Draw("dz>>h_dz_ML(500, -0.05, 0.05)", "id >= 0 && id < 58896 ");
258258
canvdZ->SaveAs("tf3digits_dz.pdf");
259259
canvdZ->SaveAs("tf3digits_dz.root");
260260

@@ -264,13 +264,13 @@ void CheckDigitsIOTOF(std::string digifile = "tf3digits.root", std::string hitfi
264264
auto canvdXdZ = new TCanvas("canvdXdZ", "", 1600, 800);
265265
canvdXdZ->Divide(2, 1);
266266
canvdXdZ->cd(1);
267-
nt->Draw(Form("dx:dz>>h_dx_vs_dz_ITOF(600, -%f, %f, 600, -%f, %f)", canvaEdgeRow, canvaEdgeCol, canvaEdgeRow, canvaEdgeCol), "id >= 0 && id < 1920", "colz");
267+
nt->Draw(Form("dx:dz>>h_dx_vs_dz_ITOF(600, -%f, %f, 600, -%f, %f)", canvaEdgeRow, canvaEdgeCol, canvaEdgeRow, canvaEdgeCol), "id >= 0 && id < 2352", "colz");
268268
addTLines(chipInfo.PitchRow, chipInfo.PitchCol);
269269
auto h = (TH2F*)gPad->GetPrimitive("h_dx_vs_dz_ITOF");
270270
Info("ITOF", "RMS(dx)=%.1f mu", h->GetRMS(2) * 1e4);
271271
Info("ITOF", "RMS(dz)=%.1f mu", h->GetRMS(1) * 1e4);
272272
canvdXdZ->cd(2);
273-
nt->Draw(Form("dx:dz>>h_dx_vs_dz_OTOF(600, -%f, %f, 600, -%f, %f)", canvaEdgeRow, canvaEdgeCol, canvaEdgeRow, canvaEdgeCol), "id >= 1920 && id < 55488", "colz");
273+
nt->Draw(Form("dx:dz>>h_dx_vs_dz_OTOF(600, -%f, %f, 600, -%f, %f)", canvaEdgeRow, canvaEdgeCol, canvaEdgeRow, canvaEdgeCol), "id >= 2352 && id < 58896", "colz");
274274
addTLines(chipInfo.PitchRow, chipInfo.PitchCol);
275275
h = (TH2F*)gPad->GetPrimitive("h_dx_vs_dz_OTOF");
276276
Info("OTOF", "RMS(dx)=%.1f mu", h->GetRMS(2) * 1e4);
@@ -283,13 +283,13 @@ void CheckDigitsIOTOF(std::string digifile = "tf3digits.root", std::string hitfi
283283
canvdXdZHit->Divide(2, 1);
284284
canvdXdZHit->cd(1);
285285
LOG(info) << "dxH, dzH";
286-
nt2->Draw(Form("dxH:dzH>>h_dxH_vs_dzH_ITOF(300, -%f, %f, 300, -%f, %f)", canvaEdgeRow, canvaEdgeCol, canvaEdgeRow, canvaEdgeCol), "id >= 0 && id < 1920", "colz");
286+
nt2->Draw(Form("dxH:dzH>>h_dxH_vs_dzH_ITOF(300, -%f, %f, 300, -%f, %f)", canvaEdgeRow, canvaEdgeCol, canvaEdgeRow, canvaEdgeCol), "id >= 0 && id < 2352", "colz");
287287
addTLines(chipInfo.PitchRow, chipInfo.PitchCol);
288288
h = (TH2F*)gPad->GetPrimitive("h_dxH_vs_dzH_ITOF");
289289
Info("ITOF", "RMS(dxH)=%.1f mu", h->GetRMS(2) * 1e4);
290290
Info("ITOF", "RMS(dzH)=%.1f mu", h->GetRMS(1) * 1e4);
291291
canvdXdZHit->cd(2);
292-
nt2->Draw(Form("dxH:dzH>>h_dxH_vs_dzH_OTOF(300, -%f, %f, 300, -%f, %f)", canvaEdgeRow, canvaEdgeCol, canvaEdgeRow, canvaEdgeCol), "id >= 1920 && id < 55488", "colz");
292+
nt2->Draw(Form("dxH:dzH>>h_dxH_vs_dzH_OTOF(300, -%f, %f, 300, -%f, %f)", canvaEdgeRow, canvaEdgeCol, canvaEdgeRow, canvaEdgeCol), "id >= 2352 && id < 58896", "colz");
293293
addTLines(chipInfo.PitchRow, chipInfo.PitchCol);
294294
h = (TH2F*)gPad->GetPrimitive("h_dxH_vs_dzH_OTOF");
295295
Info("OTOF", "RMS(dxH)=%.1f mu", h->GetRMS(2) * 1e4);

‎Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Layer.cxx‎

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ void ITOFLayer::createLayer(TGeoVolume* motherVolume)
215215
setModuleStyle(moduleVol);
216216

217217
// Now we create the volume for a single stave
218-
TGeoBBox* stave = new TGeoBBox(staveSizeX * 0.5, staveSizeY * 0.5 - 0.5 * moduleSizeY, staveSizeZ * 0.5);
218+
TGeoBBox* stave = new TGeoBBox(staveSizeX * 0.5, staveSizeY * 0.5, staveSizeZ * 0.5);
219219
TGeoVolume* staveVol = new TGeoVolume(staveName, stave, medSi);
220220
setStaveStyle(staveVol);
221221

@@ -224,9 +224,14 @@ void ITOFLayer::createLayer(TGeoVolume* motherVolume)
224224
for (int j = 0; j < sChipsPerCol; ++j) {
225225
LOGP(info, "iTOF: Creating chip {}/{} for module {}/{}", i + 1, sChipsPerRow, j + 1, sChipsPerCol);
226226
auto* translation = new TGeoTranslation(Form("segmentTransChip%d", i + 1), (i - 0.5) * (TF3Chip::sChipSizeX + sChipGap), 0, (j + 0.5) * TF3Chip::sChipSizeZ + j * sChipGap - 0.5 * moduleSizeZ);
227-
auto* rotation = new TGeoRotation(Form("segmentRotChip%d", i + 1), 0., i == 0 ? 0. : 180., 0.);
227+
TGeoRotation* rotation = nullptr;
228+
if (i == 1) {
229+
rotation = new TGeoRotation(Form("segmentRotChip%d", i + 1), 90, 180, 90, 90, 180, 0);
230+
} else {
231+
rotation = new TGeoRotation(Form("segmentRotChip%d", i + 1), 0, 0, 0);
232+
}
228233
auto* transformation = new TGeoCombiTrans(*translation, *rotation);
229-
moduleVol->AddNode(chipVol, 1 + i * sChipsPerCol + j, translation);
234+
moduleVol->AddNode(chipVol, 1 + i * sChipsPerCol + j, transformation);
230235
}
231236
}
232237

@@ -341,9 +346,9 @@ void OTOFLayer::createLayer(TGeoVolume* motherVolume)
341346
TGeoVolume* staveVol = new TGeoVolume(staveName, stave, medAir);
342347
setOTOFStaveStyle(staveVol);
343348

344-
// Now we create the volume for a single stave
349+
// Now we create the volume for a single substave
345350
const int modulesPerSubStave = mModulesPerStave;
346-
TGeoBBox* subStave = new TGeoBBox(subStaveSizeX * 0.5, subStaveSizeY * 0.5 - 0.5 * moduleSizeY, subStaveSizeZ * 0.5);
351+
TGeoBBox* subStave = new TGeoBBox(subStaveSizeX * 0.5, subStaveSizeY * 0.5, subStaveSizeZ * 0.5);
347352
TGeoVolume* subStaveVol = new TGeoVolume(subStaveName, subStave, medSi);
348353
setStaveStyle(subStaveVol);
349354

@@ -352,9 +357,14 @@ void OTOFLayer::createLayer(TGeoVolume* motherVolume)
352357
for (int j = 0; j < sChipsPerCol; ++j) {
353358
LOGP(info, "oTOF: Creating chip {}/{} for module {}/{}", i + 1, sChipsPerRow, j + 1, sChipsPerCol);
354359
auto* translation = new TGeoTranslation(Form("segmentTransChip%d", i + 1), (i - 0.5) * (TF3Chip::sChipSizeX + sChipGap), 0, (j + 0.5) * TF3Chip::sChipSizeZ + j * sChipGap - 0.5 * moduleSizeZ);
355-
auto* rotation = new TGeoRotation(Form("segmentRotChip%d", i + 1), 0., i == 0 ? 0. : 180., 0.);
360+
TGeoRotation* rotation = nullptr;
361+
if (i == 1) {
362+
rotation = new TGeoRotation(Form("segmentRotChip%d", i + 1), 90, 180, 90, 90, 180, 0);
363+
} else {
364+
rotation = new TGeoRotation(Form("segmentRotChip%d", i + 1), 0, 0, 0);
365+
}
356366
auto* transformation = new TGeoCombiTrans(*translation, *rotation);
357-
moduleVol->AddNode(chipVol, 1 + i * sChipsPerCol + j, translation);
367+
moduleVol->AddNode(chipVol, 1 + i * sChipsPerCol + j, transformation);
358368
}
359369
}
360370

0 commit comments

Comments
 (0)