Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Detectors/TPC/base/include/TPCBase/ParameterDetector.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ namespace tpc

struct ParameterDetector : public o2::conf::ConfigurableParamHelper<ParameterDetector> {

float TPClength = 250.f; ///< Length of the TPC [cm]
float TPClength = 250.f; ///< Length of the TPC [cm]
float TPCRecoWindowSim = 1.5f; ///< length of the reconstruction window in units of drift time of the TPC in simulation (Neutron capture process can extend up to 30-40 TPC drift time)
float PadCapacitance = 0.1f; ///< Capacitance of a single pad [pF]
TimeBin TmaxTriggered = 550; ///< Maximum time bin in case of triggered readout mode
float DriftTimeOffset = 7.3; ///< drift time offset in time bins (we observe ~2.4\mus before October 2023 and ~1.45 \mus after)
float PadCapacitance = 0.1f; ///< Capacitance of a single pad [pF]
TimeBin TmaxTriggered = 550; ///< Maximum time bin in case of triggered readout mode
float DriftTimeOffset = 7.3; ///< drift time offset in time bins (we observe ~2.4\mus before October 2023 and ~1.45 \mus after)
bool ExcludeFCGap = true; ///< exclude electrons created in the gap between the IFC vessel and OFC vessel and FC strips

O2ParamDef(ParameterDetector, "TPCDetParam");
};
Expand Down
24 changes: 24 additions & 0 deletions Detectors/TPC/simulation/src/Detector.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "TPCSimulation/Detector.h"
#include "TPCSimulation/Point.h"
#include "TPCBase/ParameterGas.h"
#include "TPCBase/ParameterDetector.h"

#include "DetectorsBase/Stack.h"
#include "SimulationDataFormat/TrackReference.h"
Expand Down Expand Up @@ -104,6 +105,7 @@ Bool_t Detector::ProcessHits(FairVolume* vol)
{
mStepCounter++;
auto& gasParam = ParameterGas::Instance();
auto& detParam = ParameterDetector::Instance();
const Int_t kMaxDistRef = 15; // maximal difference between 2 stored references - the parameter should be 15 cm as default
static Double_t lastReferenceR = 0; // keeps last reference point in radius (cm)

Expand Down Expand Up @@ -140,6 +142,28 @@ Bool_t Detector::ProcessHits(FairVolume* vol)
// TODO: Temporary hack to process only one sector
// if (sectorID != 0) return kFALSE;

// ---| remove clusters between the IFC and the FC strips |---
// those should not enter the active readout area
// do coarse selection before, to limit number of transformations
if (detParam.ExcludeFCGap) {
const auto rCluster = std::sqrt(position.X() * position.X() + position.Y() * position.Y());
const float rodRin = 81.5 + 2.2; // radial position of the inner field cage rods + radial size of the field cage rods
const float rodRout = 254.25 + 2.2; // radial position of the outer field cage rods + radial size of the field cage rods
const float fcLxIn = 82.428409; // position of the inner FC strips in local x = cos(10 deg) * rodRin;
const float fcLxOut = 252.55395; // position of the outer FC strips in local x = cos(10 deg) * rodRin;

if (rCluster < rodRin || rCluster > fcLxOut) {
const int sectorIDnonShift = static_cast<int>(Sector::ToSector(position.X(), position.Y(), position.Z()));
const double alpha = TMath::DegToRad() * (10. + sectorIDnonShift * 20.);
const double cs = std::cos(-alpha), sn = std::sin(-alpha);
const auto localX = position.X() * cs - position.Y() * sn;
// fine cut
if (localX < fcLxIn || localX > fcLxOut) {
return kFALSE;
}
}
}

// ---| momentum and beta gamma |---
static TLorentzVector momentum; // static to make avoid creation/deletion of this expensive object
fMC->TrackMomentum(momentum);
Expand Down
Loading