Skip to content

Commit 7c92e44

Browse files
committed
enable hits
1 parent d04a89c commit 7c92e44

15 files changed

Lines changed: 253 additions & 333 deletions

File tree

DataFormats/Detectors/Upgrades/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@
1010
# or submit itself to any jurisdiction.
1111

1212
message(STATUS "Building dataformats for upgrades")
13-
add_subdirectory(FVD)

DataFormats/Detectors/Upgrades/FVD/CMakeLists.txt

Lines changed: 0 additions & 19 deletions
This file was deleted.

DataFormats/Detectors/Upgrades/FVD/include/DataFormatsFVD/Hit.h

Lines changed: 0 additions & 108 deletions
This file was deleted.

DataFormats/Detectors/Upgrades/FVD/src/DataFormatsFVDLinkDef.h

Lines changed: 0 additions & 21 deletions
This file was deleted.

DataFormats/Detectors/Upgrades/FVD/src/Hits.cxx

Whitespace-only changes.

Detectors/Upgrades/ALICE3/FVD/base/include/FVDBase/FVDBaseParam.h

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,25 @@ namespace o2
2020
namespace fvd
2121
{
2222
struct FVDBaseParam : public o2::conf::ConfigurableParamHelper<FVDBaseParam> {
23-
static constexpr int nCellA = 40; //24
24-
static constexpr int nCellC = 48;
25-
static constexpr int nRingsA = 5; //3
26-
static constexpr int nRingsC = 6;
27-
28-
static constexpr float dzScint = 4.;
29-
static constexpr float rRingsA[int(nCellA/8)+1] = {3., 14.8, 26.6, 38.4, 50.2, 62.};
30-
static constexpr float rRingsC[int(nCellC/8)+1] = {3.5, 14.8, 22.8, 37.3, 48.5, 59.8, 71.};
3123

32-
static constexpr float zModA = 1700;
33-
static constexpr float zModC = -1950;
24+
// int nringsA = 5; // 3
25+
// int nringsC = 6;
26+
int nsect = 8;
27+
28+
float dzscint = 4.;
29+
std::vector<float> ringsA = {3., 14.8, 26.6, 38.4, 50.2, 62.};
30+
std::vector<float> ringsC = {3.5, 14.8, 22.8, 37.3, 48.5, 59.8, 71.};
31+
32+
int nringsA = ringsA.size() - 1;
33+
int nringsC = ringsC.size() - 1;
34+
35+
float zmodA = 1700;
36+
float zmodC = -1950;
3437

3538
O2ParamDef(FVDBaseParam, "FVDBase");
3639
};
3740

3841
} // namespace fvd
3942
} // namespace o2
43+
4044
#endif

Detectors/Upgrades/ALICE3/FVD/base/include/FVDBase/GeometryTGeo.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,7 @@ class GeometryTGeo : public o2::detectors::DetMatrixCache
4444

4545
static constexpr o2::detectors::DetID::ID getDetID() { return o2::detectors::DetID::FVD; }
4646

47-
int getCellId(int nmod, int nring, int nsec) const;
48-
int getCurrentCellId(const TVirtualMC* fMC) const;
49-
5047
private:
51-
5248
static std::unique_ptr<o2::fvd::GeometryTGeo> sInstance;
5349

5450
ClassDefNV(GeometryTGeo, 1);

Detectors/Upgrades/ALICE3/FVD/base/src/GeometryTGeo.cxx

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <fairlogger/Logger.h>
1818

1919
using namespace o2::fvd;
20-
namespace o2
20+
namespace o2
2121
{
2222
namespace fvd
2323
{
@@ -46,7 +46,7 @@ GeometryTGeo* GeometryTGeo::Instance()
4646

4747
void GeometryTGeo::Build(int loadTrans)
4848
{
49-
if (isBuilt()) {
49+
if (isBuilt()) {
5050
LOGP(warning, "Already built");
5151
return; // already initialized
5252
}
@@ -62,24 +62,5 @@ void GeometryTGeo::fillMatrixCache(int mask)
6262
{
6363
}
6464

65-
int GeometryTGeo::getCellId(int nmod, int nring, int nsec) const
66-
{
67-
return nmod * FVDBaseParam::nCellA + 8 * nring + nsec;
68-
}
69-
70-
int GeometryTGeo::getCurrentCellId(const TVirtualMC* fMC) const
71-
{
72-
int moduleId = -1;
73-
int sectorId = -1;
74-
int ringId = -1;
75-
76-
fMC->CurrentVolOffID(2, moduleId);
77-
fMC->CurrentVolOffID(1, sectorId);
78-
fMC->CurrentVolOffID(0, ringId);
79-
int cellId = getCellId(moduleId, ringId, sectorId);
80-
81-
return cellId;
82-
}
83-
8465
} // namespace fvd
85-
} //namespace o2
66+
} // namespace o2

Detectors/Upgrades/ALICE3/FVD/simulation/CMakeLists.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@
1010
# or submit itself to any jurisdiction.
1111

1212
o2_add_library(FVDSimulation
13-
SOURCES src/Detector.cxx
14-
PUBLIC_LINK_LIBRARIES O2::SimulationDataFormat
15-
O2::DataFormatsFVD)
13+
SOURCES src/Detector.cxx
14+
PUBLIC_LINK_LIBRARIES O2::FVDBase
15+
O2::ITSMFTSimulation
16+
ROOT::Physics)
1617

1718
o2_target_root_dictionary(FVDSimulation
18-
HEADERS include/FVDSimulation/Detector.h)
19-
19+
HEADERS include/FVDSimulation/Detector.h)
2020

21+
o2_data_file(COPY data DESTINATION Detectors/FVD/simulation)

Detectors/Upgrades/ALICE3/FVD/simulation/include/FVDSimulation/Detector.h

Lines changed: 47 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,22 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12+
/// \file Detector.h
13+
/// \brief Definition of the Detector class
14+
1215
#ifndef ALICEO2_FVD_DETECTOR_H_
1316
#define ALICEO2_FVD_DETECTOR_H_
1417

1518
#include "SimulationDataFormat/BaseHits.h"
1619
#include "DetectorsBase/Detector.h"
17-
#include "DataFormatsFVD/Hit.h"
1820
#include "FVDBase/GeometryTGeo.h"
21+
#include "FVDBase/FVDBaseParam.h"
22+
#include "ITSMFTSimulation/Hit.h"
23+
#include "Rtypes.h"
24+
#include "TGeoManager.h"
25+
#include "TLorentzVector.h"
26+
#include "TVector3.h"
1927

20-
class FairModule;
2128
class FairVolume;
2229
class TGeoVolume;
2330

@@ -26,23 +33,36 @@ namespace o2
2633
namespace fvd
2734
{
2835
class GeometryTGeo;
29-
class Hit;
36+
}
37+
}
38+
39+
namespace o2
40+
{
41+
namespace fvd
42+
{
43+
3044
class Detector : public o2::base::DetImpl<Detector>
3145
{
3246
public:
33-
Detector(Bool_t Active);
47+
Detector(bool Active);
3448

3549
Detector() = default;
50+
3651
~Detector() override;
3752

3853
void ConstructGeometry() override;
3954

40-
o2::fvd::Hit* addHit(Int_t trackId, Int_t cellId,
41-
const math_utils::Point3D<float>& startPos, const math_utils::Point3D<float>& endPos,
42-
const math_utils::Vector3D<float>& startMom, double startE,
43-
double endTime, double eLoss, Int_t particlePdg);
44-
45-
std::vector<o2::fvd::Hit>* getHits(Int_t iColl)
55+
/// This method is an example of how to add your own point of type Hit to the clones array
56+
o2::itsmft::Hit* addHit(int trackID, int detID,
57+
const TVector3& startPos,
58+
const TVector3& endPos,
59+
const TVector3& startMom,
60+
double startE,
61+
double endTime, double eLoss,
62+
unsigned int startStatus,
63+
unsigned int endStatus);
64+
65+
std::vector<o2::itsmft::Hit>* getHits(Int_t iColl)
4666
{
4767
if (iColl == 0) {
4868
return mHits;
@@ -69,28 +89,40 @@ class Detector : public o2::base::DetImpl<Detector>
6989
};
7090

7191
private:
72-
Detector(const Detector& rhs);
92+
Detector(const Detector&);
7393
Detector& operator=(const Detector&);
7494

75-
std::vector<o2::fvd::Hit>* mHits = nullptr;
76-
GeometryTGeo* mGeometryTGeo = nullptr;
95+
std::vector<o2::itsmft::Hit>* mHits = nullptr;
96+
GeometryTGeo* mGeometryTGeo = nullptr;
7797

7898
TGeoVolumeAssembly* buildModuleA();
7999
TGeoVolumeAssembly* buildModuleC();
80100

101+
int mNumberOfRingsA;
102+
int mNumberOfRingsC;
103+
int mNumberOfSectors;
104+
float mDzScint;
105+
106+
std::vector<float> mRingRadiiA;
107+
std::vector<float> mRingRadiiC;
108+
109+
float mZmodA;
110+
float mZmodC;
111+
81112
void defineSensitiveVolumes();
82113

83114
/// Transient data about track passing the sensor, needed by ProcessHits()
84115
struct TrackData { // this is transient
85116
bool mHitStarted; //! hit creation started
86-
TLorentzVector mPositionStart; //! position at entrance
117+
unsigned char mTrkStatusStart; //! track status flag
118+
TLorentzVector mPositionStart; //! position at entrance
87119
TLorentzVector mMomentumStart; //! momentum
88120
double mEnergyLoss; //! energy loss
89121
} mTrackData; //!
90122

91123
template <typename Det>
92124
friend class o2::base::DetImpl;
93-
ClassDefOverride(Detector, 2);
125+
ClassDefOverride(Detector, 1);
94126
};
95127

96128
// Input and output function for standard C++ input/output.

0 commit comments

Comments
 (0)