|
33 | 33 | #include "TableHelper.h" |
34 | 34 | #include "pidTPCBase.h" |
35 | 35 |
|
| 36 | +#include "Common/CCDB/ctpRateFetcher.h" |
36 | 37 | #include "Common/Core/PID/TPCPIDResponse.h" |
37 | 38 | #include "Common/DataModel/EventSelection.h" |
38 | 39 | #include "Common/DataModel/Multiplicity.h" |
@@ -151,7 +152,8 @@ struct tpcPid { |
151 | 152 | Configurable<int> useNetworkAl{"useNetworkAl", 1, {"Switch for applying neural network on the alpha mass hypothesis (if network enabled) (set to 0 to disable)"}}; |
152 | 153 | Configurable<float> networkBetaGammaCutoff{"networkBetaGammaCutoff", 0.45, {"Lower value of beta-gamma to override the NN application"}}; |
153 | 154 | Configurable<float> networkInputBatchedMode{"networkInputBatchedMode", -1, {"-1: Takes all tracks, >0: Takes networkInputBatchedMode number of tracks at once"}}; |
154 | | - |
| 155 | + Configurable<std::string> irSource{"irSource", "ZNC hadronic", "Estimator of the interaction rate (Recommended: pp --> T0VTX, Pb-Pb --> ZNC hadronic)"}; |
| 156 | + ctpRateFetcher mRateFetcher; |
155 | 157 | // Parametrization configuration |
156 | 158 | bool useCCDBParam = false; |
157 | 159 | std::vector<float> track_properties; |
@@ -400,6 +402,16 @@ struct tpcPid { |
400 | 402 | if (input_dimensions == 7 && networkVersion == "2") { |
401 | 403 | track_properties[counter_track_props + 6] = trk.has_collision() ? collisions.iteratorAt(trk.collisionId()).ft0cOccupancyInTimeRange() / 60000. : 1.; |
402 | 404 | } |
| 405 | + if (input_dimensions == 8 && networkVersion == "3") { |
| 406 | + if (trk.has_collision()) { |
| 407 | + auto trk_bc = (collisions.iteratorAt(trk.collisionId())).template bc_as<B>(); |
| 408 | + float hadronicRate = mRateFetcher.fetch(ccdb.service, trk_bc.timestamp(), trk_bc.runNumber(), irSource) * 1.e-3; |
| 409 | + track_properties[counter_track_props + 7] = hadronicRate / 50.; |
| 410 | + } else { |
| 411 | + track_properties[counter_track_props + 7] = 1; |
| 412 | + } |
| 413 | + } |
| 414 | + |
403 | 415 | counter_track_props += input_dimensions; |
404 | 416 | in_batch_counter++; |
405 | 417 | total_input_count++; |
|
0 commit comments