KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVGroupReconstructor.h
Go to the documentation of this file.
1 #ifndef __KVGROUPRECONSTRUCTOR_H
2 #define __KVGROUPRECONSTRUCTOR_H
3 
4 #include "KVBase.h"
5 #include "KVGroup.h"
6 #include "KVReconstructedEvent.h"
7 #ifdef WITH_CPP11
8 #include <unordered_map>
9 #else
10 #include <map>
11 #endif
12 #include <string>
13 
29 class KVGroupReconstructor : public KVBase {
30 
31  static bool fDoIdentification;
32  static bool fDoCalibration;
33 
37 protected:
38  mutable int nfireddets;
41  std::unordered_map<std::string, KVIdentificationResult*> id_by_type;
42 
45  virtual void PostReconstructionProcessing();
46  virtual void IdentifyParticle(KVReconstructedNucleus& PART);
48  {
49  AbstractMethod("CalibrateParticle(KVReconstructedNucleus*)");
50  }
52  {
53  AbstractMethod("CalibrateCoherencyParticle(KVReconstructedNucleus*)");
54  }
56  {
58  PART.SetIsCalibrated();
59  PART.SetECode(code);
60  }
61 
64  {
65  return fPartSeedCond;
66  }
68 
80  };
81  std::vector<particle_to_add_from_coherency_analysis> coherency_particles;
82  virtual void AddCoherencyParticles() {};
83 
84 public:
86  virtual ~KVGroupReconstructor();
87 
88  void SetReconEventClass(TClass* c);
89  int GetNFiredDets() const
90  {
91  return nfireddets;
92  }
93 
95  {
96  return fGrpEvent;
97  }
98  virtual void SetGroup(KVGroup* g);
99  KVGroup* GetGroup() const
100  {
101  return fGroup;
102  }
103 
104  static KVGroupReconstructor* Factory(const TString& plugin = "");
105 
106  void Process();
107  void Reconstruct();
108  virtual void Identify();
109  void Calibrate();
110 
111  void AnalyseParticles();
113  {
115  Int_t n = 0;
116  if (GetEventFragment()->GetMult()) {
117  for (KVReconstructedEvent::Iterator it = GetEventFragment()->begin(); it != GetEventFragment()->end(); ++it) {
118  KVReconstructedNucleus& nuc = it.get_reference();
119  n += (Int_t) nuc.IsIdentified();
120  }
121  }
122  return n;
123  }
125  {
127  return (GetEventFragment()->GetMult() - GetNIdentifiedInGroup());
128  }
129  static void SetDoIdentification(bool on = kTRUE)
130  {
132  fDoIdentification = on;
133  }
134  static void SetDoCalibration(bool on = kTRUE)
135  {
137  fDoCalibration = on;
138  }
139 
140  ClassDef(KVGroupReconstructor, 0) //Base class for handling event reconstruction in detector groups
141 };
142 
143 #endif
int Int_t
unsigned short UShort_t
double Double_t
#define ClassDef(name, id)
Base class for KaliVeda framework.
Definition: KVBase.h:141
Path taken by particles through multidetector geometry.
Information on relative positions of detectors & particle trajectories.
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
KVIDTelescope * identifying_telescope
telescope which identified current particle
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 *)
virtual void AddCoherencyParticles()
int nfireddets
number of fired detectors in group for current event
KVGroup * fGroup
the group where we are reconstructing
void Calibrate()
Calculate and set energies of all identified but uncalibrated particles in event.
static void SetDoCalibration(bool on=kTRUE)
virtual void IdentifyParticle(KVReconstructedNucleus &PART)
virtual ~KVGroupReconstructor()
Destructor.
TString fPartSeedCond
condition for seeding reconstructed particles
Double_t GetTargetEnergyLossCorrection(KVReconstructedNucleus *ion)
void SetCalibrationStatus(KVReconstructedNucleus &PART, UShort_t code)
static void SetDoIdentification(bool on=kTRUE)
virtual void CalibrateCoherencyParticle(KVReconstructedNucleus *)
void SetReconEventClass(TClass *c)
Instantiate event fragment object.
TString GetPartSeedCond() const
KVIdentificationResult partID
identification to be applied to current particle
KVGroupReconstructor()
Default constructor.
void TreatStatusStopFirstStage(KVReconstructedNucleus &)
virtual void PostReconstructionProcessing()
static KVGroupReconstructor * Factory(const TString &plugin="")
virtual void SetGroup(KVGroup *g)
std::vector< particle_to_add_from_coherency_analysis > coherency_particles
Group of detectors which can be treated independently of all others in array.
Definition: KVGroup.h:19
Base class for all detectors or associations of detectors in array which can identify charged particl...
Definition: KVIDTelescope.h:83
Full result of one attempted particle identification.
Event containing KVReconstructedNucleus nuclei reconstructed from hits in detectors.
Nuclei reconstructed from data measured by a detector array .
Iterator end() const
void AbstractMethod(const char *method) const
const Int_t n
const long double g
masses
Definition: KVUnits.h:72
informations required to add a particle to the event which is revealed by an inconsistency between th...
Int_t max_id_result_index
last KVIdentificationResult in original_particle's list
Int_t first_id_result_to_copy
number of KVIdentificationResult (in original_particle's list) corresponding to identification of the...
KVIDTelescope * identifying_telescope
telescope which identified current particle
KVGeoDNTrajectory * stopping_trajectory
trajectory on which new particle stopped
KVReconstructedNucleus * original_particle
particle whose identification/calibration revealed presence of pile-up
KVGeoDetectorNode * stopping_detector_node
detector node in which new particle stopped