|
24 | 24 | #include "display/GPUDisplayInterface.h" |
25 | 25 | #include "genEvents.h" |
26 | 26 |
|
27 | | -#include "TPCFastTransformPOD.h" |
28 | 27 | #include "GPUTPCGMMergedTrack.h" |
29 | 28 | #include "GPUSettings.h" |
30 | 29 | #include "GPUConstantMem.h" |
31 | 30 |
|
32 | 31 | #include "GPUO2DataTypes.h" |
33 | 32 | #include "GPUChainITS.h" |
34 | 33 |
|
| 34 | +// For creating default objects |
| 35 | +#include "TPCReconstruction/TPCFastTransformHelperO2.h" |
| 36 | +#include "CalibdEdxContainer.h" |
| 37 | +#include "TPCFastTransformPOD.h" |
| 38 | +#include "GPUTRDRecoParam.h" |
| 39 | +#include "TPCZSLinkMapping.h" |
| 40 | + |
35 | 41 | #include "DataFormatsTPC/CompressedClusters.h" |
36 | 42 |
|
37 | 43 | #include <iostream> |
@@ -286,6 +292,31 @@ int32_t ReadConfiguration(int argc, char** argv) |
286 | 292 | return (0); |
287 | 293 | } |
288 | 294 |
|
| 295 | +void CreateTrivialCalibObjects() |
| 296 | +{ |
| 297 | + GPUCalibObjectsConst calib; |
| 298 | + |
| 299 | + aligned_unique_buffer_ptr<TPCFastTransformPOD> tmpFastTransformBuffer; |
| 300 | + TPCFastTransformPOD::create(tmpFastTransformBuffer, *o2::tpc::TPCFastTransformHelperO2::instance()->create(0)); |
| 301 | + calib.fastTransform = tmpFastTransformBuffer.get(); |
| 302 | + auto tmpTRDGeometry = std::make_unique<o2::trd::GeometryFlat>(); |
| 303 | + calib.trdGeometry = tmpTRDGeometry.get(); |
| 304 | + auto tmpTRDRecoParam = std::make_unique<GPUTRDRecoParam>(); |
| 305 | + calib.trdRecoParam = tmpTRDRecoParam.get(); |
| 306 | + auto tmpdEdxCalibContainer = std::make_unique<o2::tpc::CalibdEdxContainer>(); |
| 307 | + tmpdEdxCalibContainer->setDefaultZeroSupresssionThreshold(); |
| 308 | + tmpdEdxCalibContainer->setDefaultPolTopologyCorrection(); |
| 309 | + calib.dEdxCalibContainer = tmpdEdxCalibContainer.get(); |
| 310 | + auto tmpTPCPadGainCalib = std::make_unique<TPCPadGainCalib>(); |
| 311 | + calib.tpcPadGain = tmpTPCPadGainCalib.get(); |
| 312 | + auto tmpTPCZSLinkMapping = std::make_unique<TPCZSLinkMapping>(); |
| 313 | + calib.tpcZSLinkMapping = tmpTPCZSLinkMapping.get(); |
| 314 | + |
| 315 | + chainTracking->SetCalibObjects(calib); |
| 316 | + rec->DumpSettings("./"); |
| 317 | + printf("Wrote trivial calibration objects to current folder\n"); |
| 318 | +} |
| 319 | + |
289 | 320 | int32_t SetupReconstruction() |
290 | 321 | { |
291 | 322 | if (!configStandalone.eventGenerator) { |
@@ -770,6 +801,11 @@ int32_t main(int argc, char** argv) |
770 | 801 | } |
771 | 802 | } |
772 | 803 |
|
| 804 | + if (configStandalone.recreateTrivialCalibObjects) { |
| 805 | + CreateTrivialCalibObjects(); |
| 806 | + return 0; |
| 807 | + } |
| 808 | + |
773 | 809 | if (SetupReconstruction()) { |
774 | 810 | return 1; |
775 | 811 | } |
|
0 commit comments