From e86d596a6ae62c2594bcf95ed3c163b3917518f0 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Thu, 15 Feb 2024 14:10:19 +0000 Subject: [PATCH] Please consider the following formatting changes --- .../include/DataFormatsITSMFT/CompCluster.h | 2 +- .../include/ITSBase/DescriptorInnerBarrel.h | 2 +- .../simulation/include/ITSMFTSimulation/Hit.h | 8 +- .../ITS3/base/src/SegmentationSuperAlpide.cxx | 1 - .../test/CheckSuperAlpideSegmentTrans.C | 95 ++++++++++--------- .../macros/test/CompareClustersAndDigits.C | 4 +- .../BuildTopologyDictionary.h | 1 - .../ITS3/reconstruction/src/IOUtils.cxx | 3 +- .../include/ITS3Simulation/Digitizer.h | 1 - .../include/ITS3Simulation/ITS3Services.h | 1 - .../ITS3/simulation/src/ITS3Services.cxx | 1 - .../include/ITS3Workflow/ClusterReaderSpec.h | 2 - .../include/ITS3Workflow/RecoWorkflow.h | 3 - .../DigitizerWorkflow/src/ITS3DigitizerSpec.h | 2 +- 14 files changed, 58 insertions(+), 68 deletions(-) diff --git a/DataFormats/Detectors/ITSMFT/common/include/DataFormatsITSMFT/CompCluster.h b/DataFormats/Detectors/ITSMFT/common/include/DataFormatsITSMFT/CompCluster.h index 06dc35178f623..10afd2d69a050 100644 --- a/DataFormats/Detectors/ITSMFT/common/include/DataFormatsITSMFT/CompCluster.h +++ b/DataFormats/Detectors/ITSMFT/common/include/DataFormatsITSMFT/CompCluster.h @@ -92,7 +92,7 @@ class CompCluster class CompClusterExt : public CompCluster { private: - UShort_t mChipID{}; ///< chip id + UShort_t mChipID{}; ///< chip id public: CompClusterExt(UShort_t row = 0, UShort_t col = 0, UShort_t patt = 0, UShort_t chipID = 0) : CompCluster(row, col, patt), mChipID(chipID) diff --git a/Detectors/ITSMFT/ITS/base/include/ITSBase/DescriptorInnerBarrel.h b/Detectors/ITSMFT/ITS/base/include/ITSBase/DescriptorInnerBarrel.h index e84eae4dc3bc8..87d4abfc4d123 100644 --- a/Detectors/ITSMFT/ITS/base/include/ITSBase/DescriptorInnerBarrel.h +++ b/Detectors/ITSMFT/ITS/base/include/ITSBase/DescriptorInnerBarrel.h @@ -31,7 +31,7 @@ class DescriptorInnerBarrel : public TObject /// Default constructor DescriptorInnerBarrel() = default; /// Standard constructor - DescriptorInnerBarrel(int nlayers): mNumLayers(nlayers) {}; + DescriptorInnerBarrel(int nlayers) : mNumLayers(nlayers){}; DescriptorInnerBarrel(const DescriptorInnerBarrel& src) = delete; DescriptorInnerBarrel& operator=(const DescriptorInnerBarrel& geom) = delete; diff --git a/Detectors/ITSMFT/common/simulation/include/ITSMFTSimulation/Hit.h b/Detectors/ITSMFT/common/simulation/include/ITSMFTSimulation/Hit.h index bfe645afa1e04..a41dd75ebf8ed 100644 --- a/Detectors/ITSMFT/common/simulation/include/ITSMFTSimulation/Hit.h +++ b/Detectors/ITSMFT/common/simulation/include/ITSMFTSimulation/Hit.h @@ -24,7 +24,6 @@ #include "CommonUtils/ShmAllocator.h" #endif - namespace o2::itsmft { @@ -113,9 +112,9 @@ class Hit : public o2::BasicXYZEHit private: math_utils::Vector3D mMomentum; ///< momentum at entrance math_utils::Point3D mPosStart; ///< position at entrance (base mPos give position on exit) - Float_t mE{}; ///< total energy at entrance - UChar_t mTrackStatusEnd{}; ///< MC status flag at exit - UChar_t mTrackStatusStart{}; ///< MC status at starting point + Float_t mE{}; ///< total energy at entrance + UChar_t mTrackStatusEnd{}; ///< MC status flag at exit + UChar_t mTrackStatusStart{}; ///< MC status at starting point ClassDefNV(Hit, 3); }; @@ -133,7 +132,6 @@ Hit::Hit(int trackID, unsigned short detID, const TVector3& startPos, const TVec } // namespace o2::itsmft - #ifdef USESHM namespace std { diff --git a/Detectors/Upgrades/ITS3/base/src/SegmentationSuperAlpide.cxx b/Detectors/Upgrades/ITS3/base/src/SegmentationSuperAlpide.cxx index 4dadbfb08fd77..26ca09f351bec 100644 --- a/Detectors/Upgrades/ITS3/base/src/SegmentationSuperAlpide.cxx +++ b/Detectors/Upgrades/ITS3/base/src/SegmentationSuperAlpide.cxx @@ -17,5 +17,4 @@ namespace o2::its3 { const std::array SuperSegmentations{0, 1, 2}; - } diff --git a/Detectors/Upgrades/ITS3/macros/test/CheckSuperAlpideSegmentTrans.C b/Detectors/Upgrades/ITS3/macros/test/CheckSuperAlpideSegmentTrans.C index 5a0634009992d..7eb54caba6269 100644 --- a/Detectors/Upgrades/ITS3/macros/test/CheckSuperAlpideSegmentTrans.C +++ b/Detectors/Upgrades/ITS3/macros/test/CheckSuperAlpideSegmentTrans.C @@ -42,8 +42,9 @@ constexpr auto nCols{SegmentationSuperAlpide::mNCols}; constexpr auto fLength{SegmentationSuperAlpide::mLength}; constexpr auto fWidth{SegmentationSuperAlpide::mWidth}; -TH2 *DrawReverseBins(TH2 *h) { - TH2F *h2 = new TH2F(Form("%s_invert", h->GetName()), h->GetTitle(), nCols, 0, +TH2* DrawReverseBins(TH2* h) +{ + TH2F* h2 = new TH2F(Form("%s_invert", h->GetName()), h->GetTitle(), nCols, 0, nCols, nRows, 0, nRows); h2->GetXaxis()->SetLabelOffset(999); @@ -60,67 +61,70 @@ TH2 *DrawReverseBins(TH2 *h) { return h2; } -void ReverseYAxis(TH1 *h) { +void ReverseYAxis(TH1* h) +{ gPad->Update(); - TGaxis *newaxis = - new TGaxis(gPad->GetUxmin(), gPad->GetUymax(), gPad->GetUxmin() - 0.001, - gPad->GetUymin(), h->GetYaxis()->GetXmin(), - h->GetYaxis()->GetXmax(), 510, "+"); + TGaxis* newaxis = + new TGaxis(gPad->GetUxmin(), gPad->GetUymax(), gPad->GetUxmin() - 0.001, + gPad->GetUymin(), h->GetYaxis()->GetXmin(), + h->GetYaxis()->GetXmax(), 510, "+"); newaxis->SetLabelOffset(-0.03); newaxis->Draw(); } -void DrawXAxisCol(TH1 *h) { +void DrawXAxisCol(TH1* h) +{ gPad->Update(); - TGaxis *newaxis = - new TGaxis(gPad->GetUxmin(), gPad->GetUymax(), gPad->GetUxmin() - 0.001, - gPad->GetUymin(), h->GetXaxis()->GetXmin(), - h->GetYaxis()->GetXmax(), 510, "+"); + TGaxis* newaxis = + new TGaxis(gPad->GetUxmin(), gPad->GetUymax(), gPad->GetUxmin() - 0.001, + gPad->GetUymin(), h->GetXaxis()->GetXmin(), + h->GetYaxis()->GetXmax(), 510, "+"); newaxis->SetLabelOffset(-0.03); newaxis->Draw(); } -void CheckSuperAlpideSegmentTrans() { +void CheckSuperAlpideSegmentTrans() +{ gStyle->SetOptStat(1111111); for (int iLayer{0}; iLayer < 3; ++iLayer) { double r_inner = constants::radii[iLayer] - constants::thickness / 2.; double r_outer = constants::radii[iLayer] + constants::thickness / 2.; double phiReadout_inner = - constants::tile::readout::width / r_inner * Rad2Deg; + constants::tile::readout::width / r_inner * Rad2Deg; double phiReadout_outer = - constants::tile::readout::width / r_outer * Rad2Deg; + constants::tile::readout::width / r_outer * Rad2Deg; double pixelarray_inner = - constants::pixelarray::width / r_inner * Rad2Deg + phiReadout_inner; + constants::pixelarray::width / r_inner * Rad2Deg + phiReadout_inner; double pixelarray_outer = - constants::pixelarray::width / r_outer * Rad2Deg + phiReadout_outer; + constants::pixelarray::width / r_outer * Rad2Deg + phiReadout_outer; auto arc_inner = - new TArc(0, 0, r_inner, phiReadout_inner, pixelarray_inner); + new TArc(0, 0, r_inner, phiReadout_inner, pixelarray_inner); arc_inner->SetFillStyle(0); arc_inner->SetLineColor(kBlue); auto arc_outer = - new TArc(0, 0, r_outer, phiReadout_outer, pixelarray_outer); + new TArc(0, 0, r_outer, phiReadout_outer, pixelarray_outer); arc_outer->SetFillStyle(0); arc_outer->SetLineColor(kRed); // Generate points on arc - auto *h_c2f_base = - new TH2F(Form("h_c2f_base_%d", iLayer), "Curved 2 Flat", 100, - -r_outer - 0.1, r_outer + 0.1, 100, -0.2, 1.2); - auto *h_f2c_res = - new TH2F(Form("h_f2c_res_%d", iLayer), "XY Residuals;x [cm]; y [cm]", - 101, -1e-3, 1e-3, 101, -2e-3, 2e-3); + auto* h_c2f_base = + new TH2F(Form("h_c2f_base_%d", iLayer), "Curved 2 Flat", 100, + -r_outer - 0.1, r_outer + 0.1, 100, -0.2, 1.2); + auto* h_f2c_res = + new TH2F(Form("h_f2c_res_%d", iLayer), "XY Residuals;x [cm]; y [cm]", + 101, -1e-3, 1e-3, 101, -2e-3, 2e-3); // double stepSize = pixelarray_inner - phiReadout_inner; double stepSize = 1e-3; - auto *g_arc_inner = new TGraph(); + auto* g_arc_inner = new TGraph(); g_arc_inner->SetMarkerStyle(5); g_arc_inner->SetMarkerColor(kBlue + 1); - auto *g_arc_inner_flat = new TGraph(); + auto* g_arc_inner_flat = new TGraph(); g_arc_inner_flat->SetMarkerStyle(5); g_arc_inner_flat->SetMarkerColor(kBlue + 1); - auto *g_arc_outer = new TGraph(); + auto* g_arc_outer = new TGraph(); g_arc_outer->SetMarkerStyle(5); g_arc_outer->SetMarkerColor(kRed + 1); - auto *g_arc_outer_flat = new TGraph(); + auto* g_arc_outer_flat = new TGraph(); g_arc_outer_flat->SetMarkerStyle(5); g_arc_outer_flat->SetMarkerColor(kRed + 1); double xmin_inner = {0}, xmax_inner = {0}; @@ -140,8 +144,7 @@ void CheckSuperAlpideSegmentTrans() { y_inner_flat); SuperSegmentations[iLayer].flatToCurved(x_inner_flat, y_inner_flat, x_inner_curved, y_inner_curved); - SuperSegmentations[iLayer].curvedToFlat(x_outer, y_outer, x_outer_flat,Axis - y_outer_flat); + SuperSegmentations[iLayer].curvedToFlat(x_outer, y_outer, x_outer_flat, Axis y_outer_flat); SuperSegmentations[iLayer].flatToCurved(x_outer_flat, y_outer_flat, x_outer_curved, y_outer_curved); g_arc_inner_flat->AddPoint(x_inner_flat, y_inner_flat); @@ -172,37 +175,37 @@ void CheckSuperAlpideSegmentTrans() { Info("C2F", "Outer: Xmin=%f Xmax=%f ---> %f", xmin_outer, xmax_outer, width_outer); if (double dev = - abs(width_inner - constants::pixelarray::width) / width_inner; + abs(width_inner - constants::pixelarray::width) / width_inner; dev > 0.001) { Error("C2F", "Inner: Not equal length projection! Real=%f (Dev=%f%%", constants::pixelarray::width, dev); } if (double dev = - abs(width_outer - constants::pixelarray::width) / width_outer; + abs(width_outer - constants::pixelarray::width) / width_outer; dev > 0.001) { Error("C2F", "Outer: Not equal length projection! Real=%f (Dev=%f%%", constants::pixelarray::width, dev); } // L2D, D2L transformations - auto *h_local = new TH2F(Form("h_local_%d", iLayer), "Local Coordinates", + auto* h_local = new TH2F(Form("h_local_%d", iLayer), "Local Coordinates", nCols, 0, nCols, nRows, 0, nRows); - auto *h_detector = new TH2F( - Form("h_detector_%d", iLayer), "Detector Coordinates", nCols * 4, - -fLength / 2., fLength / 2., nRows * 4, -fWidth / 2., fWidth / 2.); - auto *h_l2d_row = - new TH1F(Form("h_l2d_row_%d", iLayer), - "Residual: row_{gen} - row_{ii}; #DeltaRow", 1000, -10, 10); - auto *h_l2d_col = - new TH1F(Form("h_l2d_col_%d", iLayer), - "Residual: col_{gen} - col_{ii}; #DeltaCol", 1000, -10, 10); + auto* h_detector = new TH2F( + Form("h_detector_%d", iLayer), "Detector Coordinates", nCols * 4, + -fLength / 2., fLength / 2., nRows * 4, -fWidth / 2., fWidth / 2.); + auto* h_l2d_row = + new TH1F(Form("h_l2d_row_%d", iLayer), + "Residual: row_{gen} - row_{ii}; #DeltaRow", 1000, -10, 10); + auto* h_l2d_col = + new TH1F(Form("h_l2d_col_%d", iLayer), + "Residual: col_{gen} - col_{ii}; #DeltaCol", 1000, -10, 10); for (int iRow{0}; iRow < nRows; ++iRow) { for (int iCol{0}; iCol < nCols; ++iCol) { float xRow{0}, zCol{0}; int iiRow{0}, iiCol{0}; auto v1 = - SuperSegmentations[iLayer].detectorToLocal(iRow, iCol, xRow, zCol); + SuperSegmentations[iLayer].detectorToLocal(iRow, iCol, xRow, zCol); auto v2 = SuperSegmentations[iLayer].localToDetector(xRow, zCol, iiRow, iiCol); // Info("L2D", @@ -222,7 +225,7 @@ void CheckSuperAlpideSegmentTrans() { } // Plots - auto *c = new TCanvas(); + auto* c = new TCanvas(); c->SetTitle(Form("Layer %d", iLayer)); c->Divide(2, 3); c->cd(1); @@ -236,7 +239,7 @@ void CheckSuperAlpideSegmentTrans() { c->cd(2); h_f2c_res->Draw("colz"); c->cd(3); - auto *h_local_invert = DrawReverseBins(h_local); + auto* h_local_invert = DrawReverseBins(h_local); h_local_invert->Draw(); ReverseYAxis(h_local_invert); DrawXAxisCol(h_local_invert); diff --git a/Detectors/Upgrades/ITS3/macros/test/CompareClustersAndDigits.C b/Detectors/Upgrades/ITS3/macros/test/CompareClustersAndDigits.C index b1b41e2ae76fc..281d949ede466 100644 --- a/Detectors/Upgrades/ITS3/macros/test/CompareClustersAndDigits.C +++ b/Detectors/Upgrades/ITS3/macros/test/CompareClustersAndDigits.C @@ -290,7 +290,7 @@ void CompareClustersAndDigits(std::string clusfile = "o2clus_it3.root", locHMiddle.SetXYZ(0.5f * (locHEnd.X() + locHStart.X()), 0.5f * (locHEnd.Y() + locHStart.Y()), 0.5f * (locHEnd.Z() + locHStart.Z())); int rowHS, colHS, rowHM, colHM, rowHE, colHE, colC, rowC; - bool v1,v2,v3,v4; + bool v1, v2, v3, v4; if (isIB) { v1 = o2::its3::SuperSegmentations[layer].localToDetector(locHStart.X(), locHStart.Z(), rowHS, colHS); v2 = o2::its3::SuperSegmentations[layer].localToDetector(locHMiddle.X(), locHMiddle.Z(), rowHM, colHM); @@ -302,7 +302,7 @@ void CompareClustersAndDigits(std::string clusfile = "o2clus_it3.root", v3 = o2::itsmft::SegmentationAlpide::localToDetector(locHEnd.X(), locHEnd.Z(), rowHE, colHE); v4 = o2::itsmft::SegmentationAlpide::localToDetector(locC.X(), locC.Z(), rowC, colC); } - if (!v1 || !v2 || !v3||!v4) { + if (!v1 || !v2 || !v3 || !v4) { // sometimes the transformation for hit start/end do not work since they can beyond the chip if they are // at the edge, so for visualisation purposes we do not draw these clusters continue; diff --git a/Detectors/Upgrades/ITS3/reconstruction/include/ITS3Reconstruction/BuildTopologyDictionary.h b/Detectors/Upgrades/ITS3/reconstruction/include/ITS3Reconstruction/BuildTopologyDictionary.h index f346205da7a32..7df603bb29fb2 100644 --- a/Detectors/Upgrades/ITS3/reconstruction/include/ITS3Reconstruction/BuildTopologyDictionary.h +++ b/Detectors/Upgrades/ITS3/reconstruction/include/ITS3Reconstruction/BuildTopologyDictionary.h @@ -54,5 +54,4 @@ class BuildTopologyDictionary }; } // namespace o2::its3 - #endif diff --git a/Detectors/Upgrades/ITS3/reconstruction/src/IOUtils.cxx b/Detectors/Upgrades/ITS3/reconstruction/src/IOUtils.cxx index 2cb5ad9786656..fd8a7d333037e 100644 --- a/Detectors/Upgrades/ITS3/reconstruction/src/IOUtils.cxx +++ b/Detectors/Upgrades/ITS3/reconstruction/src/IOUtils.cxx @@ -21,7 +21,6 @@ #include #include "ITS3Base/SpecsV2.h" - namespace o2::its3::ioutils { using SSAlpide = o2::its3::SegmentationSuperAlpide; @@ -53,7 +52,7 @@ int loadROFrameDataITS3(its::TimeFrame* tf, sigmaY2 = dict->getErr2X(pattID) * pitchRow * pitchRow; sigmaZ2 = dict->getErr2Z(pattID) * pitchCol * pitchCol; if (!dict->isGroup(pattID)) { - locXYZ = dict->getClusterCoordinates(c ); + locXYZ = dict->getClusterCoordinates(c); } else { o2::itsmft::ClusterPattern patt(pattIt); locXYZ = dict->getClusterCoordinates(c, patt); diff --git a/Detectors/Upgrades/ITS3/simulation/include/ITS3Simulation/Digitizer.h b/Detectors/Upgrades/ITS3/simulation/include/ITS3Simulation/Digitizer.h index c1b53bc6f1cba..49afd1202088c 100644 --- a/Detectors/Upgrades/ITS3/simulation/include/ITS3Simulation/Digitizer.h +++ b/Detectors/Upgrades/ITS3/simulation/include/ITS3Simulation/Digitizer.h @@ -121,5 +121,4 @@ class Digitizer : public TObject }; } // namespace o2::its3 - #endif /* ALICEO2_ITS3_DIGITIZER_H */ diff --git a/Detectors/Upgrades/ITS3/simulation/include/ITS3Simulation/ITS3Services.h b/Detectors/Upgrades/ITS3/simulation/include/ITS3Simulation/ITS3Services.h index 5b6f8ea1efa77..2b191a730781a 100644 --- a/Detectors/Upgrades/ITS3/simulation/include/ITS3Simulation/ITS3Services.h +++ b/Detectors/Upgrades/ITS3/simulation/include/ITS3Simulation/ITS3Services.h @@ -32,5 +32,4 @@ class ITS3Services } // namespace o2::its3 - #endif diff --git a/Detectors/Upgrades/ITS3/simulation/src/ITS3Services.cxx b/Detectors/Upgrades/ITS3/simulation/src/ITS3Services.cxx index dc610b33b43e1..cc2255a2b2085 100644 --- a/Detectors/Upgrades/ITS3/simulation/src/ITS3Services.cxx +++ b/Detectors/Upgrades/ITS3/simulation/src/ITS3Services.cxx @@ -17,7 +17,6 @@ #include // for LOG - namespace o2::its3 { diff --git a/Detectors/Upgrades/ITS3/workflow/include/ITS3Workflow/ClusterReaderSpec.h b/Detectors/Upgrades/ITS3/workflow/include/ITS3Workflow/ClusterReaderSpec.h index 2c1b9e0b63d83..5a95b75bf7933 100644 --- a/Detectors/Upgrades/ITS3/workflow/include/ITS3Workflow/ClusterReaderSpec.h +++ b/Detectors/Upgrades/ITS3/workflow/include/ITS3Workflow/ClusterReaderSpec.h @@ -27,7 +27,6 @@ using namespace o2::framework; - namespace o2::its3 { @@ -73,5 +72,4 @@ framework::DataProcessorSpec getITS3ClusterReaderSpec(bool useMC = true, bool us } // namespace o2::its3 - #endif /* O2_ITSMFT_CLUSTERREADER */ diff --git a/Detectors/Upgrades/ITS3/workflow/include/ITS3Workflow/RecoWorkflow.h b/Detectors/Upgrades/ITS3/workflow/include/ITS3Workflow/RecoWorkflow.h index f213037b399ce..bbe1067c30db3 100644 --- a/Detectors/Upgrades/ITS3/workflow/include/ITS3Workflow/RecoWorkflow.h +++ b/Detectors/Upgrades/ITS3/workflow/include/ITS3Workflow/RecoWorkflow.h @@ -20,7 +20,6 @@ #include "GPUReconstruction.h" #include "GPUChainITS.h" - namespace o2::its3::reco_workflow { @@ -33,6 +32,4 @@ framework::WorkflowSpec getWorkflow(bool useMC, int useTrig); } - - #endif diff --git a/Steer/DigitizerWorkflow/src/ITS3DigitizerSpec.h b/Steer/DigitizerWorkflow/src/ITS3DigitizerSpec.h index 2bff4f9798a8b..33fe2383ec21f 100644 --- a/Steer/DigitizerWorkflow/src/ITS3DigitizerSpec.h +++ b/Steer/DigitizerWorkflow/src/ITS3DigitizerSpec.h @@ -20,6 +20,6 @@ namespace o2::its3 o2::framework::DataProcessorSpec getITS3DigitizerSpec(int channel, bool mctruth = true); } // namespace o2::its3 - // end namespace o2 + // end namespace o2 #endif /* STEER_DIGITIZERWORKFLOW_ITS3DIGITIZER_H_ */