KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVDataPatch_INDRA_camp5_PHDcorrection.cpp
Go to the documentation of this file.
1 //Created by KVClassFactory on Thu Jan 30 14:22:15 2014
2 //Author: John Frankland,,,
3 
5 #include <TStreamerInfo.h>
6 #include <KVINDRAReconNuc.h>
7 #include <KVTarget.h>
8 #include "KVMultiDetArray.h"
9 
11 
12 
13 
14 
18 {
19  // Default constructor
20  SetName(ClassName());
21  SetTitle(Class()->GetTitle());
22 }
23 
24 
25 
28 
30 {
31  // Destructor
32 }
33 
34 
35 
39 
41  TString dataseries, Int_t datareleasenumber, const TList* streamerinfolist)
42 {
43  // Patch is applied to all runs of INDRA 5th campaign 'root' data written with KaliVeda
44  // version <1.8.10 and KVINDRAReconNuc class version < 11
45 
46  TStreamerInfo* i = (TStreamerInfo*)streamerinfolist->FindObject("KVINDRAReconNuc");
47  return (dataset == "INDRA_camp5" && datatype == "root" && dataseries == "1.8"
48  && datareleasenumber < 10 && i->GetClassVersion() < 11);
49 }
50 
51 
52 
56 
58 {
59  // Patch is applied to all identified & calibrated nuclei with Z>10 on rings 1-9.
60  // The particle energy is recalibrated.
61 
63  if (N->IsIdentified() && N->IsCalibrated() && N->GetZ() > 10 && N->GetRingNumber() < 10) {
65  if (t) {
66  // make sure target is in correct state to calculate
67  // target energy losses of fragments
68  if (t->IsIncoming()) t->SetIncoming(kFALSE);
69  if (!t->IsOutgoing()) t->SetOutgoing(kTRUE);
70  }
71  N->Calibrate();//recalibrate particle
72  }
73 }
74 
75 
76 
78 
80 {
81  std::cout << "Particle-level patch applied to all runs of INDRA 5th campaign 'root'" << std::endl;
82  std::cout << "data written with KaliVeda version <1.8.10 and KVINDRAReconNuc class" << std::endl;
83  std::cout << "version < 11." << std::endl;
84  std::cout << "Patch is applied to all identified & calibrated nuclei with Z>10 on rings 1-9." << std::endl;
85  std::cout << "The particle energy is recalibrated." << std::endl;
86 }
87 
88 
int Int_t
KVMultiDetArray * gMultiDetArray
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
const Bool_t kFALSE
bool Bool_t
const Bool_t kTRUE
#define N
Patch for correcting Silicon PHD on rings 1-9 [INDRA_camp5 before 1.8.10].
virtual Bool_t IsRequired(TString dataset, TString datatype, Int_t runnumber, TString dataseries, Int_t datareleasenumber, const TList *streamerinfolist)
Nuclei reconstructed from data measured in the INDRA array.
KVTarget * GetTarget()
Nuclei reconstructed from data measured by a detector array .
Calculation/correction of energy losses of particles through an experimental target.
Definition: KVTarget.h:126
Bool_t IsIncoming() const
Definition: KVTarget.h:205
void SetIncoming(Bool_t r=kTRUE)
Definition: KVTarget.h:216
Bool_t IsOutgoing() const
Definition: KVTarget.h:224
void SetOutgoing(Bool_t r=kTRUE)
Definition: KVTarget.h:236
virtual TObject * FindObject(const char *name) const
RooCmdArg ClassName(const char *name)
const Int_t n
gr SetName("gr")
int GetClassVersion(const clang::RecordDecl *cl, const cling::Interpreter &interp)
const char * Class