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

FVD detector #13476

Open
wants to merge 27 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1481922
basic geometry and data format for new detector
pkurash Sep 2, 2024
07dc65a
Merge branch 'AliceO2Group:dev' into new-detector3
pkurash Sep 2, 2024
c417fcb
fixed geometry and json
pkurash Sep 3, 2024
58436cd
Merge branch 'new-detector3' of github.com:pkurash/AliceO2 into new-d…
pkurash Sep 3, 2024
44bef8c
fixed hits
pkurash Sep 3, 2024
deadde8
updated geometry and detector source code
pkurash Sep 3, 2024
e77714d
Merge branch 'AliceO2Group:dev' into new-detector4
pkurash Sep 4, 2024
dd8656e
updated geometry and detector source code
pkurash Sep 3, 2024
ad83fef
Merge branch 'new-detector4' of github.com:pkurash/AliceO2 into new-d…
pkurash Sep 4, 2024
73d3a4a
minor fixes
pkurash Sep 6, 2024
9c4883c
Merge branch 'AliceO2Group:dev' into new-detector4
pkurash Sep 7, 2024
605bf80
Merge branch 'AliceO2Group:dev' into new-detector4
pkurash Sep 9, 2024
f500ae8
Merge branch 'AliceO2Group:dev' into new-detector4
pkurash Sep 11, 2024
863ff24
sensitive volumes
pkurash Sep 7, 2024
69019f6
geometry update
pkurash Sep 12, 2024
84943c2
geometry update
pkurash Sep 12, 2024
d04a89c
Merge branch 'AliceO2Group:dev' into new-detector4
pkurash Sep 14, 2024
7c92e44
enable hits
pkurash Sep 16, 2024
2b00551
enable hits
pkurash Sep 16, 2024
c070c3f
enable hits
pkurash Sep 16, 2024
1ea137b
fix channel ids
pkurash Sep 18, 2024
340cf47
More flexible confgurable parameters
pkurash Sep 18, 2024
f77b1c2
More flexible confgurable parameters
pkurash Sep 18, 2024
cddc156
Merge branch 'AliceO2Group:dev' into new-detector4
pkurash Sep 18, 2024
63bff65
update parameters and geometry
pkurash Sep 23, 2024
9750bf6
Merge branch 'AliceO2Group:dev' into new-detector4
pkurash Sep 28, 2024
7c9bb95
Merge branch 'AliceO2Group:dev' into new-detector4
pkurash Oct 1, 2024
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
9 changes: 6 additions & 3 deletions Common/SimConfig/src/SimConfig.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ void SimConfig::determineActiveModules(std::vector<std::string> const& inputargs
activeModules[i] != "TF3" &&
activeModules[i] != "RCH" &&
activeModules[i] != "MI3" &&
activeModules[i] != "ECL") {
activeModules[i] != "ECL" &&
activeModules[i] != "FVD") {
LOGP(fatal, "List of active modules contains {}, which is not a module from the upgrades.", activeModules[i]);
}
}
Expand All @@ -112,7 +113,8 @@ void SimConfig::determineActiveModules(std::vector<std::string> const& inputargs
activeModules[i] == "TF3" ||
activeModules[i] == "RCH" ||
activeModules[i] == "MI3" ||
activeModules[i] == "ECL") {
activeModules[i] == "ECL" ||
activeModules[i] == "FVD") {
LOGP(fatal, "List of active modules contains {}, which is not a run 3 module", activeModules[i]);
}
}
Expand All @@ -130,6 +132,7 @@ void SimConfig::determineActiveModules(std::vector<std::string> const& inputargs
d == DetID::TF3 ||
d == DetID::RCH ||
d == DetID::ECL ||
d == DetID::FVD ||
d == DetID::MI3) {
activeModules.emplace_back(DetID::getName(d));
}
Expand All @@ -149,7 +152,7 @@ void SimConfig::determineActiveModules(std::vector<std::string> const& inputargs
activeModules.emplace_back("SHIL");
for (int d = DetID::First; d <= DetID::Last; ++d) {
#ifdef ENABLE_UPGRADES
if (d != DetID::IT3 && d != DetID::TRK && d != DetID::FT3 && d != DetID::FCT && d != DetID::TF3 && d != DetID::RCH && d != DetID::ECL && d != DetID::MI3) {
if (d != DetID::IT3 && d != DetID::TRK && d != DetID::FT3 && d != DetID::FCT && d != DetID::TF3 && d != DetID::RCH && d != DetID::ECL && d != DetID::FVD && d != DetID::MI3) {
activeModules.emplace_back(DetID::getName(d));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,10 @@ class DetID
static constexpr ID RCH = 23;
static constexpr ID MI3 = 24;
static constexpr ID ECL = 25;
static constexpr ID Last = ECL;
static constexpr ID FVD = 26;
static constexpr ID Last = FVD;
#else
static constexpr ID Last = FOC; ///< if extra detectors added, update this !!!
static constexpr ID Last = FVD; ///< if extra detectors added, update this !!!
pkurash marked this conversation as resolved.
Show resolved Hide resolved
#endif
static constexpr ID First = ITS;

Expand Down Expand Up @@ -181,7 +182,7 @@ class DetID
// detector names, will be defined in DataSources
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", "TST", "CTP", "FOC", "IT3", "TRK", "FT3", "FCT", "TF3", "RCH", "MI3", "ECL", nullptr};
{"ITS", "TPC", "TRD", "TOF", "PHS", "CPV", "EMC", "HMP", "MFT", "MCH", "MID", "ZDC", "FT0", "FV0", "FDD", "TST", "CTP", "FOC", "IT3", "TRK", "FT3", "FCT", "TF3", "RCH", "MI3", "ECL", "FVD", nullptr};
#else
{"ITS", "TPC", "TRD", "TOF", "PHS", "CPV", "EMC", "HMP", "MFT", "MCH", "MID", "ZDC", "FT0", "FV0", "FDD", "TST", "CTP", "FOC", nullptr};
#endif
Expand All @@ -195,7 +196,7 @@ class DetID
#ifdef ENABLE_UPGRADES
,
o2h::gDataOriginIT3, o2h::gDataOriginTRK, o2h::gDataOriginFT3, o2h::gDataOriginFCT, o2h::gDataOriginTF3,
o2h::gDataOriginRCH, o2h::gDataOriginMI3, o2h::gDataOriginECL
o2h::gDataOriginRCH, o2h::gDataOriginMI3, o2h::gDataOriginECL, o2h::gDataOriginFVD
#endif
};
#endif // GPUCA_GPUCODE_DEVICE
Expand All @@ -211,10 +212,11 @@ GPUconstexpr() DetID::mask_t sMasks[DetID::nDetectors] = ///< detectot masks
DetID::mask_t(math_utils::bit2Mask(DetID::CPV)), DetID::mask_t(math_utils::bit2Mask(DetID::EMC)), DetID::mask_t(math_utils::bit2Mask(DetID::HMP)), DetID::mask_t(math_utils::bit2Mask(DetID::MFT)), DetID::mask_t(math_utils::bit2Mask(DetID::MCH)),
DetID::mask_t(math_utils::bit2Mask(DetID::MID)), DetID::mask_t(math_utils::bit2Mask(DetID::ZDC)), DetID::mask_t(math_utils::bit2Mask(DetID::FT0)), DetID::mask_t(math_utils::bit2Mask(DetID::FV0)), DetID::mask_t(math_utils::bit2Mask(DetID::FDD)),
DetID::mask_t(math_utils::bit2Mask(DetID::TST)), DetID::mask_t(math_utils::bit2Mask(DetID::CTP)), DetID::mask_t(math_utils::bit2Mask(DetID::FOC))

#ifdef ENABLE_UPGRADES
,
DetID::mask_t(math_utils::bit2Mask(DetID::IT3)), DetID::mask_t(math_utils::bit2Mask(DetID::TRK)), DetID::mask_t(math_utils::bit2Mask(DetID::FT3)), DetID::mask_t(math_utils::bit2Mask(DetID::FCT)), DetID::mask_t(math_utils::bit2Mask(DetID::TF3)),
DetID::mask_t(math_utils::bit2Mask(DetID::RCH)), DetID::mask_t(math_utils::bit2Mask(DetID::MI3)), DetID::mask_t(math_utils::bit2Mask(DetID::ECL))
DetID::mask_t(math_utils::bit2Mask(DetID::RCH)), DetID::mask_t(math_utils::bit2Mask(DetID::MI3)), DetID::mask_t(math_utils::bit2Mask(DetID::ECL)), DetID::mask_t(math_utils::bit2Mask(DetID::FVD))
#endif
};
} // namespace detid_internal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ class SimTraits
/*TF3*/ VS{ "TF3Hit" },
/*RCH*/ VS{ "RCHHit" },
/*MI3*/ VS{ "MI3Hit" },
/*ECL*/ VS{ "ECLHit" }
/*ECL*/ VS{ "ECLHit" },
/*FVD*/ VS{ "FVDHit" }
#endif
};
// clang-format on
Expand Down
1 change: 1 addition & 0 deletions DataFormats/Detectors/Upgrades/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
# or submit itself to any jurisdiction.

message(STATUS "Building dataformats for upgrades")
add_subdirectory(FVD)
19 changes: 19 additions & 0 deletions DataFormats/Detectors/Upgrades/FVD/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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.

o2_add_library(DataFormatsFVD
PUBLIC_LINK_LIBRARIES O2::FVDBase
O2::CommonDataFormat
)

o2_target_root_dictionary(DataFormatsFVD
HEADERS include/DataFormatsFVD/Hit.h

Check failure on line 18 in DataFormats/Detectors/Upgrades/FVD/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / PR formatting / whitespace

Tab characters found

Indent code using spaces instead of tabs.
)
108 changes: 108 additions & 0 deletions DataFormats/Detectors/Upgrades/FVD/include/DataFormatsFVD/Hit.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
// Copyright 2019-2024 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.

#ifndef ALICEO2_FVD_HIT_H_
#define ALICEO2_FVD_HIT_H_

#include "SimulationDataFormat/BaseHits.h" // for BasicXYZEHit
#include "CommonUtils/ShmAllocator.h"
#include "TVector3.h"

namespace o2
{
namespace fvd
{

class Hit : public o2::BasicXYZEHit<Float_t, Float_t>
{

public:
Hit() = default;

inline Hit(int trackID,
int cellID,
const math_utils::Point3D<float>& startPos,
const math_utils::Point3D<float>& endPos,
const math_utils::Vector3D<float>& startMom,
double startE,
double endTime,
double eLoss,
int particlePdg);

// Entrance position getters
math_utils::Point3D<Float_t> const& GetPosStart() const { return mPositionStart; }
Float_t GetStartX() const { return mPositionStart.X(); }
Float_t GetStartY() const { return mPositionStart.Y(); }
Float_t GetStartZ() const { return mPositionStart.Z(); }
template <typename F>
void GetStartPosition(F& x, F& y, F& z) const
{
x = GetStartX();
y = GetStartY();
z = GetStartZ();
}

// Momentum getters
math_utils::Vector3D<Float_t> const& GetMomentum() const { return mMomentumStart; }

math_utils::Vector3D<Float_t>& GetMomentum() { return mMomentumStart; }
Float_t GetPx() const { return mMomentumStart.X(); }
Float_t GetPy() const { return mMomentumStart.Y(); }
Float_t GetPz() const { return mMomentumStart.Z(); }
Float_t GetE() const { return mEnergyStart; }

Float_t GetTotalEnergyAtEntrance() const { return GetE(); }

int GetParticlePdg() const {return mParticlePdg;}

void Print(const Option_t* opt) const;

private:
int mParticlePdg;
float mEnergyStart;
math_utils::Vector3D<float> mMomentumStart; ///< momentum at entrance
math_utils::Point3D<float> mPositionStart;

Check failure on line 72 in DataFormats/Detectors/Upgrades/FVD/include/DataFormatsFVD/Hit.h

View workflow job for this annotation

GitHub Actions / PR formatting / whitespace

Trailing spaces

Remove the trailing spaces at the end of the line.
ClassDefNV(Hit, 1);

};

Hit::Hit(int trackID,
int detID,
const math_utils::Point3D<float>& startPos,
const math_utils::Point3D<float>& endPos,
const math_utils::Vector3D<float>& startMom,
double startE,
double endTime,
double eLoss,
Int_t particlePdg)
: BasicXYZEHit(endPos.X(),
endPos.Y(),
endPos.Z(),
endTime,
eLoss,
trackID,
detID)
{
}

} // namespace fvd
} // namespace o2

#ifdef USESHM
namespace std
{
template <>
class allocator<o2::fvd::Hit> : public o2::utils::ShmAllocator<o2::fvd::Hit>
{
};
} // namespace std
#endif
#endif
21 changes: 21 additions & 0 deletions DataFormats/Detectors/Upgrades/FVD/src/DataFormatsFVDLinkDef.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright 2019-2024 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.

#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;

#pragma link C++ class o2::fvd::Hit + ;
#pragma link C++ class vector < o2::fvd::Hit> + ;

#endif
Empty file.
1 change: 1 addition & 0 deletions DataFormats/Headers/include/Headers/DataHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,7 @@ constexpr o2::header::DataOrigin gDataOriginTF3{"TF3"};
constexpr o2::header::DataOrigin gDataOriginRCH{"RCH"};
constexpr o2::header::DataOrigin gDataOriginMI3{"MI3"};
constexpr o2::header::DataOrigin gDataOriginECL{"ECL"}; // upgrades
constexpr o2::header::DataOrigin gDataOriginFVD{"FVD"}; // upgrades

constexpr o2::header::DataOrigin gDataOriginGPU{"GPU"};

Expand Down
3 changes: 2 additions & 1 deletion Detectors/Upgrades/ALICE3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
add_subdirectory(Passive)
add_subdirectory(TRK)
add_subdirectory(ECal)
add_subdirectory(FVD)
add_subdirectory(FT3)
add_subdirectory(FCT)
add_subdirectory(AOD)
add_subdirectory(IOTOF)
add_subdirectory(RICH)
add_subdirectory(MID)
add_subdirectory(macros)
add_subdirectory(macros)
13 changes: 13 additions & 0 deletions Detectors/Upgrades/ALICE3/FVD/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +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.

add_subdirectory(base)
add_subdirectory(simulation)
10 changes: 10 additions & 0 deletions Detectors/Upgrades/ALICE3/FVD/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!-- doxy
\page refDetectorsUpgradesALICE3TRK Tracker
/doxy -->

# ALICE 3 FORVARD DETECTOR

This is top page for the FVD detector documentation.

<!-- doxy
/doxy -->
20 changes: 20 additions & 0 deletions Detectors/Upgrades/ALICE3/FVD/base/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 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.

o2_add_library(FVDBase
SOURCES src/GeometryTGeo.cxx
src/FVDBaseParam.cxx
PUBLIC_LINK_LIBRARIES O2::DetectorsBase)

o2_target_root_dictionary(FVDBase
HEADERS include/FVDBase/GeometryTGeo.h

Check failure on line 18 in Detectors/Upgrades/ALICE3/FVD/base/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / PR formatting / whitespace

Tab characters found

Indent code using spaces instead of tabs.
include/FVDBase/FVDBaseParam.h)

Check failure on line 19 in Detectors/Upgrades/ALICE3/FVD/base/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / PR formatting / whitespace

Tab characters found

Indent code using spaces instead of tabs.

17 changes: 17 additions & 0 deletions Detectors/Upgrades/ALICE3/FVD/base/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!-- doxy
\page refFITFV0base FV0 Base
/doxy -->

# FV0 Base

## Geometry

The `o2::fv0::Geometry` class represents the geometry of the FV0 detector as used in simulation. It also provides utility methods for retrieving the center locations of the detector cells. See the below example for how to use the `Geometry` class to query the FV0 cell locations. Note that these are the ideal locations, and that any misalignment is not considered.

```cpp
o2::fv0::Geometry* fv0Geometry = o2::fv0::Geometry::instance(o2::fv0::Geometry::eUninitialized);
o2::fv0::Point3Dsimple cellPosition = fv0Geometry->getReadoutCenter(chId);
float x = cellPosition.x;
float y = cellPosition.y;
float z = cellPosition.z;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// 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.

#ifndef ALICEO2_FVD_FVDBASEPARAM_
#define ALICEO2_FVD_FVDBASEPARAM_

#include "FVDBase/GeometryTGeo.h"
#include "CommonUtils/ConfigurableParamHelper.h"

namespace o2
{
namespace fvd
{
struct FVDBaseParam : public o2::conf::ConfigurableParamHelper<FVDBaseParam> {
static constexpr int nCellA = 40; // 24
static constexpr int nCellC = 48;
static constexpr int nRingsA = 5; //3
static constexpr int nRingsC = 6;

Check failure on line 27 in Detectors/Upgrades/ALICE3/FVD/base/include/FVDBase/FVDBaseParam.h

View workflow job for this annotation

GitHub Actions / PR formatting / whitespace

Trailing spaces

Remove the trailing spaces at the end of the line.
static constexpr float dzScint = 4.;
static constexpr float rRingsA[int(nCellA/8)+1] = {3., 14.8, 26.6, 38.4, 50.2, 62.};
static constexpr float rRingsC[int(nCellC/8)+1] = {3.5, 17., 30.5, 44., 57.5, 71.};

static constexpr float zModA = 1700;
static constexpr float zModC = -1950;

O2ParamDef(FVDBaseParam, "FVDBase");
};

} // namespace fvd
} // namespace o2
#endif
Loading
Loading