1 #include "KVGroupReconstructor.h"
2 #include "KVMultiDetArray.h"
19 :
KVBase(
"KVGroupReconstructor",
"Reconstruction of particles in detector groups"),
215 && (!
d->GetHits() || !
d->GetHits()->GetEntries())
262 throw std::runtime_error(
Form(
"<KVGroupReconstructor::ReconstructParticle>: Failed to obtain reconstruction trajectory for node %s on trajectory %s",
271 Rtraj->IterateFrom();
273 while ((
n = Rtraj->GetNextNode())) {
275 KVDetector*
d =
n->GetDetector();
363 nuc = it.get_pointer();
423 TIter next(idt_list);
425 Int_t n_success_id = 0;
435 if (IDR->
IDOK) n_success_id++;
495 Int_t zmin =
d.GetStoppingDetector()->FindZmin(-1.,
d.GetMassFormula());
533 if (!
d.IsIdentified()) {
559 if (!
d.IsCalibrated()) {
560 if (
d.IsZMeasured() &&
d.GetZ()) {
564 d.SetECode(
GetGroup()->GetParentStructure<KVMultiDetArray>()->GetNoCalibrationCode());
605 if (!array->GetTarget() || !ion)
return 0.0;
606 return (array->GetTarget()->GetParticleEIncFromERes(ion) - ion->
GetEnergy());
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t g
char * Form(const char *fmt,...)
Base class for KaliVeda framework.
virtual const Char_t * GetType() const
static TPluginHandler * LoadPlugin(const Char_t *base, const Char_t *uri="0")
Path taken by particles through multidetector geometry.
KVGeoDetectorNode * GetNextNode() const
KVString GetPathString() const
void IterateFrom(const KVGeoDetectorNode *node0=nullptr) const
Int_t GetNumberOfIdentifications() const
const KVSeqCollection * GetIDTelescopes() const
Information on relative positions of detectors & particle trajectories.
KVDetector * GetDetector() const
Int_t GetNTrajBackwards() const
const Char_t * GetName() const override
Name of node is same as name of associated detector.
Int_t GetNTrajForwards() const
KVGeoStrucElement * GetParentStructure(const Char_t *type, const Char_t *name="") const
Base class for particle reconstruction in one group of a detector array.
virtual KVReconstructedNucleus * ReconstructTrajectory(const KVGeoDNTrajectory *traj, const KVGeoDetectorNode *node)
KVReconstructedEvent * fGrpEvent
event containing particles reconstructed in this group
static bool fDoCalibration
KVIDTelescope * identifying_telescope
telescope which identified current particle
virtual void identify_particle(KVIDTelescope *idt, KVIdentificationResult *IDR, KVReconstructedNucleus &)
virtual void ReconstructParticle(KVReconstructedNucleus *part, const KVGeoDNTrajectory *traj, const KVGeoDetectorNode *node)
KVGroup * GetGroup() const
std::unordered_map< std::string, KVIdentificationResult * > id_by_type
identification results by type for current particle
KVReconstructedEvent * GetEventFragment() const
virtual void CalibrateParticle(KVReconstructedNucleus *)
static KVGroupReconstructor * Factory(const TString &plugin="", const KVGroup *g=nullptr)
virtual void AddCoherencyParticles()
int nfireddets
set to true during secondary analysis
KVGroup * fGroup
the group where we are reconstructing
static bool fDoIdentification
void Calibrate()
Calculate and set energies of all Z-identified but uncalibrated charged particles in event.
virtual void SetGroup(const KVGroup *g)
virtual ~KVGroupReconstructor()
Destructor.
virtual KVReconNucTrajectory * get_recon_traj_for_particle(const KVGeoDNTrajectory *traj, const KVGeoDetectorNode *node)
TString fPartSeedCond
condition for seeding reconstructed particles
Double_t GetTargetEnergyLossCorrection(KVReconstructedNucleus *ion)
virtual void IdentifyParticle(KVReconstructedNucleus &)
virtual void Reconstruct()
KVGroupReconstructor(const KVGroup *g=nullptr)
Default constructor.
void SetReconEventClass(TClass *c)
Instantiate event fragment object.
TString GetPartSeedCond() const
KVIdentificationResult partID
identification to be applied to current particle
Int_t GetNUnidentifiedInGroup()
void TreatStatusStopFirstStage(KVReconstructedNucleus &)
virtual void PostReconstructionProcessing()
std::vector< particle_to_add_from_coherency_analysis > coherency_particles
Group of detectors which can be treated independently of all others in array.
const KVGeoDNTrajectory * GetTrajectoryForReconstruction(const KVGeoDNTrajectory *t, const KVGeoDetectorNode *n) const
Base class for all detectors or associations of detectors in array which can identify charged particl...
virtual Bool_t IsReadyForID()
Bool_t HasDetector(const KVDetector *d) const
Bool_t IsIndependent() const
Full result of one attempted particle identification.
Bool_t IDattempted
=kTRUE if identification was attempted
Bool_t IDOK
general quality of identification, =kTRUE if acceptable identification made
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 Z
Z of particle found (if Zident==kTRUE)
Int_t IDcode
a general identification code for this type of identification
Bool_t Zident
=kTRUE if Z of particle established
Base class for describing the geometry of a detector array.
Double_t GetEnergy() const
void SetParameter(const Char_t *name, ValType value) const
Path through detector array used to reconstruct detected particle.
Int_t GetNumberOfIndependentIdentifications() const
Event containing KVReconstructedNucleus nuclei reconstructed from hits in detectors.
Nuclei reconstructed from data measured by a detector array .
void SetReconstructionTrajectory(const KVReconNucTrajectory *t)
Method called in initial reconstruction of particle.
@ 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
KVIdentificationResult * GetIdentificationResult(Int_t i)
const KVReconNucTrajectory * GetReconstructionTrajectory() const
void SetIdentification(KVIdentificationResult *, KVIDTelescope *)
Bool_t IsIdentified() const
KVDetector * GetStoppingDetector() const
void SetDetector(int i, KVDetector *);
KaliVeda extensions to ROOT collection classes.
TObject * First() const override
TObject * Last() const override
virtual Int_t GetMult(Option_t *opt="") const
Wrapper class for iterating over nuclei in KVReconstructedEvent accessed through base pointer or refe...
virtual Int_t GetEntries() const
const char * GetName() const override
virtual void Info(const char *method, const char *msgfmt,...) const
Longptr_t ExecPlugin(int nargs)
const char * Data() const