KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVDataPatch_E789_FAZIABadCsICalibFragments.h
Go to the documentation of this file.
1 #ifndef __KVDATAPATCH_E789_FAZIABADCSICALIBFRAGMENTS_H
2 #define __KVDATAPATCH_E789_FAZIABADCSICALIBFRAGMENTS_H
3 
4 #include "KVDataPatch.h"
6 #include "KVFAZIA.h"
7 
27 public:
29  {
31  SetName(ClassName());
32  SetTitle(Class()->GetTitle());
33  }
34 
35  Bool_t IsRequired(TString dataset, TString datatype, Int_t,
36  TString dataseries, Int_t datareleasenumber, const TList*)
37  {
38  return (dataset == "INDRAFAZIA.E789") && (datatype == "recon") && (dataseries == "1.12") && (datareleasenumber == 5);
39  }
40 
42  {
43  return false;
44  }
46  {
47  return true;
48  }
51  {
52  if (rnuc->InArray("FAZIA") && rnuc->IsZMeasured() && rnuc->IsCalibrated()
53  && rnuc->GetStoppingDetector()->IsType("CsI") && rnuc->GetZ() > 2)
54  correct_ecsi(rnuc);
55  }
56 
57  void PrintPatchInfo() const;
58 
60  {
68 
69  double ecsi, esi1, esi2;
70  if ((ecsi = rnuc->GetParameters()->GetDoubleValue("FAZIA.ECSI")) > 0
71  && (esi1 = rnuc->GetParameters()->GetDoubleValue("FAZIA.ESI1")) > 0
72  && (esi2 = rnuc->GetParameters()->GetDoubleValue("FAZIA.ESI2")) > 0) {
75  auto si1 = rnuc->GetReconstructionTrajectory()->GetDetector("SI1");
76  auto si2 = rnuc->GetReconstructionTrajectory()->GetDetector("SI2");
77  KVDetector si1si2("Si", si1->GetThickness() + si2->GetThickness());
78  auto new_ecsi = si1si2.GetEResFromDeltaE(rnuc->GetZ(), rnuc->GetA(), esi1 + esi2);
79  if (new_ecsi > 0) {
80  rnuc->SetParameter("DATAPATCH.E789_FAZIABadCsICalibFragments.APPLIED", true);
81  rnuc->SetParameter("FAZIA.ECSI_BAD", ecsi);
82  rnuc->SetParameter("FAZIA.ECSI", -new_ecsi); // calculated CsI energy
83  rnuc->SetECode(KVFAZIA::ECodes::SOME_ENERGY_LOSSES_CALCULATED);
85  rnuc->SetEnergy(esi1 + esi2 + new_ecsi);
87  rnuc->UpdateAllFrames();
88  return true;
89  }
90  }
91  return false;
92  }
93 
94  ClassDef(KVDataPatch_E789_FAZIABadCsICalibFragments, 1) //Correct mistaken use of Z=2 CsI calib for all fragments in FAZIA
95 };
96 
97 #endif
int Int_t
bool Bool_t
#define ClassDef(name, id)
virtual Bool_t IsType(const Char_t *typ) const
Definition: KVBase.h:184
Correct mistaken use of Z=2 CsI calib for all fragments in FAZIA.
Bool_t IsRequired(TString dataset, TString datatype, Int_t, TString dataseries, Int_t datareleasenumber, const TList *)
Correction to be applied to reconstructed calibrated data.
Definition: KVDataPatch.h:54
Base class for detector geometry description.
Definition: KVDetector.h:159
virtual Double_t GetEResFromDeltaE(Int_t Z, Int_t A, Double_t dE=-1.0, enum SolType type=kEmax)
Double_t GetDoubleValue(const Char_t *name) const
Int_t GetA() const
Definition: KVNucleus.cpp:799
Int_t GetZ() const
Return the number of proton / atomic number.
Definition: KVNucleus.cpp:770
void UpdateAllFrames()
Definition: KVParticle.cpp:913
KVNameValueList * GetParameters() const
Definition: KVParticle.h:816
void SetParameter(const Char_t *name, ValType value) const
Definition: KVParticle.h:820
void SetEnergy(Double_t e)
Definition: KVParticle.h:601
KVDetector * GetDetector(const TString &label) const
Event containing KVReconstructedNucleus nuclei reconstructed from hits in detectors.
Nuclei reconstructed from data measured by a detector array .
virtual Bool_t IsZMeasured() const
Bool_t InArray(const TString &) const
Returns kTRUE if particle was detected in array with given name.
const KVReconNucTrajectory * GetReconstructionTrajectory() const
KVDetector * GetStoppingDetector() const
void SetDetector(int i, KVDetector *);
virtual void SetTitle(const char *title="")
virtual const char * GetTitle() const
virtual void SetName(const char *name)
virtual const char * ClassName() const
const char * Class