KaliVeda  1.12/06
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  auto rnuc = dynamic_cast<KVReconstructedNucleus*>(n);
53  if (rnuc->InArray("FAZIA") && rnuc->IsZMeasured() && rnuc->IsCalibrated()
54  && rnuc->GetStoppingDetector()->IsType("CsI") && rnuc->GetZ() > 2)
55  correct_ecsi(rnuc);
56  }
57 
58  void PrintPatchInfo() const;
59 
61  {
69 
70  double ecsi, esi1, esi2;
71  if ((ecsi = rnuc->GetParameters()->GetDoubleValue("FAZIA.ECSI")) > 0
72  && (esi1 = rnuc->GetParameters()->GetDoubleValue("FAZIA.ESI1")) > 0
73  && (esi2 = rnuc->GetParameters()->GetDoubleValue("FAZIA.ESI2")) > 0) {
76  auto si1 = rnuc->GetReconstructionTrajectory()->GetDetector("SI1");
77  auto si2 = rnuc->GetReconstructionTrajectory()->GetDetector("SI2");
78  KVDetector si1si2("Si", si1->GetThickness() + si2->GetThickness());
79  auto new_ecsi = si1si2.GetEResFromDeltaE(rnuc->GetZ(), rnuc->GetA(), esi1 + esi2);
80  if (new_ecsi > 0) {
81  rnuc->SetParameter("DATAPATCH.E789_FAZIABadCsICalibFragments.APPLIED", true);
82  rnuc->SetParameter("FAZIA.ECSI_BAD", ecsi);
83  rnuc->SetParameter("FAZIA.ECSI", -new_ecsi); // calculated CsI energy
84  rnuc->SetECode(KVFAZIA::ECodes::SOME_ENERGY_LOSSES_CALCULATED);
86  rnuc->SetEnergy(esi1 + esi2 + new_ecsi);
88  rnuc->UpdateAllFrames();
89  return true;
90  }
91  }
92  return false;
93  }
94 
95  ClassDef(KVDataPatch_E789_FAZIABadCsICalibFragments, 1) //Correct mistaken use of Z=2 CsI calib for all fragments in FAZIA
96 };
97 
98 #endif
int Int_t
bool Bool_t
#define ClassDef(name, id)
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:55
Base class for detector geometry description, interface to energy-loss calculations.
Definition: KVDetector.h:121
Base class container for multi-particle events.
Definition: KVEvent.h:176
virtual Double_t GetEResFromDeltaE(Int_t Z, Int_t A, Double_t dE=-1.0, enum SolType type=kEmax)
Definition: KVMaterial.cpp:750
Double_t GetDoubleValue(const Char_t *name) const
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:125
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()
KVNameValueList * GetParameters() const
Definition: KVParticle.h:735
void SetParameter(const Char_t *name, ValType value) const
Definition: KVParticle.h:739
void SetEnergy(Double_t e)
Definition: KVParticle.h:560
KVDetector * GetDetector(const TString &label) const
Nuclei reconstructed from data measured by a detector array ,.
const KVReconNucTrajectory * GetReconstructionTrajectory() const
virtual void SetTitle(const char *title="")
virtual const char * GetTitle() const
virtual void SetName(const char *name)
virtual const char * ClassName() const
const Int_t n
const char * Class