Skip to content

Commit 77ddd3d

Browse files
WIP
1 parent 9da1a8c commit 77ddd3d

File tree

13 files changed

+551
-30
lines changed

13 files changed

+551
-30
lines changed

Detectors/FIT/FDD/simulation/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@
1212
o2_add_library(FDDSimulation
1313
SOURCES src/Detector.cxx
1414
src/Digitizer.cxx
15+
<<<<<<< Updated upstream
1516
PUBLIC_LINK_LIBRARIES O2::CommonUtils
1617
O2::SimulationDataFormat
18+
=======
19+
PUBLIC_LINK_LIBRARIES O2::SimulationDataFormat
20+
>>>>>>> Stashed changes
1721
O2::FDDBase
1822
O2::DataFormatsFDD
1923
O2::DetectorsRaw

Detectors/FIT/FDD/simulation/include/FDDSimulation/Digitizer.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <array>
2929
#include <deque>
3030
#include <bitset>
31+
#include "FDDSimulation/FDDDigParam.h"
3132

3233
namespace o2
3334
{

Detectors/FIT/FDD/simulation/include/FDDSimulation/FDDDigParam.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,15 @@
2222
namespace o2::fdd
2323
{
2424
struct FDDDigParam : o2::conf::ConfigurableParamHelper<FDDDigParam> {
25+
<<<<<<< Updated upstream
2526
float hitTimeOffsetA = 0; ///< Hit time offset on the A side [ns]
2627
float hitTimeOffsetC = 0; ///< Hit time offset on the C side [ns]
2728

2829
float pmGain = 1e6; ///< PM gain
30+
=======
31+
float hitTimeOffsetA = 0; ///< Hit time offset on the A side [ns]
32+
float hitTimeOffsetC = 0; ///< Hit time offset on the C side [ns]
33+
>>>>>>> Stashed changes
2934

3035
O2ParamDef(FDDDigParam, "FDDDigParam");
3136
};

Detectors/FIT/FDD/simulation/src/Digitizer.cxx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@
1111

1212
#include "FDDSimulation/Digitizer.h"
1313

14+
<<<<<<< Updated upstream
1415
#include "CommonDataFormat/InteractionRecord.h"
1516
#include "FDDSimulation/FDDDigParam.h"
17+
=======
18+
#include "FDDSimulation/FDDDigParam.h"
19+
#include "CommonDataFormat/InteractionRecord.h"
20+
>>>>>>> Stashed changes
1621
#include "SimulationDataFormat/MCTruthContainer.h"
1722

1823
#include "TMath.h"
@@ -74,10 +79,18 @@ void Digitizer::process(const std::vector<o2::fdd::Hit>& hits,
7479
double delayScintillator = mRndScintDelay.getNextValue();
7580
double timeHit = delayScintillator + hit.GetTime();
7681

82+
<<<<<<< Updated upstream
7783
// Subtract time-of-flight from hit time
7884
const float timeOfFlight = hit.GetPos().R() / o2::constants::physics::LightSpeedCm2NS;
7985
const float timeOffset = iChannel < 8 ? FDDDigParam::Instance().hitTimeOffsetC : FDDDigParam::Instance().hitTimeOffsetA;
8086

87+
=======
88+
// Time-of-flight subtracted from hit time
89+
// timeHit -= getTOFCorrection(int(iChannel / 4));
90+
const float timeOfFlight = hit.GetPos().R() / o2::constants::physics::LightSpeedCm2NS;
91+
const float timeOffset = 0; // TODO: why instance not working?
92+
// const float timeOffset = hit.GetDetectorID() > 7 ? FDDDigParam::Instance().hitTimeOffsetA : FDDDigParam::Instance().hitTimeOffsetC; // TODO double check ch IDs
93+
>>>>>>> Stashed changes
8194
timeHit += -timeOfFlight + timeOffset;
8295
timeHit += mIntRecord.getTimeNS();
8396
o2::InteractionRecord irHit(timeHit); // BC in which the hit appears (might be different from interaction BC for slow particles)

Detectors/FIT/FT0/base/include/FT0Base/FT0DigParam.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ struct FT0DigParam : o2::conf::ConfigurableParamHelper<FT0DigParam> {
2929
float mAmp_trsh = 100; // [ph.e]
3030
float mAmpRecordLow = -4; // integrate charge from
3131
float mAmpRecordUp = 15; // to [ns]
32+
<<<<<<< Updated upstream
33+
=======
34+
// float mC_side_cable_cmps = 2.86; // ns
35+
// float mA_side_cable_cmps = 11.110; // ns
36+
>>>>>>> Stashed changes
3237
float hitTimeOffsetA = 0; ///< hit time offset on the A side [ns]
3338
float hitTimeOffsetC = 0; ///< hit time offset on the C side [ns]
3439
int mtrg_central_trh = 600.; // channels

Detectors/FIT/FT0/simulation/src/Digitizer.cxx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,20 @@ void Digitizer::process(const std::vector<o2::ft0::HitType>* hits,
216216
const auto& params = FT0DigParam::Instance();
217217

218218
Bool_t is_A_side = (hit_ch < 4 * mGeometry.NCellsA);
219+
<<<<<<< Updated upstream
219220

220221
// Subtract time-of-flight from hit time
221222
const Float_t timeOfFlight = hit.GetPos().R() / o2::constants::physics::LightSpeedCm2NS;
222223
const Float_t timeOffset = is_A_side ? params.hitTimeOffsetA : params.hitTimeOffsetC;
223224
Double_t hit_time = hit.GetTime() - timeOfFlight + timeOffset;
224225

226+
=======
227+
// Time-of-flight subtracted from hit time
228+
const Float_t timeOfFlight = hit.GetPos().R() / o2::constants::physics::LightSpeedCm2NS;
229+
const Float_t timeOffset = is_A_side ? params.hitTimeOffsetA : params.hitTimeOffsetC;
230+
// Float_t time_compensate = is_A_side ? params.mA_side_cable_cmps : params.mC_side_cable_cmps;
231+
Double_t hit_time = hit.GetTime() - timeOfFlight + timeOffset;
232+
>>>>>>> Stashed changes
225233
if (hit_time > 150) {
226234
continue; // not collect very slow particles
227235
}

Detectors/FIT/FV0/simulation/include/FV0Simulation/Digitizer.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,11 @@ class Digitizer
9696
/// \param hitTime Time of the hit
9797
/// \param hitR Length to IP from the position of the hit
9898
/// \param cachedIR Cached interaction records
99+
<<<<<<< Updated upstream
99100
/// \param nCachedIR Number of cached interaction records
101+
=======
102+
/// \param nCachedIR Mumber of cached interaction records
103+
>>>>>>> Stashed changes
100104
/// \param detID Detector cell ID
101105
void createPulse(float mipFraction, int parID, const double hitTime, const float hitR,
102106
std::array<o2::InteractionRecord, NBC2Cache> const& cachedIR, int nCachedIR, const int detID);

Detectors/FIT/FV0/simulation/include/FV0Simulation/FV0DigParam.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ struct FV0DigParam : o2::conf::ConfigurableParamHelper<FV0DigParam> {
5757
bool isIntegrateFull = false; // Full charge integration widow in 25 ns
5858
float cfdCheckWindow = 2.5; // time window for the cfd in ns to trigger the charge integration
5959
int avgNumberPhElectronPerMip = 201; // avg number of photo-electrons per MIP
60+
<<<<<<< Updated upstream
61+
=======
62+
// float globalTimeOfFlight = 315.0 / o2::constants::physics::LightSpeedCm2NS; // TODO [check the correct value for distance of FV0 to IP]
63+
float hitTimeOffset = 0.0; ///< Hit time offset [ns]
64+
>>>>>>> Stashed changes
6065
float mCfdDeadTime = 15.6; // [ns]
6166
float mCFD_trsh = 3.; // [mV]
6267
float getCFDTrshInAdc() const { return mCFD_trsh * getChannelsPerMilivolt(); } // [ADC channels]

Detectors/FIT/FV0/simulation/src/Digitizer.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,11 @@ void Digitizer::createPulse(float mipFraction, int parID, const double hitTime,
162162
}
163163
}
164164

165+
<<<<<<< Updated upstream
165166
// Subtract time-of-flight from hit time
167+
=======
168+
// Time-of-flight subtracted from hit time
169+
>>>>>>> Stashed changes
166170
const float timeOfFlight = hitR / o2::constants::physics::LightSpeedCm2NS;
167171
Int_t const NBinShift = std::lround((hitTime - timeOfFlight + FV0DigParam::Instance().hitTimeOffset) / FV0DigParam::Instance().waveformBinWidth);
168172

0 commit comments

Comments
 (0)