@@ -38,38 +38,40 @@ int loadROFrameDataITS3(its::TimeFrame* tf,
3838
3939 std::vector<o2::its3::SegmentationSuperAlpide> segITS3;
4040 for (int iLayer{0 }; iLayer < geom->getNumberOfLayers () - 4 ; ++iLayer) {
41- segITS3.push_back (SegmentationSuperAlpide (iLayer));
41+ for (int iChip{0 }; iChip < geom->getNumberOfChipsPerLayer (iLayer); ++iChip) {
42+ segITS3.push_back (SegmentationSuperAlpide (iLayer));
43+ }
4244 }
45+ int nChipsITS3 = segITS3.size ();
4346
4447 tf->mNrof = 0 ;
4548 for (auto & rof : rofs) {
4649 for (int clusterId{rof.getFirstEntry ()}; clusterId < rof.getFirstEntry () + rof.getNEntries (); ++clusterId) {
4750 auto & c = clusters[clusterId];
48-
4951 auto sensorID = c.getSensorID ();
5052 int layer = layer = geom->getLayer (sensorID);
5153
5254 auto pattID = c.getPatternID ();
5355 o2::math_utils::Point3D<float > locXYZ;
5456 float sigmaY2 = o2::its::ioutils::DefClusError2Row, sigmaZ2 = o2::its::ioutils::DefClusError2Col, sigmaYZ = 0 ; // Dummy COG errors (about half pixel size)
55- float pitchRow = ((layer < geom-> getNumberOfLayers () - 4 ) ? segITS3[layer ].mPitchRow : o2::itsmft::SegmentationAlpide::PitchRow);
56- float pitchCol = ((layer < geom-> getNumberOfLayers () - 4 ) ? segITS3[layer ].mPitchCol : o2::itsmft::SegmentationAlpide::PitchCol);
57+ float pitchRow = ((sensorID < nChipsITS3) ? segITS3[sensorID ].mPitchRow : o2::itsmft::SegmentationAlpide::PitchRow);
58+ float pitchCol = ((sensorID < nChipsITS3) ? segITS3[sensorID ].mPitchCol : o2::itsmft::SegmentationAlpide::PitchCol);
5759 if (pattID != its3::CompCluster::InvalidPatternID) {
5860 sigmaY2 = dict->getErr2X (pattID) * pitchRow * pitchRow;
5961 sigmaZ2 = dict->getErr2Z (pattID) * pitchCol * pitchCol;
6062 if (!dict->isGroup (pattID)) {
61- locXYZ = dict->getClusterCoordinates (c, segITS3. size () );
63+ locXYZ = dict->getClusterCoordinates (c, nChipsITS3 );
6264 } else {
6365 o2::itsmft::ClusterPattern patt (pattIt);
64- locXYZ = dict->getClusterCoordinates (c, patt, segITS3. size () );
66+ locXYZ = dict->getClusterCoordinates (c, patt, nChipsITS3 );
6567 sigmaY2 = patt.getRowSpan () * patt.getRowSpan () * pitchRow * pitchRow / 12 .;
6668 sigmaZ2 = patt.getColumnSpan () * patt.getColumnSpan () * pitchCol * pitchCol / 12 .;
6769 }
6870 } else {
6971 o2::itsmft::ClusterPattern patt (pattIt);
7072 sigmaY2 = patt.getRowSpan () * patt.getRowSpan () * pitchRow * pitchRow / 12 .;
7173 sigmaZ2 = patt.getColumnSpan () * patt.getColumnSpan () * pitchCol * pitchCol / 12 .;
72- locXYZ = dict->getClusterCoordinates (c, patt, false , segITS3. size () );
74+ locXYZ = dict->getClusterCoordinates (c, patt, false , nChipsITS3 );
7375 }
7476
7577 // Transformation to the local --> global
0 commit comments