diff --git a/DataFormats/Detectors/Common/include/DetectorsCommonDataFormats/DetID.h b/DataFormats/Detectors/Common/include/DetectorsCommonDataFormats/DetID.h index ce6a31f5e777e..d42b690a35d69 100644 --- a/DataFormats/Detectors/Common/include/DetectorsCommonDataFormats/DetID.h +++ b/DataFormats/Detectors/Common/include/DetectorsCommonDataFormats/DetID.h @@ -58,8 +58,8 @@ class DetID static constexpr ID MCH = 9; static constexpr ID MID = 10; static constexpr ID ZDC = 11; - static constexpr ID T0 = 12; - static constexpr ID V0 = 13; + static constexpr ID FT0 = 12; + static constexpr ID FV0 = 13; static constexpr ID FDD = 14; static constexpr ID ACO = 15; static constexpr ID First = ITS; @@ -108,13 +108,13 @@ class DetID static constexpr const char* sDetNames[nDetectors + 1] = ///< defined detector names - { "ITS", "TPC", "TRD", "TOF", "PHS", "CPV", "EMC", "HMP", "MFT", "MCH", "MID", "ZDC", "T0", "V0", "FDD", "ACO", nullptr }; + { "ITS", "TPC", "TRD", "TOF", "PHS", "CPV", "EMC", "HMP", "MFT", "MCH", "MID", "ZDC", "FT0", "FV0", "FDD", "ACO", nullptr }; // detector names, will be defined in DataSources static constexpr std::array sMasks = ///< detectot masks { utils::bit2Mask(ITS), utils::bit2Mask(TPC), utils::bit2Mask(TRD), utils::bit2Mask(TOF), utils::bit2Mask(PHS), utils::bit2Mask(CPV), utils::bit2Mask(EMC), utils::bit2Mask(HMP), utils::bit2Mask(MFT), utils::bit2Mask(MCH), - utils::bit2Mask(MID), utils::bit2Mask(ZDC), utils::bit2Mask(T0), utils::bit2Mask(V0), utils::bit2Mask(FDD), utils::bit2Mask(ACO) }; + utils::bit2Mask(MID), utils::bit2Mask(ZDC), utils::bit2Mask(FT0), utils::bit2Mask(FV0), utils::bit2Mask(FDD), utils::bit2Mask(ACO) }; ClassDefNV(DetID, 1); }; diff --git a/DataFormats/Detectors/Common/src/DetID.cxx b/DataFormats/Detectors/Common/src/DetID.cxx index b35bf4dc2fa8b..cc95fc2e80b0b 100644 --- a/DataFormats/Detectors/Common/src/DetID.cxx +++ b/DataFormats/Detectors/Common/src/DetID.cxx @@ -25,7 +25,7 @@ constexpr std::array DetID::sMasks; // redundant declarations constexpr DetID::ID DetID::ITS, DetID::TPC, DetID::TRD, DetID::TOF, DetID::PHS, DetID::CPV, DetID::EMC, - DetID::HMP, DetID::MFT, DetID::MCH, DetID::MID, DetID::ZDC, DetID::T0, DetID::V0, DetID::FDD, DetID::ACO, DetID::First, DetID::Last; + DetID::HMP, DetID::MFT, DetID::MCH, DetID::MID, DetID::ZDC, DetID::FT0, DetID::FV0, DetID::FDD, DetID::ACO, DetID::First, DetID::Last; constexpr int DetID::nDetectors; diff --git a/DataFormats/Detectors/FIT/CMakeLists.txt b/DataFormats/Detectors/FIT/CMakeLists.txt index e4c209cade8fa..1f2aed65285fd 100644 --- a/DataFormats/Detectors/FIT/CMakeLists.txt +++ b/DataFormats/Detectors/FIT/CMakeLists.txt @@ -8,5 +8,5 @@ # granted to it by virtue of its status as an Intergovernmental Organization or # submit itself to any jurisdiction. -add_subdirectory(T0) -add_subdirectory(V0) +add_subdirectory(FT0) +add_subdirectory(FV0) diff --git a/DataFormats/Detectors/FIT/T0/CMakeLists.txt b/DataFormats/Detectors/FIT/FT0/CMakeLists.txt similarity index 64% rename from DataFormats/Detectors/FIT/T0/CMakeLists.txt rename to DataFormats/Detectors/FIT/FT0/CMakeLists.txt index 69aa46007a580..a38ffad75d143 100644 --- a/DataFormats/Detectors/FIT/T0/CMakeLists.txt +++ b/DataFormats/Detectors/FIT/FT0/CMakeLists.txt @@ -8,13 +8,13 @@ # granted to it by virtue of its status as an Intergovernmental Organization or # submit itself to any jurisdiction. -o2_add_library(DataFormatsFITT0 +o2_add_library(DataFormatsFT0 SOURCES src/Digit.cxx src/RecPoints.cxx PUBLIC_LINK_LIBRARIES O2::CommonDataFormat O2::SimulationDataFormat) -o2_target_root_dictionary(DataFormatsFITT0 - HEADERS include/DataFormatsFITT0/Digit.h - include/DataFormatsFITT0/RecPoints.h - include/DataFormatsFITT0/MCLabel.h - include/DataFormatsFITT0/HitType.h) +o2_target_root_dictionary(DataFormatsFT0 + HEADERS include/DataFormatsFT0/Digit.h + include/DataFormatsFT0/RecPoints.h + include/DataFormatsFT0/MCLabel.h + include/DataFormatsFT0/HitType.h) diff --git a/DataFormats/Detectors/FIT/T0/include/DataFormatsFITT0/Digit.h b/DataFormats/Detectors/FIT/FT0/include/DataFormatsFT0/Digit.h similarity index 99% rename from DataFormats/Detectors/FIT/T0/include/DataFormatsFITT0/Digit.h rename to DataFormats/Detectors/FIT/FT0/include/DataFormatsFT0/Digit.h index 3c9cbeb46d9a3..1ab54e4efa666 100644 --- a/DataFormats/Detectors/FIT/T0/include/DataFormatsFITT0/Digit.h +++ b/DataFormats/Detectors/FIT/FT0/include/DataFormatsFT0/Digit.h @@ -18,7 +18,7 @@ namespace o2 { -namespace t0 +namespace ft0 { struct ChannelData { @@ -105,6 +105,6 @@ class Digit : public DigitBase }; std::ostream& operator<<(std::ostream& stream, const Digit& digi); -} // namespace t0 +} // namespace ft0 } // namespace o2 #endif diff --git a/DataFormats/Detectors/FIT/T0/include/DataFormatsFITT0/HitType.h b/DataFormats/Detectors/FIT/FT0/include/DataFormatsFT0/HitType.h similarity index 88% rename from DataFormats/Detectors/FIT/T0/include/DataFormatsFITT0/HitType.h rename to DataFormats/Detectors/FIT/FT0/include/DataFormatsFT0/HitType.h index f2a97357b1984..b8579bfc5fb43 100644 --- a/DataFormats/Detectors/FIT/T0/include/DataFormatsFITT0/HitType.h +++ b/DataFormats/Detectors/FIT/FT0/include/DataFormatsFT0/HitType.h @@ -20,7 +20,7 @@ namespace o2 { -namespace t0 +namespace ft0 { class HitType : public o2::BasicXYZEHit { @@ -28,7 +28,7 @@ class HitType : public o2::BasicXYZEHit using BasicXYZEHit::BasicXYZEHit; }; -} // namespace t0 +} // namespace ft0 } // namespace o2 @@ -36,7 +36,7 @@ class HitType : public o2::BasicXYZEHit namespace std { template <> -class allocator : public o2::utils::ShmAllocator +class allocator : public o2::utils::ShmAllocator { }; } // namespace std diff --git a/DataFormats/Detectors/FIT/T0/include/DataFormatsFITT0/MCLabel.h b/DataFormats/Detectors/FIT/FT0/include/DataFormatsFT0/MCLabel.h similarity index 96% rename from DataFormats/Detectors/FIT/T0/include/DataFormatsFITT0/MCLabel.h rename to DataFormats/Detectors/FIT/FT0/include/DataFormatsFT0/MCLabel.h index 441135d1aa66d..ade298338db1f 100644 --- a/DataFormats/Detectors/FIT/T0/include/DataFormatsFITT0/MCLabel.h +++ b/DataFormats/Detectors/FIT/FT0/include/DataFormatsFT0/MCLabel.h @@ -17,7 +17,7 @@ namespace o2 { -namespace t0 +namespace ft0 { class MCLabel : public o2::MCCompLabel { @@ -33,7 +33,7 @@ class MCLabel : public o2::MCCompLabel ClassDefNV(MCLabel, 1); }; -} // namespace t0 +} // namespace ft0 } // namespace o2 #endif diff --git a/DataFormats/Detectors/FIT/T0/include/DataFormatsFITT0/RecPoints.h b/DataFormats/Detectors/FIT/FT0/include/DataFormatsFT0/RecPoints.h similarity index 84% rename from DataFormats/Detectors/FIT/T0/include/DataFormatsFITT0/RecPoints.h rename to DataFormats/Detectors/FIT/FT0/include/DataFormatsFT0/RecPoints.h index 1b785bf7f208b..9df1774f0719e 100644 --- a/DataFormats/Detectors/FIT/T0/include/DataFormatsFITT0/RecPoints.h +++ b/DataFormats/Detectors/FIT/FT0/include/DataFormatsFT0/RecPoints.h @@ -18,11 +18,11 @@ #include #include "Rtypes.h" #include -#include +#include namespace o2 { -namespace t0 +namespace ft0 { class RecPoints @@ -35,7 +35,7 @@ class RecPoints RecPoints() = default; RecPoints(const std::array& collisiontime, Float_t vertex, - std::vector timeamp) + std::vector timeamp) : mCollisionTime(collisiontime), mVertex(vertex), mTimeAmp(std::move(timeamp)) @@ -43,7 +43,7 @@ class RecPoints } ~RecPoints() = default; - void fillFromDigits(const o2::t0::Digit& digit); + void fillFromDigits(const o2::ft0::Digit& digit); float getCollisionTime(int side) const { return mCollisionTime[side]; } float getCollisionTimeMean() const { return getCollisionTime(TimeMean); } float getCollisionTimeA() const { return getCollisionTime(TimeC); } @@ -59,9 +59,9 @@ class RecPoints void SetMgrEventTime(Double_t time) { mEventTime = time; } - const std::vector& getChDgData() const { return mTimeAmp; } - void setChDgData(const std::vector& TimeAmp) { mTimeAmp = TimeAmp; } - void setChDgData(std::vector&& TimeAmp) { mTimeAmp = std::move(TimeAmp); } + const std::vector& getChDgData() const { return mTimeAmp; } + void setChDgData(const std::vector& TimeAmp) { mTimeAmp = TimeAmp; } + void setChDgData(std::vector&& TimeAmp) { mTimeAmp = std::move(TimeAmp); } void setInteractionRecord(uint16_t bc, uint32_t orbit) { @@ -79,11 +79,11 @@ class RecPoints 2 * o2::InteractionRecord::DummyTime }; Float_t mVertex = 0; Double_t mEventTime = 2 * o2::InteractionRecord::DummyTime; //event time from Fair for continuous - std::vector mTimeAmp; + std::vector mTimeAmp; o2::InteractionRecord mIntRecord; // Interaction record (orbit, bc) from digits ClassDefNV(RecPoints, 1); }; -} // namespace t0 +} // namespace ft0 } // namespace o2 #endif diff --git a/DataFormats/Detectors/FIT/T0/src/DataFormatsFITT0LinkDef.h b/DataFormats/Detectors/FIT/FT0/src/DataFormatsFT0LinkDef.h similarity index 53% rename from DataFormats/Detectors/FIT/T0/src/DataFormatsFITT0LinkDef.h rename to DataFormats/Detectors/FIT/FT0/src/DataFormatsFT0LinkDef.h index c5fa389a4b342..afd7cacc9e157 100644 --- a/DataFormats/Detectors/FIT/T0/src/DataFormatsFITT0LinkDef.h +++ b/DataFormats/Detectors/FIT/FT0/src/DataFormatsFT0LinkDef.h @@ -14,18 +14,18 @@ #pragma link off all classes; #pragma link off all functions; -#pragma link C++ class o2::t0::Digit + ; -#pragma link C++ class o2::t0::ChannelData + ; -#pragma link C++ class vector < o2::t0::ChannelData> + ; -#pragma link C++ class vector < o2::t0::Digit> + ; +#pragma link C++ class o2::ft0::Digit + ; +#pragma link C++ class o2::ft0::ChannelData + ; +#pragma link C++ class vector < o2::ft0::ChannelData > +; +#pragma link C++ class vector < o2::ft0::Digit > +; -#pragma link C++ class o2::t0::RecPoints + ; -#pragma link C++ class vector < o2::t0::RecPoints> + ; +#pragma link C++ class o2::ft0::RecPoints + ; +#pragma link C++ class vector < o2::ft0::RecPoints > +; -#pragma link C++ class o2::t0::MCLabel + ; -#pragma link C++ class o2::dataformats::MCTruthContainer < o2::t0::MCLabel> + ; +#pragma link C++ class o2::ft0::MCLabel + ; +#pragma link C++ class o2::dataformats::MCTruthContainer < o2::ft0::MCLabel > +; -#pragma link C++ class o2::t0::HitType + ; -#pragma link C++ class vector < o2::t0::HitType> + ; +#pragma link C++ class o2::ft0::HitType + ; +#pragma link C++ class vector < o2::ft0::HitType > +; #endif diff --git a/DataFormats/Detectors/FIT/T0/src/Digit.cxx b/DataFormats/Detectors/FIT/FT0/src/Digit.cxx similarity index 94% rename from DataFormats/Detectors/FIT/T0/src/Digit.cxx rename to DataFormats/Detectors/FIT/FT0/src/Digit.cxx index 4d15a52c71515..00fccd86a7127 100644 --- a/DataFormats/Detectors/FIT/T0/src/Digit.cxx +++ b/DataFormats/Detectors/FIT/FT0/src/Digit.cxx @@ -8,10 +8,10 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -#include "DataFormatsFITT0/Digit.h" +#include "DataFormatsFT0/Digit.h" #include -using namespace o2::t0; +using namespace o2::ft0; void Digit::printStream(std::ostream& stream) const { diff --git a/DataFormats/Detectors/FIT/T0/src/RecPoints.cxx b/DataFormats/Detectors/FIT/FT0/src/RecPoints.cxx similarity index 94% rename from DataFormats/Detectors/FIT/T0/src/RecPoints.cxx rename to DataFormats/Detectors/FIT/FT0/src/RecPoints.cxx index 44fcc06f1026e..571517f1a7c79 100644 --- a/DataFormats/Detectors/FIT/T0/src/RecPoints.cxx +++ b/DataFormats/Detectors/FIT/FT0/src/RecPoints.cxx @@ -8,13 +8,13 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -#include "DataFormatsFITT0/RecPoints.h" +#include "DataFormatsFT0/RecPoints.h" #include #include #include #include -using namespace o2::t0; +using namespace o2::ft0; namespace { @@ -22,7 +22,7 @@ constexpr int NCellsA = 24; // number of radiatiors on A side constexpr int NCellsC = 28; // number of radiatiors on C side } // namespace -void RecPoints::fillFromDigits(const o2::t0::Digit& digit) +void RecPoints::fillFromDigits(const o2::ft0::Digit& digit) { mCollisionTime = {}; diff --git a/DataFormats/Detectors/FIT/V0/CMakeLists.txt b/DataFormats/Detectors/FIT/FV0/CMakeLists.txt similarity index 80% rename from DataFormats/Detectors/FIT/V0/CMakeLists.txt rename to DataFormats/Detectors/FIT/FV0/CMakeLists.txt index 9bba27774e5a7..90ce4a0b83c93 100644 --- a/DataFormats/Detectors/FIT/V0/CMakeLists.txt +++ b/DataFormats/Detectors/FIT/FV0/CMakeLists.txt @@ -8,9 +8,9 @@ # granted to it by virtue of its status as an Intergovernmental Organization or # submit itself to any jurisdiction. -o2_add_library(DataFormatsFITV0 +o2_add_library(DataFormatsFV0 SOURCES src/Hit.cxx PUBLIC_LINK_LIBRARIES O2::SimulationDataFormat) -o2_target_root_dictionary(DataFormatsFITV0 - HEADERS include/DataFormatsFITV0/Hit.h) +o2_target_root_dictionary(DataFormatsFV0 + HEADERS include/DataFormatsFV0/Hit.h) diff --git a/DataFormats/Detectors/FIT/V0/include/DataFormatsFITV0/Hit.h b/DataFormats/Detectors/FIT/FV0/include/DataFormatsFV0/Hit.h similarity index 92% rename from DataFormats/Detectors/FIT/V0/include/DataFormatsFITV0/Hit.h rename to DataFormats/Detectors/FIT/FV0/include/DataFormatsFV0/Hit.h index 838c0ca34d9c3..6edcb96e609bb 100644 --- a/DataFormats/Detectors/FIT/V0/include/DataFormatsFITV0/Hit.h +++ b/DataFormats/Detectors/FIT/FV0/include/DataFormatsFV0/Hit.h @@ -9,10 +9,10 @@ // or submit itself to any jurisdiction. /// \file Hit.h -/// \brief Definition of the FIT-V0 Hit class (based on ITSMFT) +/// \brief Definition of the FV0 Hit class (based on ITSMFT) -#ifndef ALICEO2_FIT_V0_HIT_H_ -#define ALICEO2_FIT_V0_HIT_H_ +#ifndef ALICEO2_FV0_HIT_H_ +#define ALICEO2_FV0_HIT_H_ #include "SimulationDataFormat/BaseHits.h" // for BasicXYZEHit #include "Rtypes.h" // for Bool_t, Double_t, Int_t, Double32_t, etc @@ -22,7 +22,7 @@ namespace o2 { -namespace v0 +namespace fv0 { class Hit : public o2::BasicXYZEHit @@ -89,17 +89,17 @@ Hit::Hit(int trackID, int detID, const TVector3& startPos, const TVector3& endPo { } -} // namespace v0 +} // namespace fv0 } // namespace o2 #ifdef USESHM namespace std { template <> -class allocator : public o2::utils::ShmAllocator +class allocator : public o2::utils::ShmAllocator { }; } // namespace std #endif /* USESHM */ -#endif /* ALICEO2_FIT_V0_HIT_H_ */ +#endif /* ALICEO2_FV0_HIT_H_ */ diff --git a/DataFormats/Detectors/FIT/V0/src/DataFormatsFITV0LinkDef.h b/DataFormats/Detectors/FIT/FV0/src/DataFormatsFV0LinkDef.h similarity index 86% rename from DataFormats/Detectors/FIT/V0/src/DataFormatsFITV0LinkDef.h rename to DataFormats/Detectors/FIT/FV0/src/DataFormatsFV0LinkDef.h index aee9c546804f7..dd4e53a166ecd 100644 --- a/DataFormats/Detectors/FIT/V0/src/DataFormatsFITV0LinkDef.h +++ b/DataFormats/Detectors/FIT/FV0/src/DataFormatsFV0LinkDef.h @@ -14,7 +14,7 @@ #pragma link off all classes; #pragma link off all functions; -#pragma link C++ class o2::v0::Hit + ; -#pragma link C++ class vector < o2::v0::Hit> + ; +#pragma link C++ class o2::fv0::Hit + ; +#pragma link C++ class vector < o2::fv0::Hit > +; #endif diff --git a/DataFormats/Detectors/FIT/V0/src/Hit.cxx b/DataFormats/Detectors/FIT/FV0/src/Hit.cxx similarity index 91% rename from DataFormats/Detectors/FIT/V0/src/Hit.cxx rename to DataFormats/Detectors/FIT/FV0/src/Hit.cxx index 1c762c4b16860..0651b78ffd464 100644 --- a/DataFormats/Detectors/FIT/V0/src/Hit.cxx +++ b/DataFormats/Detectors/FIT/FV0/src/Hit.cxx @@ -11,15 +11,15 @@ /// \file Hit.cxx /// \brief Implementation of the Hit class -#include "DataFormatsFITV0/Hit.h" +#include "DataFormatsFV0/Hit.h" #include -ClassImp(o2::v0::Hit) +ClassImp(o2::fv0::Hit) namespace o2 { - namespace v0 + namespace fv0 { void Hit::Print(const Option_t* opt) const @@ -31,5 +31,5 @@ ClassImp(o2::v0::Hit) GetStartX(), GetStartY(), GetStartZ(), GetX(), GetY(), GetZ()); } - } // namespace v0 + } // namespace fv0 } // namespace o2 diff --git a/DataFormats/Headers/include/Headers/DataHeader.h b/DataFormats/Headers/include/Headers/DataHeader.h index 822ee725c2002..4d6fbb4a9cd91 100644 --- a/DataFormats/Headers/include/Headers/DataHeader.h +++ b/DataFormats/Headers/include/Headers/DataHeader.h @@ -650,8 +650,8 @@ constexpr o2::header::DataOrigin gDataOriginACO{ "ACO" }; constexpr o2::header::DataOrigin gDataOriginCPV{ "CPV" }; constexpr o2::header::DataOrigin gDataOriginCTP{ "CTP" }; constexpr o2::header::DataOrigin gDataOriginEMC{ "EMC" }; -constexpr o2::header::DataOrigin gDataOriginT0{ "T0" }; -constexpr o2::header::DataOrigin gDataOriginV0{ "V0" }; +constexpr o2::header::DataOrigin gDataOriginFT0{ "FT0" }; +constexpr o2::header::DataOrigin gDataOriginFV0{ "FV0" }; constexpr o2::header::DataOrigin gDataOriginFDD{ "FDD" }; constexpr o2::header::DataOrigin gDataOriginHMP{ "HMP" }; constexpr o2::header::DataOrigin gDataOriginITS{ "ITS" }; diff --git a/Detectors/Base/include/DetectorsBase/DCAFitter.h b/Detectors/Base/include/DetectorsBase/DCAFitter.h index 202dcdc1ebcba..5f5395b02fb83 100644 --- a/Detectors/Base/include/DetectorsBase/DCAFitter.h +++ b/Detectors/Base/include/DetectorsBase/DCAFitter.h @@ -227,7 +227,7 @@ class DCAFitter setUseAbsDCA(false); // by default use weighted DCA definition (much slower) } - ///< number of validated V0 candidates (at most 2 are possible) + ///< number of validated FV0 candidates (at most 2 are possible) int getNCandidates() const { return mNCandidates; } ///< return PCA candidate (no check for its validity) @@ -236,10 +236,10 @@ class DCAFitter ///< return Chi2 at PCA candidate (no check for its validity) ftype_t getChi2AtPCACandidate(int cand) const { return mChi2[cand]; } - ///< 1st track params propagated to V0 candidate (no check for the candidate validity) + ///< 1st track params propagated to FV0 candidate (no check for the candidate validity) const Track& getTrack0(int cand) const { return mCandTr0[cand]; } - ///< 2nd track params propagated to V0 candidate (no check for the candidate validity) + ///< 2nd track params propagated to FV0 candidate (no check for the candidate validity) const Track& getTrack1(int cand) const { return mCandTr1[cand]; } ///< calculate parameters tracks at PCA diff --git a/Detectors/Base/test/testDCAFitter.cxx b/Detectors/Base/test/testDCAFitter.cxx index 4a5a4b6205106..137fb44c1aa6e 100644 --- a/Detectors/Base/test/testDCAFitter.cxx +++ b/Detectors/Base/test/testDCAFitter.cxx @@ -44,7 +44,7 @@ BOOST_AUTO_TEST_CASE(PairDCAFitter) { double bz = 5.0; - // create V0 + // create FV0 std::array cv = { 1e-6, 0, 1e-6, 0, 0, 1e-6, 0, 0, 0, 1e-6, 0, 0, 0, 0, 1e-5 }; std::array pr = { 0., 0., -0.2, 0.6, 1. }; DCAFitter::Track t0(0., 0., pr, cv); diff --git a/Detectors/FIT/CMakeLists.txt b/Detectors/FIT/CMakeLists.txt index ac67c3a10466e..c93aa1ccab557 100644 --- a/Detectors/FIT/CMakeLists.txt +++ b/Detectors/FIT/CMakeLists.txt @@ -8,9 +8,9 @@ # granted to it by virtue of its status as an Intergovernmental Organization or # submit itself to any jurisdiction. -add_subdirectory(T0) +add_subdirectory(FT0) add_subdirectory(common) -add_subdirectory(V0) +add_subdirectory(FV0) add_subdirectory(FDD) add_subdirectory(workflow) add_subdirectory(macros) diff --git a/Detectors/FIT/T0/CMakeLists.txt b/Detectors/FIT/FT0/CMakeLists.txt similarity index 100% rename from Detectors/FIT/T0/CMakeLists.txt rename to Detectors/FIT/FT0/CMakeLists.txt diff --git a/Detectors/FIT/T0/base/CMakeLists.txt b/Detectors/FIT/FT0/base/CMakeLists.txt similarity index 79% rename from Detectors/FIT/T0/base/CMakeLists.txt rename to Detectors/FIT/FT0/base/CMakeLists.txt index ed660fe49bc9f..40350f5df2d47 100644 --- a/Detectors/FIT/T0/base/CMakeLists.txt +++ b/Detectors/FIT/FT0/base/CMakeLists.txt @@ -8,10 +8,10 @@ # granted to it by virtue of its status as an Intergovernmental Organization or # submit itself to any jurisdiction. -o2_add_library(T0Base +o2_add_library(FT0Base SOURCES src/Geometry.cxx PUBLIC_LINK_LIBRARIES ROOT::Physics FairRoot::Base) -o2_target_root_dictionary(T0Base HEADERS include/T0Base/Geometry.h) +o2_target_root_dictionary(FT0Base HEADERS include/FT0Base/Geometry.h) -o2_data_file(COPY files DESTINATION Detectors/T0/) +o2_data_file(COPY files DESTINATION Detectors/FT0/) diff --git a/Detectors/FIT/T0/base/files/quartzOptProperties.txt b/Detectors/FIT/FT0/base/files/quartzOptProperties.txt similarity index 100% rename from Detectors/FIT/T0/base/files/quartzOptProperties.txt rename to Detectors/FIT/FT0/base/files/quartzOptProperties.txt diff --git a/Detectors/FIT/T0/base/include/T0Base/Geometry.h b/Detectors/FIT/FT0/base/include/FT0Base/Geometry.h similarity index 98% rename from Detectors/FIT/T0/base/include/T0Base/Geometry.h rename to Detectors/FIT/FT0/base/include/FT0Base/Geometry.h index 71580b4a20e6a..1850773c21039 100644 --- a/Detectors/FIT/T0/base/include/T0Base/Geometry.h +++ b/Detectors/FIT/FT0/base/include/FT0Base/Geometry.h @@ -18,7 +18,7 @@ #include namespace o2 { -namespace t0 +namespace ft0 { // FIT is not tracking detector, Geometry could be used in future but not now. So just simple settings class Geometry @@ -52,6 +52,6 @@ class Geometry ClassDefNV(Geometry, 1); }; -} // namespace t0 +} // namespace ft0 } // namespace o2 #endif diff --git a/Detectors/FIT/V0/base/src/V0BaseLinkDef.h b/Detectors/FIT/FT0/base/src/FT0BaseLinkDef.h similarity index 92% rename from Detectors/FIT/V0/base/src/V0BaseLinkDef.h rename to Detectors/FIT/FT0/base/src/FT0BaseLinkDef.h index 7de04be8eb1c8..ba34f1e82413b 100644 --- a/Detectors/FIT/V0/base/src/V0BaseLinkDef.h +++ b/Detectors/FIT/FT0/base/src/FT0BaseLinkDef.h @@ -14,6 +14,6 @@ #pragma link off all classes; #pragma link off all functions; -#pragma link C++ class o2::v0::Geometry + ; +#pragma link C++ class o2::ft0::Geometry + ; #endif diff --git a/Detectors/FIT/T0/base/src/Geometry.cxx b/Detectors/FIT/FT0/base/src/Geometry.cxx similarity index 97% rename from Detectors/FIT/T0/base/src/Geometry.cxx rename to Detectors/FIT/FT0/base/src/Geometry.cxx index 46084df237544..7f674e6753a33 100644 --- a/Detectors/FIT/T0/base/src/Geometry.cxx +++ b/Detectors/FIT/FT0/base/src/Geometry.cxx @@ -9,14 +9,14 @@ // or submit itself to any jurisdiction. #include //#include -#include "T0Base/Geometry.h" +#include "FT0Base/Geometry.h" #include #include -ClassImp(o2::t0::Geometry); +ClassImp(o2::ft0::Geometry); -using namespace o2::t0; +using namespace o2::ft0; Geometry::Geometry() : mMCP{ { 0, 0, 0 } } { diff --git a/Detectors/FIT/T0/reconstruction/CMakeLists.txt b/Detectors/FIT/FT0/reconstruction/CMakeLists.txt similarity index 76% rename from Detectors/FIT/T0/reconstruction/CMakeLists.txt rename to Detectors/FIT/FT0/reconstruction/CMakeLists.txt index cc27d26c49106..6c1be8a50bcb8 100644 --- a/Detectors/FIT/T0/reconstruction/CMakeLists.txt +++ b/Detectors/FIT/FT0/reconstruction/CMakeLists.txt @@ -8,10 +8,10 @@ # granted to it by virtue of its status as an Intergovernmental Organization or # submit itself to any jurisdiction. -o2_add_library(T0Reconstruction +o2_add_library(FT0Reconstruction SOURCES src/CollisionTimeRecoTask.cxx - PUBLIC_LINK_LIBRARIES O2::DataFormatsFITT0) + PUBLIC_LINK_LIBRARIES O2::DataFormatsFT0) o2_target_root_dictionary( - T0Reconstruction - HEADERS include/T0Reconstruction/CollisionTimeRecoTask.h) + FT0Reconstruction + HEADERS include/FT0Reconstruction/CollisionTimeRecoTask.h) diff --git a/Detectors/FIT/T0/reconstruction/include/T0Reconstruction/CollisionTimeRecoTask.h b/Detectors/FIT/FT0/reconstruction/include/FT0Reconstruction/CollisionTimeRecoTask.h similarity index 83% rename from Detectors/FIT/T0/reconstruction/include/T0Reconstruction/CollisionTimeRecoTask.h rename to Detectors/FIT/FT0/reconstruction/include/FT0Reconstruction/CollisionTimeRecoTask.h index a0e7fa519c76d..ae4a0bb373609 100644 --- a/Detectors/FIT/T0/reconstruction/include/T0Reconstruction/CollisionTimeRecoTask.h +++ b/Detectors/FIT/FT0/reconstruction/include/FT0Reconstruction/CollisionTimeRecoTask.h @@ -14,23 +14,23 @@ #define ALICEO2_FIT_COLLISIONTIMERECOTASK_H #include -#include "DataFormatsFITT0/Digit.h" -#include "DataFormatsFITT0/RecPoints.h" +#include "DataFormatsFT0/Digit.h" +#include "DataFormatsFT0/RecPoints.h" namespace o2 { -namespace t0 +namespace ft0 { class CollisionTimeRecoTask { public: CollisionTimeRecoTask() = default; ~CollisionTimeRecoTask() = default; - void Process(const o2::t0::Digit& digits, RecPoints& recPoints) const; + void Process(const o2::ft0::Digit& digits, RecPoints& recPoints) const; void FinishTask(); private: ClassDefNV(CollisionTimeRecoTask, 1); }; -} // namespace t0 +} // namespace ft0 } // namespace o2 #endif diff --git a/Detectors/FIT/T0/reconstruction/src/CollisionTimeRecoTask.cxx b/Detectors/FIT/FT0/reconstruction/src/CollisionTimeRecoTask.cxx similarity index 94% rename from Detectors/FIT/T0/reconstruction/src/CollisionTimeRecoTask.cxx rename to Detectors/FIT/FT0/reconstruction/src/CollisionTimeRecoTask.cxx index 3f921ea24e619..cc6d3af515031 100644 --- a/Detectors/FIT/T0/reconstruction/src/CollisionTimeRecoTask.cxx +++ b/Detectors/FIT/FT0/reconstruction/src/CollisionTimeRecoTask.cxx @@ -11,10 +11,10 @@ /// \file CollisionTimeRecoTask.cxx /// \brief Implementation of the FIT reconstruction task -#include "T0Reconstruction/CollisionTimeRecoTask.h" +#include "FT0Reconstruction/CollisionTimeRecoTask.h" #include "FairLogger.h" // for LOG -using namespace o2::t0; +using namespace o2::ft0; /* //_____________________________________________________________________ diff --git a/Detectors/FIT/T0/reconstruction/src/T0ReconstructionLinkDef.h b/Detectors/FIT/FT0/reconstruction/src/FT0ReconstructionLinkDef.h similarity index 91% rename from Detectors/FIT/T0/reconstruction/src/T0ReconstructionLinkDef.h rename to Detectors/FIT/FT0/reconstruction/src/FT0ReconstructionLinkDef.h index f5985f89eabcb..175e7c5403591 100644 --- a/Detectors/FIT/T0/reconstruction/src/T0ReconstructionLinkDef.h +++ b/Detectors/FIT/FT0/reconstruction/src/FT0ReconstructionLinkDef.h @@ -14,6 +14,6 @@ #pragma link off all classes; #pragma link off all functions; -#pragma link C++ class o2::t0::CollisionTimeRecoTask + ; +#pragma link C++ class o2::ft0::CollisionTimeRecoTask + ; #endif diff --git a/Detectors/FIT/T0/simulation/CMakeLists.txt b/Detectors/FIT/FT0/simulation/CMakeLists.txt similarity index 76% rename from Detectors/FIT/T0/simulation/CMakeLists.txt rename to Detectors/FIT/FT0/simulation/CMakeLists.txt index 818654f396b02..3687445fe7a15 100644 --- a/Detectors/FIT/T0/simulation/CMakeLists.txt +++ b/Detectors/FIT/FT0/simulation/CMakeLists.txt @@ -8,9 +8,9 @@ # granted to it by virtue of its status as an Intergovernmental Organization or # submit itself to any jurisdiction. -o2_add_library(T0Simulation +o2_add_library(FT0Simulation SOURCES src/Detector.cxx - PUBLIC_LINK_LIBRARIES O2::SimulationDataFormat O2::T0Base - O2::DataFormatsFITT0) + PUBLIC_LINK_LIBRARIES O2::SimulationDataFormat O2::FT0Base + O2::DataFormatsFT0) -o2_target_root_dictionary(T0Simulation HEADERS include/T0Simulation/Detector.h) +o2_target_root_dictionary(FT0Simulation HEADERS include/FT0Simulation/Detector.h) diff --git a/Detectors/FIT/T0/simulation/include/T0Simulation/Detector.h b/Detectors/FIT/FT0/simulation/include/FT0Simulation/Detector.h similarity index 90% rename from Detectors/FIT/T0/simulation/include/T0Simulation/Detector.h rename to Detectors/FIT/FT0/simulation/include/FT0Simulation/Detector.h index fa5654dc13404..28a62b0406816 100644 --- a/Detectors/FIT/T0/simulation/include/T0Simulation/Detector.h +++ b/Detectors/FIT/FT0/simulation/include/FT0Simulation/Detector.h @@ -11,13 +11,13 @@ /// \file Detector.h /// \brief Definition of the Detector class -#ifndef ALICEO2_T0_DETECTOR_H_ -#define ALICEO2_T0_DETECTOR_H_ +#ifndef ALICEO2_FT0_DETECTOR_H_ +#define ALICEO2_FT0_DETECTOR_H_ #include "SimulationDataFormat/BaseHits.h" #include "DetectorsBase/Detector.h" // for Detector -#include "T0Base/Geometry.h" -#include "DataFormatsFITT0/HitType.h" +#include "FT0Base/Geometry.h" +#include "DataFormatsFT0/HitType.h" class FairModule; @@ -27,7 +27,7 @@ class TGraph; namespace o2 { -namespace t0 +namespace ft0 { class Geometry; } @@ -35,7 +35,7 @@ class Geometry; namespace o2 { -namespace t0 +namespace ft0 { // using HitType = o2::BasicXYZEHit; class Geometry; @@ -70,11 +70,11 @@ class Detector : public o2::base::DetImpl /// This method is called for each step during simulation (see FairMCApplication::Stepping()) Bool_t ProcessHits(FairVolume* v) override; - o2::t0::HitType* AddHit(float x, float y, float z, float time, float energy, Int_t trackId, Int_t detId); + o2::ft0::HitType* AddHit(float x, float y, float z, float time, float energy, Int_t trackId, Int_t detId); void Register() override; - std::vector* getHits(Int_t iColl) + std::vector* getHits(Int_t iColl) { if (iColl == 0) { return mHits; @@ -130,7 +130,7 @@ class Detector : public o2::base::DetImpl std::vector mReflMet; /// Container for data points - std::vector* mHits = nullptr; + std::vector* mHits = nullptr; /// Define the sensitive volumes of the geometry void defineSensitiveVolumes(); @@ -148,7 +148,7 @@ class Detector : public o2::base::DetImpl std::ostream& operator<<(std::ostream& os, Detector& source); std::istream& operator>>(std::istream& os, Detector& source); -} // namespace t0 +} // namespace ft0 } // namespace o2 #ifdef USESHM @@ -157,7 +157,7 @@ namespace o2 namespace base { template <> -struct UseShm { +struct UseShm { static constexpr bool value = true; }; } // namespace base diff --git a/Detectors/FIT/T0/simulation/include/T0Simulation/DigitizationParameters.h b/Detectors/FIT/FT0/simulation/include/FT0Simulation/DigitizationParameters.h similarity index 86% rename from Detectors/FIT/T0/simulation/include/T0Simulation/DigitizationParameters.h rename to Detectors/FIT/FT0/simulation/include/FT0Simulation/DigitizationParameters.h index a3661ababedbf..7a506a9922ae6 100644 --- a/Detectors/FIT/T0/simulation/include/T0Simulation/DigitizationParameters.h +++ b/Detectors/FIT/FT0/simulation/include/FT0Simulation/DigitizationParameters.h @@ -8,14 +8,14 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -#ifndef ALICEO2_T0_DIGITIZATION_PARAMETERS -#define ALICEO2_T0_DIGITIZATION_PARAMETERS +#ifndef ALICEO2_FT0_DIGITIZATION_PARAMETERS +#define ALICEO2_FT0_DIGITIZATION_PARAMETERS #include -#include +#include -namespace o2::t0 +namespace o2::ft0 { -inline o2::fit::DigitizationParameters T0DigitizationParameters() +inline o2::fit::DigitizationParameters FT0DigitizationParameters() { o2::fit::DigitizationParameters result; result.NCellsA = Geometry::NCellsA; @@ -28,7 +28,7 @@ inline o2::fit::DigitizationParameters T0DigitizationParameters() result.mCFD_trsh_mip = 3.; // [mV] result.mTime_trg_gate = 4.; // ns result.mTimeDiffAC = (Geometry::ZdetA - Geometry::ZdetC) * TMath::C(); - result.mIsT0 = true; + result.mIsFT0 = true; result.mSignalWidth = 5; result.mCfdShift = 1.66; //ns result.mMip_in_V = 7; //MIP to mV @@ -39,5 +39,5 @@ inline o2::fit::DigitizationParameters T0DigitizationParameters() return result; } -} // namespace o2::t0 +} // namespace o2::ft0 #endif diff --git a/Detectors/FIT/T0/simulation/include/T0Simulation/DigitizerTask.h b/Detectors/FIT/FT0/simulation/include/FT0Simulation/DigitizerTask.h similarity index 73% rename from Detectors/FIT/T0/simulation/include/T0Simulation/DigitizerTask.h rename to Detectors/FIT/FT0/simulation/include/FT0Simulation/DigitizerTask.h index 0d9b1b2f991c4..fc8232cc79f5f 100644 --- a/Detectors/FIT/T0/simulation/include/T0Simulation/DigitizerTask.h +++ b/Detectors/FIT/FT0/simulation/include/FT0Simulation/DigitizerTask.h @@ -17,16 +17,16 @@ #include "FairTask.h" // for FairTask, InitStatus #include "Rtypes.h" // for DigitizerTask::Class, ClassDef, etc -#include "DataFormatsFITT0/Digit.h" -#include "T0Simulation/Detector.h" // for HitType +#include "DataFormatsFT0/Digit.h" +#include "FT0Simulation/Detector.h" // for HitType #include "FITSimulation/Digitizer.h" #include "SimulationDataFormat/MCTruthContainer.h" #include "SimulationDataFormat/MCCompLabel.h" -#include "DataFormatsFITT0/MCLabel.h" +#include "DataFormatsFT0/MCLabel.h" namespace o2 { -namespace t0 +namespace ft0 { class DigitizerTask : public FairTask @@ -54,25 +54,25 @@ class DigitizerTask : public FairTask Bool_t mContinuous = kFALSE; ///< flag to do continuous simulation double mFairTimeUnitInNS = 1; ///< Fair time unit in ns - Int_t mSourceID = 0; ///< current source - Int_t mEventID = 0; ///< current event id from the source - Digitizer mDigitizer; ///< Digitizer - const std::vector* mHitsArray = nullptr; ///< Array of MC hits + Int_t mSourceID = 0; ///< current source + Int_t mEventID = 0; ///< current event id from the source + Digitizer mDigitizer; ///< Digitizer + const std::vector* mHitsArray = nullptr; ///< Array of MC hits TBranch* mQEDBranch = nullptr; //! optional special branch of hits from QED collitions - const std::vector* mHitsArrayQED = nullptr; //! array of MC hits from ED + const std::vector* mHitsArrayQED = nullptr; //! array of MC hits from ED float mQEDEntryTimeBinNS = 0.f; ///< every entry in the QED branch integrates QED for so many nanosec. double mLastQEDTimeNS = 0.; ///< center of the time-bin of last added QED bg slot (entry of mQEDBranch) int mLastQEDEntry = -1; ///< last used QED entry UChar_t mQEDSourceID = 0; ///< MC ID source of the QED (stored in the labels) - o2::t0::Digit* mEventDigit = nullptr; - o2::dataformats::MCTruthContainer mMCTruthArray; //! Labels containter - o2::dataformats::MCTruthContainer* mMCTruthArrayPtr = &mMCTruthArray; //! Labels containter pointer + o2::ft0::Digit* mEventDigit = nullptr; + o2::dataformats::MCTruthContainer mMCTruthArray; //! Labels containter + o2::dataformats::MCTruthContainer* mMCTruthArrayPtr = &mMCTruthArray; //! Labels containter pointer ClassDefOverride(DigitizerTask, 1); }; -} // namespace t0 +} // namespace ft0 } // namespace o2 #endif /* ALICEO2_TOF_DIGITIZERTASK_H */ diff --git a/Detectors/FIT/T0/simulation/src/Detector.cxx b/Detectors/FIT/FT0/simulation/src/Detector.cxx similarity index 97% rename from Detectors/FIT/T0/simulation/src/Detector.cxx rename to Detectors/FIT/FT0/simulation/src/Detector.cxx index 3ff17c3d1d785..5fe625cdedd69 100644 --- a/Detectors/FIT/T0/simulation/src/Detector.cxx +++ b/Detectors/FIT/FT0/simulation/src/Detector.cxx @@ -24,17 +24,17 @@ #include "FairVolume.h" #include -#include "T0Base/Geometry.h" -#include "T0Simulation/Detector.h" +#include "FT0Base/Geometry.h" +#include "FT0Simulation/Detector.h" #include "SimulationDataFormat/Stack.h" -using namespace o2::t0; -using o2::t0::Geometry; +using namespace o2::ft0; +using o2::ft0::Geometry; ClassImp(Detector); Detector::Detector(Bool_t Active) - : o2::base::DetImpl("T0", Active), mIdSens1(0), mPMTeff(nullptr), mHits(o2::utils::createSimVector()) + : o2::base::DetImpl("FT0", Active), mIdSens1(0), mPMTeff(nullptr), mHits(o2::utils::createSimVector()) { // Gegeo = GetGeometry() ; @@ -43,7 +43,7 @@ Detector::Detector(Bool_t Active) } Detector::Detector(const Detector& rhs) - : o2::base::DetImpl(rhs), mIdSens1(rhs.mIdSens1), mPMTeff(rhs.mPMTeff), mHits(o2::utils::createSimVector()) + : o2::base::DetImpl(rhs), mIdSens1(rhs.mIdSens1), mPMTeff(rhs.mPMTeff), mHits(o2::utils::createSimVector()) { } @@ -66,7 +66,7 @@ void Detector::InitializeO2Detector() void Detector::ConstructGeometry() { - LOG(DEBUG) << "Creating FIT T0 geometry\n"; + LOG(DEBUG) << "Creating FT0 geometry\n"; CreateMaterials(); Float_t zdetA = 333; @@ -391,7 +391,7 @@ Bool_t Detector::ProcessHits(FairVolume* v) return kFALSE; } -o2::t0::HitType* Detector::AddHit(float x, float y, float z, float time, float energy, Int_t trackId, Int_t detId) +o2::ft0::HitType* Detector::AddHit(float x, float y, float z, float time, float energy, Int_t trackId, Int_t detId) { mHits->emplace_back(x, y, z, time, energy, trackId, detId); auto stack = (o2::data::Stack*)fMC->GetStack(); @@ -471,7 +471,7 @@ void Detector::DefineOpticalProperties() const char* aliceO2env = std::getenv("O2_ROOT"); if (aliceO2env) inputDir = aliceO2env; - inputDir += "/share/Detectors/T0/files/"; + inputDir += "/share/Detectors/FT0/files/"; TString optPropPath = inputDir + "quartzOptProperties.txt"; optPropPath = gSystem->ExpandPathName(optPropPath.Data()); // Expand $(ALICE_ROOT) into real system path diff --git a/Detectors/FIT/T0/simulation/src/DigitizerTask.cxx b/Detectors/FIT/FT0/simulation/src/DigitizerTask.cxx similarity index 93% rename from Detectors/FIT/T0/simulation/src/DigitizerTask.cxx rename to Detectors/FIT/FT0/simulation/src/DigitizerTask.cxx index 65808c67580c2..ea6366a441083 100644 --- a/Detectors/FIT/T0/simulation/src/DigitizerTask.cxx +++ b/Detectors/FIT/FT0/simulation/src/DigitizerTask.cxx @@ -11,7 +11,7 @@ /// \file DigitizerTask.cxx /// \brief Implementation of the TOF digitizer task -#include "T0Simulation/DigitizerTask.h" +#include "FT0Simulation/DigitizerTask.h" #include "MathUtils/Utils.h" #include "FairLogger.h" // for LOG @@ -19,7 +19,7 @@ using namespace o2::fit; -DigitizerTask::DigitizerTask() : FairTask("T0DigitizerTask"), mDigitizer() {} +DigitizerTask::DigitizerTask() : FairTask("FT0DigitizerTask"), mDigitizer() {} DigitizerTask::~DigitizerTask() { if (mEventDigit) @@ -37,7 +37,7 @@ InitStatus DigitizerTask::Init() return kERROR; } - mHitsArray = mgr->InitObjectAs*>("FITHit"); + mHitsArray = mgr->InitObjectAs*>("FITHit"); if (!mHitsArray) { LOG(ERROR) << "FIT hits not registered in the FairRootManager. Exiting ..." << FairLogger::endl; @@ -47,7 +47,7 @@ InitStatus DigitizerTask::Init() mDigitizer.setMCLabels(mMCTruthArrayPtr); // Register output container - mgr->RegisterAny("FITT0Digit", mEventDigit, kTRUE); + mgr->RegisterAny("FT0Digit", mEventDigit, kTRUE); // mMCTruthArray = new typename std::remove_pointer::type; mgr->RegisterAny("FITDigitMCTruth", mMCTruthArrayPtr, kTRUE); mDigitizer.init(); diff --git a/Detectors/FIT/T0/simulation/src/T0SimulationLinkDef.h b/Detectors/FIT/FT0/simulation/src/FT0SimulationLinkDef.h similarity index 84% rename from Detectors/FIT/T0/simulation/src/T0SimulationLinkDef.h rename to Detectors/FIT/FT0/simulation/src/FT0SimulationLinkDef.h index 03c389a730d65..32cd20e080ad1 100644 --- a/Detectors/FIT/T0/simulation/src/T0SimulationLinkDef.h +++ b/Detectors/FIT/FT0/simulation/src/FT0SimulationLinkDef.h @@ -14,7 +14,7 @@ #pragma link off all classes; #pragma link off all functions; -#pragma link C++ class o2::t0::Detector + ; -#pragma link C++ class o2::base::DetImpl < o2::t0::Detector > +; +#pragma link C++ class o2::ft0::Detector + ; +#pragma link C++ class o2::base::DetImpl < o2::ft0::Detector > +; #endif diff --git a/Detectors/FIT/V0/CMakeLists.txt b/Detectors/FIT/FV0/CMakeLists.txt similarity index 100% rename from Detectors/FIT/V0/CMakeLists.txt rename to Detectors/FIT/FV0/CMakeLists.txt diff --git a/Detectors/FIT/V0/base/CMakeLists.txt b/Detectors/FIT/FV0/base/CMakeLists.txt similarity index 79% rename from Detectors/FIT/V0/base/CMakeLists.txt rename to Detectors/FIT/FV0/base/CMakeLists.txt index ebc9355314d11..cc1cfd4d1b30c 100644 --- a/Detectors/FIT/V0/base/CMakeLists.txt +++ b/Detectors/FIT/FV0/base/CMakeLists.txt @@ -8,10 +8,10 @@ # granted to it by virtue of its status as an Intergovernmental Organization or # submit itself to any jurisdiction. -o2_add_library(V0Base +o2_add_library(FV0Base SOURCES src/Geometry.cxx PUBLIC_LINK_LIBRARIES ROOT::Geom FairRoot::Base) -o2_target_root_dictionary(V0Base HEADERS include/V0Base/Geometry.h) +o2_target_root_dictionary(FV0Base HEADERS include/FV0Base/Geometry.h) -o2_data_file(COPY files DESTINATION Detectors/V0/) +o2_data_file(COPY files DESTINATION Detectors/FV0/) diff --git a/Detectors/FIT/V0/base/files/quartzOptProperties.txt b/Detectors/FIT/FV0/base/files/quartzOptProperties.txt similarity index 100% rename from Detectors/FIT/V0/base/files/quartzOptProperties.txt rename to Detectors/FIT/FV0/base/files/quartzOptProperties.txt diff --git a/Detectors/FIT/V0/base/include/V0Base/Geometry.h b/Detectors/FIT/FV0/base/include/FV0Base/Geometry.h similarity index 92% rename from Detectors/FIT/V0/base/include/V0Base/Geometry.h rename to Detectors/FIT/FV0/base/include/FV0Base/Geometry.h index 07b23891abbc3..a34700e7d96f8 100644 --- a/Detectors/FIT/V0/base/include/V0Base/Geometry.h +++ b/Detectors/FIT/FV0/base/include/FV0Base/Geometry.h @@ -9,12 +9,12 @@ // or submit itself to any jurisdiction. /// \file Geometry.h -/// \brief Base definition of FIT-V0+ geometry. +/// \brief Base definition of FV0+ geometry. /// /// \author Maciej Slupecki, University of Jyvaskyla, Finland -#ifndef ALICEO2_FITV0_GEOMETRY_H_ -#define ALICEO2_FITV0_GEOMETRY_H_ +#ifndef ALICEO2_FV0_GEOMETRY_H_ +#define ALICEO2_FV0_GEOMETRY_H_ #include #include @@ -22,9 +22,9 @@ namespace o2 { -namespace v0 +namespace fv0 { -/// FIT-V0+ Geometry +/// FV0+ Geometry class Geometry { public: @@ -59,7 +59,7 @@ class Geometry static constexpr float sDySeparationScint = sDrSeparationScint; static constexpr int sBaseNumberOfSectors = 8; // number of sectors // TODO: Adjust the sZposition once the simulation geometry is implemented, T0 starts at 328 - // at sZposition==320, there is a gap (to be filled with fibers and support) of 8 cm between the plastic of V0+ and aluminum covers of T0+ + // at sZposition==320, there is a gap (to be filled with fibers and support) of 8 cm between the plastic of FV0+ and aluminum covers of FT0+ static constexpr float sZposition = 320 - sDzScint / 2; // z-position of the geometrical center of the detectors sensitive part static constexpr int sNumberOfRings = 5; // number of rings static constexpr float sRingRadiiScint[sNumberOfRings + 1] = { 4.07, 7.3, 12.9, 21.25, 38.7, 71.975 }; // average ring radii @@ -69,7 +69,7 @@ class Geometry void initializeLuts(); void buildGeometry(); - void assembleSectors(TGeoVolumeAssembly* volV0); + void assembleSectors(TGeoVolumeAssembly* volFV0); TGeoVolumeAssembly* buildSector(uint16_t iSector); std::vector mvrAvgScint; // average ring radii (index 0 -> ring 1 min, index 1 -> ring 1 max and ring 2 min, ... index 5 -> ring 5 max) @@ -82,6 +82,6 @@ class Geometry ClassDefNV(Geometry, 1); }; -} // namespace v0 +} // namespace fv0 } // namespace o2 #endif diff --git a/Detectors/FIT/T0/base/src/T0BaseLinkDef.h b/Detectors/FIT/FV0/base/src/FV0BaseLinkDef.h similarity index 92% rename from Detectors/FIT/T0/base/src/T0BaseLinkDef.h rename to Detectors/FIT/FV0/base/src/FV0BaseLinkDef.h index 4be48bd4b2466..b2ec9f0e5022c 100644 --- a/Detectors/FIT/T0/base/src/T0BaseLinkDef.h +++ b/Detectors/FIT/FV0/base/src/FV0BaseLinkDef.h @@ -14,6 +14,6 @@ #pragma link off all classes; #pragma link off all functions; -#pragma link C++ class o2::t0::Geometry + ; +#pragma link C++ class o2::fv0::Geometry + ; #endif diff --git a/Detectors/FIT/V0/base/src/Geometry.cxx b/Detectors/FIT/FV0/base/src/Geometry.cxx similarity index 88% rename from Detectors/FIT/V0/base/src/Geometry.cxx rename to Detectors/FIT/FV0/base/src/Geometry.cxx index 3f681b4da44a1..bfb4f2177feeb 100644 --- a/Detectors/FIT/V0/base/src/Geometry.cxx +++ b/Detectors/FIT/FV0/base/src/Geometry.cxx @@ -9,7 +9,7 @@ // or submit itself to any jurisdiction. #include //#include -#include "V0Base/Geometry.h" +#include "FV0Base/Geometry.h" #include #include @@ -21,9 +21,9 @@ #include #include -ClassImp(o2::v0::Geometry); +ClassImp(o2::fv0::Geometry); -using namespace o2::v0; +using namespace o2::fv0; Geometry::Geometry(EGeoType initType) { @@ -70,14 +70,14 @@ void Geometry::buildGeometry() LOG(FATAL) << "Could not find the top volume"; } - // Top volume of FIT V0 detector - TGeoVolumeAssembly* volV0 = new TGeoVolumeAssembly("FITV0"); - LOG(INFO) << "Geometry::buildGeometry()::Volume name = " << volV0->GetName(); - assembleSectors(volV0); + // Top volume of FV0 detector + TGeoVolumeAssembly* volFV0 = new TGeoVolumeAssembly("FV0"); + LOG(INFO) << "Geometry::buildGeometry()::Volume name = " << volFV0->GetName(); + assembleSectors(volFV0); TGeoTranslation* trGlobalZshift = new TGeoTranslation(0, 0, sZposition); - vALIC->AddNode(volV0, 0, trGlobalZshift); + vALIC->AddNode(volFV0, 0, trGlobalZshift); } TGeoVolumeAssembly* Geometry::buildSector(uint16_t iSector) @@ -100,8 +100,8 @@ TGeoVolumeAssembly* Geometry::buildSector(uint16_t iSector) booleanFormula += (std::string) "-boolBoxScintSeparator" + ":rotPhiSector1"; // subtract clockwise box (same but rotated by 45 degrees) TGeoCompositeShape* geoCell = new TGeoCompositeShape(ssNameGeoComposite.str().c_str(), booleanFormula.c_str()); - TGeoMedium* kMed = gGeoManager->GetMedium("V0_Scintillator$"); - TGeoVolume* volCell = new TGeoVolume("V0cell", geoCell, kMed); + TGeoMedium* kMed = gGeoManager->GetMedium("FV0_Scintillator$"); + TGeoVolume* volCell = new TGeoVolume("FV0cell", geoCell, kMed); volCell->SetLineColor(kYellow); sector->AddNode(volCell, iCell + 1); @@ -109,11 +109,11 @@ TGeoVolumeAssembly* Geometry::buildSector(uint16_t iSector) return sector; } -void Geometry::assembleSectors(TGeoVolumeAssembly* volV0) +void Geometry::assembleSectors(TGeoVolumeAssembly* volFV0) { for (uint16_t isector = 0; isector < mvPhiRot.size(); isector++) { TGeoVolumeAssembly* sector = buildSector(isector); - volV0->AddNode(sector, isector + 1, mvPhiRot.at(isector)); + volFV0->AddNode(sector, isector + 1, mvPhiRot.at(isector)); } } diff --git a/Detectors/FIT/V0/simulation/CMakeLists.txt b/Detectors/FIT/FV0/simulation/CMakeLists.txt similarity index 74% rename from Detectors/FIT/V0/simulation/CMakeLists.txt rename to Detectors/FIT/FV0/simulation/CMakeLists.txt index 5f9c75cc84638..b6a9d27563e89 100644 --- a/Detectors/FIT/V0/simulation/CMakeLists.txt +++ b/Detectors/FIT/FV0/simulation/CMakeLists.txt @@ -8,9 +8,9 @@ # granted to it by virtue of its status as an Intergovernmental Organization or # submit itself to any jurisdiction. -o2_add_library(V0Simulation +o2_add_library(FV0Simulation SOURCES src/Detector.cxx - PUBLIC_LINK_LIBRARIES O2::SimulationDataFormat O2::V0Base - O2::DataFormatsFITV0 ROOT::Physics) + PUBLIC_LINK_LIBRARIES O2::SimulationDataFormat O2::FV0Base + O2::DataFormatsFV0 ROOT::Physics) -o2_target_root_dictionary(V0Simulation HEADERS include/V0Simulation/Detector.h) +o2_target_root_dictionary(FV0Simulation HEADERS include/FV0Simulation/Detector.h) diff --git a/Detectors/FIT/V0/simulation/include/V0Simulation/Detector.h b/Detectors/FIT/FV0/simulation/include/FV0Simulation/Detector.h similarity index 86% rename from Detectors/FIT/V0/simulation/include/V0Simulation/Detector.h rename to Detectors/FIT/FV0/simulation/include/FV0Simulation/Detector.h index 1562eb26c7142..8bad2948f0d48 100644 --- a/Detectors/FIT/V0/simulation/include/V0Simulation/Detector.h +++ b/Detectors/FIT/FV0/simulation/include/FV0Simulation/Detector.h @@ -11,15 +11,15 @@ /// \file Detector.h /// \brief Definition of the Detector class -#ifndef ALICEO2_V0_DETECTOR_H_ -#define ALICEO2_V0_DETECTOR_H_ +#ifndef ALICEO2_FV0_DETECTOR_H_ +#define ALICEO2_FV0_DETECTOR_H_ #include "TLorentzVector.h" #include "SimulationDataFormat/BaseHits.h" #include "DetectorsBase/Detector.h" // for Detector -#include "V0Base/Geometry.h" -#include "DataFormatsFITV0/Hit.h" +#include "FV0Base/Geometry.h" +#include "DataFormatsFV0/Hit.h" class FairModule; @@ -29,7 +29,7 @@ class TGraph; namespace o2 { -namespace v0 +namespace fv0 { class Geometry; } @@ -37,7 +37,7 @@ class Geometry; namespace o2 { -namespace v0 +namespace fv0 { class Geometry; class Detector : public o2::base::DetImpl @@ -66,7 +66,7 @@ class Detector : public o2::base::DetImpl void Register() override; /// Gets the produced hits - std::vector* getHits(Int_t iColl) + std::vector* getHits(Int_t iColl) { if (iColl == 0) { return mHits; @@ -102,7 +102,7 @@ class Detector : public o2::base::DetImpl private: /// Container for hits - std::vector* mHits = nullptr; + std::vector* mHits = nullptr; /// Geometry pointer Geometry* mGeometry = nullptr; //! @@ -115,10 +115,10 @@ class Detector : public o2::base::DetImpl double mEnergyLoss; //! energy loss } mTrackData; //! - o2::v0::Hit* addHit(Int_t trackId, Int_t cellId, - TVector3 startPos, TVector3 endPos, - TVector3 startMom, double startE, - double endTime, double eLoss, Int_t particlePdg); + o2::fv0::Hit* addHit(Int_t trackId, Int_t cellId, + TVector3 startPos, TVector3 endPos, + TVector3 startMom, double startE, + double endTime, double eLoss, Int_t particlePdg); template friend class o2::base::DetImpl; @@ -128,7 +128,7 @@ class Detector : public o2::base::DetImpl // Input and output function for standard C++ input/output. std::ostream& operator<<(std::ostream& os, Detector& source); std::istream& operator>>(std::istream& os, Detector& source); -} // namespace v0 +} // namespace fv0 } // namespace o2 #ifdef USESHM namespace o2 @@ -136,7 +136,7 @@ namespace o2 namespace base { template <> -struct UseShm { +struct UseShm { static constexpr bool value = true; }; } // namespace base diff --git a/Detectors/FIT/V0/simulation/src/Detector.cxx b/Detectors/FIT/FV0/simulation/src/Detector.cxx similarity index 86% rename from Detectors/FIT/V0/simulation/src/Detector.cxx rename to Detectors/FIT/FV0/simulation/src/Detector.cxx index 164992425d219..2f7c280d80c70 100644 --- a/Detectors/FIT/V0/simulation/src/Detector.cxx +++ b/Detectors/FIT/FV0/simulation/src/Detector.cxx @@ -25,18 +25,18 @@ #include "FairVolume.h" #include -#include "V0Simulation/Detector.h" -#include "V0Base/Geometry.h" +#include "FV0Simulation/Detector.h" +#include "FV0Base/Geometry.h" #include "SimulationDataFormat/Stack.h" -using namespace o2::v0; -using o2::v0::Geometry; +using namespace o2::fv0; +using o2::fv0::Geometry; ClassImp(Detector); Detector::Detector() - : o2::base::DetImpl("V0", kTRUE), - mHits(o2::utils::createSimVector()), + : o2::base::DetImpl("FV0", kTRUE), + mHits(o2::utils::createSimVector()), mGeometry(nullptr), mTrackData() { @@ -54,8 +54,8 @@ Detector::~Detector() } Detector::Detector(Bool_t isActive) - : o2::base::DetImpl("V0", isActive), - mHits(o2::utils::createSimVector()), + : o2::base::DetImpl("FV0", isActive), + mHits(o2::utils::createSimVector()), mGeometry(nullptr), mTrackData() { @@ -64,13 +64,13 @@ Detector::Detector(Bool_t isActive) void Detector::InitializeO2Detector() { - LOG(INFO) << "FIT_V0: Initializing O2 detector. Adding sensitive volume."; - TGeoVolume* volSensitive = gGeoManager->GetVolume("V0cell"); + LOG(INFO) << "FV0: Initializing O2 detector. Adding sensitive volume."; + TGeoVolume* volSensitive = gGeoManager->GetVolume("FV0cell"); if (!volSensitive) { - LOG(FATAL) << "Can't find FIT V0 sensitive volume: cell"; + LOG(FATAL) << "Can't find FV0 sensitive volume: cell"; } else { AddSensitiveVolume(volSensitive); - LOG(INFO) << "FIT-V0: Sensitive volume: " << volSensitive->GetName() << " " << volSensitive->GetNumber(); + LOG(INFO) << "FV0: Sensitive volume: " << volSensitive->GetName() << " " << volSensitive->GetNumber(); } } @@ -131,10 +131,10 @@ Bool_t Detector::ProcessHits(FairVolume* v) return kTRUE; } -o2::v0::Hit* Detector::addHit(Int_t trackId, Int_t cellId, - TVector3 startPos, TVector3 endPos, - TVector3 startMom, double startE, - double endTime, double eLoss, Int_t particlePdg) +o2::fv0::Hit* Detector::addHit(Int_t trackId, Int_t cellId, + TVector3 startPos, TVector3 endPos, + TVector3 startMom, double startE, + double endTime, double eLoss, Int_t particlePdg) { mHits->emplace_back(trackId, cellId, startPos, endPos, startMom, startE, endTime, eLoss, particlePdg); @@ -146,7 +146,7 @@ o2::v0::Hit* Detector::addHit(Int_t trackId, Int_t cellId, // TODO: -> verify Todos inside the function void Detector::createMaterials() { - LOG(INFO) << "FIT_V0: Creating materials"; + LOG(INFO) << "FV0: Creating materials"; // Air mixture const Int_t nAir = 4; @@ -192,7 +192,7 @@ void Detector::createMaterials() void Detector::ConstructGeometry() { - LOG(INFO) << "FIT_V0: Constructing geometry"; + LOG(INFO) << "FV0: Constructing geometry"; createMaterials(); mGeometry = new Geometry(Geometry::eOnlySensitive); } diff --git a/Detectors/FIT/FV0/simulation/src/FV0SimulationLinkDef.h b/Detectors/FIT/FV0/simulation/src/FV0SimulationLinkDef.h new file mode 100644 index 0000000000000..cc2f96c4110a2 --- /dev/null +++ b/Detectors/FIT/FV0/simulation/src/FV0SimulationLinkDef.h @@ -0,0 +1,20 @@ +// 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. + +#ifdef __CLING__ + +#pragma link off all globals; +#pragma link off all classes; +#pragma link off all functions; + +#pragma link C++ class o2::fv0::Detector + ; +#pragma link C++ class o2::base::DetImpl < o2::fv0::Detector > +; + +#endif diff --git a/Detectors/FIT/V0/simulation/src/V0SimulationLinkDef.h b/Detectors/FIT/V0/simulation/src/V0SimulationLinkDef.h deleted file mode 100644 index 29a2717cc2c29..0000000000000 --- a/Detectors/FIT/V0/simulation/src/V0SimulationLinkDef.h +++ /dev/null @@ -1,20 +0,0 @@ -// 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. - -#ifdef __CLING__ - -#pragma link off all globals; -#pragma link off all classes; -#pragma link off all functions; - -#pragma link C++ class o2::v0::Detector + ; -#pragma link C++ class o2::base::DetImpl < o2::v0::Detector > +; - -#endif diff --git a/Detectors/FIT/common/simulation/CMakeLists.txt b/Detectors/FIT/common/simulation/CMakeLists.txt index b3e081bfcd7ae..5c356e0c3a7cd 100644 --- a/Detectors/FIT/common/simulation/CMakeLists.txt +++ b/Detectors/FIT/common/simulation/CMakeLists.txt @@ -10,8 +10,8 @@ o2_add_library(FITSimulation SOURCES src/Digitizer.cxx - PUBLIC_LINK_LIBRARIES O2::CommonDataFormat O2::DataFormatsFITT0 - O2::T0Simulation) + PUBLIC_LINK_LIBRARIES O2::CommonDataFormat O2::DataFormatsFT0 + O2::FT0Simulation) o2_target_root_dictionary( FITSimulation diff --git a/Detectors/FIT/common/simulation/include/FITSimulation/DigitizationParameters.h b/Detectors/FIT/common/simulation/include/FITSimulation/DigitizationParameters.h index e2ac37e4a8c79..96065ff39778a 100644 --- a/Detectors/FIT/common/simulation/include/FITSimulation/DigitizationParameters.h +++ b/Detectors/FIT/common/simulation/include/FITSimulation/DigitizationParameters.h @@ -25,7 +25,7 @@ struct DigitizationParameters { Float_t mCFD_trsh_mip; // = 4[mV] / 10[mV/mip] Float_t mTime_trg_gate; // ns Float_t mTimeDiffAC; - bool mIsT0; //amplitude T0(true) or V0 (false) + bool mIsFT0; //amplitude FT0(true) or FV0 (false) Float_t mSignalWidth; // Gate in ns Float_t mCfdShift; // time shift for CFD shape simulation Float_t mMip_in_V; //MIP to mV diff --git a/Detectors/FIT/common/simulation/include/FITSimulation/Digitizer.h b/Detectors/FIT/common/simulation/include/FITSimulation/Digitizer.h index 0b695010edc67..9ce2714a67897 100644 --- a/Detectors/FIT/common/simulation/include/FITSimulation/Digitizer.h +++ b/Detectors/FIT/common/simulation/include/FITSimulation/Digitizer.h @@ -12,9 +12,9 @@ #define ALICEO2_FIT_DIGITIZER_H #include "CommonDataFormat/InteractionRecord.h" -#include "DataFormatsFITT0/Digit.h" -#include "DataFormatsFITT0/MCLabel.h" -#include "T0Simulation/Detector.h" +#include "DataFormatsFT0/Digit.h" +#include "DataFormatsFT0/MCLabel.h" +#include "FT0Simulation/Detector.h" #include "SimulationDataFormat/MCTruthContainer.h" #include "SimulationDataFormat/MCCompLabel.h" #include "FITSimulation/DigitizationParameters.h" @@ -31,8 +31,8 @@ class Digitizer ~Digitizer() = default; //void process(const std::vector* hits, std::vector* digits); - void process(const std::vector* hits, o2::t0::Digit* digit, std::vector>& channel_times); - void computeAverage(o2::t0::Digit& digit); + void process(const std::vector* hits, o2::ft0::Digit* digit, std::vector>& channel_times); + void computeAverage(o2::ft0::Digit& digit); void initParameters(); void printParameters(); @@ -50,13 +50,13 @@ class Digitizer uint32_t getOrbit() const { return mIntRecord.orbit; } uint16_t getBC() const { return mIntRecord.bc; } - void setTriggers(o2::t0::Digit* digit); - void smearCFDtime(o2::t0::Digit* digit, std::vector> const& channel_times); + void setTriggers(o2::ft0::Digit* digit); + void smearCFDtime(o2::ft0::Digit* digit, std::vector> const& channel_times); void init(); void finish(); - void setMCLabels(o2::dataformats::MCTruthContainer* mclb) { mMCLabels = mclb; } + void setMCLabels(o2::dataformats::MCTruthContainer* mclb) { mMCLabels = mclb; } double get_time(const std::vector& times); private: @@ -72,7 +72,7 @@ class Digitizer DigitizationParameters parameters; - o2::dataformats::MCTruthContainer* mMCLabels = nullptr; + o2::dataformats::MCTruthContainer* mMCLabels = nullptr; static constexpr Float_t C_side_cable_cmps = 2.877; //ns static constexpr Float_t A_side_cable_cmps = 11.08; //ns diff --git a/Detectors/FIT/common/simulation/src/Digitizer.cxx b/Detectors/FIT/common/simulation/src/Digitizer.cxx index d18b488a2bc41..df089a6338b0e 100644 --- a/Detectors/FIT/common/simulation/src/Digitizer.cxx +++ b/Detectors/FIT/common/simulation/src/Digitizer.cxx @@ -66,23 +66,23 @@ double Digitizer::get_time(const std::vector& times) return 1e10; } -void Digitizer::process(const std::vector* hits, o2::t0::Digit* digit, std::vector>& channel_times) +void Digitizer::process(const std::vector* hits, o2::ft0::Digit* digit, std::vector>& channel_times) { auto sorted_hits{ *hits }; - std::sort(sorted_hits.begin(), sorted_hits.end(), [](o2::t0::HitType const& a, o2::t0::HitType const& b) { + std::sort(sorted_hits.begin(), sorted_hits.end(), [](o2::ft0::HitType const& a, o2::ft0::HitType const& b) { return a.GetTrackID() < b.GetTrackID(); }); digit->setTime(mEventTime); digit->setInteractionRecord(mIntRecord); //Calculating signal time, amplitude in mean_time +- time_gate -------------- - std::vector& channel_data = digit->getChDgData(); + std::vector& channel_data = digit->getChDgData(); if (channel_data.size() == 0) { channel_data.reserve(parameters.mMCPs); for (int i = 0; i < parameters.mMCPs; ++i) - channel_data.emplace_back(o2::t0::ChannelData{ i, 0, 0, 0 }); + channel_data.emplace_back(o2::ft0::ChannelData{ i, 0, 0, 0 }); } if (channel_times.size() == 0) channel_times.resize(parameters.mMCPs); @@ -107,7 +107,7 @@ void Digitizer::process(const std::vector* hits, o2::t0::Digit* //charge particles in MCLabel Int_t parentID = hit.GetTrackID(); if (parentID != parent) { - o2::t0::MCLabel label(hit.GetTrackID(), mEventID, mSrcID, hit_ch); + o2::ft0::MCLabel label(hit.GetTrackID(), mEventID, mSrcID, hit_ch); int lblCurrent; if (mMCLabels) { lblCurrent = mMCLabels->getIndexedSize(); // this is the size of mHeaderArray; @@ -119,12 +119,12 @@ void Digitizer::process(const std::vector* hits, o2::t0::Digit* } //------------------------------------------------------------------------ -void Digitizer::smearCFDtime(o2::t0::Digit* digit, std::vector> const& channel_times) +void Digitizer::smearCFDtime(o2::ft0::Digit* digit, std::vector> const& channel_times) { //smeared CFD time for 50ps // constexpr Float_t mMip_in_V = 7.; // mV /250 ph.e. // constexpr Float_t nPe_in_mip = 250.; // n ph. e. in one mip - std::vector mChDgDataArr; + std::vector mChDgDataArr; for (const auto& d : digit->getChDgData()) { Int_t mcp = d.ChId; Float_t amp = parameters.mMip_in_V * d.numberOfParticles / parameters.mPe_in_mip; @@ -132,14 +132,14 @@ void Digitizer::smearCFDtime(o2::t0::Digit* digit, std::vector parameters.mCFD_trsh_mip) { double smeared_time = get_time(channel_times[mcp]) + parameters.mBC_clk_center + mEventTime - parameters.mCfdShift; if (smeared_time < 1e9) - mChDgDataArr.emplace_back(o2::t0::ChannelData{ mcp, smeared_time, amp, numpart }); + mChDgDataArr.emplace_back(o2::ft0::ChannelData{ mcp, smeared_time, amp, numpart }); } } digit->setChDgData(std::move(mChDgDataArr)); } //------------------------------------------------------------------------ -void Digitizer::setTriggers(o2::t0::Digit* digit) +void Digitizer::setTriggers(o2::ft0::Digit* digit) { constexpr Double_t trg_central_trh = 100.; // mip diff --git a/Detectors/FIT/macros/CMakeLists.txt b/Detectors/FIT/macros/CMakeLists.txt index 0f6103fea5804..ec479e843102d 100644 --- a/Detectors/FIT/macros/CMakeLists.txt +++ b/Detectors/FIT/macros/CMakeLists.txt @@ -9,11 +9,11 @@ # submit itself to any jurisdiction. o2_add_test_root_macro(readHitsDigits.C - PUBLIC_LINK_LIBRARIES O2::DataFormatsFITT0 + PUBLIC_LINK_LIBRARIES O2::DataFormatsFT0 LABELS fit) -o2_add_test_root_macro(run_reco_t0.C +o2_add_test_root_macro(run_reco_ft0.C PUBLIC_LINK_LIBRARIES FairRoot::Base FairLogger::FairLogger - O2::T0Reconstruction + O2::FT0Reconstruction LABELS fit) diff --git a/Detectors/FIT/macros/readHitsDigits.C b/Detectors/FIT/macros/readHitsDigits.C index da2941203ad68..4228cf037fdaa 100644 --- a/Detectors/FIT/macros/readHitsDigits.C +++ b/Detectors/FIT/macros/readHitsDigits.C @@ -1,6 +1,6 @@ #if !defined(__CLING__) || defined(__ROOTCLING__) -#include "DataFormatsFITT0/Digit.h" -#include "DataFormatsFITT0/HitType.h" +#include "DataFormatsFT0/Digit.h" +#include "DataFormatsFT0/HitType.h" #include #include #include @@ -22,8 +22,8 @@ void readHitsDigits() TFile* fhit = new TFile("o2sim.root"); TTree* hitTree = (TTree*)fhit->Get("o2sim"); - std::vector* hitArray = nullptr; - hitTree->SetBranchAddress("T0Hit", &hitArray); + std::vector* hitArray = nullptr; + hitTree->SetBranchAddress("FT0Hit", &hitArray); Int_t nevH = hitTree->GetEntries(); // hits are stored as one event per entry // std::cout << "Found " << nevH << " events with hits " << std::endl; @@ -51,11 +51,11 @@ void readHitsDigits() } } - TFile* fdig = TFile::Open("t0digits.root"); + TFile* fdig = TFile::Open("ft0digits.root"); std::cout << " Open digits file " << std::endl; TTree* digTree = (TTree*)fdig->Get("o2sim"); - std::vector* digArr = new std::vector; - digTree->SetBranchAddress("T0Digit", &digArr); + std::vector* digArr = new std::vector; + digTree->SetBranchAddress("FT0Digit", &digArr); Int_t nevD = digTree->GetEntries(); // digits in cont. readout may be grouped as few events per entry // std::cout << "Found " << nevD << " events with digits " << std::endl; Float_t cfd[208], amp[208], part[208]; diff --git a/Detectors/FIT/macros/run_reco_t0.C b/Detectors/FIT/macros/run_reco_ft0.C similarity index 67% rename from Detectors/FIT/macros/run_reco_t0.C rename to Detectors/FIT/macros/run_reco_ft0.C index ad842a3109942..523cbbca1ba41 100644 --- a/Detectors/FIT/macros/run_reco_t0.C +++ b/Detectors/FIT/macros/run_reco_ft0.C @@ -9,14 +9,14 @@ #include "FairLogger.h" -#include "T0Reconstruction/CollisionTimeRecoTask.h" -#include "DataFormatsFITT0/RecPoints.h" -#include "DataFormatsFITT0/Digit.h" +#include "FT0Reconstruction/CollisionTimeRecoTask.h" +#include "DataFormatsFT0/RecPoints.h" +#include "DataFormatsFT0/Digit.h" #endif -void run_reco_t0(std::string inpudDig = "t0digits.root", - std::string outName = "o2reco_t0.root", - std::string inputGRP = "o2sim_grp.root") +void run_reco_ft0(std::string inpudDig = "ft0digits.root", + std::string outName = "o2reco_ft0.root", + std::string inputGRP = "o2sim_grp.root") { // Initialize logger @@ -27,22 +27,22 @@ void run_reco_t0(std::string inpudDig = "t0digits.root", // Setup timer TStopwatch timer; - TFile* fdig = TFile::Open("t0digits.root"); + TFile* fdig = TFile::Open("ft0digits.root"); std::cout << " Open digits file " << std::endl; TTree* digTree = (TTree*)fdig->Get("o2sim"); digTree->Print(); - std::vector* digits = new std::vector; - digTree->SetBranchAddress("T0Digit", &digits); + std::vector* digits = new std::vector; + digTree->SetBranchAddress("FT0Digit", &digits); Int_t nevD = digTree->GetEntries(); // digits in cont. readout may be grouped as few events per entry std::cout << "Found " << nevD << " events with digits " << std::endl; - std::vector* recPointsP = new std::vector; + std::vector* recPointsP = new std::vector; TFile outFile(outName.c_str(), "recreate"); - TTree outTree("o2sim", "T0RecPoints"); - outTree.Branch("T0Cluster", &recPointsP); + TTree outTree("o2sim", "FT0RecPoints"); + outTree.Branch("FT0Cluster", &recPointsP); - o2::t0::CollisionTimeRecoTask recoFIT; + o2::ft0::CollisionTimeRecoTask recoFIT; timer.Start(); for (int iEv = 0; iEv < nevD; iEv++) { digTree->GetEntry(iEv); diff --git a/Detectors/FIT/workflow/CMakeLists.txt b/Detectors/FIT/workflow/CMakeLists.txt index a0d95ecb8fdb6..dd91ac2f3f6c4 100644 --- a/Detectors/FIT/workflow/CMakeLists.txt +++ b/Detectors/FIT/workflow/CMakeLists.txt @@ -9,10 +9,10 @@ # submit itself to any jurisdiction. o2_add_library(FITWorkflow - SOURCES src/RecoWorkflow.cxx src/T0DigitReaderSpec.cxx - src/T0ReconstructorSpec.cxx src/T0RecPointWriterSpec.cxx - src/T0RecPointReaderSpec.cxx - PUBLIC_LINK_LIBRARIES O2::T0Reconstruction O2::Framework) + SOURCES src/RecoWorkflow.cxx src/FT0DigitReaderSpec.cxx + src/FT0ReconstructorSpec.cxx src/FT0RecPointWriterSpec.cxx + src/FT0RecPointReaderSpec.cxx + PUBLIC_LINK_LIBRARIES O2::FT0Reconstruction O2::Framework) o2_add_executable(reco-workflow COMPONENT_NAME fit diff --git a/Detectors/FIT/workflow/include/FITWorkflow/T0DigitReaderSpec.h b/Detectors/FIT/workflow/include/FITWorkflow/FT0DigitReaderSpec.h similarity index 65% rename from Detectors/FIT/workflow/include/FITWorkflow/T0DigitReaderSpec.h rename to Detectors/FIT/workflow/include/FITWorkflow/FT0DigitReaderSpec.h index 9f526aa7fe03e..4d14caba6df89 100644 --- a/Detectors/FIT/workflow/include/FITWorkflow/T0DigitReaderSpec.h +++ b/Detectors/FIT/workflow/include/FITWorkflow/FT0DigitReaderSpec.h @@ -8,24 +8,24 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -/// @file T0DigitReaderSpec.h +/// @file FT0DigitReaderSpec.h -#ifndef O2_T0_DIGITREADER -#define O2_T0_DIGITREADER +#ifndef O2_FT0_DIGITREADER +#define O2_FT0_DIGITREADER #include "TFile.h" #include "Framework/DataProcessorSpec.h" #include "Framework/Task.h" -#include "DataFormatsFITT0/Digit.h" -#include "DataFormatsFITT0/MCLabel.h" +#include "DataFormatsFT0/Digit.h" +#include "DataFormatsFT0/MCLabel.h" #include "SimulationDataFormat/MCTruthContainer.h" using namespace o2::framework; namespace o2 { -namespace t0 +namespace ft0 { class DigitReader : public Task @@ -39,22 +39,22 @@ class DigitReader : public Task private: bool mFinished = false; bool mUseMC = true; // use MC truth - o2::header::DataOrigin mOrigin = o2::header::gDataOriginT0; + o2::header::DataOrigin mOrigin = o2::header::gDataOriginFT0; - std::vector* mDigits = nullptr; - o2::dataformats::MCTruthContainer* mMCTruth = nullptr; + std::vector* mDigits = nullptr; + o2::dataformats::MCTruthContainer* mMCTruth = nullptr; std::string mInputFileName = ""; std::string mDigitTreeName = "o2sim"; - std::string mDigitBranchName = "T0Digit"; - std::string mDigitMCTruthBranchName = "T0DigitMCTruth"; + std::string mDigitBranchName = "FT0Digit"; + std::string mDigitMCTruthBranchName = "FT0DigitMCTruth"; }; /// create a processor spec /// read simulated ITS digits from a root file -framework::DataProcessorSpec getT0DigitReaderSpec(bool useMC); +framework::DataProcessorSpec getFT0DigitReaderSpec(bool useMC); -} // namespace t0 +} // namespace ft0 } // namespace o2 -#endif /* O2_T0_DIGITREADER */ +#endif /* O2_FT0_DIGITREADER */ diff --git a/Detectors/FIT/workflow/include/FITWorkflow/T0RecPointReaderSpec.h b/Detectors/FIT/workflow/include/FITWorkflow/FT0RecPointReaderSpec.h similarity index 67% rename from Detectors/FIT/workflow/include/FITWorkflow/T0RecPointReaderSpec.h rename to Detectors/FIT/workflow/include/FITWorkflow/FT0RecPointReaderSpec.h index 8381ae4dd233a..0f4d0496a4e95 100644 --- a/Detectors/FIT/workflow/include/FITWorkflow/T0RecPointReaderSpec.h +++ b/Detectors/FIT/workflow/include/FITWorkflow/FT0RecPointReaderSpec.h @@ -8,22 +8,22 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -/// @file T0RecPointReaderSpec.h +/// @file FT0RecPointReaderSpec.h -#ifndef O2_T0_RECPOINTREADER -#define O2_T0_RECPOINTREADER +#ifndef O2_FT0_RECPOINTREADER +#define O2_FT0_RECPOINTREADER #include "TFile.h" #include "Framework/DataProcessorSpec.h" #include "Framework/Task.h" -#include "DataFormatsFITT0/RecPoints.h" +#include "DataFormatsFT0/RecPoints.h" using namespace o2::framework; namespace o2 { -namespace t0 +namespace ft0 { class RecPointReader : public Task @@ -37,20 +37,20 @@ class RecPointReader : public Task private: bool mFinished = false; bool mUseMC = true; // use MC truth - o2::header::DataOrigin mOrigin = o2::header::gDataOriginT0; + o2::header::DataOrigin mOrigin = o2::header::gDataOriginFT0; - std::vector* mRecPoints = nullptr; + std::vector* mRecPoints = nullptr; - std::string mInputFileName = "o2reco_t0.root"; + std::string mInputFileName = "o2reco_ft0.root"; std::string mRecPointTreeName = "o2sim"; - std::string mRecPointBranchName = "T0Cluster"; + std::string mRecPointBranchName = "FT0Cluster"; }; /// create a processor spec /// read simulated ITS digits from a root file -framework::DataProcessorSpec getT0RecPointReaderSpec(bool useMC); +framework::DataProcessorSpec getFT0RecPointReaderSpec(bool useMC); -} // namespace t0 +} // namespace ft0 } // namespace o2 -#endif /* O2_T0_RECPOINTREADER */ +#endif /* O2_FT0_RECPOINTREADER */ diff --git a/Detectors/FIT/workflow/include/FITWorkflow/T0RecPointWriterSpec.h b/Detectors/FIT/workflow/include/FITWorkflow/FT0RecPointWriterSpec.h similarity index 62% rename from Detectors/FIT/workflow/include/FITWorkflow/T0RecPointWriterSpec.h rename to Detectors/FIT/workflow/include/FITWorkflow/FT0RecPointWriterSpec.h index 4aaeeacc4a257..2c73ba5e9ed4c 100644 --- a/Detectors/FIT/workflow/include/FITWorkflow/T0RecPointWriterSpec.h +++ b/Detectors/FIT/workflow/include/FITWorkflow/FT0RecPointWriterSpec.h @@ -8,10 +8,10 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -/// @file T0RecPointWriterSpec.h +/// @file FT0RecPointWriterSpec.h -#ifndef O2_FIT_T0RECPOINTWRITER_H -#define O2_FIT_T0RECPOINTWRITER_H +#ifndef O2_FT0RECPOINTWRITER_H +#define O2_FT0RECPOINTWRITER_H #include "TFile.h" @@ -22,14 +22,14 @@ using namespace o2::framework; namespace o2 { -namespace t0 +namespace ft0 { -class T0RecPointWriter : public Task +class FT0RecPointWriter : public Task { public: - T0RecPointWriter(bool useMC = true) : mUseMC(useMC) {} - ~T0RecPointWriter() override = default; + FT0RecPointWriter(bool useMC = true) : mUseMC(useMC) {} + ~FT0RecPointWriter() override = default; void init(InitContext& ic) final; void run(ProcessingContext& pc) final; @@ -37,17 +37,17 @@ class T0RecPointWriter : public Task bool mFinished = false; bool mUseMC = true; - std::string mOutputFileName = "o2reco_t0.root"; + std::string mOutputFileName = "o2reco_ft0.root"; std::string mOutputTreeName = "o2sim"; - std::string mRPOutputBranchName = "T0Cluster"; - o2::header::DataOrigin mOrigin = o2::header::gDataOriginT0; + std::string mRPOutputBranchName = "FT0Cluster"; + o2::header::DataOrigin mOrigin = o2::header::gDataOriginFT0; }; /// create a processor spec /// write ITS clusters a root file -framework::DataProcessorSpec getT0RecPointWriterSpec(bool useMC); +framework::DataProcessorSpec getFT0RecPointWriterSpec(bool useMC); -} // namespace t0 +} // namespace ft0 } // namespace o2 -#endif /* O2_FIT_T0RECPOINTWRITER_H */ +#endif /* O2_FT0RECPOINTWRITER_H */ diff --git a/Detectors/FIT/workflow/include/FITWorkflow/T0ReconstructorSpec.h b/Detectors/FIT/workflow/include/FITWorkflow/FT0ReconstructorSpec.h similarity index 56% rename from Detectors/FIT/workflow/include/FITWorkflow/T0ReconstructorSpec.h rename to Detectors/FIT/workflow/include/FITWorkflow/FT0ReconstructorSpec.h index 9b20b6d580591..d861b9118c94d 100644 --- a/Detectors/FIT/workflow/include/FITWorkflow/T0ReconstructorSpec.h +++ b/Detectors/FIT/workflow/include/FITWorkflow/FT0ReconstructorSpec.h @@ -8,43 +8,43 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -/// @file T0ReconstructorSpec.h +/// @file FT0ReconstructorSpec.h -#ifndef O2_FIT_T0RECONSTRUCTORDPL_H -#define O2_FIT_T0RECONSTRUCTORDPL_H +#ifndef O2_FT0RECONSTRUCTORDPL_H +#define O2_FT0RECONSTRUCTORDPL_H #include "Framework/DataProcessorSpec.h" #include "Framework/Task.h" -#include "T0Reconstruction/CollisionTimeRecoTask.h" -#include "DataFormatsFITT0/RecPoints.h" +#include "FT0Reconstruction/CollisionTimeRecoTask.h" +#include "DataFormatsFT0/RecPoints.h" using namespace o2::framework; namespace o2 { -namespace t0 +namespace ft0 { -class T0ReconstructorDPL : public Task +class FT0ReconstructorDPL : public Task { public: - T0ReconstructorDPL(bool useMC) : mUseMC(useMC) {} - ~T0ReconstructorDPL() override = default; + FT0ReconstructorDPL(bool useMC) : mUseMC(useMC) {} + ~FT0ReconstructorDPL() override = default; void init(InitContext& ic) final; void run(ProcessingContext& pc) final; private: bool mFinished = false; bool mUseMC = true; - std::vector mRecPoints; - o2::t0::CollisionTimeRecoTask mReco; - o2::header::DataOrigin mOrigin = o2::header::gDataOriginT0; + std::vector mRecPoints; + o2::ft0::CollisionTimeRecoTask mReco; + o2::header::DataOrigin mOrigin = o2::header::gDataOriginFT0; }; /// create a processor spec -framework::DataProcessorSpec getT0ReconstructorSpec(bool useMC = true); +framework::DataProcessorSpec getFT0ReconstructorSpec(bool useMC = true); -} // namespace t0 +} // namespace ft0 } // namespace o2 -#endif /* O2_FIT_T0RECONSTRUCTORDPL_H */ +#endif /* O2_FT0RECONSTRUCTORDPL_H */ diff --git a/Detectors/FIT/workflow/src/T0DigitReaderSpec.cxx b/Detectors/FIT/workflow/src/FT0DigitReaderSpec.cxx similarity index 68% rename from Detectors/FIT/workflow/src/T0DigitReaderSpec.cxx rename to Detectors/FIT/workflow/src/FT0DigitReaderSpec.cxx index e896b95b48ad6..cb7df9dcc992c 100644 --- a/Detectors/FIT/workflow/src/T0DigitReaderSpec.cxx +++ b/Detectors/FIT/workflow/src/FT0DigitReaderSpec.cxx @@ -8,21 +8,21 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -/// @file T0DigitReaderSpec.cxx +/// @file FT0DigitReaderSpec.cxx #include #include "TTree.h" #include "Framework/ControlService.h" -#include "FITWorkflow/T0DigitReaderSpec.h" +#include "FITWorkflow/FT0DigitReaderSpec.h" using namespace o2::framework; -using namespace o2::t0; +using namespace o2::ft0; namespace o2 { -namespace t0 +namespace ft0 { DigitReader::DigitReader(bool useMC) @@ -32,7 +32,7 @@ DigitReader::DigitReader(bool useMC) void DigitReader::init(InitContext& ic) { - mInputFileName = ic.options().get("t0-digits-infile"); + mInputFileName = ic.options().get("ft0-digits-infile"); } void DigitReader::run(ProcessingContext& pc) @@ -44,13 +44,13 @@ void DigitReader::run(ProcessingContext& pc) { // load data from files TFile digFile(mInputFileName.c_str(), "read"); if (digFile.IsZombie()) { - LOG(FATAL) << "Failed to open T0 digits file " << mInputFileName; + LOG(FATAL) << "Failed to open FT0 digits file " << mInputFileName; } TTree* digTree = (TTree*)digFile.Get(mDigitTreeName.c_str()); if (!digTree) { - LOG(FATAL) << "Failed to load T0 digits tree " << mDigitTreeName << " from " << mInputFileName; + LOG(FATAL) << "Failed to load FT0 digits tree " << mDigitTreeName << " from " << mInputFileName; } - LOG(INFO) << "Loaded T0 digits tree " << mDigitTreeName << " from " << mInputFileName; + LOG(INFO) << "Loaded FT0 digits tree " << mDigitTreeName << " from " << mInputFileName; digTree->SetBranchAddress(mDigitBranchName.c_str(), &mDigits); if (mUseMC) { @@ -67,7 +67,7 @@ void DigitReader::run(ProcessingContext& pc) digFile.Close(); } - LOG(INFO) << "T0 DigitReader pushes " << mDigits->size() << " digits"; + LOG(INFO) << "FT0 DigitReader pushes " << mDigits->size() << " digits"; pc.outputs().snapshot(Output{ mOrigin, "DIGITS", 0, Lifetime::Timeframe }, *mDigits); if (mUseMC) { pc.outputs().snapshot(Output{ mOrigin, "DIGITSMCTR", 0, Lifetime::Timeframe }, *mMCTruth); @@ -77,23 +77,23 @@ void DigitReader::run(ProcessingContext& pc) pc.services().get().readyToQuit(false); } -DataProcessorSpec getT0DigitReaderSpec(bool useMC) +DataProcessorSpec getFT0DigitReaderSpec(bool useMC) { std::vector outputSpec; - outputSpec.emplace_back(o2::header::gDataOriginT0, "DIGITS", 0, Lifetime::Timeframe); + outputSpec.emplace_back(o2::header::gDataOriginFT0, "DIGITS", 0, Lifetime::Timeframe); if (useMC) { - outputSpec.emplace_back(o2::header::gDataOriginT0, "DIGITSMCTR", 0, Lifetime::Timeframe); + outputSpec.emplace_back(o2::header::gDataOriginFT0, "DIGITSMCTR", 0, Lifetime::Timeframe); } return DataProcessorSpec{ - "t0-digit-reader", + "ft0-digit-reader", Inputs{}, outputSpec, AlgorithmSpec{ adaptFromTask() }, Options{ - { "t0-digits-infile", VariantType::String, "t0digits.root", { "Name of the input file" } } } + { "ft0-digits-infile", VariantType::String, "ft0digits.root", { "Name of the input file" } } } }; } -} // namespace t0 +} // namespace ft0 } // namespace o2 diff --git a/Detectors/FIT/workflow/src/T0RecPointReaderSpec.cxx b/Detectors/FIT/workflow/src/FT0RecPointReaderSpec.cxx similarity index 59% rename from Detectors/FIT/workflow/src/T0RecPointReaderSpec.cxx rename to Detectors/FIT/workflow/src/FT0RecPointReaderSpec.cxx index 2d4bb597ff603..e9a9051bcbff5 100644 --- a/Detectors/FIT/workflow/src/T0RecPointReaderSpec.cxx +++ b/Detectors/FIT/workflow/src/FT0RecPointReaderSpec.cxx @@ -8,34 +8,34 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -/// @file T0RecPointReaderSpec.cxx +/// @file FT0RecPointReaderSpec.cxx #include #include "TTree.h" #include "Framework/ControlService.h" -#include "FITWorkflow/T0RecPointReaderSpec.h" +#include "FITWorkflow/FT0RecPointReaderSpec.h" using namespace o2::framework; -using namespace o2::t0; +using namespace o2::ft0; namespace o2 { -namespace t0 +namespace ft0 { RecPointReader::RecPointReader(bool useMC) { mUseMC = useMC; if (useMC) { - LOG(WARNING) << "T0 RecPoint reader at the moment does not process MC"; + LOG(WARNING) << "FT0 RecPoint reader at the moment does not process MC"; } } void RecPointReader::init(InitContext& ic) { - mInputFileName = ic.options().get("t0-recpoints-infile"); + mInputFileName = ic.options().get("ft0-recpoints-infile"); } void RecPointReader::run(ProcessingContext& pc) @@ -47,17 +47,17 @@ void RecPointReader::run(ProcessingContext& pc) { // load data from files TFile rpFile(mInputFileName.c_str(), "read"); if (rpFile.IsZombie()) { - LOG(FATAL) << "Failed to open T0 recpoints file " << mInputFileName; + LOG(FATAL) << "Failed to open FT0 recpoints file " << mInputFileName; } TTree* rpTree = (TTree*)rpFile.Get(mRecPointTreeName.c_str()); if (!rpTree) { - LOG(FATAL) << "Failed to load T0 recpoints tree " << mRecPointTreeName << " from " << mInputFileName; + LOG(FATAL) << "Failed to load FT0 recpoints tree " << mRecPointTreeName << " from " << mInputFileName; } - LOG(INFO) << "Loaded T0 recpoints tree " << mRecPointTreeName << " from " << mInputFileName; + LOG(INFO) << "Loaded FT0 recpoints tree " << mRecPointTreeName << " from " << mInputFileName; rpTree->SetBranchAddress(mRecPointBranchName.c_str(), &mRecPoints); if (mUseMC) { - LOG(WARNING) << "MC-truth is not supported for T0 recpoints currently"; + LOG(WARNING) << "MC-truth is not supported for FT0 recpoints currently"; mUseMC = false; } @@ -66,30 +66,30 @@ void RecPointReader::run(ProcessingContext& pc) rpFile.Close(); } - LOG(INFO) << "T0 RecPointReader pushes " << mRecPoints->size() << " recpoints"; + LOG(INFO) << "FT0 RecPointReader pushes " << mRecPoints->size() << " recpoints"; pc.outputs().snapshot(Output{ mOrigin, "RECPOINTS", 0, Lifetime::Timeframe }, *mRecPoints); mFinished = true; pc.services().get().readyToQuit(false); } -DataProcessorSpec getT0RecPointReaderSpec(bool useMC) +DataProcessorSpec getFT0RecPointReaderSpec(bool useMC) { std::vector outputSpec; - outputSpec.emplace_back(o2::header::gDataOriginT0, "RECPOINTS", 0, Lifetime::Timeframe); + outputSpec.emplace_back(o2::header::gDataOriginFT0, "RECPOINTS", 0, Lifetime::Timeframe); if (useMC) { - LOG(WARNING) << "MC-truth is not supported for T0 recpoints currently"; + LOG(WARNING) << "MC-truth is not supported for FT0 recpoints currently"; } return DataProcessorSpec{ - "t0-recpoints-reader", + "ft0-recpoints-reader", Inputs{}, outputSpec, AlgorithmSpec{ adaptFromTask() }, Options{ - { "t0-recpoints-infile", VariantType::String, "o2reco_t0.root", { "Name of the input file" } } } + { "ft0-recpoints-infile", VariantType::String, "o2reco_ft0.root", { "Name of the input file" } } } }; } -} // namespace t0 +} // namespace ft0 } // namespace o2 diff --git a/Detectors/FIT/workflow/src/FT0RecPointWriterSpec.cxx b/Detectors/FIT/workflow/src/FT0RecPointWriterSpec.cxx new file mode 100644 index 0000000000000..3b64bc8db4351 --- /dev/null +++ b/Detectors/FIT/workflow/src/FT0RecPointWriterSpec.cxx @@ -0,0 +1,73 @@ +// 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 FT0RecPointWriterSpec.cxx + +#include + +#include "TTree.h" + +#include "Framework/ControlService.h" +#include "FITWorkflow/FT0RecPointWriterSpec.h" +#include "DataFormatsFT0/RecPoints.h" + +using namespace o2::framework; + +namespace o2 +{ +namespace ft0 +{ + +void FT0RecPointWriter::init(InitContext& ic) +{ +} + +void FT0RecPointWriter::run(ProcessingContext& pc) +{ + if (mFinished) { + return; + } + // no MC infor treatment at the moment + auto recPoints = pc.inputs().get>("recpoints"); + auto recPointsPtr = &recPoints; + LOG(INFO) << "FT0RecPointWriter pulled " << recPoints.size() << " RecPoints"; + + TFile flOut(mOutputFileName.c_str(), "recreate"); + if (flOut.IsZombie()) { + LOG(FATAL) << "Failed to create FT0 RecPoints output file " << mOutputFileName; + } + TTree tree(mOutputTreeName.c_str(), "Tree with FT0 RecPoints"); + tree.Branch(mRPOutputBranchName.c_str(), &recPointsPtr); + tree.Fill(); + tree.Write(); + + mFinished = true; + pc.services().get().readyToQuit(false); +} + +DataProcessorSpec getFT0RecPointWriterSpec(bool useMC) +{ + std::vector inputSpec; + inputSpec.emplace_back("recpoints", o2::header::gDataOriginFT0, "RECPOINTS", 0, Lifetime::Timeframe); + return DataProcessorSpec{ + "ft0-recpoint-writer", + inputSpec, + Outputs{}, + AlgorithmSpec{ adaptFromTask(useMC) }, + Options{ + { "ft0-recpoint-outfile", VariantType::String, "o2reco_ft0.root", { "Name of the output file" } }, + { "ft0-recpoint-tree-name", VariantType::String, "o2sim", { "Name of the FT0 recpoints tree" } }, + { "ft0-recpoint-branch-name", VariantType::String, "FT0Cluster", { "Name of the FT0 recpoints branch" } }, + } + }; +} + +} // namespace ft0 +} // namespace o2 diff --git a/Detectors/FIT/workflow/src/T0ReconstructorSpec.cxx b/Detectors/FIT/workflow/src/FT0ReconstructorSpec.cxx similarity index 58% rename from Detectors/FIT/workflow/src/T0ReconstructorSpec.cxx rename to Detectors/FIT/workflow/src/FT0ReconstructorSpec.cxx index b116c1da46c3d..4291fe85d70f8 100644 --- a/Detectors/FIT/workflow/src/T0ReconstructorSpec.cxx +++ b/Detectors/FIT/workflow/src/FT0ReconstructorSpec.cxx @@ -8,38 +8,38 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -/// @file T0ReconstructorSpec.cxx +/// @file FT0ReconstructorSpec.cxx #include #include "SimulationDataFormat/MCTruthContainer.h" #include "Framework/ControlService.h" -#include "FITWorkflow/T0ReconstructorSpec.h" -#include "DataFormatsFITT0/Digit.h" -#include "DataFormatsFITT0/MCLabel.h" +#include "FITWorkflow/FT0ReconstructorSpec.h" +#include "DataFormatsFT0/Digit.h" +#include "DataFormatsFT0/MCLabel.h" using namespace o2::framework; namespace o2 { -namespace t0 +namespace ft0 { -void T0ReconstructorDPL::init(InitContext& ic) +void FT0ReconstructorDPL::init(InitContext& ic) { } -void T0ReconstructorDPL::run(ProcessingContext& pc) +void FT0ReconstructorDPL::run(ProcessingContext& pc) { if (mFinished) { return; } mRecPoints.clear(); - auto digits = pc.inputs().get>("digits"); + auto digits = pc.inputs().get>("digits"); // RS: if we need to process MC truth, uncomment lines below - //std::unique_ptr> labels; - //const o2::dataformats::MCTruthContainer* lblPtr = nullptr; + //std::unique_ptr> labels; + //const o2::dataformats::MCTruthContainer* lblPtr = nullptr; if (mUseMC) { - //labels = pc.inputs().get*>("labels"); + //labels = pc.inputs().get*>("labels"); //lblPtr = labels.get(); LOG(INFO) << "Ignoring MC info"; } @@ -52,32 +52,32 @@ void T0ReconstructorDPL::run(ProcessingContext& pc) } // do we ignore MC in this task? - LOG(INFO) << "T0 reconstruction pushes " << mRecPoints.size() << " RecPoints"; + LOG(INFO) << "FT0 reconstruction pushes " << mRecPoints.size() << " RecPoints"; pc.outputs().snapshot(Output{ mOrigin, "RECPOINTS", 0, Lifetime::Timeframe }, mRecPoints); mFinished = true; pc.services().get().readyToQuit(false); } -DataProcessorSpec getT0ReconstructorSpec(bool useMC) +DataProcessorSpec getFT0ReconstructorSpec(bool useMC) { std::vector inputSpec; std::vector outputSpec; - inputSpec.emplace_back("digits", o2::header::gDataOriginT0, "DIGITS", 0, Lifetime::Timeframe); + inputSpec.emplace_back("digits", o2::header::gDataOriginFT0, "DIGITS", 0, Lifetime::Timeframe); if (useMC) { - LOG(INFO) << "Currently T0Reconstructor does not consume and provide MC truth"; - // inputSpec.emplace_back("labels", o2::header::gDataOriginT0, "DIGITSMCTR", 0, Lifetime::Timeframe); + LOG(INFO) << "Currently FT0Reconstructor does not consume and provide MC truth"; + // inputSpec.emplace_back("labels", o2::header::gDataOriginFT0, "DIGITSMCTR", 0, Lifetime::Timeframe); } - outputSpec.emplace_back(o2::header::gDataOriginT0, "RECPOINTS", 0, Lifetime::Timeframe); + outputSpec.emplace_back(o2::header::gDataOriginFT0, "RECPOINTS", 0, Lifetime::Timeframe); return DataProcessorSpec{ - "t0-reconstructor", + "ft0-reconstructor", inputSpec, outputSpec, - AlgorithmSpec{ adaptFromTask(useMC) }, + AlgorithmSpec{ adaptFromTask(useMC) }, Options{} }; } -} // namespace t0 +} // namespace ft0 } // namespace o2 diff --git a/Detectors/FIT/workflow/src/RecoWorkflow.cxx b/Detectors/FIT/workflow/src/RecoWorkflow.cxx index a634183d4053a..3c6f3fa019a6a 100644 --- a/Detectors/FIT/workflow/src/RecoWorkflow.cxx +++ b/Detectors/FIT/workflow/src/RecoWorkflow.cxx @@ -12,9 +12,9 @@ #include "FITWorkflow/RecoWorkflow.h" -#include "FITWorkflow/T0DigitReaderSpec.h" -#include "FITWorkflow/T0RecPointWriterSpec.h" -#include "FITWorkflow/T0ReconstructorSpec.h" +#include "FITWorkflow/FT0DigitReaderSpec.h" +#include "FITWorkflow/FT0RecPointWriterSpec.h" +#include "FITWorkflow/FT0ReconstructorSpec.h" namespace o2 { @@ -25,9 +25,9 @@ framework::WorkflowSpec getRecoWorkflow(bool useMC) { framework::WorkflowSpec specs; - specs.emplace_back(o2::t0::getT0RecPointWriterSpec(useMC)); - specs.emplace_back(o2::t0::getT0ReconstructorSpec(useMC)); - specs.emplace_back(o2::t0::getT0DigitReaderSpec(useMC)); + specs.emplace_back(o2::ft0::getFT0RecPointWriterSpec(useMC)); + specs.emplace_back(o2::ft0::getFT0ReconstructorSpec(useMC)); + specs.emplace_back(o2::ft0::getFT0DigitReaderSpec(useMC)); return specs; } diff --git a/Detectors/FIT/workflow/src/T0RecPointWriterSpec.cxx b/Detectors/FIT/workflow/src/T0RecPointWriterSpec.cxx deleted file mode 100644 index 45755733d8962..0000000000000 --- a/Detectors/FIT/workflow/src/T0RecPointWriterSpec.cxx +++ /dev/null @@ -1,73 +0,0 @@ -// 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 T0RecPointWriterSpec.cxx - -#include - -#include "TTree.h" - -#include "Framework/ControlService.h" -#include "FITWorkflow/T0RecPointWriterSpec.h" -#include "DataFormatsFITT0/RecPoints.h" - -using namespace o2::framework; - -namespace o2 -{ -namespace t0 -{ - -void T0RecPointWriter::init(InitContext& ic) -{ -} - -void T0RecPointWriter::run(ProcessingContext& pc) -{ - if (mFinished) { - return; - } - // no MC infor treatment at the moment - auto recPoints = pc.inputs().get>("recpoints"); - auto recPointsPtr = &recPoints; - LOG(INFO) << "T0RecPointWriter pulled " << recPoints.size() << " RecPoints"; - - TFile flOut(mOutputFileName.c_str(), "recreate"); - if (flOut.IsZombie()) { - LOG(FATAL) << "Failed to create T0 RecPoints output file " << mOutputFileName; - } - TTree tree(mOutputTreeName.c_str(), "Tree with T0 RecPoints"); - tree.Branch(mRPOutputBranchName.c_str(), &recPointsPtr); - tree.Fill(); - tree.Write(); - - mFinished = true; - pc.services().get().readyToQuit(false); -} - -DataProcessorSpec getT0RecPointWriterSpec(bool useMC) -{ - std::vector inputSpec; - inputSpec.emplace_back("recpoints", o2::header::gDataOriginT0, "RECPOINTS", 0, Lifetime::Timeframe); - return DataProcessorSpec{ - "t0-recpoint-writer", - inputSpec, - Outputs{}, - AlgorithmSpec{ adaptFromTask(useMC) }, - Options{ - { "t0-recpoint-outfile", VariantType::String, "o2reco_t0.root", { "Name of the output file" } }, - { "t0-recpoint-tree-name", VariantType::String, "o2sim", { "Name of the T0 recpoints tree" } }, - { "t0-recpoint-branch-name", VariantType::String, "T0Cluster", { "Name of the T0 recpoints branch" } }, - } - }; -} - -} // namespace t0 -} // namespace o2 diff --git a/Detectors/GlobalTracking/CMakeLists.txt b/Detectors/GlobalTracking/CMakeLists.txt index ff32d0b59eb19..ff700fdc3ea36 100644 --- a/Detectors/GlobalTracking/CMakeLists.txt +++ b/Detectors/GlobalTracking/CMakeLists.txt @@ -14,7 +14,7 @@ o2_add_library(GlobalTracking PUBLIC_LINK_LIBRARIES O2::DataFormatsTPC O2::DataFormatsITSMFT O2::DataFormatsITS - O2::DataFormatsFITT0 + O2::DataFormatsFT0 O2::DataFormatsTOF O2::TPCFastTransformation O2::GPUTracking diff --git a/Detectors/GlobalTracking/include/GlobalTracking/MatchTPCITS.h b/Detectors/GlobalTracking/include/GlobalTracking/MatchTPCITS.h index aa1ba3f573960..1be312a31ac6e 100644 --- a/Detectors/GlobalTracking/include/GlobalTracking/MatchTPCITS.h +++ b/Detectors/GlobalTracking/include/GlobalTracking/MatchTPCITS.h @@ -32,7 +32,7 @@ #include "DataFormatsITSMFT/Cluster.h" #include "DataFormatsITSMFT/ROFRecord.h" #include "DataFormatsITS/TrackITS.h" -#include "DataFormatsFITT0/RecPoints.h" +#include "DataFormatsFT0/RecPoints.h" #include "DataFormatsTPC/ClusterNativeHelper.h" #include "TPCFastTransform.h" #include "GPUO2Interface.h" // Needed for propper settings in GPUParam.h @@ -259,7 +259,7 @@ class MatchTPCITS } ///< set input FIT info received via DPL - void setFITInfoInp(const std::vector* inp) + void setFITInfoInp(const std::vector* inp) { assertDPLIO(true); mFITInfoInp = inp; @@ -556,7 +556,7 @@ class MatchTPCITS const std::vector* mITSTrackClusIdxInp = nullptr; ///< input ITS track cluster indices const std::vector* mITSClustersArrayInp = nullptr; ///< input ITS clusters const std::vector* mITSClusterROFRec = nullptr; ///< input ITS clusters ROFRecord - const std::vector* mFITInfoInp = nullptr; ///< optional input FIT info + const std::vector* mFITInfoInp = nullptr; ///< optional input FIT info const o2::tpc::ClusterNativeAccess* mTPCClusterIdxStruct = nullptr; ///< struct holding the TPC cluster indices const o2::dataformats::MCTruthContainer* mITSTrkLabels = nullptr; ///< input ITS Track MC labels @@ -611,7 +611,7 @@ class MatchTPCITS std::string mITSClusterROFRecBranchName = "ITSClustersROF"; ///< name of branch containing input ITS clusters ROFRecords std::string mITSMCTruthBranchName = "ITSTrackMCTruth"; ///< name of branch containing ITS MC labels std::string mTPCMCTruthBranchName = "TracksMCTruth"; ///< name of branch containing input TPC tracks - std::string mFITInfoBranchName = "T0Cluster"; ///< name of branch containing input FIT Info + std::string mFITInfoBranchName = "FT0Cluster"; ///< name of branch containing input FIT Info std::string mOutTPCITSTracksBranchName = "TPCITS"; ///< name of branch containing output matched tracks std::string mOutTPCMCTruthBranchName = "MatchTPCMCTruth"; ///< name of branch for output matched tracks TPC MC std::string mOutITSMCTruthBranchName = "MatchITSMCTruth"; ///< name of branch for output matched tracks ITS MC diff --git a/Detectors/GlobalTrackingWorkflow/src/MatchTPCITSWorkflow.cxx b/Detectors/GlobalTrackingWorkflow/src/MatchTPCITSWorkflow.cxx index 663135b693ccc..8b3f6e78c9ec6 100644 --- a/Detectors/GlobalTrackingWorkflow/src/MatchTPCITSWorkflow.cxx +++ b/Detectors/GlobalTrackingWorkflow/src/MatchTPCITSWorkflow.cxx @@ -14,7 +14,7 @@ #include "ITSWorkflow/TrackReaderSpec.h" #include "TPCWorkflow/TrackReaderSpec.h" #include "TPCWorkflow/PublisherSpec.h" -#include "FITWorkflow/T0RecPointReaderSpec.h" +#include "FITWorkflow/FT0RecPointReaderSpec.h" #include "GlobalTrackingWorkflow/TPCITSMatchingSpec.h" #include "GlobalTrackingWorkflow/MatchTPCITSWorkflow.h" #include "GlobalTrackingWorkflow/TrackWriterTPCITSSpec.h" @@ -55,7 +55,7 @@ framework::WorkflowSpec getMatchTPCITSWorkflow(bool useMC, bool useFIT) specs.emplace_back(o2::globaltracking::getTrackWriterTPCITSSpec(useMC)); if (useFIT) { - specs.emplace_back(o2::t0::getT0RecPointReaderSpec(useMC)); + specs.emplace_back(o2::ft0::getFT0RecPointReaderSpec(useMC)); } return specs; diff --git a/Detectors/GlobalTrackingWorkflow/src/TPCITSMatchingSpec.cxx b/Detectors/GlobalTrackingWorkflow/src/TPCITSMatchingSpec.cxx index c9d8f891a332b..ad77b6c7f0be2 100644 --- a/Detectors/GlobalTrackingWorkflow/src/TPCITSMatchingSpec.cxx +++ b/Detectors/GlobalTrackingWorkflow/src/TPCITSMatchingSpec.cxx @@ -250,10 +250,10 @@ void TPCITSMatchingDPL::run(ProcessingContext& pc) mMatching.setTPCTrkLabelsInp(lblTPCPtr); } - const std::vector* rpFIT = nullptr; - std::unique_ptr> rpFITU; + const std::vector* rpFIT = nullptr; + std::unique_ptr> rpFITU; if (mUseFIT) { - rpFITU = pc.inputs().get*>("fitInfo"); + rpFITU = pc.inputs().get*>("fitInfo"); rpFIT = rpFITU.get(); mMatching.setFITInfoInp(rpFIT); } @@ -290,7 +290,7 @@ DataProcessorSpec getTPCITSMatchingSpec(bool useMC, bool useFIT, const std::vect inputs.emplace_back(clusBind.c_str(), "TPC", "CLUSTERNATIVE", lane, Lifetime::Timeframe); } if (useFIT) { - inputs.emplace_back("fitInfo", "T0", "RECPOINTS", 0, Lifetime::Timeframe); + inputs.emplace_back("fitInfo", "FT0", "RECPOINTS", 0, Lifetime::Timeframe); } outputs.emplace_back("GLO", "TPCITS", 0, Lifetime::Timeframe); diff --git a/Detectors/TPC/calibration/include/TPCCalibration/CalibPulser.h b/Detectors/TPC/calibration/include/TPCCalibration/CalibPulser.h index 219ba4bbbfdb8..293feb9bc0b0d 100644 --- a/Detectors/TPC/calibration/include/TPCCalibration/CalibPulser.h +++ b/Detectors/TPC/calibration/include/TPCCalibration/CalibPulser.h @@ -169,7 +169,7 @@ class CalibPulser : public CalibRawBase /// return pointer to T0 histogram TH2S* getHistoT0(ROC roc, Bool_t force) { - return getHistogram(roc, mT0Histograms, mNbinsT0, mXminT0, mXmaxT0, "T0", force); + return getHistogram(roc, mT0Histograms, mNbinsT0, mXminT0, mXmaxT0, "FT0", force); } /// return pointer to Qtot histogram diff --git a/Detectors/TPC/calibration/src/CalibPulser.cxx b/Detectors/TPC/calibration/src/CalibPulser.cxx index 85673d0564716..2deeaaca0c28a 100644 --- a/Detectors/TPC/calibration/src/CalibPulser.cxx +++ b/Detectors/TPC/calibration/src/CalibPulser.cxx @@ -220,7 +220,7 @@ void CalibPulser::analyse() void CalibPulser::dumpToFile(const std::string filename) { auto f = std::unique_ptr(TFile::Open(filename.c_str(), "recreate")); - f->WriteObject(&mT0, "T0"); + f->WriteObject(&mT0, "T0"); f->WriteObject(&mWidth, "Width"); f->WriteObject(&mQtot, "Qtot"); diff --git a/EventVisualisation/DataConverter/include/EventVisualisationDataConverter/ConversionConstants.h b/EventVisualisation/DataConverter/include/EventVisualisationDataConverter/ConversionConstants.h index 46ac294868267..97d53f72fdc82 100644 --- a/EventVisualisation/DataConverter/include/EventVisualisationDataConverter/ConversionConstants.h +++ b/EventVisualisation/DataConverter/include/EventVisualisationDataConverter/ConversionConstants.h @@ -20,24 +20,24 @@ #include enum ETrackType { - Standard, + Standard, - KinkMother, - KinkDaughter, + KinkMother, + KinkDaughter, - V0NegativeDaughter, - V0PositiveDaughter, - V0Mother, + V0NegativeDaughter, + V0PositiveDaughter, + V0Mother, - CascadePrimaryMother, - CascadePrimaryDaughter, - CascadeSecondaryMother, - CascadeNegativeDaughter, - CascadePositiveDaughter, + CascadePrimaryMother, + CascadePrimaryDaughter, + CascadeSecondaryMother, + CascadeNegativeDaughter, + CascadePositiveDaughter, - MuonMatched, - MuonNotMatched, - MuonGhost + MuonMatched, + MuonNotMatched, + MuonGhost }; const int nDetectorTypes = 23; @@ -77,24 +77,24 @@ const std::string gDetectorTypes[nDetectorTypes] = { const int nTrackTypes = 14; const std::string gTrackTypes[nTrackTypes] = { - "standard", + "standard", - "kink_mother", - "kink_daughter", + "kink_mother", + "kink_daughter", - "V0_negative_daughter", - "V0_positive_daughter", - "V0_mother", + "V0_negative_daughter", + "V0_positive_daughter", + "V0_mother", - "cascade_primary_mother", - "cascade_primary_daughter", - "cascade_secondary_mother", - "cascade_negative_daughter", - "cascade_positive_daughter", + "cascade_primary_mother", + "cascade_primary_daughter", + "cascade_secondary_mother", + "cascade_negative_daughter", + "cascade_positive_daughter", - "muon_matched", - "muon_not_matched", - "muon_ghost" + "muon_matched", + "muon_not_matched", + "muon_ghost" }; #endif //ALIROOT_CONVERSIONCONSTANTS_H diff --git a/Steer/DigitizerWorkflow/src/FITDigitWriterSpec.cxx b/Steer/DigitizerWorkflow/src/FITDigitWriterSpec.cxx index bc76cce714c75..4d8318d5d1c75 100644 --- a/Steer/DigitizerWorkflow/src/FITDigitWriterSpec.cxx +++ b/Steer/DigitizerWorkflow/src/FITDigitWriterSpec.cxx @@ -8,14 +8,14 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -/// @brief Processor spec for a ROOT file writer for FIT T0&V0 digits +/// @brief Processor spec for a ROOT file writer for FT0&FV0 digits #include "FITDigitWriterSpec.h" #include "Framework/CallbackService.h" #include "Framework/ControlService.h" #include "Framework/Task.h" -#include "DataFormatsFITT0/Digit.h" -#include "DataFormatsFITT0/MCLabel.h" +#include "DataFormatsFT0/Digit.h" +#include "DataFormatsFT0/MCLabel.h" #include "Headers/DataHeader.h" #include "DetectorsCommonDataFormats/DetID.h" #include "SimulationDataFormat/MCTruthContainer.h" @@ -39,7 +39,7 @@ namespace fit class FITDPLDigitWriter { - using MCCont = o2::dataformats::MCTruthContainer; + using MCCont = o2::dataformats::MCTruthContainer; public: void init(framework::InitContext& ic) @@ -69,7 +69,7 @@ class FITDPLDigitWriter std::transform(detStrL.begin(), detStrL.end(), detStrL.begin(), ::tolower); // retrieve the digits from the input - auto inDigits = pc.inputs().get>((detStr + "digits").c_str()); + auto inDigits = pc.inputs().get>((detStr + "digits").c_str()); auto inLabels = pc.inputs().get((detStr + "digitsMCTR").c_str()); LOG(INFO) << "RECEIVED DIGITS SIZE " << inDigits.size(); @@ -106,37 +106,37 @@ class FITDPLDigitWriter bool mFinished = false; o2::detectors::DetID mID; o2::header::DataOrigin mOrigin = o2::header::gDataOriginInvalid; - std::vector mDigits; // input digits + std::vector mDigits; // input digits std::unique_ptr mOutFile; std::unique_ptr mOutTree; }; //_______________________________________________ -class T0DPLDigitWriter : public FITDPLDigitWriter +class FT0DPLDigitWriter : public FITDPLDigitWriter { public: // FIXME: origina should be extractable from the DetID, the problem is 3d party header dependencies - static constexpr o2::detectors::DetID::ID DETID = o2::detectors::DetID::T0; - static constexpr o2::header::DataOrigin DETOR = o2::header::gDataOriginT0; - T0DPLDigitWriter() + static constexpr o2::detectors::DetID::ID DETID = o2::detectors::DetID::FT0; + static constexpr o2::header::DataOrigin DETOR = o2::header::gDataOriginFT0; + FT0DPLDigitWriter() { mID = DETID; mOrigin = DETOR; } }; -constexpr o2::detectors::DetID::ID T0DPLDigitWriter::DETID; -constexpr o2::header::DataOrigin T0DPLDigitWriter::DETOR; +constexpr o2::detectors::DetID::ID FT0DPLDigitWriter::DETID; +constexpr o2::header::DataOrigin FT0DPLDigitWriter::DETOR; //_______________________________________________ /// create the processor spec /// describing a processor receiving digits for ITS/MFT and writing them to file -DataProcessorSpec getT0DigitWriterSpec() +DataProcessorSpec getFT0DigitWriterSpec() { - std::string detStr = o2::detectors::DetID::getName(T0DPLDigitWriter::DETID); + std::string detStr = o2::detectors::DetID::getName(FT0DPLDigitWriter::DETID); std::string detStrL = detStr; std::transform(detStrL.begin(), detStrL.end(), detStrL.begin(), ::tolower); - auto detOrig = T0DPLDigitWriter::DETOR; + auto detOrig = FT0DPLDigitWriter::DETOR; std::vector inputs; inputs.emplace_back(InputSpec{ (detStr + "digits").c_str(), detOrig, "DIGITS", 0, Lifetime::Timeframe }); @@ -146,7 +146,7 @@ DataProcessorSpec getT0DigitWriterSpec() (detStr + "DigitWriter").c_str(), inputs, {}, // no output - AlgorithmSpec(adaptFromTask()), + AlgorithmSpec(adaptFromTask()), Options{ { (detStrL + "-digit-outfile").c_str(), VariantType::String, (detStrL + "digits.root").c_str(), { "Name of the input file" } }, { "treename", VariantType::String, "o2sim", { "Name of top-level TTree" } }, diff --git a/Steer/DigitizerWorkflow/src/FITDigitWriterSpec.h b/Steer/DigitizerWorkflow/src/FITDigitWriterSpec.h index 4f07f79d6c028..9e20e0bcb4c25 100644 --- a/Steer/DigitizerWorkflow/src/FITDigitWriterSpec.h +++ b/Steer/DigitizerWorkflow/src/FITDigitWriterSpec.h @@ -18,7 +18,7 @@ namespace o2 namespace fit { -o2::framework::DataProcessorSpec getT0DigitWriterSpec(); +o2::framework::DataProcessorSpec getFT0DigitWriterSpec(); } // namespace fit } // end namespace o2 diff --git a/Steer/DigitizerWorkflow/src/FITDigitizerSpec.cxx b/Steer/DigitizerWorkflow/src/FITDigitizerSpec.cxx index d1484c1dc56a9..3f3a076a24b1a 100644 --- a/Steer/DigitizerWorkflow/src/FITDigitizerSpec.cxx +++ b/Steer/DigitizerWorkflow/src/FITDigitizerSpec.cxx @@ -16,9 +16,9 @@ #include "Headers/DataHeader.h" #include "Steer/HitProcessingManager.h" // for RunContext #include "FITSimulation/Digitizer.h" -#include "T0Simulation/DigitizationParameters.h" -#include "DataFormatsFITT0/Digit.h" -#include "DataFormatsFITT0/MCLabel.h" +#include "FT0Simulation/DigitizationParameters.h" +#include "DataFormatsFT0/Digit.h" +#include "DataFormatsFT0/MCLabel.h" #include "SimulationDataFormat/MCCompLabel.h" #include "SimulationDataFormat/MCTruthContainer.h" #include "Framework/Task.h" @@ -58,8 +58,8 @@ class FITDPLDigitizerTask mSimChains.emplace_back(new TChain("o2sim")); mSimChains.back()->AddFile(signalfilename.c_str()); } - static constexpr o2::detectors::DetID::ID DETID = o2::detectors::DetID::T0; - if (mID == o2::detectors::DetID::T0) { + static constexpr o2::detectors::DetID::ID DETID = o2::detectors::DetID::FT0; + if (mID == o2::detectors::DetID::FT0) { mDigitizer.init(); } const bool isContinuous = ic.options().get("pileup"); @@ -88,11 +88,11 @@ class FITDPLDigitizerTask LOG(INFO) << "CALLING FIT DIGITIZATION"; - static std::vector hits; - o2::dataformats::MCTruthContainer labelAccum; - o2::dataformats::MCTruthContainer labels; - o2::t0::Digit digit; - std::vector digitAccum; // digit accumulator + static std::vector hits; + o2::dataformats::MCTruthContainer labelAccum; + o2::dataformats::MCTruthContainer labels; + o2::ft0::Digit digit; + std::vector digitAccum; // digit accumulator mDigitizer.setMCLabels(&labels); auto& eventParts = context->getEventParts(); // loop over all composite collisions given from context @@ -159,7 +159,7 @@ class FITDPLDigitizerTask void retrieveHits(std::vector const& chains, int sourceID, int entryID, - std::vector* hits) + std::vector* hits) { std::string detStr = mID.getName(); auto br = mSimChains[sourceID]->GetBranch((detStr + "Hit").c_str()); @@ -173,31 +173,31 @@ class FITDPLDigitizerTask } }; -class FITT0DPLDigitizerTask : public FITDPLDigitizerTask +class FT0DPLDigitizerTask : public FITDPLDigitizerTask { public: // FIXME: origina should be extractable from the DetID, the problem is 3d party header dependencies - static constexpr o2::detectors::DetID::ID DETID = o2::detectors::DetID::T0; - static constexpr o2::header::DataOrigin DETOR = o2::header::gDataOriginT0; - FITT0DPLDigitizerTask() : FITDPLDigitizerTask{ o2::t0::T0DigitizationParameters() } + static constexpr o2::detectors::DetID::ID DETID = o2::detectors::DetID::FT0; + static constexpr o2::header::DataOrigin DETOR = o2::header::gDataOriginFT0; + FT0DPLDigitizerTask() : FITDPLDigitizerTask{ o2::ft0::FT0DigitizationParameters() } { mID = DETID; mOrigin = DETOR; } }; -constexpr o2::detectors::DetID::ID FITT0DPLDigitizerTask::DETID; -constexpr o2::header::DataOrigin FITT0DPLDigitizerTask::DETOR; +constexpr o2::detectors::DetID::ID FT0DPLDigitizerTask::DETID; +constexpr o2::header::DataOrigin FT0DPLDigitizerTask::DETOR; -o2::framework::DataProcessorSpec getFITT0DigitizerSpec(int channel) +o2::framework::DataProcessorSpec getFT0DigitizerSpec(int channel) { // create the full data processor spec using // a name identifier // input description // algorithmic description (here a lambda getting called once to setup the actual processing function) // options that can be used for this processor (here: input file names where to take the hits) - std::string detStr = o2::detectors::DetID::getName(FITT0DPLDigitizerTask::DETID); - auto detOrig = FITT0DPLDigitizerTask::DETOR; + std::string detStr = o2::detectors::DetID::getName(FT0DPLDigitizerTask::DETID); + auto detOrig = FT0DPLDigitizerTask::DETOR; return DataProcessorSpec{ (detStr + "Digitizer").c_str(), @@ -205,7 +205,7 @@ o2::framework::DataProcessorSpec getFITT0DigitizerSpec(int channel) Outputs{ OutputSpec{ detOrig, "DIGITS", 0, Lifetime::Timeframe }, OutputSpec{ detOrig, "DIGITSMCTR", 0, Lifetime::Timeframe }, OutputSpec{ detOrig, "ROMode", 0, Lifetime::Timeframe } }, - AlgorithmSpec{ adaptFromTask() }, + AlgorithmSpec{ adaptFromTask() }, Options{ { "simFile", VariantType::String, "o2sim.root", { "Sim (background) input filename" } }, { "simFileS", VariantType::String, "", { "Sim (signal) input filename" } }, { "pileup", VariantType::Int, 1, { "whether to run in continuous time mode" } } } diff --git a/Steer/DigitizerWorkflow/src/FITDigitizerSpec.h b/Steer/DigitizerWorkflow/src/FITDigitizerSpec.h index b47d0148ebab1..b29e63391a51c 100644 --- a/Steer/DigitizerWorkflow/src/FITDigitizerSpec.h +++ b/Steer/DigitizerWorkflow/src/FITDigitizerSpec.h @@ -18,8 +18,8 @@ namespace o2 namespace fit { -o2::framework::DataProcessorSpec getFITT0DigitizerSpec(int channel); -//o2::framework::DataProcessorSpec getFITV0DigitizerSpec(int channel); +o2::framework::DataProcessorSpec getFT0DigitizerSpec(int channel); +//o2::framework::DataProcessorSpec getFV0DigitizerSpec(int channel); } // end namespace fit } // end namespace o2 diff --git a/Steer/DigitizerWorkflow/src/GRPUpdaterSpec.cxx b/Steer/DigitizerWorkflow/src/GRPUpdaterSpec.cxx index 55d87e7b49079..8c74fe6f5fc3c 100644 --- a/Steer/DigitizerWorkflow/src/GRPUpdaterSpec.cxx +++ b/Steer/DigitizerWorkflow/src/GRPUpdaterSpec.cxx @@ -87,7 +87,7 @@ o2::framework::DataProcessorSpec getGRPUpdaterSpec(const std::vector>(reftree, "T0Hit"); - std::cout << gPrefix << " T0 "; + auto refresult = analyse>(reftree, "FT0Hit"); + std::cout << gPrefix << " FT0 "; refresult.print(); } @@ -273,10 +273,10 @@ void analyzeFDD(TTree* reftree) refresult.print(); } -void analyzeV0(TTree* reftree) +void analyzeFV0(TTree* reftree) { - auto refresult = analyse>(reftree, "V0Hit"); - std::cout << gPrefix << " V0 "; + auto refresult = analyse>(reftree, "FV0Hit"); + std::cout << gPrefix << " FV0 "; refresult.print(); } @@ -308,8 +308,8 @@ void analyzeHits(const char* filename = "o2sim.root", const char* prefix = "") analyzeEMC(reftree); analyzeTRD(reftree); analyzePHS(reftree); - analyzeT0(reftree); - analyzeV0(reftree); + analyzeFT0(reftree); + analyzeFV0(reftree); analyzeFDD(reftree); analyzeHMP(reftree); } diff --git a/macro/build_geometry.C b/macro/build_geometry.C index cad5d8ba98aab..a7670bb1066ca 100644 --- a/macro/build_geometry.C +++ b/macro/build_geometry.C @@ -30,8 +30,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -197,14 +197,14 @@ void build_geometry(FairRunSim* run = nullptr) run->AddModule(new o2::cpv::Detector(true)); } - if (isActivated("T0")) { + if (isActivated("FT0")) { // FIT-T0 - run->AddModule(new o2::t0::Detector(true)); + run->AddModule(new o2::ft0::Detector(true)); } - if (isActivated("V0")) { + if (isActivated("FV0")) { // FIT-V0 - run->AddModule(new o2::v0::Detector(true)); + run->AddModule(new o2::fv0::Detector(true)); } if (isActivated("FDD")) { diff --git a/macro/run_match_TPCITS.C b/macro/run_match_TPCITS.C index 5c4be39a14e5e..bca02c32a86a6 100644 --- a/macro/run_match_TPCITS.C +++ b/macro/run_match_TPCITS.C @@ -22,7 +22,7 @@ void run_match_TPCITS(std::string path = "./", std::string outputfile = "o2match std::string inputTracksTPC = "tpctracks.root", std::string inputClustersITS = "o2clus_its.root", std::string inputClustersTPC = "tpc-native-clusters.root", - std::string inputFITInfo = "o2reco_t0.root", // optional FIT (T0) info + std::string inputFITInfo = "o2reco_ft0.root", // optional FIT (T0) info std::string inputGeom = "O2geometry.root", std::string inputGRP = "o2sim_grp.root") { diff --git a/run/CMakeLists.txt b/run/CMakeLists.txt index 90501fb9cfa5c..67b2f58d0b85c 100644 --- a/run/CMakeLists.txt +++ b/run/CMakeLists.txt @@ -28,11 +28,11 @@ target_link_libraries(allsim O2::MFTSimulation O2::MIDSimulation O2::PHOSSimulation - O2::T0Simulation + O2::FT0Simulation O2::TOFSimulation O2::TPCSimulation O2::TRDSimulation - O2::V0Simulation + O2::FV0Simulation O2::ZDCSimulation O2::Generators) diff --git a/run/O2HitMerger.h b/run/O2HitMerger.h index 4c8477c7f9bac..dabddbcc343cf 100644 --- a/run/O2HitMerger.h +++ b/run/O2HitMerger.h @@ -43,8 +43,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -501,12 +501,12 @@ void O2HitMerger::initDetInstances() mDetectorInstances[i] = std::move(std::make_unique(true)); counter++; } - if (i == DetID::T0) { - mDetectorInstances[i] = std::move(std::make_unique(true)); + if (i == DetID::FT0) { + mDetectorInstances[i] = std::move(std::make_unique(true)); counter++; } - if (i == DetID::V0) { - mDetectorInstances[i] = std::move(std::make_unique(true)); + if (i == DetID::FV0) { + mDetectorInstances[i] = std::move(std::make_unique(true)); counter++; } if (i == DetID::FDD) {