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
1 change: 1 addition & 0 deletions Detectors/TPC/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ add_subdirectory(simulation)
add_subdirectory(monitor)
add_subdirectory(workflow)
add_subdirectory(qc)
add_subdirectory(spacecharge)
2 changes: 1 addition & 1 deletion Detectors/TPC/reconstruction/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ o2_add_test_root_macro(macro/createTPCSpaceChargeCorrection.C
PUBLIC_LINK_LIBRARIES O2::TPCReconstruction
O2::CommonConstants
O2::CommonUtils
O2::TPCSpaceChargeBase
O2::TPCSpaceCharge
LABELS tpc)

o2_add_test_root_macro(macro/findKrBoxCluster.C
Expand Down
174 changes: 63 additions & 111 deletions Detectors/TPC/reconstruction/macro/createTPCSpaceChargeCorrection.C

Large diffs are not rendered by default.

13 changes: 2 additions & 11 deletions Detectors/TPC/simulation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ o2_add_library(TPCSimulation
src/PadResponse.cxx
src/Point.cxx
src/SAMPAProcessing.cxx
src/SpaceCharge.cxx
PUBLIC_LINK_LIBRARIES O2::DetectorsBase O2::SimulationDataFormat
O2::TPCBase O2::TPCSpaceChargeBase
O2::TPCBase O2::TPCSpaceCharge
ROOT::Physics)

o2_target_root_dictionary(TPCSimulation
Expand All @@ -38,8 +37,7 @@ o2_target_root_dictionary(TPCSimulation
include/TPCSimulation/GEMAmplification.h
include/TPCSimulation/PadResponse.h
include/TPCSimulation/Point.h
include/TPCSimulation/SAMPAProcessing.h
include/TPCSimulation/SpaceCharge.h)
include/TPCSimulation/SAMPAProcessing.h)

o2_add_executable(digits-to-rawzs
COMPONENT_NAME tpc
Expand All @@ -57,13 +55,6 @@ if(BUILD_TESTING)
O2::SimulationDataFormat
LABELS tpc)

o2_add_test_root_macro(macro/createResidualDistortionObject.C
PUBLIC_LINK_LIBRARIES O2::TPCSpaceChargeBase
O2::CommonUtils
O2::CommonConstants
O2::TPCSimulation
LABELS tpc)

o2_add_test_root_macro(macro/laserTrackGenerator.C
PUBLIC_LINK_LIBRARIES FairRoot::Base
O2::DataFormatsTPC
Expand Down
22 changes: 14 additions & 8 deletions Detectors/TPC/simulation/include/TPCSimulation/Digitizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "TPCSimulation/DigitContainer.h"
#include "TPCSimulation/PadResponse.h"
#include "TPCSimulation/Point.h"
#include "TPCSimulation/SpaceCharge.h"
#include "TPCSpaceCharge/SpaceCharge.h"

#include "TPCBase/Mapper.h"

Expand Down Expand Up @@ -52,6 +52,8 @@ class DigitContainer;
class Digitizer
{
public:
using SC = SpaceCharge<double, 129, 129, 180>;

/// Default constructor
Digitizer() = default;

Expand Down Expand Up @@ -109,20 +111,24 @@ class Digitizer
/// \param nZSlices number of grid points in z, must be (2**N)+1
/// \param nPhiBins number of grid points in phi
/// \param nRBins number of grid points in r, must be (2**N)+1
void setUseSCDistortions(SpaceCharge::SCDistortionType distortionType, const TH3* hisInitialSCDensity, int nRBins, int nPhiBins, int nZSlices);
void setUseSCDistortions(SC::SCDistortionType distortionType, const TH3* hisInitialSCDensity);
/// Enable the use of space-charge distortions and provide SpaceCharge object as input
/// \param spaceCharge unique pointer to spaceCharge object
void setUseSCDistortions(SpaceCharge* spaceCharge);
void setUseSCDistortions(SC* spaceCharge);

/// Enable the use of space-charge distortions by providing global distortions and global corrections stored in a ROOT file
/// The storage of the values should be done by the methods provided in the SpaceCharge class
/// \param TFile file containing distortions and corrections
void setUseSCDistortions(TFile& finp);

private:
DigitContainer mDigitContainer; ///< Container for the Digits
std::unique_ptr<SpaceCharge> mSpaceCharge; ///< Handler of space-charge distortions
Sector mSector = -1; ///< ID of the currently processed sector
float mEventTime = 0.f; ///< Time of the currently processed event
DigitContainer mDigitContainer; ///< Container for the Digits
std::unique_ptr<SC> mSpaceCharge; ///< Handler of space-charge distortions
Sector mSector = -1; ///< ID of the currently processed sector
float mEventTime = 0.f; ///< Time of the currently processed event
// FIXME: whats the reason for hving this static?
static bool mIsContinuous; ///< Switch for continuous readout
bool mUseSCDistortions = false; ///< Flag to switch on the use of space-charge distortions

ClassDefNV(Digitizer, 1);
};
} // namespace tpc
Expand Down
244 changes: 0 additions & 244 deletions Detectors/TPC/simulation/include/TPCSimulation/SpaceCharge.h

This file was deleted.

Loading