Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class GeometryTGeo : public o2::detectors::DetMatrixCache
int getNumberOfHalfStaves(int lay) const { return mNumberOfHalfStaves[lay]; }

int getNumberOfDisksMLOT() const { return mNumberOfDisksMLOT; }
int getNumberOfStavesInDisk(int lay) const { return mFirstStaveIndexDisc[lay+1] - mFirstStaveIndexDisc[lay]; }
int getNumberOfStavesInDisk(int lay) const { return mFirstStaveIndexDisc[lay + 1] - mFirstStaveIndexDisc[lay]; }
bool isOwner() const { return mOwner; }
void setOwner(bool v) { mOwner = v; }

Expand Down Expand Up @@ -257,12 +257,12 @@ class GeometryTGeo : public o2::detectors::DetMatrixCache
// std::vector<int> mNumberOfChipsPerStave; ///< number of chips per stave in ML/OT
// std::vector<int> mNumberOfChipsPerHalfStave; ///< number of chips per half stave in ML/OT
// std::vector<int> mNumberOfChipsPerModule; ///< number of chips per module in ML/OT
std::vector<unsigned short> mLastChipIndex; ///< max ID of the detector in the petal(VD) or layer(MLOT)
std::vector<unsigned short> mLastChipIndexVD; ///< max ID of the detector in the layer for the VD
std::vector<unsigned short> mLastChipIndex; ///< max ID of the detector in the petal(VD) or layer(MLOT)
std::vector<unsigned short> mLastChipIndexVD; ///< max ID of the detector in the layer for the VD
// std::vector<unsigned short> mLastChipIndexMLOT; ///< max ID of the detector in the layer for the MLOT
std::vector<unsigned short> mFirstChipIndexMLOTDisc; ///< ID of the first sensor chip in the layer for the MLOT; array size is one larger than the number of disks; last element equals nChips+1
std::vector<unsigned short> mFirstStaveIndexDisc; ///< Index of first stave (abs ID) in each MLOT Disc
std::vector<unsigned short> mFirstChipIndexStave; ///< Index of first chip on stave (Discs)
std::vector<unsigned short> mFirstStaveIndexDisc; ///< Index of first stave (abs ID) in each MLOT Disc
std::vector<unsigned short> mFirstChipIndexStave; ///< Index of first chip on stave (Discs)
std::array<char, MAXLAYERS> mLayerToWrapper; ///< Layer to wrapper correspondence, not implemented yet

bool mOwner = true; //! is it owned by the singleton?
Expand Down
2 changes: 1 addition & 1 deletion Detectors/Upgrades/ALICE3/TRK/base/include/TRKBase/Specs.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ constexpr double thickness{20 * mu};

namespace MLOTDisks
{
constexpr int nLayers{12}; // number of disks in the ML and OT
constexpr int nLayers{12}; // number of disks in the ML and OT
}

} // namespace o2::trk::constants
Expand Down
19 changes: 8 additions & 11 deletions Detectors/Upgrades/ALICE3/TRK/base/src/GeometryTGeo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -303,15 +303,14 @@ int GeometryTGeo::getLayerTRK(int index) const
}
int subDetID = getSubDetID(index);
int firstDetLayer = 0;
// NOTE: taking these from o2::trk::constants, instead

// NOTE: taking these from o2::trk::constants, instead
// of the geometry that is constructed in the 'Build' function
// risks inconsistencies...

if (subDetID == 1) {
firstDetLayer = o2::trk::constants::VD::petal::nLayers;
}
else if (subDetID == 2) {
} else if (subDetID == 2) {
firstDetLayer = o2::trk::constants::VD::petal::nLayers + o2::trk::constants::ML::nLayers + o2::trk::constants::OT::nLayers;
}
return firstDetLayer + getLayer(index);
Expand Down Expand Up @@ -437,8 +436,7 @@ int GeometryTGeo::getChip(int index) const
int chipsPerModule = Nchip;
return index % chipsPerModule;
}
}
else if (subDetID == 2) { // Forward disks (FT3)
} else if (subDetID == 2) { // Forward disks (FT3)
int lay = getLayer(index);
int stave = getStave(index);
return index - mFirstChipIndexStave[mFirstStaveIndexDisc[lay] + stave];
Expand Down Expand Up @@ -564,12 +562,11 @@ TString GeometryTGeo::getMatrixPath(int index) const
path += Form("%s%d_%d/", getTRKChipPattern(), layer, chip); // TRKChipx_y
path += Form("%s%d_1/", getTRKSensorPattern(), layer); // TRKSensorx_1
}
}
else if (subDetID == 2) {
} else if (subDetID == 2) {
int direction = 0;
if (layer >= mNumberOfDisksMLOT/2) {
if (layer >= mNumberOfDisksMLOT / 2) {
direction = 1;
layer -= mNumberOfDisksMLOT/2;
layer -= mNumberOfDisksMLOT / 2;
}
path += Form("%s%d_%d_1/", getFT3LayerPattern(), direction, layer);
path += Form("FT3Sensor_Active_%d_%d_%d_%d_%d", direction, layer, stave, chip, chip);
Expand Down Expand Up @@ -755,7 +752,7 @@ int GeometryTGeo::extractNumberOfDisksMLOT(int dir) const
int numDiscs = 0;
while (gGeoManager->GetVolume(composeSymNameLayerFT3(dir, numDiscs))) {
numDiscs++;
} // Check maybe subvolume?
} // Check maybe subvolume?
return numDiscs; // Assume same # layers on both sides
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class Digitizer
{
if (subDetID == 0) { // VD
return constants::VD::petal::layer::nRows[layer];
} else if (subDetID == 1 || subDetID == 2) { // ML/OT
} else if (subDetID == 1 || subDetID == 2) { // ML/OT
return constants::moduleMLOT::chip::nRows;
}
return 0;
Expand Down
10 changes: 5 additions & 5 deletions Detectors/Upgrades/ALICE3/TRK/simulation/src/Digitizer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ void Digitizer::process(const std::vector<Hit>* hits, int evID, int srcID, int l
<< " at time " << mEventTime.getTimeNS() << " ROFrame = " << mNewROFrame
<< " Min/Max ROFrames " << mROFrameMin << "/" << mROFrameMax << " layer " << layer;

//std::cout << "Printing segmentation info: " << std::endl;
//SegmentationChip::Print();
// std::cout << "Printing segmentation info: " << std::endl;
// SegmentationChip::Print();

// is there something to flush ?
if (mNewROFrame > mROFrameMin) {
Expand Down Expand Up @@ -310,7 +310,7 @@ void Digitizer::processHit(const o2::trk::Hit& hit, uint32_t& maxFr, int evID, i

const auto& matrix = mGeometry->getMatrixL2G(hit.GetDetectorID());
// matrix.print();

/// transorm from the global detector coordinates to the local detector coordinates
math_utils::Vector3D<float> xyzLocS(matrix ^ (hit.GetPosStart())); // start position in sensor frame
math_utils::Vector3D<float> xyzLocE(matrix ^ (hit.GetPos())); // end position in sensor frame
Expand Down Expand Up @@ -403,8 +403,8 @@ void Digitizer::processHit(const o2::trk::Hit& hit, uint32_t& maxFr, int evID, i
float cRowPix = 0.f, cColPix = 0.f; // local coordinate of the current pixel center

const o2::trk::ChipSimResponse* resp = getChipResponse(chipID);
//std::cout << "Printing chip response:" << std::endl;
//resp->print();
// std::cout << "Printing chip response:" << std::endl;
// resp->print();

// take into account that the ChipSimResponse depth defintion has different min/max boundaries
// although the max should coincide with the surface of the epitaxial layer, which in the chip
Expand Down
Loading