Skip to content

Commit

Permalink
More flexible confgurable parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
pkurash committed Sep 18, 2024
1 parent 1ea137b commit 340cf47
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,14 @@ namespace fvd
{
struct FVDBaseParam : public o2::conf::ConfigurableParamHelper<FVDBaseParam> {

// int nringsA = 5; // 3
// int nringsC = 6;
int nsect = 8;

float dzscint = 4.;
static constexpr int nsect = 8;

std::vector<float> ringsA = {3., 14.8, 26.6, 38.4, 50.2, 62.};
std::vector<float> ringsC = {3.5, 14.8, 22.8, 37.3, 48.5, 59.8, 71.};

int nringsA = ringsA.size() - 1;
int nringsC = ringsC.size() - 1;

float zmodA = 1700;
float zmodC = -1950;
float dzscint = 4.;

O2ParamDef(FVDBaseParam, "FVDBase");
};
Expand Down
12 changes: 9 additions & 3 deletions Detectors/Upgrades/ALICE3/FVD/simulation/src/Detector.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,16 @@ Detector::Detector(bool active)
mTrackData()
{
auto& baseParam = FVDBaseParam::Instance();
mNumberOfRingsA = baseParam.nringsA;
mNumberOfRingsC = baseParam.nringsC;
mNumberOfSectors = baseParam.nsect;

mDzScint = baseParam.dzscint;

mRingRadiiA = baseParam.ringsA;
mRingRadiiC = baseParam.ringsC;

mNumberOfRingsA = mRingRadiiA.size() - 1;
mNumberOfRingsC = mRingRadiiC.size() - 1;

mZmodA = baseParam.zmodA;
mZmodC = baseParam.zmodC;
}
Expand Down Expand Up @@ -108,7 +109,12 @@ bool Detector::ProcessHits(FairVolume* vol)
{
// This method is called from the MC stepping
// Track only charged particles and photons
if (fMC->TrackCharge()) {
bool isPhotonTrack = false;
Int_t particlePdg = fMC->TrackPid();
if (particlePdg == 22) { // If particle is standard PDG photon
isPhotonTrack = true;
}
if (!(isPhotonTrack || fMC->TrackCharge())) {
return kFALSE;
}

Expand Down

0 comments on commit 340cf47

Please sign in to comment.