KaliVeda
Toolkit for HIC analysis
KVFAZIAIDSiPSA.cpp
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 #include "TRandom.h"
7 
9 
10 // BEGIN_HTML <!--
12 /* -->
13 <h2>KVFAZIAIDSiPSA</h2>
14 <h4>PSA identification in first silicon of FAZIA telescopes</h4>
15 <!-- */
16 // --> END_HTML
18 
21 
22 
25 
27 {
28  // Default constructor
29 
30  if (!fZThreshold) {
31  // Threshold for Z identification by PSA
32  // Data from NIM A ?, ? (2017)
33 // Double_t Z[] = {3,6,9,12,15,18,21,24,27,30};
34 // Double_t E[] = {10,30,65,105,155,220,310,420,520,590};
35 // Double_t dE = 5;// +/- 5 MeV for all points
36 // fZThreshold = new TGraphErrors(10,Z,E);
37 // for(int i=0;i<10;++i) fZThreshold->SetPointError(i,0,dE);
38  fZThreshold = new TF1("FAZIAIDSiPSA-ZSEUIL", "pol2", 0, 100);
39 // fZThreshold->SetParameters(12.261900, -1.767320, 0.765392); // Previous implementation
40  fZThreshold->SetParameters(1.71777, -0.760697, 0.752485) ; // New implementation after thresholds determination with FAZIACOR experiment
41  }
42 
43  if (!fAThreshold) {
44  // Threshold for A identification by PSA
45  // Data from NIM A ?, ? (2017)
46 // int i=0; fZmaxAID=3;
47 // 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};
48 // Double_t Z[17]; for(int i=0;i<17;++i) Z[i] = i+3;
49 // Double_t dE[17]; for(int i=0;i<11;++i) dE[i] = 15; for(int i=11;i<17;++i) dE[i] = 25;
50 // fAThreshold = new TGraphErrors(17,Z,E,0,dE);
51  fAThreshold = new TF1("FAZIAIDSiPSA-ASEUIL", "pol2", 0, 100);
52  fAThreshold->SetParameters(-5.14823, 2.03461, 1.55798);
53  }
54  SetType("SiPSA");
55  SetLabel("FAZIA.Si");
56  fMaxZ = 18.5;
57  fSigmaZ = .4;
58 
59 }
60 
61 
62 
63 
70 
72 {
73  // Initialisation of telescope before identification.
74  // This method MUST be called once before any identification is attempted.
75  // Initialisation of grid is performed here.
76  // IsReadyForID() will return kTRUE if a grid is associated to this telescope for the current run.
77 //printf("Initializing SiPSA\n");
78 
80  if (!gDataSet->HasCalibIdentInfos()) { // for filtering simulations
81  SetBit(kReadyForID, GetDetector(1)->IsLabelled("SI1"));// only activate PSA for SI1
82  // if not, no particles are identified in SI1-SI2
83  }
84 }
85 
86 
87 
94 
96 {
97  // Return kTRUE if energy of ION is > minimum incident energy required for identification
98  // in charge (Z) given by figure 9 of "Comparison of charged particle identification
99  // using pulse shape discrimination and DeltaE-E methods between front and rear injection in
100  // silicon detector" NIM A 701, 145 (2013) (FAZIA collaboration).
101  // Thresholds used are those for rear-injection (red curve, lowest values).
102 
103  Double_t seuil = fZThreshold->Eval(ION->GetZ());
104  return (ION->GetEnergy() >= seuil);
105 }
106 
107 
108 
121 
123 {
124  // For filtering simulations
125  // If n->GetEnergy() is above threshold for mass identification, we set
126  // IDR->IsAMeasured(kTRUE) (and IDR->IsZMeasured(kTRUE)).
127  // Otherwise, we just set IDR->IsZMeasured(kTRUE) and use the A given by
128  // the mass formula for the particle
129  //
130  // Z-dependence of A identification:
131  // all ok above threshold if Z<=16, decreasing probability for 17<=Z<=21
132  // no A identification for Z>21
133  //
134  // If A is not measured, we make sure the KE of the particle corresponds to the simulated one
135 
136  IDR->Zident = true;
138  Bool_t okmass = (n->GetZ() < 17) || (n->GetZ() < 22 && gRandom->Uniform() < fMassIDProb->Eval(IDR->Z));
139  okmass = okmass && (n->GetEnergy() >= fAThreshold->Eval(n->GetZ()));
140  if (okmass) {
141  IDR->Aident = true;
142  }
143  else {
144  n->GetParameters()->SetValue("OriginalMass", n->GetA());
145  // double e = n->GetE();
146  // n->GetZ();
147  // n->SetE(e); ???
148  // give to IDR the mass corresponding to mass formula for particle?
149  IDR->A = n->GetA();
150  IDR->Aident = false;
151  }
152 }
153 
154 
bool Bool_t
double Double_t
R__EXTERN TRandom * gRandom
void SetLabel(const Char_t *lab)
Definition: KVBase.h:194
Bool_t IsLabelled(const Char_t *l) const
Definition: KVBase.h:206
virtual void SetType(const Char_t *str)
Definition: KVBase.h:172
Bool_t HasCalibIdentInfos() const
Definition: KVDataSet.h:229
static TF1 * fZThreshold
empirical threshold for Z identification
void Initialize() override
void SetIdentificationStatus(KVIdentificationResult *IDR, const KVNucleus *) override
static TF1 * fAThreshold
empirical threshold for A identification
KVFAZIAIDSiPSA()
Default constructor.
Bool_t CheckTheoreticalIdentificationThreshold(KVNucleus *, Double_t=0.0) override
static TF1 * fMassIDProb
KVDetector * GetDetector(UInt_t n) const
virtual void Initialize(void)
Full result of one attempted particle identification.
Bool_t Aident
= kTRUE if A of particle established
Int_t A
A of particle found (if Aident==kTRUE)
Int_t Z
Z of particle found (if Zident==kTRUE)
Bool_t Zident
=kTRUE if Z of particle established
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:123
Int_t GetZ() const
Return the number of proton / atomic number.
Definition: KVNucleus.cpp:763
Double_t GetEnergy() const
Definition: KVParticle.h:624
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
ClassImp(TPyArg)