1 #include "KVReconstructedNucleus.h"
2 #include "KVIDTelescope.h"
4 #include "KVMultiDetArray.h"
21 fIDTelescope =
nullptr;
24 fTargetEnergyLoss = 0;
25 ResetBit(kIsIdentified);
26 ResetBit(kIsCalibrated);
50 :
KVNucleus(), fIDResults(
"KVIdentificationResult", 5)
54 #if ROOT_VERSION_CODE >= ROOT_VERSION(3,4,0)
91 for (R__i = 0; R__i < 5; R__i++) {
101 if (gMultiDetArray) {
140 "Particle alone in group, or identification independently of other particles in group is directly possible." << endl;
145 "Particle reconstructed after identification of others in group and subtraction of their calculated energy losses in common detectors."
151 "Particle identification estimated after arbitrary sharing of energy lost in common detectors between several reconstructed particles."
157 "Particle stopped in first stage of telescope. Estimation of minimum Z."
163 "Undetectable pile-up in first member of identifying telesscope (apparent status=OK). Would lead to incorrect identification by DE-E method (Z and/or A overestimated)."
169 "Undetectable ghost particle in filtered simulation. Another particle passed through all of the same detectors (pile-up)."
214 for (
int i = ndets - 1; i >= 0; i--) {
216 if (det) det->
Print(
"data");
228 cout <<
" =======> ";
231 cout <<
" Z=" <<
GetZ() <<
" A=" <<
GetA();
233 else cout <<
" Zreal=" <<
GetRealZ();
245 cout <<
"(unidentified)" << endl;
252 cout <<
" (uncalibrated)" << endl;
254 cout <<
"RECONSTRUCTION STATUS : " << endl;
262 #if ROOT_VERSION_CODE >= ROOT_VERSION(3,4,0)
289 Int_t nidres = GetNumberOfIdentificationResults();
290 for (
int i = 1; i <= nidres; ++i) {
293 robj.
SetBit(kIsIdentified, TestBit(kIsIdentified));
294 robj.
SetBit(kIsCalibrated, TestBit(kIsCalibrated));
295 robj.
SetBit(kCoherency, TestBit(kCoherency));
296 robj.
SetBit(kZMeasured, TestBit(kZMeasured));
297 robj.
SetBit(kAMeasured, TestBit(kAMeasured));
337 if (
GetGroup() && strncmp(opt,
"N", 1))
409 double small_solid = 1.e+09;
413 if (
n->GetDetector()->GetSolidAngle() < small_solid) {
414 angle_det =
n->GetDetector();
415 small_solid =
n->GetDetector()->GetSolidAngle();
418 if (!strcmp(opt,
"random")) {
441 if (gMultiDetArray) {
456 n->GetDetector()->AddHit(
this);
457 if (
IsIdentified())
n->GetDetector()->IncrementIdentifiedParticles();
458 else n->GetDetector()->IncrementUnidentifiedParticles();
489 n->GetDetector()->RemoveHit(
this);
490 if (
IsIdentified())
n->GetDetector()->IncrementIdentifiedParticles(-1);
491 else n->GetDetector()->IncrementUnidentifiedParticles(-1);
497 n->GetDetector()->AddHit(
this);
498 if (
IsIdentified())
n->GetDetector()->IncrementIdentifiedParticles();
499 else n->GetDetector()->IncrementUnidentifiedParticles();
552 if (
GetParameters()->IsValue(
"Coherent",
false)) printf(
"/not coherent/");
553 if (
GetParameters()->IsValue(
"Pileup",
true)) printf(
"/pileup/");
Base class for detector geometry description, interface to energy-loss calculations.
void IncrementIdentifiedParticles(Int_t n=1)
void IncrementUnidentifiedParticles(Int_t n=1)
KVGroup * GetGroup() const
void Print(Option_t *option="") const override
virtual Bool_t IsDetecting() const
TVector3 GetRandomDirection(Option_t *t="isotropic") override
void AddHit(KVNucleus *part)
TVector3 GetDirection() override
KVGeoDetectorNode * GetNextNode() const
KVString GetPathString() const
void AddUnidentifiedParticle(int modify_identified=-1) const
void IterateFrom(const KVGeoDetectorNode *node0=nullptr) const
Information on relative positions of detectors & particle trajectories.
KVDetector * GetDetector() const
virtual KVDetector * GetDetector(const Char_t *name) const
Return detector in this structure with given name.
KVGeoStrucElement * GetParentStructure(const Char_t *type, const Char_t *name="") const
Group of detectors which can be treated independently of all others in array.
void Reset(Option_t *opt="")
const KVGeoDNTrajectory * FindReconTraj(const KVString &path)
Base class for all detectors or associations of detectors in array which can identify charged particl...
Full result of one attempted particle identification.
Bool_t IDattempted
=kTRUE if identification was attempted
void Print(Option_t *opt="") const override
Bool_t Aident
= kTRUE if A of particle established
Double_t PID
= "real" Z if Zident==kTRUE and Aident==kFALSE, "real" A if Zident==Aident==kTRUE
Int_t A
A of particle found (if Aident==kTRUE)
Int_t Z
Z of particle found (if Zident==kTRUE)
Int_t IDcode
a general identification code for this type of identification
void Copy(TObject &) const override
Copy this to obj.
Bool_t Zident
=kTRUE if Z of particle established
Base class for describing the geometry of a detector array.
KVIDTelescope * GetIDTelescope(const Char_t *name) const
Return pointer to DeltaE-E ID Telescope with "name".
const Char_t * GetStringValue(const Char_t *name) const
void Print(Option_t *opt="") const override
Description of properties and kinematics of atomic nuclei.
void Copy(TObject &) const override
Copy this KVNucleus into the KVNucleus object referenced by "obj".
void Clear(Option_t *opt="") override
void SetZ(Int_t z, Char_t mt=-1)
Int_t GetZ() const
Return the number of proton / atomic number.
KVNameValueList * GetParameters() const
Double_t GetTheta() const
Double_t GetEnergy() const
const Char_t * GetName() const override
return the field fName
void SetMomentum(const TVector3 *v)
Path through detector array used to reconstruct detected particle.
Int_t GetNumberOfIndependentIdentifications() const
void ls(Option_t *="") const override
Nuclei reconstructed from data measured by a detector array .
virtual void SetIDCode(UShort_t s)
void ls(Option_t *="") const override
KVDetector * GetDetector(const TString &label) const
void PrintStatusString() const
virtual Bool_t IsZMeasured() const
virtual void SetAMeasured(Bool_t yes=kTRUE)
Float_t fRealZ
Z returned by identification routine.
void SetReconstructionTrajectory(const KVReconNucTrajectory *t)
Method called in initial reconstruction of particle.
virtual Double_t GetTargetEnergyLoss() const
void CopyAndMoveReferences(const KVReconstructedNucleus *)
@ kStatusOKafterShare
of energy losses of other particles in the same group which have Status=0
@ kStatusStopFirstStage
(arbitrarily) between this and the other particle(s) with Status=2
@ kStatusPileupDE
telescope; a minimum Z could be estimated from the measured energy loss.
Bool_t InArray(const TString &) const
Returns kTRUE if particle was detected in array with given name.
const KVReconNucTrajectory * fReconTraj
trajectory used to reconstruct particle
Int_t GetNumberOfIdentificationResults() const
Bool_t IsCalibrated() const
KVIdentificationResult * GetIdentificationResult(Int_t i)
KVHashList fDetList
non-persistent list of pointers to detectors
const KVReconNucTrajectory * GetReconstructionTrajectory() const
Float_t fRealA
A returned by identification routine.
void SetIdentification(KVIdentificationResult *, KVIDTelescope *)
KVReconstructedNucleus()
default ctor.
void Copy(TObject &) const override
Bool_t IsIdentified() const
void Clear(Option_t *option="") override
virtual Int_t GetIDCode() const
TClonesArray fIDResults
results of every identification attempt made for this nucleus, in order of the ID telescopes used
KVDetector * GetStoppingDetector() const
void SetDetector(int i, KVDetector *);
virtual void SetTargetEnergyLoss(Double_t e)
KVString fDetNames
list of names of detectors through which particle passed
void ModifyReconstructionTrajectory(const KVReconNucTrajectory *t)
virtual void GetAnglesFromReconstructionTrajectory(Option_t *opt="random")
void init()
default initialisation
KVString fIDTelName
name of identification telescope which identified this particle (if any)
TString GetArrayName() const
Returns name of array particle was detected in (if known)
void Print(Option_t *option="") const override
void SetRealZ(Float_t zz)
virtual void SetZMeasured(Bool_t yes=kTRUE)
Int_t fNSegDet
number of segmented/independent detectors hit by particle
void ReplaceReconTraj(const TString &traj_name)
Double_t fTargetEnergyLoss
calculated energy lost in target
KVIDTelescope * GetIdentifyingTelescope() const
KVGroup * GetGroup() const
void SetIdentifyingTelescope(KVIDTelescope *i)
KVIDTelescope * fIDTelescope
non-persistent pointer to identification telescope
virtual Bool_t IsAMeasured() const
Int_t fAnalStatus
status of particle after analysis of reconstructed event
void Clear(Option_t *option="") override
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
void Begin(TString delim) const
KVString Next(Bool_t strip_whitespace=kFALSE) const
virtual Version_t ReadVersion(UInt_t *start=nullptr, UInt_t *bcnt=nullptr, const TClass *cl=nullptr)=0
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const char *classname)=0
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=nullptr)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
void Clear(Option_t *option="") override
TClass * IsA() const override
void Streamer(TBuffer &) override
const char * GetName() const override
void Streamer(TBuffer &) override
const char * GetTitle() const override
virtual void Error(const char *method, const char *msgfmt,...) const
const char * Data() const
virtual void Streamer(TBuffer &)
TString & Remove(EStripType s, char c)