KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVFAZIAIDSiPSA.cpp
Go to the documentation of this file.
1 //Created by KVClassFactory on Mon Feb 17 13:52:51 2014
2 //Author: John Frankland,,,
3 
4 #include "KVFAZIAIDSiPSA.h"
5 #include "KVDataSet.h"
6 
8 
9 // BEGIN_HTML <!--
11 /* -->
12 <h2>KVFAZIAIDSiPSA</h2>
13 <h4>PSA identification in first silicon of FAZIA telescopes</h4>
14 <!-- */
15 // --> END_HTML
17 
20 
21 
24 
26 {
27  // Default constructor
28 
29  if (!fZThreshold) {
30  // Threshold for Z identification by PSA
31  // Data from NIM A ?, ? (2017)
32 // Double_t Z[] = {3,6,9,12,15,18,21,24,27,30};
33 // Double_t E[] = {10,30,65,105,155,220,310,420,520,590};
34 // Double_t dE = 5;// +/- 5 MeV for all points
35 // fZThreshold = new TGraphErrors(10,Z,E);
36 // for(int i=0;i<10;++i) fZThreshold->SetPointError(i,0,dE);
37  fZThreshold = new TF1("FAZIAIDSiPSA-ZSEUIL", "pol2", 0, 100);
38 // fZThreshold->SetParameters(12.261900, -1.767320, 0.765392); // Previous implementation
39  fZThreshold->SetParameters(1.71777, -0.760697, 0.752485) ; // New implementation after thresholds determination with FAZIACOR experiment
40  }
41 
42  if (!fAThreshold) {
43  // Threshold for A identification by PSA
44  // Data from NIM A ?, ? (2017)
45 // int i=0; fZmaxAID=3;
46 // Double_t E[] = {15,22.5,37.5,67.5,97.5,112.5,140,172.5,202.5,247.5,277.5,322.5,375,410,487.5,530,612.5};
47 // Double_t Z[17]; for(int i=0;i<17;++i) Z[i] = i+3;
48 // Double_t dE[17]; for(int i=0;i<11;++i) dE[i] = 15; for(int i=11;i<17;++i) dE[i] = 25;
49 // fAThreshold = new TGraphErrors(17,Z,E,0,dE);
50  fAThreshold = new TF1("FAZIAIDSiPSA-ASEUIL", "pol2", 0, 100);
51  fAThreshold->SetParameters(-5.14823, 2.03461, 1.55798);
52  }
53  SetType("SiPSA");
54  fMaxZ = 18.5;
55  fSigmaZ = .4;
56 
57 }
58 
59 
60 
61 
68 
70 {
71  // Initialisation of telescope before identification.
72  // This method MUST be called once before any identification is attempted.
73  // Initialisation of grid is performed here.
74  // IsReadyForID() will return kTRUE if a grid is associated to this telescope for the current run.
75 //printf("Initializing SiPSA\n");
76 
78  if (!gDataSet->HasCalibIdentInfos()) { // for filtering simulations
79  SetBit(kReadyForID, GetDetector(1)->IsLabelled("SI1"));// only activate PSA for SI1
80  // if not, no particles are identified in SI1-SI2
81  }
82 }
83 
84 
85 
92 
94 {
95  // Return kTRUE if energy of ION is > minimum incident energy required for identification
96  // in charge (Z) given by figure 9 of "Comparison of charged particle identification
97  // using pulse shape discrimination and DeltaE-E methods between front and rear injection in
98  // silicon detector" NIM A 701, 145 (2013) (FAZIA collaboration).
99  // Thresholds used are those for rear-injection (red curve, lowest values).
100 
101  Double_t seuil = fZThreshold->Eval(ION->GetZ());
102  return (ION->GetEnergy() >= seuil);
103 }
104 
105 
106 
119 
121 {
122  // For filtering simulations
123  // If n->GetEnergy() is above threshold for mass identification, we set
124  // n->IsAMeasured(kTRUE) (and n->IsZMeasured(kTRUE)).
125  // Otherwise, we just set n->IsZMeasured(kTRUE) and use the A given by
126  // the mass formula for the particle
127  //
128  // Z-dependence of A identification:
129  // all ok above threshold if Z<=16, decreasing probability for 17<=Z<=21
130  // no A identification for Z>21
131  //
132  // If A is not measured, we make sure the KE of the particle corresponds to the simulated one
133 
134  n->SetZMeasured();
136  Bool_t okmass = (n->GetZ() < 17) || (n->GetZ() < 22 && gRandom->Uniform() < fMassIDProb->Eval(n->GetZ()));
137  okmass = okmass && (n->GetEnergy() >= fAThreshold->Eval(n->GetZ()));
138 
139 // Info("SetIdentificationStatus","%s : %lf %lf",ClassName(),fMassIDProb->GetParameter(0),fMassIDProb->GetParameter(1));
140 
141  if (okmass) {
142  if (n->GetParameters()->HasParameter("OriginalMass")) n->SetA(n->GetParameters()->GetIntValue("OriginalMass"));
143  n->SetAMeasured();
144  }
145  else {
146  n->GetParameters()->SetValue("OriginalMass", n->GetA());
147  double e = n->GetE();
148  n->SetZ(n->GetZ());
149  n->SetE(e);
150  }
151 }
152 
153 
KVDataSet * gDataSet
Definition: KVDataSet.cpp:30
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
#define e(i)
bool Bool_t
double Double_t
R__EXTERN TRandom * gRandom
Bool_t IsLabelled(const Char_t *l) const
Definition: KVBase.h:200
virtual void SetType(const Char_t *str)
Definition: KVBase.h:166
Bool_t HasCalibIdentInfos() const
Definition: KVDataSet.h:396
void SetIdentificationStatus(KVReconstructedNucleus *)
static TF1 * fZThreshold
empirical threshold for Z identification
static TF1 * fAThreshold
empirical threshold for A identification
KVFAZIAIDSiPSA()
Default constructor.
virtual void Initialize()
Bool_t CheckTheoreticalIdentificationThreshold(KVNucleus *, Double_t=0.0)
static TF1 * fMassIDProb
KVDetector * GetDetector(UInt_t n) const
virtual void Initialize(void)
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:125
Int_t GetZ() const
Return the number of proton / atomic number.
Definition: KVNucleus.cpp:770
Double_t GetEnergy() const
Definition: KVParticle.h:582
Nuclei reconstructed from data measured by a detector array ,.
virtual void SetParameters(const Double_t *params)
virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const
void SetBit(UInt_t f)
virtual Double_t Uniform(Double_t x1, Double_t x2)
const Int_t n