|
13 | 13 | #include "TPCSimulation/Detector.h" |
14 | 14 | #include "TPCSimulation/Point.h" |
15 | 15 | #include "TPCBase/ParameterGas.h" |
| 16 | +#include "TPCBase/ParameterDetector.h" |
16 | 17 |
|
17 | 18 | #include "DetectorsBase/Stack.h" |
18 | 19 | #include "SimulationDataFormat/TrackReference.h" |
@@ -104,6 +105,7 @@ Bool_t Detector::ProcessHits(FairVolume* vol) |
104 | 105 | { |
105 | 106 | mStepCounter++; |
106 | 107 | auto& gasParam = ParameterGas::Instance(); |
| 108 | + auto& detParam = ParameterDetector::Instance(); |
107 | 109 | const Int_t kMaxDistRef = 15; // maximal difference between 2 stored references - the parameter should be 15 cm as default |
108 | 110 | static Double_t lastReferenceR = 0; // keeps last reference point in radius (cm) |
109 | 111 |
|
@@ -140,6 +142,28 @@ Bool_t Detector::ProcessHits(FairVolume* vol) |
140 | 142 | // TODO: Temporary hack to process only one sector |
141 | 143 | // if (sectorID != 0) return kFALSE; |
142 | 144 |
|
| 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 | + |
143 | 167 | // ---| momentum and beta gamma |--- |
144 | 168 | static TLorentzVector momentum; // static to make avoid creation/deletion of this expensive object |
145 | 169 | fMC->TrackMomentum(momentum); |
|
0 commit comments