KaliVeda
Toolkit for HIC analysis
KVDataPatch_E884_DataUniformization.cpp
1 #include "KVDataPatch_E884_DataUniformization.h"
2 #include "KVExpDB.h"
3 #include "KVFAZIA.h"
4 
5 
7 
9 {
10  public:
12  {
13  runlists[zn_bi_1] = "26-43";
15  bad_id_lists[zn_bi_1][KVFAZIA::IDCodes::ID_SI1_PSA] =
16  {"212, 211, 332, 644, 1042, 214, 313, 443, 533, 1041, 1043, 942"};
17  bad_id_lists[zn_bi_1][KVFAZIA::IDCodes::ID_SI1_SI2] =
18  {"211, 333, 12, 443, 533, 911, 1121, 941, 112, 812, 442"};
19  bad_id_lists[zn_bi_1][KVFAZIA::IDCodes::ID_SI2_CSI] =
20  {"123, 941, 821, 924"};
21  }
22  bool is_required(int run)
23  {
24  for(auto& nl : runlists)
25  if(nl.second.Contains(run))
26  {
27  this_system = nl.first;
28  return true;
29  }
30  return false;
31  }
32  bool is_ok(KVFAZIA::IDCodes idcode, int index)
33  {
34  return !bad_id_lists[this_system][idcode].Contains(index);
35  }
36  private:
37  enum system_t
38  {
42  zn_al
43  };
45  std::map<system_t,KVNumberList> runlists;
46  using bad_id_list = std::map<KVFAZIA::IDCodes,KVNumberList>;
47  std::map<system_t, bad_id_list> bad_id_lists;
48 };
49 
50 
52  : KVDataPatch("KVDataPatch_E884_DataUniformization",
53  "Removes all particles identified in telescopes with atypical behaviour based on results of data quality audits"),
54  pimpl{std::make_unique<_impl>()}
55 {}
56 
58 
59 
61 
63 {
64  return dataset=="INDRAFAZIA.E884" && datatype=="recon" && pimpl->is_required(run_number);
65 }
66 
67 
68 
70 
72 {
73  if(!pimpl->is_ok((KVFAZIA::IDCodes)rnuc->GetIDCode(),rnuc->GetStoppingDetector()->GetIndex()))
74  {
75  rnuc->SetIsOK(kFALSE);
76  rnuc->GetParameters()->SetValue("EXCLUDED", "Excluded by KVDataPatch_E884_DataUniformization");
77  }
78 }
79 
80 
81 
83 
85 {
86  std::cout << "E884: Data uniformization, removes all particles identified in telescopes with atypical behaviour\n\n";
87  std::cout << "Based on results of data quality audits, we remove (declare as 'bad') any particles identified in\n";
88  std::cout << "telescopes which do not follow the average behaviour of neighbouring telescopes (with similar theta)\n";
89  std::cout << "concerning:\n";
90  std::cout << " + largest Z identified\n";
91  std::cout << " + mean Z identified;\n";
92  std::cout << " + thresholds for Z or A identification.\n\n";
93 }
94 
95 
int Int_t
bool Bool_t
constexpr Bool_t kFALSE
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
std::map< KVFAZIA::IDCodes, KVNumberList > bad_id_list
Bool_t IsRequired(TString, TString, Int_t, TString, Int_t, const TList *) override
void ApplyToParticle(KVReconstructedNucleus *) override
Correction to be applied to reconstructed calibrated data.
Definition: KVDataPatch.h:55
virtual Int_t GetIndex() const
Definition: KVDetector.h:848
IDCodes
Identification quality codes attributed to particles reconstructed from data.
Definition: KVFAZIA.h:131
void SetValue(const Char_t *name, value_type value)
void SetIsOK(Bool_t flag=kTRUE)
Definition: KVParticle.cpp:371
KVNameValueList * GetParameters() const
Definition: KVParticle.h:818
Nuclei reconstructed from data measured by a detector array .
virtual Int_t GetIDCode() const
KVDetector * GetStoppingDetector() const