Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ namespace iotof
{

struct ChipSpecifics {
int NCols = 129;
int NRows = 271;
int NCols = 120;
int NRows = 240;
float PitchCol = 250.00e-4;
float PitchRow = 100.00e-4;
float PassiveEdgeReadOut = 0.;
float PassiveEdgeReadOut = 0.2;
float PassiveEdgeTop = 0.;
float PassiveEdgeSide = 0.;
float PixelPassiveEdgeX = 0.;
Expand All @@ -49,12 +49,25 @@ struct IOTOFBaseParam : public o2::conf::ConfigurableParamHelper<IOTOFBaseParam>
bool enableOuterTOF = true; // Enable Outer TOF layer
bool enableForwardTOF = false; // Enable Forward TOF layer
bool enableBackwardTOF = false; // Enable Backward TOF layer
bool itofTurbo = true; // Segmented ITOF turbo or staggered
std::string detectorPattern = ""; // Layouts of the detector
bool segmentedInnerTOF = true; // If the inner TOF layer is segmented
bool segmentedOuterTOF = true; // If the outer TOF layer is segmented
float x2x0 = 0.02f; // thickness expressed in radiation length, for all layers for the moment
float sensorThickness = 0.0050f; // thickness of the sensor in cm, for all layers for the moment, the default is set to 50 microns

// ITOF segmentation parameters
float itofRadius = 21.38f; // ITOF radius (cm)
float itofLength = 126.82f; // ITOF length (cm)
int itofNStaves = 28; // ITOF number of staves
float itofStaveTilt = 6.63; // ITOF stave tilt angle (deg)

// OTOF segmentation parameters
float otofRadius = 92.f; // OTOF radius (cm)
float otofLength = 688.54f; // OTOF length (cm)
int otofNStaves = 62; // OTOF number of staves
float otofStaveTilt = 5; // OTOF stave tilt angle (deg)

O2ParamDef(IOTOFBaseParam, "IOTOFBase");
};

Expand Down
16 changes: 8 additions & 8 deletions Detectors/Upgrades/ALICE3/IOTOF/macros/CheckDigitsIOTOF.C
Original file line number Diff line number Diff line change
Expand Up @@ -240,21 +240,21 @@ void CheckDigitsIOTOF(std::string digifile = "tf3digits.root", std::string hitfi
auto canvXY = new TCanvas("canvXY", "", 1600, 800);
canvXY->Divide(2, 1);
canvXY->cd(1);
nt->Draw("y:x>>h_y_vs_x_IOTOF(1000, -100, 100, 1000, -100, 100)", "id >= 0 && id < 55488", "colz");
nt->Draw("y:x>>h_y_vs_x_IOTOF(1000, -100, 100, 1000, -100, 100)", "id >= 0 && id < 58896", "colz");
canvXY->cd(2);
nt->Draw("y:z>>h_y_vs_z_IOTOF(1000, -400, 400, 1000, -100, 100)", "id >= 0 && id < 55488", "colz");
nt->Draw("y:z>>h_y_vs_z_IOTOF(1000, -400, 400, 1000, -100, 100)", "id >= 0 && id < 58896", "colz");
canvXY->SaveAs("tf3digits_y_vs_x_vs_z.pdf");

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

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

Expand All @@ -264,13 +264,13 @@ void CheckDigitsIOTOF(std::string digifile = "tf3digits.root", std::string hitfi
auto canvdXdZ = new TCanvas("canvdXdZ", "", 1600, 800);
canvdXdZ->Divide(2, 1);
canvdXdZ->cd(1);
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");
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");
addTLines(chipInfo.PitchRow, chipInfo.PitchCol);
auto h = (TH2F*)gPad->GetPrimitive("h_dx_vs_dz_ITOF");
Info("ITOF", "RMS(dx)=%.1f mu", h->GetRMS(2) * 1e4);
Info("ITOF", "RMS(dz)=%.1f mu", h->GetRMS(1) * 1e4);
canvdXdZ->cd(2);
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");
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");
addTLines(chipInfo.PitchRow, chipInfo.PitchCol);
h = (TH2F*)gPad->GetPrimitive("h_dx_vs_dz_OTOF");
Info("OTOF", "RMS(dx)=%.1f mu", h->GetRMS(2) * 1e4);
Expand All @@ -283,13 +283,13 @@ void CheckDigitsIOTOF(std::string digifile = "tf3digits.root", std::string hitfi
canvdXdZHit->Divide(2, 1);
canvdXdZHit->cd(1);
LOG(info) << "dxH, dzH";
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");
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");
addTLines(chipInfo.PitchRow, chipInfo.PitchCol);
h = (TH2F*)gPad->GetPrimitive("h_dxH_vs_dzH_ITOF");
Info("ITOF", "RMS(dxH)=%.1f mu", h->GetRMS(2) * 1e4);
Info("ITOF", "RMS(dzH)=%.1f mu", h->GetRMS(1) * 1e4);
canvdXdZHit->cd(2);
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");
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");
addTLines(chipInfo.PitchRow, chipInfo.PitchCol);
h = (TH2F*)gPad->GetPrimitive("h_dxH_vs_dzH_OTOF");
Info("OTOF", "RMS(dxH)=%.1f mu", h->GetRMS(2) * 1e4);
Expand Down
2 changes: 2 additions & 0 deletions Detectors/Upgrades/ALICE3/IOTOF/simulation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

o2_add_library(IOTOFSimulation
SOURCES src/Layer.cxx
src/TF3Chip.cxx
src/Chip.cxx
src/Detector.cxx
src/Digitizer.cxx
Expand All @@ -23,6 +24,7 @@ o2_add_library(IOTOFSimulation
o2_target_root_dictionary(IOTOFSimulation
HEADERS include/IOTOFSimulation/Detector.h
include/IOTOFSimulation/Chip.h
include/IOTOFSimulation/TF3Chip.h
include/IOTOFSimulation/Layer.h
include/IOTOFSimulation/Digitizer.h
include/IOTOFSimulation/DPLDigitizerParam.h
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@ class Layer
auto getZLength() const { return mZLength; }
auto getZOffset() const { return mZOffset; }
auto getx2X0() const { return mX2X0; }
auto getChipThickness() const { return mChipThickness; }
auto getChipThickness() const { return mLayerThickness; }
auto getName() const { return mLayerName; }
auto getLayout() const { return mLayout; }
auto getSegments() const { return mStaves; }
static constexpr int kBarrel = 0;
static constexpr int kDisk = 1;
static constexpr int kBarrelSegmented = 2;
static constexpr int kDiskSegmented = 3;
static constexpr int kBarrelStaggered = 4;

virtual void createLayer(TGeoVolume* motherVolume) {};

Expand All @@ -52,13 +53,19 @@ class Layer
float mZLength;
float mZOffset{0.f}; // Of use when fwd layers
float mX2X0;
float mChipThickness; // Thickness of the chip in cm, derived from mX2X0 and the radiation length of silicon
float mLayerThickness; // Thickness of the layer in cm, derived from mX2X0 and the radiation length of silicon
float mSensorThickness; // Thickness of the sensor in cm, to be subtracted from the chip thickness to get the total module thickness
int mLayout{kBarrel}; // Identifier of the type of layer layout (barrel, disk, barrel segmented, disk segmented)
// To be used only in case of the segmented layout, to define the number of staves in phi (for barrel) or in r (for disk)
std::pair<int, float> mStaves{0, 0.0f}; // Number and size of staves in phi (for barrel) or in r (for disk) in case of segmented layout
int mModulesPerStave{0}; // Number of modules along a stave
double mTiltAngle{0.0}; // Tilt angle in degrees to be applied as a rotation around the local center of the stave

static const int sChipsPerRow; // number of chips per row in module
static const int sChipsPerCol; // number of chips per col in module
static const double sChipGap; // gap between chips in module
static const double sModuleGap; // gap between modules in stave
static const double sChipThickness; // full thickness of the chip
};

class ITOFLayer : public Layer
Expand All @@ -67,6 +74,10 @@ class ITOFLayer : public Layer
using Layer::Layer;
virtual void createLayer(TGeoVolume* motherVolume) override;
static std::vector<std::string> mRegister;

static const double sStaggerRadialShift;

private:
};

class OTOFLayer : public Layer
Expand All @@ -75,6 +86,9 @@ class OTOFLayer : public Layer
using Layer::Layer;
virtual void createLayer(TGeoVolume* motherVolume) override;
static std::vector<std::string> mRegister;

static const double sSubStavesDistanceY;
static const double sSubStavesOverlapX;
};

class FTOFLayer : public Layer
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#ifndef ALICEO2_IOTOF_TF3CHIP_H_
#define ALICEO2_IOTOF_TF3CHIP_H_

#include <TGeoManager.h> // for gGeoManager
#include "Rtypes.h" // for Int_t, Double_t, Bool_t, UInt_t, etc

class TGeoVolume;
class TGeoManager;

namespace o2
{

namespace iotof
{

/// TF3Chip class creates a TGeoVolume representing the TF3 Chip

class TF3Chip
{
public:
TF3Chip() = default;
~TF3Chip() = default;

/// Creates the TF3Chip
/// Returns the chip as a TGeoVolume
/// \param yc Y chip half lengths
/// \param ys sensor half thickness
/// \param chipName sensName default volume names
/// \param dummy if true creates a dummy air volume (for material budget studies)
/// \param mgr The GeoManager (used only to get the proper material)
static TGeoVolume* createChip(Double_t yc, Double_t ys,
char const* chipName = "TF3Chip", char const* sensName = "TF3Sensor",
Bool_t dummy = kFALSE, const TGeoManager* mgr = gGeoManager);

static void createMaterials(Int_t id, Int_t fieldType, Float_t maxField);

static const double getChipSizeX() { return sChipSizeX; };
static const double getChipSizeY() { return sChipSizeZ; };

static const double sChipSizeX;
static const double sChipSizeZ;

ClassDefNV(TF3Chip, 0); // TF3Chip geometry
};

} // namespace iotof
} // namespace o2

#endif
24 changes: 13 additions & 11 deletions Detectors/Upgrades/ALICE3/IOTOF/simulation/src/Detector.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ void Detector::configLayers(bool itof, bool otof, bool ftof, bool btof, std::str
const float x2x0, const float sensorThickness)
{

std::pair<float, float> dInnerTof = {21.f, 129.f}; // Radius and length
std::pair<float, float> dOuterTof = {92.f, 680.f}; // Radius and length
auto& iotofPars = IOTOFBaseParam::Instance();
std::pair<float, float> dInnerTof = {iotofPars.itofRadius, iotofPars.itofLength}; // Radius and length
std::pair<float, float> dOuterTof = {iotofPars.otofRadius, iotofPars.otofLength}; // Radius and length
std::pair<float, float> radiusRangeDiskTof = {15.f, 100.f};
float zForwardTof = 370.f;
LOG(info) << "Configuring IOTOF layers with '" << pattern << "' pattern";
Expand Down Expand Up @@ -121,22 +122,23 @@ void Detector::configLayers(bool itof, bool otof, bool ftof, bool btof, std::str
} else {
LOG(fatal) << "IOTOF layer pattern " << pattern << " not recognized, exiting";
}

if (itof) { // iTOF
const std::string name = GeometryTGeo::getITOFLayerPattern();
const int nStaves = itofSegmented ? 24 : 0; // number of staves in segmented case
const double staveWidth = itofSegmented ? 5.42 : 0.0; // cm
const double staveTiltAngle = itofSegmented ? 3.0 : 0.0; // degrees
const int modulesPerStave = itofSegmented ? 10 : 0; // number of modules per stave in segmented case
const int nStaves = itofSegmented ? iotofPars.itofNStaves : 0; // number of staves in segmented case
const double staveWidth = itofSegmented ? 5.42 : 0.0; // cm
const double staveTiltAngle = itofSegmented ? iotofPars.itofStaveTilt : 0.0; // degrees
const int modulesPerStave = itofSegmented ? 7 : 0; // number of modules per stave in segmented case
mITOFLayer = ITOFLayer(name,
dInnerTof.first, 0.f, dInnerTof.second, 0.f, x2x0, itofSegmented ? ITOFLayer::kBarrelSegmented : ITOFLayer::kBarrel,
dInnerTof.first, 0.f, dInnerTof.second, 0.f, x2x0, itofSegmented ? (iotofPars.itofTurbo ? ITOFLayer::kBarrelSegmented : ITOFLayer::kBarrelStaggered) : ITOFLayer::kBarrel,
nStaves, staveWidth, staveTiltAngle, modulesPerStave, itofSegmented ? sensorThickness : 0.0f);
}
if (otof) { // oTOF
const std::string name = GeometryTGeo::getOTOFLayerPattern();
const int nStaves = otofSegmented ? 62 : 0; // number of staves in segmented case
const double staveWidth = otofSegmented ? 9.74 : 0.0; // cm
const double staveTiltAngle = otofSegmented ? 5.0 : 0.0; // degrees
const int modulesPerStave = otofSegmented ? 54 : 0; // number of modules per stave in segmented case
const int nStaves = otofSegmented ? iotofPars.otofNStaves : 0; // number of staves in segmented case
const double staveWidth = otofSegmented ? 9.74 : 0.0; // cm
const double staveTiltAngle = otofSegmented ? iotofPars.otofStaveTilt : 0.0; // degrees
const int modulesPerStave = otofSegmented ? 38 : 0; // number of modules per stave in segmented case
mOTOFLayer = OTOFLayer(name,
dOuterTof.first, 0.f, dOuterTof.second, 0.f, x2x0, otofSegmented ? OTOFLayer::kBarrelSegmented : OTOFLayer::kBarrel,
nStaves, staveWidth, staveTiltAngle, modulesPerStave, otofSegmented ? sensorThickness : 0.0f);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#pragma link off all classes;
#pragma link off all functions;

#pragma link C++ class o2::iotof::TF3Chip + ;
#pragma link C++ class o2::iotof::Layer + ;
#pragma link C++ class o2::iotof::ITOFLayer + ;
#pragma link C++ class o2::iotof::OTOFLayer + ;
Expand Down
Loading
Loading