|
37 | 37 | #include "Common/DataModel/EventSelection.h" |
38 | 38 | #include "Common/DataModel/Multiplicity.h" |
39 | 39 | #include "Common/DataModel/PIDResponseTPC.h" |
| 40 | +#include "Common/CCDB/ctpRateFetcher.h" |
40 | 41 | #include "Tools/ML/model.h" |
41 | 42 |
|
42 | 43 | #include "CCDB/BasicCCDBManager.h" |
@@ -151,7 +152,9 @@ 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; |
| 157 | + |
155 | 158 | // Parametrization configuration |
156 | 159 | bool useCCDBParam = false; |
157 | 160 | std::vector<float> track_properties; |
@@ -400,6 +403,16 @@ struct tpcPid { |
400 | 403 | if (input_dimensions == 7 && networkVersion == "2") { |
401 | 404 | track_properties[counter_track_props + 6] = trk.has_collision() ? collisions.iteratorAt(trk.collisionId()).ft0cOccupancyInTimeRange() / 60000. : 1.; |
402 | 405 | } |
| 406 | + if (input_dimensions == 8 && networkVersion == "3") { |
| 407 | + if(trk.has_collision()){ |
| 408 | + auto trk_bc = (collisions.iteratorAt(trk.collisionId())).template bc_as<B>(); |
| 409 | + float hadronicRate = mRateFetcher.fetch(ccdb.service, trk_bc.timestamp(), trk_bc.runNumber(), irSource) * 1.e-3; |
| 410 | + track_properties[counter_track_props + 7] = hadronicRate/50.; |
| 411 | + }else{ |
| 412 | + track_properties[counter_track_props + 7] =1; |
| 413 | + } |
| 414 | + } |
| 415 | + |
403 | 416 | counter_track_props += input_dimensions; |
404 | 417 | in_batch_counter++; |
405 | 418 | total_input_count++; |
|
0 commit comments