Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please consider the following formatting changes to #12711 #19

Closed
wants to merge 1 commit into from
Closed
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 @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "CommonUtils/ShmAllocator.h"
#endif


namespace o2::itsmft
{

Expand Down Expand Up @@ -113,9 +112,9 @@ class Hit : public o2::BasicXYZEHit<Float_t, Float_t>
private:
math_utils::Vector3D<Float_t> mMomentum; ///< momentum at entrance
math_utils::Point3D<Float_t> 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);
};
Expand All @@ -133,7 +132,6 @@ Hit::Hit(int trackID, unsigned short detID, const TVector3& startPos, const TVec

} // namespace o2::itsmft


#ifdef USESHM
namespace std
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ namespace o2::its3
{

const std::array<SegmentationSuperAlpide, constants::nLayers> SuperSegmentations{0, 1, 2};

}
95 changes: 49 additions & 46 deletions Detectors/Upgrades/ITS3/macros/test/CheckSuperAlpideSegmentTrans.C
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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};
Expand All @@ -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);
Expand Down Expand Up @@ -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",
Expand All @@ -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);
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// 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.

Check failure on line 10 in Detectors/Upgrades/ITS3/macros/test/CompareClustersAndDigits.C

View workflow job for this annotation

GitHub Actions / PR formatting / copyright headers

Missing or malformed copyright notice

This source file is missing the correct copyright notice.

/// \file CheckClusters.C
/// \brief Simple macro to check ITSU clusters
Expand Down Expand Up @@ -290,7 +290,7 @@
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);
Expand All @@ -302,7 +302,7 @@
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,4 @@ class BuildTopologyDictionary
};
} // namespace o2::its3


#endif
3 changes: 1 addition & 2 deletions Detectors/Upgrades/ITS3/reconstruction/src/IOUtils.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <Framework/Logger.h>
#include "ITS3Base/SpecsV2.h"


namespace o2::its3::ioutils
{
using SSAlpide = o2::its3::SegmentationSuperAlpide;
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,4 @@ class Digitizer : public TObject
};
} // namespace o2::its3


#endif /* ALICEO2_ITS3_DIGITIZER_H */
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,4 @@ class ITS3Services

} // namespace o2::its3


#endif
1 change: 0 additions & 1 deletion Detectors/Upgrades/ITS3/simulation/src/ITS3Services.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

#include <fairlogger/Logger.h> // for LOG


namespace o2::its3
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

using namespace o2::framework;


namespace o2::its3
{

Expand Down Expand Up @@ -73,5 +72,4 @@ framework::DataProcessorSpec getITS3ClusterReaderSpec(bool useMC = true, bool us

} // namespace o2::its3


#endif /* O2_ITSMFT_CLUSTERREADER */
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "GPUReconstruction.h"
#include "GPUChainITS.h"


namespace o2::its3::reco_workflow
{

Expand All @@ -33,6 +32,4 @@ framework::WorkflowSpec getWorkflow(bool useMC,
int useTrig);
}



#endif
2 changes: 1 addition & 1 deletion Steer/DigitizerWorkflow/src/ITS3DigitizerSpec.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_ */
Loading