20 #include "KVASMultiDetArray.h"
21 #include "KVDetector.h"
22 #include "KVDetectorEvent.h"
23 #include "KVReconstructedEvent.h"
24 #include "KVEBYEDAT_ACQParam.h"
27 #include "KVTemplateEvent.h"
28 #include "KVNucleus.h"
29 #include "KVASGroup.h"
31 #include "KVTelescope.h"
32 #include "KVMaterial.h"
34 #include "KVIDTelescope.h"
39 #include <KVIDGridManager.h>
44 #include "KVHashList.h"
45 #include "KVNameValueList.h"
46 #include "KVUniqueNameList.h"
47 #include "KVIonRangeTable.h"
67 fCurrentLayerNumber = 0;
76 KVASMultiDetArray::~KVASMultiDetArray()
95 while ((kring1 = (
KVRing*) lay1_nextring())) {
96 while ((kring2 = (
KVRing*) lay2_nextring())) {
99 "SetGroups(KVLayer * l1, KVLayer * l2) - Looking at rings:" <<
101 cout <<
" kring1 - " << kring1->
GetName() <<
", " << kring1->
103 cout <<
" kring2 - " << kring2->
GetName() <<
", " << kring2->
108 cout <<
" +++ Calling UpdateGroupsInRings" << endl;
110 UpdateGroupsInRings(kring1, kring2);
112 lay2_nextring.
Reset();
131 AddToGroups(kvt1, kvt2);
150 TIter nextL(fLayers);
154 while ((k1 = (
KVLayer*) nextL())) {
156 while ((k2 = (
KVRing*) nextR())) {
193 TIter nextL(fLayers);
198 while ((k1 = (
KVLayer*) nextL())) {
200 while ((k2 = (
KVRing*) nextR())) {
215 TIter nextD(GetDetectors());
219 Info(
"MakeListOfDetectors",
"Success");
230 const Char_t* ring_name)
const
233 KVLayer* tmp = GetLayer(layer);
249 KVLayer* tmp = GetLayer(layer);
265 KVLayer* tmp = GetLayer(layer);
281 KVLayer* tmp = GetLayer(layer);
296 ClearStructures(
"GROUP");
301 TIter nxtlay1(fLayers);
305 TIter nxtlay2(fLayers);
308 while ((l1 = (
KVLayer*) nxtlay1())) {
309 while ((l2 = (
KVLayer*) nxtlay2())) {
323 while ((l1 = (
KVLayer*) nxtlay1())) {
327 while ((robj = (
KVRing*) nxtrng())) {
367 cout <<
"Making new Group from " << kt1->
368 GetName() <<
" and " << kt2->
GetName() << endl;
382 cout <<
"Adding " << kt2->
GetName() <<
" to group " << kvg->
393 cout <<
"Adding " << kt1->
GetName() <<
" to group " << kvg->
460 Warning(
"KVASMultiDetArray",
"Needs reimplementing");
518 while ((obj = (
KVGroup*) next())) {
519 if (((
KVASGroup*)obj)->IsInPolarRange(theta)
520 && ((
KVASGroup*)obj)->IsInPhiRange(phi)) {
544 tmp =
gr->GetTelescopesWithAngles(theta, phi);
573 return ftotal_solid_angle;
616 TIter next_det(det_lay.get());
623 GetAlignedIDTelescopesForDetector(det, tel_list);
627 GetAlignedIDTelescopesForDetector(det, 0);
646 if (
de->GetGroup()) {
688 Fatal(
"AnalyseGroupAndReconstructedEvent",
689 "All groups in KVASMultiDetArray must derive from KVASGroup! %s is NOT a KVASGroup", grp->
GetName());
704 AnalyseTelescopes(
event, kvtl);
711 if (grp->
GetHits() == initial_hits_in_group) {
715 AnalyseTelescopes(
event, kvtl);
724 Info(
"AnalyseGroup",
"Single layer group");
732 AnalyseTelescopes(
event, kvtl);
738 Info(
"AnalyseGroup",
"OK after analysis of hit groups");
758 if (max < t->GetDetectors()->GetSize())
765 for (
UInt_t i = ndet; i > 0; i--) {
778 Warning(
"AnalyseTelescopes",
"pointeur KVDetector NULL");
782 event->AnalyseDetectors(&detlist);
Group in axially-symmetric array (obsolete)
UInt_t GetLayerNearestTarget() const
UInt_t GetNumberOfLayers()
void SetDimensions(KVPosition *, KVPosition *)
UInt_t GetLayerFurthestTarget() const
KVNameValueList * DetectParticle(KVNucleus *part)
TList * GetTelescopesInLayer(UInt_t nlayer)
Base class for azimuthally-symmetric multidetector arrays (obsolete)
virtual void set_up_telescope(KVDetector *de, KVDetector *e, KVIDTelescope *idt, TCollection *l)
Set up detectors in de-e identification telescope and add to idtels.
virtual void MergeGroups(KVASGroup *kg1, KVASGroup *kg2)
KVRing * GetRing(const Char_t *layer, const Char_t *ring_name) const
find named ring in named layer
virtual void set_up_single_stage_telescope(KVDetector *det, KVIDTelescope *idt, TCollection *l)
Set up detector in single-stage identification telescope and add to idtels.
virtual Double_t GetTotalSolidAngle(void) const
KVNameValueList * DetectParticle_KV(KVNucleus *part)
KVTelescope * GetTelescope(const Char_t *name) const
Return pointer to telescope in array with name given by "name".
void MakeListOfDetectors()
void SetGroups(KVLayer *, KVLayer *)
Update the list of groups in the detector array by comparing all telescopes in two layers.
void UpdateGroupsInRings(KVRing *r1, KVRing *r2)
Calculate groups by comparing two rings in different layers.
virtual void AddToGroups(KVTelescope *kt1, KVTelescope *kt2)
void AnalyseGroupAndReconstructEvent(KVReconstructedEvent *event, KVGroup *grp)
void AnalyseTelescopes(KVReconstructedEvent *event, TList *kvtl)
virtual KVGroup * GetGroupWithAngles(Float_t theta, Float_t phi)
return pointer to group in array according to given polar coordinates
void GetIDTelescopesForGroup(KVGroup *grp, TCollection *tel_list)
TList * GetTelescopes(Float_t theta, Float_t phi)
void CalculateGroupsFromGeometry()
Base class for detector geometry description.
virtual const Char_t * GetArrayName()
virtual Bool_t IsOK() const
KVGroup * GetGroup() const
KVGeoDetectorNode * GetNode()
const KVSeqCollection * GetDetectors() const
const KVSeqCollection * GetStructures() const
KVGeoStrucElement * GetStructure(const Char_t *name) const
KVGeoStrucElement * GetParentStructure(const Char_t *type, const Char_t *name="") const
Group of detectors which can be treated independently of all others in array.
virtual void SetNumber(UInt_t num)
virtual TList * GetDetectorsInLayer(UInt_t lay)
virtual UInt_t GetNumberOfDetectorLayers()
Base class for all detectors or associations of detectors in array which can identify charged particl...
void SetGroup(KVGroup *kvg)
virtual void AddDetector(KVDetector *d)
Set of detectors at a similar distance from target (obsolete)
virtual Double_t GetTotalSolidAngle(void) const
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
Description of properties and kinematics of atomic nuclei.
Double_t GetTheta() const
virtual void SetAzimuthalMinMax(Double_t min, Double_t max)
Set min and max azimuthal angles and calculate (mean) phi.
virtual Double_t GetSolidAngle(void) const
Double_t GetPhiMax() const
Double_t GetPhiMin() const
Double_t GetThetaMin() const
virtual void SetPolarMinMax(Double_t min, Double_t max)
Set min and max polar angles and calculate (mean) theta.
Bool_t IsOverlappingWith(KVPosition *pos)
kTRUE if there is at least partial overlap between two solid angle elements
Double_t GetThetaMax() const
Event containing KVReconstructedNucleus nuclei reconstructed from hits in detectors.
static void AnalyseParticlesInGroup(KVGroup *grp)
Ring in INDRA array (obsolete)
const KVSeqCollection * GetTelescopes() const
KaliVeda extensions to ROOT collection classes.
virtual Int_t GetSize() const
KVSeqCollection * GetSubListWithType(const Char_t *retvalue) const
Associates two detectors placed one behind the other.
KVDetector * GetDetector(Int_t n) const
Optimised list in which named objects can only be placed once.
virtual void Add(TObject *obj)=0
TObject * FindObject(const char *name) const override
void Add(TObject *obj) override
const char * GetName() const override
virtual void SetName(const char *name)
virtual Bool_t InheritsFrom(const char *classname) const
double max(double x, double y)
Type GetType(const std::string &Name)