Skip to content

Commit a4f9b96

Browse files
wiechulasawenzel
authored andcommitted
Exclude electrons created between vessels and field strips
1 parent b0b090f commit a4f9b96

File tree

2 files changed

+29
-4
lines changed

2 files changed

+29
-4
lines changed

Detectors/TPC/base/include/TPCBase/ParameterDetector.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ namespace tpc
2828

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

31-
float TPClength = 250.f; ///< Length of the TPC [cm]
31+
float TPClength = 250.f; ///< Length of the TPC [cm]
3232
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)
33-
float PadCapacitance = 0.1f; ///< Capacitance of a single pad [pF]
34-
TimeBin TmaxTriggered = 550; ///< Maximum time bin in case of triggered readout mode
35-
float DriftTimeOffset = 7.3; ///< drift time offset in time bins (we observe ~2.4\mus before October 2023 and ~1.45 \mus after)
33+
float PadCapacitance = 0.1f; ///< Capacitance of a single pad [pF]
34+
TimeBin TmaxTriggered = 550; ///< Maximum time bin in case of triggered readout mode
35+
float DriftTimeOffset = 7.3; ///< drift time offset in time bins (we observe ~2.4\mus before October 2023 and ~1.45 \mus after)
36+
bool ExcludeFCGap = true; ///< exclude electrons created in the gap between the IFC vessel and OFC vessel and FC strips
3637

3738
O2ParamDef(ParameterDetector, "TPCDetParam");
3839
};

Detectors/TPC/simulation/src/Detector.cxx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "TPCSimulation/Detector.h"
1414
#include "TPCSimulation/Point.h"
1515
#include "TPCBase/ParameterGas.h"
16+
#include "TPCBase/ParameterDetector.h"
1617

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

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

145+
// ---| remove clusters between the IFC and the FC strips |---
146+
// those should not enter the active readout area
147+
// do coarse selection before, to limit number of transformations
148+
if (detParam.ExcludeFCGap) {
149+
const auto rCluster = std::sqrt(position.X() * position.X() + position.Y() * position.Y());
150+
const float rodRin = 81.5 + 2.2; // radial position of the inner field cage rods + radial size of the field cage rods
151+
const float rodRout = 254.25 + 2.2; // radial position of the outer field cage rods + radial size of the field cage rods
152+
const float fcLxIn = 82.428409; // position of the inner FC strips in local x = cos(10 deg) * rodRin;
153+
const float fcLxOut = 252.55395; // position of the outer FC strips in local x = cos(10 deg) * rodRin;
154+
155+
if (rCluster < rodRin || rCluster > fcLxOut) {
156+
const int sectorIDnonShift = static_cast<int>(Sector::ToSector(position.X(), position.Y(), position.Z()));
157+
const double alpha = TMath::DegToRad() * (10. + sectorIDnonShift * 20.);
158+
const double cs = std::cos(-alpha), sn = std::sin(-alpha);
159+
const auto localX = position.X() * cs - position.Y() * sn;
160+
// fine cut
161+
if (localX < fcLxIn || localX > fcLxOut) {
162+
return kFALSE;
163+
}
164+
}
165+
}
166+
143167
// ---| momentum and beta gamma |---
144168
static TLorentzVector momentum; // static to make avoid creation/deletion of this expensive object
145169
fMC->TrackMomentum(momentum);

0 commit comments

Comments
 (0)