@@ -95,7 +95,7 @@ void GeometryTGeo::Build(int loadTrans)
9595 int numberOfChipsTotal = 0 ;
9696
9797 // / filling the information for the VD
98- for (int i = 0 ; i < mNumberOfPetalsVD ; i++) {
98+ for (int i = 0 ; i < mNumberOfPetalsVD ; i++) {
9999 mNumberOfChipsPerPetalVD [i] = extractNumberOfChipsPerPetalVD ();
100100 numberOfChipsTotal += mNumberOfChipsPerPetalVD [i];
101101 mLastChipIndex [i] = numberOfChipsTotal - 1 ;
@@ -348,7 +348,7 @@ TGeoHMatrix* GeometryTGeo::extractMatrixSensor(int index) const
348348// __________________________________________________________________________
349349void GeometryTGeo::defineMLOTSensors ()
350350{
351- for (int i= 0 ; i< mSize ; i++){
351+ for (int i = 0 ; i < mSize ; i++) {
352352 if (getSubDetID (i) == 0 ) {
353353 continue ;
354354 }
@@ -359,12 +359,12 @@ void GeometryTGeo::defineMLOTSensors()
359359// __________________________________________________________________________
360360void GeometryTGeo::fillTrackingFramesCacheMLOT ()
361361{
362- // fill for every sensor of ML & OT its tracking frame parameters
363- if (!isTrackingFrameCachedMLOT () && !sensorsMLOT.empty ()){
362+ // fill for every sensor of ML & OT its tracking frame parameters
363+ if (!isTrackingFrameCachedMLOT () && !sensorsMLOT.empty ()) {
364364 size_t newSize = sensorsMLOT.size ();
365365 mCacheRefXMLOT .resize (newSize);
366366 mCacheRefAlphaMLOT .resize (newSize);
367- for (int i= 0 ; i< newSize; i++){
367+ for (int i = 0 ; i < newSize; i++) {
368368 int sensorId = sensorsMLOT[i];
369369 extractSensorXAlphaMLOT (sensorId, mCacheRefXMLOT [i], mCacheRefAlphaMLOT [i]);
370370 }
@@ -393,18 +393,18 @@ void GeometryTGeo::fillMatrixCache(int mask)
393393 }
394394 }
395395
396- // build T2L matrices for ML & OT !! VD is yet to be implemented once its geometry will be more refined
396+ // build T2L matrices for ML & OT !! VD is yet to be implemented once its geometry will be more refined
397397 if ((mask & o2::math_utils::bit2Mask (o2::math_utils::TransformType::T2L)) && !getCacheT2L ().isFilled ()) {
398398 LOGP (info, " Loading {} T2L matrices from TGeo for ML & OT" , getName ());
399- if (sensorsMLOT.size ()){
399+ if (sensorsMLOT.size ()) {
400400 int m_Size = sensorsMLOT.size ();
401401 auto & cacheT2L = getCacheT2L ();
402402 cacheT2L.setSize (m_Size);
403- for (int i= 0 ; i< m_Size; i++) {
403+ for (int i = 0 ; i < m_Size; i++) {
404404 int sensorID = sensorsMLOT[i];
405405 TGeoHMatrix& hm = createT2LMatrixMLOT (sensorID);
406- cacheT2L.setMatrix (Mat3D (hm), i); // here, sensorIDs from 0 to 374, sensorIDs shifted to 36 !
407- }
406+ cacheT2L.setMatrix (Mat3D (hm), i); // here, sensorIDs from 0 to 374, sensorIDs shifted to 36 !
407+ }
408408 }
409409 }
410410
@@ -957,45 +957,44 @@ void GeometryTGeo::Print(Option_t*) const
957957// __________________________________________________________________________
958958int GeometryTGeo::getBarrelLayer (int chipID) const
959959{
960- // for barrel layers only,
961- // so it would be consistent with number of layers i.e. from 0 to 10,
962- // starting from VD0 to OT10;
963- // skip the disks;
960+ // for barrel layers only,
961+ // so it would be consistent with number of layers i.e. from 0 to 10,
962+ // starting from VD0 to OT10;
963+ // skip the disks;
964964
965965 int subDetID = getSubDetID (chipID);
966966 int subLayerID = getLayer (chipID);
967-
967+
968968 if (subDetID < 0 || subDetID > 1 ) {
969- LOG (error) << " getBarrelLayer(): Invalid subDetID for barrel: " << subDetID
969+ LOG (error) << " getBarrelLayer(): Invalid subDetID for barrel: " << subDetID
970970 << " . Expected values are 0 or 1." ;
971- return -1 ;
971+ return -1 ;
972972 }
973973
974974 if (subLayerID < 0 || subLayerID > 7 ) {
975- LOG (error) << " getBarrelLayer(): Invalid subLayerID for barrel: " << subDetID
975+ LOG (error) << " getBarrelLayer(): Invalid subLayerID for barrel: " << subDetID
976976 << " . Expected values are between 0 and 7." ;
977- return -1 ;
977+ return -1 ;
978978 }
979979
980980 const int baseOffsets[] = {0 , 3 };
981981
982- return baseOffsets[subDetID] + subLayerID;
983-
982+ return baseOffsets[subDetID] + subLayerID;
984983}
985984
986985// __________________________________________________________________________
987- void GeometryTGeo::extractSensorXAlphaMLOT (int chipID, float & x, float & alp)
986+ void GeometryTGeo::extractSensorXAlphaMLOT (int chipID, float & x, float & alp)
988987{
989- // works for ML and OT only, a.k.a flat sensors !!!
988+ // works for ML and OT only, a.k.a flat sensors !!!
990989 double locA[3 ] = {-100 ., 0 ., 0 .}, locB[3 ] = {100 ., 0 ., 0 .}, gloA[3 ], gloB[3 ];
991990 double xp{0 }, yp{0 };
992991
993- if (getSubDetID (chipID) == 0 ){
994-
992+ if (getSubDetID (chipID) == 0 ) {
993+
995994 LOG (error) << " extractSensorXAlphaMLOT(): VD layers are not supported yet! chipID = " << chipID;
996995 return ;
997996
998- } else { // flat sensors, ML and OT
997+ } else { // flat sensors, ML and OT
999998 const TGeoHMatrix* matL2G = extractMatrixSensor (chipID);
1000999 matL2G->LocalToMaster (locA, gloA);
10011000 matL2G->LocalToMaster (locB, gloB);
@@ -1006,20 +1005,20 @@ void GeometryTGeo::extractSensorXAlphaMLOT(int chipID, float& x, float& alp)
10061005 }
10071006
10081007 alp = std::atan2 (yp, xp);
1009- x = std::hypot (xp, yp);
1008+ x = std::hypot (xp, yp);
10101009 o2::math_utils::bringTo02Pi (alp);
10111010
1012- // /TODO:
1013- // once the VD segmentation is done, VD should be added
1011+ // / TODO:
1012+ // once the VD segmentation is done, VD should be added
10141013}
10151014
10161015// __________________________________________________________________________
10171016TGeoHMatrix& GeometryTGeo::createT2LMatrixMLOT (int chipID)
10181017{
1019- // works only for ML & OT
1020- // for VD is yet to be implemented once we have more refined geometry
1021- if (getSubDetID (chipID) == 0 ){
1022-
1018+ // works only for ML & OT
1019+ // for VD is yet to be implemented once we have more refined geometry
1020+ if (getSubDetID (chipID) == 0 ) {
1021+
10231022 LOG (error) << " createT2LMatrixMLOT(): VD layers are not supported yet! chipID = " << chipID
10241023 << " returning dummy values! " ;
10251024 static TGeoHMatrix dummy;
@@ -1029,13 +1028,13 @@ TGeoHMatrix& GeometryTGeo::createT2LMatrixMLOT(int chipID)
10291028 static TGeoHMatrix t2l;
10301029 t2l.Clear ();
10311030 float alpha = getSensorRefAlphaMLOT (chipID);
1032- t2l.RotateZ (alpha * TMath::RadToDeg ());
1031+ t2l.RotateZ (alpha * TMath::RadToDeg ());
10331032 const TGeoHMatrix* matL2G = extractMatrixSensor (chipID);
10341033 const TGeoHMatrix& matL2Gi = matL2G->Inverse ();
10351034 t2l.MultiplyLeft (&matL2Gi);
10361035 return t2l;
10371036 }
10381037}
1039-
1038+
10401039} // namespace trk
10411040} // namespace o2
0 commit comments