Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ class DetID
static constexpr ID ACO = 15;
#ifdef ENABLE_UPGRADES
static constexpr ID IT3 = 16;
static constexpr ID Last = IT3;
static constexpr ID EC0 = 17;
static constexpr ID Last = EC0;
#else
static constexpr ID Last = ACO; ///< if extra detectors added, update this !!!
#endif
Expand Down Expand Up @@ -132,7 +133,7 @@ class DetID

static constexpr const char* sDetNames[nDetectors + 1] = ///< defined detector names
#ifdef ENABLE_UPGRADES
{"ITS", "TPC", "TRD", "TOF", "PHS", "CPV", "EMC", "HMP", "MFT", "MCH", "MID", "ZDC", "FT0", "FV0", "FDD", "ACO", "IT3", nullptr};
{"ITS", "TPC", "TRD", "TOF", "PHS", "CPV", "EMC", "HMP", "MFT", "MCH", "MID", "ZDC", "FT0", "FV0", "FDD", "ACO", "IT3", "EC0", nullptr};
#else
{"ITS", "TPC", "TRD", "TOF", "PHS", "CPV", "EMC", "HMP", "MFT", "MCH", "MID", "ZDC", "FT0", "FV0", "FDD", "ACO", nullptr};
#endif
Expand All @@ -144,7 +145,7 @@ class DetID
utils::bit2Mask(ACO)
#ifdef ENABLE_UPGRADES
,
utils::bit2Mask(IT3)
utils::bit2Mask(IT3), utils::bit2Mask(EC0)
#endif
};

Expand All @@ -155,7 +156,7 @@ class DetID
o2h::gDataOriginMID, o2h::gDataOriginZDC, o2h::gDataOriginFT0, o2h::gDataOriginFV0, o2h::gDataOriginFDD, o2h::gDataOriginACO
#ifdef ENABLE_UPGRADES
,
o2h::gDataOriginIT3
o2h::gDataOriginIT3, o2h::gDataOriginEC0
#endif
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class SimTraits
// initialization fragile since depends on correct order. Can we do better?

// clang-format off
static inline const std::array<std::vector<std::string>, DetID::nDetectors> DETECTORBRANCHNAMES =
{ /*ITS*/ VS{ "ITSHit" },
static inline const std::array<std::vector<std::string>, DetID::nDetectors> DETECTORBRANCHNAMES =
{ /*ITS*/ VS{ "ITSHit" },
/*TPC*/ VS{ "TPCHitsShiftedSector0",
"TPCHitsShiftedSector1",
"TPCHitsShiftedSector2",
Expand Down Expand Up @@ -89,7 +89,8 @@ class SimTraits
/*ACO*/ VS{ "ACOHit" }
#ifdef ENABLE_UPGRADES
,
/*IT3*/ VS{ "ITS3Hit" }
/*IT3*/ VS{ "ITS3Hit" },
/*EC0*/ VS{ "EC0Hit" }
#endif
};
// clang-format on
Expand Down Expand Up @@ -158,6 +159,13 @@ namespace tpc
class HitGroup;
}

#ifdef ENABLE_UPGRADES
namespace endcaps
{
class Hit;
}
#endif

namespace detectors
{

Expand Down Expand Up @@ -226,6 +234,10 @@ template <>
struct DetIDToHitTypes<o2::detectors::DetID::IT3> {
using HitType = o2::itsmft::Hit;
};
template <>
struct DetIDToHitTypes<o2::detectors::DetID::EC0> {
using HitType = o2::endcaps::Hit;
};
#endif

} // namespace detectors
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/Detectors/Common/src/DetID.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ constexpr DetID::ID DetID::ITS, DetID::TPC, DetID::TRD, DetID::TOF, DetID::PHS,
DetID::HMP, DetID::MFT, DetID::MCH, DetID::MID, DetID::ZDC, DetID::FT0, DetID::FV0, DetID::FDD, DetID::ACO, DetID::First, DetID::Last;

#ifdef ENABLE_UPGRADES
constexpr DetID::ID DetID::IT3;
constexpr DetID::ID DetID::IT3, DetID::EC0;
#endif

constexpr int DetID::nDetectors;
Expand Down
1 change: 1 addition & 0 deletions DataFormats/Headers/include/Headers/DataHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,7 @@ constexpr o2::header::DataOrigin gDataOriginTRD{"TRD"};
constexpr o2::header::DataOrigin gDataOriginZDC{"ZDC"};
#ifdef ENABLE_UPGRADES
constexpr o2::header::DataOrigin gDataOriginIT3{"IT3"};
constexpr o2::header::DataOrigin gDataOriginEC0{"EC0"};
#endif

//possible data types
Expand Down
2 changes: 1 addition & 1 deletion Detectors/Base/include/DetectorsBase/GeometryManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class GeometryManager : public TObject
private:
/// sensitive volume identifier composed from (det_mask<<sDetOffset)|(sensid&sSensorMask)
#ifdef ENABLE_UPGRADES
static constexpr UInt_t sDetOffset = 14; /// detector identifier will start from this bit
static constexpr UInt_t sDetOffset = 13; /// detector identifier will start from this bit
#else
static constexpr UInt_t sDetOffset = 15; /// detector identifier will start from this bit
#endif
Expand Down
2 changes: 2 additions & 0 deletions Detectors/Upgrades/PostLS4/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
# 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.

add_subdirectory(EndCaps)
13 changes: 13 additions & 0 deletions Detectors/Upgrades/PostLS4/EndCaps/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright CERN and copyright holders of ALICE O2. This software is distributed
# under the terms of the GNU General Public License v3 (GPL Version 3), copied
# verbatim in the file "COPYING".
#
# See http://alice-o2.web.cern.ch/license for full licensing information.
#
# 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.

add_subdirectory(commonLegacy)
add_subdirectory(EndCapsLayers)

17 changes: 17 additions & 0 deletions Detectors/Upgrades/PostLS4/EndCaps/EndCapsLayers/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright CERN and copyright holders of ALICE O2. This software is distributed
# under the terms of the GNU General Public License v3 (GPL Version 3), copied
# verbatim in the file "COPYING".
#
# See http://alice-o2.web.cern.ch/license for full licensing information.
#
# 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.

add_subdirectory(base)
add_subdirectory(DataFormats)
add_subdirectory(simulation)
add_subdirectory(reconstruction)
add_subdirectory(tracking)
add_subdirectory(workflow)
add_subdirectory(macros)
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright CERN and copyright holders of ALICE O2. This software is distributed
# under the terms of the GNU General Public License v3 (GPL Version 3), copied
# verbatim in the file "COPYING".
#
# See http://alice-o2.web.cern.ch/license for full licensing information.
#
# 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.


o2_add_library(DataFormatsEndCaps
SOURCES src/ClusterPattern.cxx
src/TopologyDictionary.cxx
PUBLIC_LINK_LIBRARIES O2::EndCapsBase #O2::ITSMFTBase
O2::ReconstructionDataFormats
O2::DataFormatsITSMFT
ms_gsl::ms_gsl)

o2_target_root_dictionary(DataFormatsEndCaps
HEADERS include/DataFormatsEndCaps/ClusterPattern.h
include/DataFormatsEndCaps/TopologyDictionary.h)
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// Copyright CERN and copyright holders of ALICE O2. This software is
// distributed under the terms of the GNU General Public License v3 (GPL
// Version 3), copied verbatim in the file "COPYING".
//
// See http://alice-o2.web.cern.ch/license for full licensing information.
//
// 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.

/// \file ClusterTopology.h
/// \brief Definition of the ClusterTopology class.
///
/// \author Luca Barioglio, University and INFN of Torino
///
/// Short ClusterPattern descritpion
///
/// This class contains the information of the pattern of a cluster of pixels (bitmask), together with the number of
/// rows and columns of the vinding box.
///

#ifndef ALICEO2_ENDCAPS_CLUSTERPATTERN_H
#define ALICEO2_ENDCAPS_CLUSTERPATTERN_H
#include <Rtypes.h>
#include <array>
#include <iosfwd>
#include <gsl/gsl>
#include "DataFormatsITSMFT/Cluster.h"

namespace o2
{
namespace endcaps
{
class ClusterTopology;
class TopologyDictionary;
class BuildTopologyDictionary;

class ClusterPattern
{
public:
/// Default constructor
ClusterPattern();
/// Standard constructor
ClusterPattern(int nRow, int nCol, const unsigned char patt[o2::itsmft::Cluster::kMaxPatternBytes]);
/// Constructor from cluster patterns
template <class iterator>
ClusterPattern(iterator& pattIt)
{
mBitmap[0] = *pattIt++;
mBitmap[1] = *pattIt++;
int nbits = mBitmap[0] * mBitmap[1];
int nBytes = nbits / 8;
if (((nbits) % 8) != 0)
nBytes++;
memcpy(&mBitmap[2], &(*pattIt), nBytes);
pattIt += nBytes;
}
/// Maximum number of bytes for the cluster puttern + 2 bytes respectively for the number of rows and columns of the bounding box
static constexpr int kExtendedPatternBytes = o2::itsmft::Cluster::kMaxPatternBytes + 2;
/// Returns the pattern
std::array<unsigned char, kExtendedPatternBytes> getPattern() const { return mBitmap; }
/// Returns a specific byte of the pattern
unsigned char getByte(int n) const;
/// Returns the number of rows
int getRowSpan() const { return (int)mBitmap[0]; }
/// Returns the number of columns
int getColumnSpan() const { return (int)mBitmap[1]; }
/// Returns the number of bytes used for the pattern
int getUsedBytes() const;
/// Prints the pattern
friend std::ostream& operator<<(std::ostream& os, const ClusterPattern& top);
/// Sets the pattern
void setPattern(int nRow, int nCol, const unsigned char patt[o2::itsmft::Cluster::kMaxPatternBytes]);
/// Sets the whole bitmask: the number of rows, the number of columns and the pattern
void setPattern(const unsigned char bitmask[kExtendedPatternBytes]);
/// Static: Compute pattern's COG position. Returns the number of fired pixels
static int getCOG(int nRow, int nCol, const unsigned char patt[o2::itsmft::Cluster::kMaxPatternBytes], float& xCOG, float& zCOG);
/// Compute pattern's COG position. Returns the number of fired pixels
int getCOG(float& xCOG, float& zCOG) const;

friend ClusterTopology;
friend TopologyDictionary;
friend BuildTopologyDictionary;

private:
/// Pattern:
///
/// - 1st byte: number of rows
/// - 2nd byte: number of columns
/// - remainig bytes : pixels of the cluster, where 1 is a fired pixel and 0
/// is a non-fired pixel. The number of bytes used for the pixels depends on
/// the size of the bounding box

std::array<unsigned char, kExtendedPatternBytes> mBitmap; ///< Cluster pattern: 1 is a fired pixel and 0 is a non-fired pixel

ClassDefNV(ClusterPattern, 1);
};
} // namespace endcaps
} // namespace o2
#endif /* ALICEO2_ENDCAPS_CLUSTERPATTERN_H */
Loading