NCFS-Pack
A generic (astro)particle physics analysis framework
 
Loading...
Searching...
No Matches
NcDetectorUnit Class Reference

Handling of a collection of generic devices. More...

#include "NcDetectorUnit.h"

Inheritance diagram for NcDetectorUnit:
NcDevice NcSignal NcPosition NcAttrib Nc3Vector NcDetector RnoStation RnoString RnoDetector

Detailed Description

Handling of a collection of generic devices.


Copyright(c) 2021 NCFS/IIHE, All Rights Reserved. *
*
Authors: The Netherlands Center for Fundamental Studies (NCFS). *
The Inter-university Institute for High Energies (IIHE). *
Website : http://www.iihe.ac.be *
Contact : Nick van Eijndhoven (nickve.nl@gmail.com) *
*
Contributors are mentioned in the code where appropriate. *
*
No part of this software may be used, copied, modified or distributed *
by any means nor transmitted or translated into machine language for *
commercial purposes without written permission by the IIHE representative. *
Permission to use the software strictly for non-commercial purposes *
is hereby granted without fee, provided that the above copyright notice *
appears in all copies and that both the copyright notice and this *
permission notice appear in the supporting documentation. *
This software is provided "as is" without express or implied warranty. *
The authors make no claims that this software is free of error, or is *
consistent with any particular standard of merchantability, or that it *
will meet your requirements for any particular application, other than *
indicated in the corresponding documentation. *
This software should not be relied on for solving a problem whose *
incorrect solution could result in injury to a person or loss of property. *
If you do use this software in such a manner, it is at your own risk. *
The authors disclaim all liability for direct or consequential damage *
resulting from your use of this software. *

// Class NcDetectorUnit
// Handling of a collection of generic devices.
//
// This class provides a facility to build up a hierarchical structure
// to store detector signals.
// Detector signals are represented by NcSignal objects that belong to
// NcDevice objects. An Ncsignal object that is related to an NcDevice
// is called a "hit" and can be stored in the NcDevice via the
// generic AddHit memberfunction.
// A group of NcDevice objects may be combined in an NcDetectorUnit object
// to represent a certain sub-detector system, and several NcDetectorUnit
// objects may finally be combined into an NcDetector object to represent
// the complete experimental setup.
// Combination of these various detector elements is performed by the
// generic AddDevice memberfunction.
//
// To provide maximal flexibility to the user, two modes can be used for the storage
// of devices which can be selected by means of the memberfunction SetDevCopy().
//
// a) SetDevCopy(0).
// Only the pointers of the 'added' devices are stored.
// This mode is typically used by making studies based on a fixed set
// of devices which stays under user control or is kept on an external
// file/tree.
// In this way the NcDetectorUnit just represents a 'logical structure' for the
// analysis of the various detector components and the recorded signals.
//
// Note :
// Modifications made to the original devices also affect the device
// objects which are stored in the NcDetectorUnit structure.
//
// b) SetDevCopy(1) (which is the default).
// Of every 'added' device a private copy will be made of which the pointer
// will be stored.
// In this way the NcDetectorUnit represents an entity on its own and modifications
// made to the original devices do not affect the NcDevice (or derived) objects
// which are stored in the NcDetectorUnit.
// This mode will allow 'adding' many different devices into an NcDetectorUnit by
// creating only one device instance in the main programme and using the
// Reset() and parameter setting memberfunctions of the object representing the device.
//
// Note :
// The copy is made using the Clone() memberfunction.
// All devices (i.e. classes derived from TObject) have the default TObject::Clone()
// memberfunction.
// However, devices generally contain an internal (signal) data structure
// which may include pointers to other objects. Therefore it is recommended to provide
// for all devices a specific copy constructor and override the default Clone()
// memberfunction using this copy constructor.
// Examples for this may be seen from NcCalorimeter, NcSignal and NcDevice.
//
// See also the documentation provided for the memberfunction SetOwner().
//
// Please refer to the documentation of NcDetector for further details.
//
//--- Author: Nick van Eijndhoven, IIHE-VUB, Brussel, June 22, 2021 08:40Z
//- Modified: Nick van Eijndhoven, IIHE-VUB, Brussel, July 14, 2021 12:56Z

Definition at line 16 of file NcDetectorUnit.h.

Public Member Functions

 NcDetectorUnit (const char *name="", const char *title="")
 
 NcDetectorUnit (const NcDetectorUnit &q)
 
virtual ~NcDetectorUnit ()
 
void AddDevice (NcDevice &d)
 
void AddDevice (NcDevice *d)
 
virtual TObject * Clone (const char *name="") const
 
virtual void Data (TString f="car", TString u="rad")
 
virtual void Data (TString f="car", TString u="rad") const
 
void DisplayHits (TString classname, Bool_t follow, Bool_t inc, Int_t idx=1, Float_t scale=-1, Int_t dp=0, Int_t mode=1, Int_t mcol=4)
 
void DisplayHits (TString classname, Bool_t follow, Bool_t inc, TString name, Float_t scale=-1, Int_t dp=0, Int_t mode=1, Int_t mcol=4)
 
NcDetectorUnitGetDetectorUnit (TString name, Bool_t follow)
 
Int_t GetDevCopy () const
 
NcDeviceGetDevice (Int_t i) const
 
NcDeviceGetDevice (TString name, Bool_t follow)
 
TObjArray * GetDevices (TString classname, Bool_t follow, TObjArray *devices=0)
 
TObjArray * GetHitsDevices (TString classname, Bool_t follow, Bool_t inc, TObjArray *hits=0, TString name="none", Int_t mode=0, Int_t opt=0)
 
NcDetectorUnitGetIdDetectorUnit (Int_t id, Bool_t follow, TObjArray *devs=0)
 
NcDetectorUnitGetIdDetectorUnit (Int_t id, TString classname, Bool_t follow)
 
NcDeviceGetIdDevice (Int_t id, Bool_t follow, TObjArray *devs=0)
 
NcDeviceGetIdDevice (Int_t id, TString classname, Bool_t follow)
 
NcSignalGetIdHit (Int_t id, TString classname, Bool_t follow, Bool_t inc)
 
Int_t GetNdevices (Bool_t follow)
 
Int_t GetNdevices (TString classname, Bool_t follow, TObjArray *hits=0)
 
Int_t GetNhitsDevices (TString classname, Bool_t follow, Bool_t inc)
 
void RemoveDevice (NcDevice *d)
 
virtual void Reset (Int_t mode=0)
 
void SetDevCopy (Int_t j)
 
virtual void SetOwner (Bool_t own=kTRUE)
 
void ShowDevices (Int_t mode=1, Bool_t header=kTRUE)
 
void ShowDevices (TString classname, Int_t mode=1, Bool_t header=kTRUE)
 
void ShowHits (TString classname, Bool_t follow, Bool_t inc, Int_t mode=1, TString f="car", TString u="rad")
 
TObjArray * SortDevices (TObjArray *hits, Int_t idx=1, Int_t mode=-1, Int_t mcal=1, Int_t deadcheck=1, TObjArray *ordered=0)
 
TObjArray * SortDevices (TObjArray *hits, TString name, Int_t mode=-1, Int_t mcal=1, Int_t deadcheck=1, TObjArray *ordered=0)
 
TObjArray * SortDevices (TString classname, Bool_t follow, Bool_t inc, Int_t idx=1, Int_t mode=-1, Int_t mcal=1, Int_t deadcheck=1, TObjArray *ordered=0)
 
TObjArray * SortDevices (TString classname, Bool_t follow, Bool_t inc, TString name, Int_t mode=-1, Int_t mcal=1, Int_t deadcheck=1, TObjArray *ordered=0)
 
TObjArray * SortHits (Int_t idx=1, Int_t mode=-1, TObjArray *hits=0, Int_t mcal=1, Int_t deadcheck=1, TObjArray *ordered=0)
 
TObjArray * SortHits (TString classname, Bool_t follow, Bool_t inc, Int_t idx=1, Int_t mode=-1, Int_t mcal=1, Int_t deadcheck=1, TObjArray *ordered=0)
 
TObjArray * SortHits (TString classname, Bool_t follow, Bool_t inc, TString name, Int_t mode=-1, Int_t mcal=1, Int_t deadcheck=1, TObjArray *ordered=0)
 
TObjArray * SortHits (TString name, Int_t mode=-1, TObjArray *hits=0, Int_t mcal=1, Int_t deadcheck=1, TObjArray *ordered=0)
 
- Public Member Functions inherited from NcDevice
 NcDevice (const char *name="", const char *title="")
 
 NcDevice (const NcDevice &dev)
 
virtual ~NcDevice ()
 
void AddHit (NcSignal &s)
 
void AddHit (NcSignal *s)
 
void DisplayHits (Int_t idx=1, Float_t scale=-1, TObjArray *hits=0, Int_t dp=0, Int_t mode=1, Int_t mcol=4)
 
void DisplayHits (TString name, Float_t scale=-1, TObjArray *hits=0, Int_t dp=0, Int_t mode=1, Int_t mcol=4)
 
NcPosition GetCOG (TObjArray *hits, Int_t pos=0, TString slotname="none", Int_t mode=0) const
 
Double_t GetCVAL (TObjArray *hits, TString obsname, TString weightname="none", Int_t mode=0, Int_t type=1) const
 
void GetExtremes (Float_t &vmin, Float_t &vmax, Int_t idx=1, TObjArray *hits=0, Int_t mode=1, Int_t deadcheck=1) const
 
void GetExtremes (Float_t &vmin, Float_t &vmax, TString name, TObjArray *hits=0, Int_t mode=1, Int_t deadcheck=1) const
 
NcSignalGetHit (Int_t j) const
 
NcSignalGetHit (TString name, Int_t mode=0, Int_t opt=0) const
 
Int_t GetHitCopy () const
 
Nc3Vector GetHitPath (TObjArray *hits, Int_t pos=0) const
 
TObjArray * GetHits ()
 
void GetHits (TObjArray &selected, TString name, Int_t mode=0, Int_t opt=0, TObjArray *hits=0) const
 
NcSignalGetIdHit (Int_t id) const
 
Int_t GetNhits () const
 
Int_t GetNhits (TString name, Int_t mode=0, Int_t opt=0) const
 
Int_t GetStatus () const
 
void RemoveHit (NcSignal &s)
 
void RemoveHit (NcSignal *s)
 
void RemoveHits ()
 
void SetHitCopy (Int_t j)
 
void SetStatus (Int_t word)
 
void ShowHit (Int_t j=0, TString f="car", TString u="rad") const
 
Double_t SlideWindow (TObjArray *hits, Double_t thres, Double_t swin, TString sname, Int_t smode=0, TString wname="none", Int_t wmode=0, Int_t *i1=0, Int_t *i2=0) const
 
TObjArray * SortHits (Int_t idx=1, Int_t mode=-1, TObjArray *hits=0, Int_t mcal=1, Int_t deadcheck=1, TObjArray *ordered=0)
 
TObjArray * SortHits (TString name, Int_t mode=-1, TObjArray *hits=0, Int_t mcal=1, Int_t deadcheck=1, TObjArray *ordered=0)
 
Double_t SumSignals (Int_t idx, Int_t mode=1, TObjArray *hits=0)
 
Double_t SumSignals (TString name, Int_t mode=1, TObjArray *hits=0)
 
- Public Member Functions inherited from NcSignal
 NcSignal (const char *name="", const char *title="")
 
 NcSignal (const NcSignal &s)
 
virtual ~NcSignal ()
 
void AddLink (TObject *obj, Int_t j=1)
 
void AddLink (TObject *obj, TString name)
 
virtual void AddSignal (Double_t sig, Int_t j=1)
 
virtual void AddSignal (Double_t sig, TString name)
 
void AddTrack (NcTrack &t, Int_t mode=1)
 
void DeleteSample (Int_t j=1)
 
void DeleteSample (TString name)
 
virtual void DeleteSignals (Int_t mode=0)
 
void DeleteWaveform (Int_t j=1)
 
void DeleteWaveform (TString name)
 
NcSampleDisplaySample (Int_t j=1, Int_t i=1) const
 
NcSampleDisplaySample (TString name, Int_t i=1) const
 
NcDeviceGetDevice () const
 
Int_t GetErrorFlag (Int_t j=1) const
 
Int_t GetErrorFlag (TString name) const
 
NcTrackGetIdTrack (Int_t id) const
 
Int_t GetIndices (TObject *obj, Int_t j, TArrayI &ks) const
 
Int_t GetIndices (TObject *obj, TArrayI &js, Int_t k) const
 
Int_t GetIndices (TObject *obj, TArrayI &js, TArrayI &ks) const
 
Int_t GetIndices (TObject *obj, TString name, TArrayI &ks) const
 
TObject * GetLink (Int_t j=1, Int_t k=1) const
 
TObject * GetLink (TString name, Int_t k=1) const
 
Int_t GetNerrors () const
 
Int_t GetNlinks (TObject *obj, TString name) const
 
Int_t GetNlinks (TObject *obj=0, Int_t j=0) const
 
Int_t GetNsamples () const
 
virtual Int_t GetNslots () const
 
Int_t GetNtracks (NcTrack *t=0) const
 
Int_t GetNvalues () const
 
Int_t GetNwaveforms () const
 
NcSampleGetSample (Int_t j=1) const
 
NcSampleGetSample (TString name) const
 
Int_t GetSampleIndex (TString name) const
 
virtual Float_t GetSignal (Int_t j=1, Int_t mode=0) const
 
virtual Float_t GetSignal (TString name, Int_t mode=0) const
 
virtual Float_t GetSignalError (Int_t j=1) const
 
virtual Float_t GetSignalError (TString name) const
 
Int_t GetSignalFlag (Int_t j=1) const
 
Int_t GetSignalFlag (TString name) const
 
Int_t GetSwapMode () const
 
NcTrackGetTrack (Int_t j) const
 
TH1F * GetWaveform (Int_t j=1) const
 
TH1F * GetWaveform (TString name) const
 
Int_t GetWaveformIndex (TString name) const
 
virtual void List (Int_t j=0) const
 
virtual void List (TString name) const
 
void ListSample (Int_t j=0) const
 
void ListTrack (Int_t j=0) const
 
void ListWaveform (Int_t j=0) const
 
void RemoveTrack (NcTrack &t, Int_t mode=1)
 
void RemoveTracks (Int_t mode=1)
 
void ResetLink (Int_t j=1, Int_t k=1)
 
void ResetLink (TString name, Int_t k=1)
 
void ResetLinks (TObject *obj, Int_t j=0, Int_t k=0)
 
void ResetLinks (TObject *obj, TString name, Int_t k=0)
 
void ResetSample (Int_t j=1)
 
void ResetSample (TString name)
 
virtual void ResetSignals (Int_t mode=0)
 
void ResetWaveform (Int_t j=1)
 
void ResetWaveform (TString name)
 
void SetDevice (NcDevice *dev)
 
void SetLink (TObject *obj, Int_t j=1, Int_t k=1)
 
void SetLink (TObject *obj, TString name, Int_t k=1)
 
void SetSample (NcSample *sample, Int_t j=1)
 
virtual void SetSignal (Double_t sig, Int_t j=1)
 
virtual void SetSignal (Double_t sig, TString name)
 
virtual void SetSignalError (Double_t dsig, Int_t j=1)
 
virtual void SetSignalError (Double_t dsig, TString name)
 
void SetSwapMode (Int_t swap=1)
 
void SetWaveform (TH1F *waveform, Int_t j=1)
 
- Public Member Functions inherited from NcPosition
 NcPosition ()
 
 NcPosition (const NcPosition &p)
 
virtual ~NcPosition ()
 
Double_t GetDistance (NcPosition &p, Float_t scale=-1)
 
Double_t GetDistance (NcPosition *p, Float_t scale=-1)
 
NcPositionGetPosition ()
 
void GetPosition (Double_t *r, TString f, TString u="rad", Float_t s=-1) const
 
void GetPosition (Float_t *r, TString f, TString u="rad", Float_t s=-1) const
 
void GetPositionErrors (Double_t *e, TString f, TString u="rad", Float_t s=-1) const
 
void GetPositionErrors (Float_t *e, TString f, TString u="rad", Float_t s=-1) const
 
NcTimestampGetTimestamp ()
 
Float_t GetUnitScale () const
 
void RemoveTimestamp ()
 
void ResetPosition ()
 
void SetPosition (Double_t *r, TString f, TString u="rad")
 
void SetPosition (Double_t r1, Double_t r2, Double_t r3, TString f, TString u="rad")
 
void SetPosition (Float_t *r, TString f, TString u="rad")
 
void SetPosition (Nc3Vector &r)
 
void SetPositionErrors (Double_t *e, TString f, TString u="rad")
 
void SetPositionErrors (Double_t e1, Double_t e2, Double_t e3, TString f, TString u="rad")
 
void SetPositionErrors (Float_t *e, TString f, TString u="rad")
 
void SetTimestamp (NcTimestamp &t)
 
void SetUnitScale (Float_t s)
 
- Public Member Functions inherited from Nc3Vector
 Nc3Vector ()
 
 Nc3Vector (const Nc3Vector &v)
 
virtual ~Nc3Vector ()
 
Double_t ConvertAngle (Double_t a, TString in, TString out) const
 
Nc3Vector Cross (Nc3Vector &q) const
 
Double_t Dot (Nc3Vector &q)
 
void GetErrors (Double_t *e, TString f, TString u="rad") const
 
void GetErrors (Float_t *e, TString f, TString u="rad") const
 
Double_t GetNorm ()
 
virtual Double_t GetOpeningAngle (Nc3Vector &q, TString u="rad")
 
Nc3Vector GetPrimed (TRotMatrix *m) const
 
Double_t GetPseudoRapidity ()
 
Double_t GetResultError () const
 
Nc3Vector GetUnprimed (TRotMatrix *m) const
 
Nc3Vector GetVecLong () const
 
void GetVector (Double_t *v, TString f, TString u="rad") const
 
void GetVector (Float_t *v, TString f, TString u="rad") const
 
Nc3Vector GetVecTrans () const
 
Double_t GetX (Int_t i, TString f, TString u="rad")
 
Int_t HasErrors () const
 
Int_t HasVector () const
 
virtual void Load (Nc3Vector &q)
 
Nc3Vector operator* (Double_t s) const
 
Nc3Vectoroperator*= (Double_t s)
 
Nc3Vector operator+ (Nc3Vector &q) const
 
Nc3Vectoroperator+= (Nc3Vector &q)
 
Nc3Vector operator- (Nc3Vector &q) const
 
Nc3Vectoroperator-= (Nc3Vector &q)
 
Nc3Vector operator/ (Double_t s) const
 
Nc3Vectoroperator/= (Double_t s)
 
Nc3Vectoroperator= (const Nc3Vector &q)
 
void PrintAngle (Double_t a, TString in, TString out, Int_t ndig=1, Bool_t align=kFALSE) const
 
void SetErrors (Double_t *e, TString f, TString u="rad")
 
void SetErrors (Double_t e1, Double_t e2, Double_t e3, TString f, TString u="rad")
 
void SetErrors (Float_t *e, TString f, TString u="rad")
 
void SetVector (Double_t *v, TString f, TString u="rad")
 
void SetVector (Double_t v1, Double_t v2, Double_t v3, TString f, TString u="rad")
 
void SetVector (Float_t *v, TString f, TString u="rad")
 
virtual void SetZero ()
 
- Public Member Functions inherited from NcAttrib
 NcAttrib ()
 
 NcAttrib (const NcAttrib &a)
 
virtual ~NcAttrib ()
 
void AddNamedSlot (TString s)
 
void DecreaseEdgeValue (Int_t j=1)
 
void DecreaseEdgeValue (TString name)
 
void DeleteCalibrations (Int_t mode=0)
 
TF1 * GetCalFunction (Int_t j=1) const
 
TF1 * GetCalFunction (TString name) const
 
Int_t GetCalWord (Int_t j=1) const
 
Int_t GetCalWord (TString name) const
 
Int_t GetDeadValue (Int_t j=1) const
 
Int_t GetDeadValue (TString name) const
 
TF1 * GetDecalFunction (Int_t j=1) const
 
TF1 * GetDecalFunction (TString name) const
 
Int_t GetEdgeValue (Int_t j=1) const
 
Int_t GetEdgeValue (TString name) const
 
Float_t GetGain (Int_t j=1) const
 
Float_t GetGain (TString name) const
 
Int_t GetGainFlag (Int_t j=1) const
 
Int_t GetGainFlag (TString name) const
 
Int_t GetLockValue (Int_t j=1) const
 
Int_t GetLockValue (TString name) const
 
Int_t GetNcalflags () const
 
Int_t GetNcalfuncs () const
 
Int_t GetNdecalfuncs () const
 
Int_t GetNgains () const
 
Int_t GetNnames () const
 
Int_t GetNoffsets () const
 
Float_t GetOffset (Int_t j=1) const
 
Float_t GetOffset (TString name) const
 
Int_t GetOffsetFlag (Int_t j=1) const
 
Int_t GetOffsetFlag (TString name) const
 
Int_t GetSlotIndex (TString name, Int_t opt=0) const
 
TString GetSlotName (Int_t j=1) const
 
void IncreaseEdgeValue (Int_t j=1)
 
void IncreaseEdgeValue (TString name)
 
virtual void Load (NcAttrib &a, Int_t j=0)
 
virtual void Load (NcAttrib &a, TString name)
 
void Lock (Int_t j=1)
 
void Lock (TString name)
 
void ResetGain (Int_t j=1)
 
void ResetGain (TString name)
 
void ResetOffset (Int_t j=1)
 
void ResetOffset (TString name)
 
void SetAlive (Int_t j=1)
 
void SetAlive (TString name)
 
void SetCalFunction (TF1 *f, Int_t j=1)
 
void SetCalFunction (TF1 *f, TString name)
 
void SetDead (Int_t j=1)
 
void SetDead (TString name)
 
void SetDecalFunction (TF1 *f, Int_t j=1)
 
void SetDecalFunction (TF1 *f, TString name)
 
void SetEdgeOff (Int_t j=1)
 
void SetEdgeOff (TString name)
 
void SetEdgeOn (Int_t j=1)
 
void SetEdgeOn (TString name)
 
void SetEdgeValue (Int_t val, Int_t j=1)
 
void SetEdgeValue (Int_t val, TString name)
 
void SetGain (Double_t gain, Int_t j=1)
 
void SetGain (Double_t gain, TString name)
 
void SetOffset (Double_t off, Int_t j=1)
 
void SetOffset (Double_t off, TString name)
 
void SetSlotName (TString s, Int_t j=1)
 
void Unlock (Int_t j=1)
 
void Unlock (TString name)
 

Protected Member Functions

void LoadDevices (TString classname, Bool_t follow, TObjArray *hits=0, NcDetectorUnit *unit=0)
 
void LoadHits (TString classname, Bool_t follow, Bool_t inc, TObjArray *hits=0, NcDetectorUnit *unit=0)
 
void ShowDevicesTree (TString classname, Int_t mode=1, NcDetectorUnit *unit=0)
 
- Protected Member Functions inherited from NcSignal
void SetSigFlags (Int_t is, Int_t ie, Int_t j)
 
- Protected Member Functions inherited from NcAttrib
void SetCalFlags (Int_t gf, Int_t of, Int_t j)
 

Protected Attributes

Int_t fDevCopy
 
TObjArray * fDevices
 
TObjArray * fDevs
 ! Temp. array to hold references to user selected devices
 
TObject * fDisplay
 ! Temp. pointer to hold objects which serve event displays
 
TObjArray * fOrdered
 ! Temp. array to hold references to various ordered objects
 
TObjArray * fThits
 ! Temp. array to hold references to the registered NcDevice hits
 
- Protected Attributes inherited from NcDevice
Int_t fHitCopy
 
TObjArray * fHits
 
TObjArray * fMarkers
 ! Temp. array to hold the 3D markers for the hit display
 
TObjArray * fOrdered
 ! Temp. array to hold the ordered hits
 
Int_t fStatus
 
- Protected Attributes inherited from NcSignal
TObject * fDevice
 
TArrayF * fDsignals
 
NcObjMatrixfLinks
 
TObjArray * fSamples
 
TArrayI * fSigflags
 
TArrayF * fSignals
 
TObjArray * fTracks
 
TObjArray * fWaveforms
 
- Protected Attributes inherited from NcPosition
Float_t fScale
 
NcTimestampfTstamp
 
- Protected Attributes inherited from Nc3Vector
Double32_t fDresult
 ! Error on scalar result (e.g. norm or dotproduct)
 
Int_t fNv
 
Double32_t * fV
 
- Protected Attributes inherited from NcAttrib
TArrayI * fCalflags
 
TObjArray * fCalfuncs
 
TObjArray * fDecalfuncs
 
TArrayF * fGains
 
TObjArray * fNames
 
TArrayF * fOffsets
 

Additional Inherited Members

- Public Attributes inherited from NcSignal
Bool_t fDevset
 

Constructor & Destructor Documentation

◆ NcDetectorUnit() [1/2]

NcDetectorUnit::NcDetectorUnit ( const char * name = "",
const char * title = "" )
// Default constructor.
//
// By default NO private copies will be made of the added devices.
// See the memberfunction SetDevCopy() to change this.

Definition at line 102 of file NcDetectorUnit.cxx.

◆ ~NcDetectorUnit()

NcDetectorUnit::~NcDetectorUnit ( )
virtual
// Default destructor.

Definition at line 121 of file NcDetectorUnit.cxx.

◆ NcDetectorUnit() [2/2]

NcDetectorUnit::NcDetectorUnit ( const NcDetectorUnit & q)
// Copy constructor.

Definition at line 156 of file NcDetectorUnit.cxx.

Member Function Documentation

◆ AddDevice() [1/2]

void NcDetectorUnit::AddDevice ( NcDevice & d)
// Add a device to the detector unit.
//
// Note :
// In case a private copy is made, this is performed via the Clone() memberfunction.
// All devices (i.e. classes derived from TObject) have the default TObject::Clone()
// memberfunction.
// However, devices generally contain an internal (signal) data structure
// which may include pointers to other objects. Therefore it is recommended to provide
// for all devices a specific copy constructor and override the default Clone()
// memberfunction using this copy constructor.
// An example for this may be seen from NcCalorimeter.

Definition at line 337 of file NcDetectorUnit.cxx.

◆ AddDevice() [2/2]

void NcDetectorUnit::AddDevice ( NcDevice * d)
inline

Definition at line 30 of file NcDetectorUnit.h.

◆ Clone()

TObject * NcDetectorUnit::Clone ( const char * name = "") const
virtual
// Make a deep copy of the current object and provide the pointer to the copy.
// This memberfunction enables automatic creation of new objects of the
// correct type depending on the object type, a feature which may be very useful
// for containers like NcEvent when adding objects in case the
// container owns the objects. This feature allows e.g. NcEvent to store
// either NcDetectorUnit objects or objects derived from NcDetectorUnit
// via tha AddDevice memberfunction, provided these derived classes also have
// a proper Clone memberfunction.

Reimplemented from NcDevice.

Reimplemented in NcDetector, RnoDetector, RnoStation, and RnoString.

Definition at line 2069 of file NcDetectorUnit.cxx.

◆ Data() [1/2]

void NcDetectorUnit::Data ( TString f = "car",
TString u = "rad" )
virtual
// Provide detector unit information within the coordinate frame f.
//
// The string argument "u" allows to choose between different angular units
// in case e.g. a spherical frame is selected.
// u = "rad" : angles provided in radians
// "deg" : angles provided in degrees
//
// The defaults are f="car" and u="rad".

Definition at line 840 of file NcDetectorUnit.cxx.

◆ Data() [2/2]

void NcDevice::Data ( TString f = "car",
TString u = "rad" ) const
virtual
// Print the device and all registered hit info according to the specified
// coordinate frame f.
//
// The string argument "u" allows to choose between different angular units
// in case e.g. a spherical frame is selected.
// u = "rad" : angles provided in radians
// "deg" : angles provided in degrees
//
// The defaults are f="car" and u="rad".

Reimplemented from NcDevice.

Definition at line 39 of file NcDevice.cxx.

◆ DisplayHits() [1/2]

void NcDetectorUnit::DisplayHits ( TString classname,
Bool_t follow,
Bool_t inc,
Int_t idx = 1,
Float_t scale = -1,
Int_t dp = 0,
Int_t mode = 1,
Int_t mcol = 4 )
// 3D color display of the various hits registered to the specified device (or derived) class.
// For classname="*", no selection on the device class will be performed.
//
// follow = kTRUE ==> Search all hits related this NcDetectorUnit at any level
// kFALSE ==> Only search the hits directly linked to this NcDetectorUnit
//
// inc = kFALSE --> Do NOT include the hits stored in the NcDetectorUnit itself
// kTRUE --> Include the hits stored in the NcDetectorUnit itself
// if it satisfies the specified device class.
//
// The user can specify the index (default=1) of the signal slot to perform the display for.
// The marker size will indicate the absolute value of the signal (specified by the slotindex)
// as a percentage of the input argument "scale".
// In case scale<0 the maximum absolute signal value encountered in the hit array will be used
// to define the 100% scale. The default is scale=-1.
// In case dp=1 the owning device position will be used, otherwise the hit position will
// be used in the display. The default is dp=0.
// Via the "mcol" argument the user can specify the marker color (see TAttMarker).
// The default is mcol=4 (blue).
// Signals which were declared as "Dead" will not be displayed.
// The gain etc... corrected signals will be used to determine the marker size.
// The gain correction is performed according to "mode" argument. The definition of this
// "mode" parameter corresponds to the description provided in the GetSignal
// memberfunction of class NcSignal.
// The default is mode=1 (for backward compatibility reasons).
//
// For more extended functionality see class NcDevice.
//
// Note :
// ------
// Before any display activity, a TCanvas and a TView have to be initiated
// first by the user like for instance
//
// TCanvas* c1=new TCanvas("c1","c1");
// TView* view=new TView(1);
// view->SetRange(-1000,-1000,-1000,1000,1000,1000);
// view->ShowAxis();

Definition at line 1408 of file NcDetectorUnit.cxx.

◆ DisplayHits() [2/2]

void NcDetectorUnit::DisplayHits ( TString classname,
Bool_t follow,
Bool_t inc,
TString name,
Float_t scale = -1,
Int_t dp = 0,
Int_t mode = 1,
Int_t mcol = 4 )
// 3D color display of the various hits registered to the specified device (or derived) class.
// For classname="*", no selection on the device class will be performed.
//
// follow = kTRUE ==> Search all hits related this NcDetectorUnit at any level
// kFALSE ==> Only search the hits directly linked to this NcDetectorUnit
//
// inc = kFALSE --> Do NOT include the hits stored in the NcDetectorUnit itself
// kTRUE --> Include the hits stored in the NcDetectorUnit itself
// if it satisfies the specified device class.
//
// The user can specify the name of the signal slot to perform the display for.
// The marker size will indicate the absolute value of the signal (specified by the slotname)
// as a percentage of the input argument "scale".
// In case scale<0 the maximum absolute signal value encountered in the hit array will be used
// to define the 100% scale. The default is scale=-1.
// In case dp=1 the owning device position will be used, otherwise the hit position will
// be used in the display. The default is dp=0.
// The marker size will indicate the percentage of the maximum encountered value
// of the absolute value of the name-specified input signal slots.
// Via the "mcol" argument the user can specify the marker color (see TAttMarker).
// The default is mcol=4 (blue).
// Signals which were declared as "Dead" will not be displayed.
// The gain etc... corrected signals will be used to determine the marker size.
// The gain correction is performed according to "mode" argument. The definition of this
// "mode" parameter corresponds to the description provided in the GetSignal
// memberfunction of class NcSignal.
// The default is mode=1 (for backward compatibility reasons).
//
// For more extended functionality see class NcDevice.
//
// Note :
// ------
// Before any display activity, a TCanvas and a TView have to be initiated
// first by the user like for instance
//
// TCanvas* c1=new TCanvas("c1","c1");
// TView* view=new TView(1);
// view->SetRange(-1000,-1000,-1000,1000,1000,1000);
// view->ShowAxis();

Definition at line 1470 of file NcDetectorUnit.cxx.

◆ GetDetectorUnit()

NcDetectorUnit * NcDetectorUnit::GetDetectorUnit ( TString name,
Bool_t follow )
// Return the detector unit with name tag "name".
//
// follow = kTRUE ==> Search all detector units related this NcDetectorUnit at any level
// kFALSE ==> Only search the detector units directly linked to this NcDetectorUnit

Definition at line 710 of file NcDetectorUnit.cxx.

◆ GetDevCopy()

Int_t NcDetectorUnit::GetDevCopy ( ) const
// Provide value of the DevCopy mode.
// 0 ==> No private copies are made; pointers of original devices are stored.
// 1 ==> Private copies of the devices are made and these pointers are stored.
//
// Note :
// In case a private copy is made, this is performed via the Clone() memberfunction.
// All devices (i.e. classes derived from TObject) have the default TObject::Clone()
// memberfunction.
// However, devices generally contain an internal (signal) data structure
// which may include pointers to other objects. Therefore it is recommended to provide
// for all devices a specific copy constructor and override the default Clone()
// memberfunction using this copy constructor.
// An example for this may be seen from NcCalorimeter.

Definition at line 241 of file NcDetectorUnit.cxx.

◆ GetDevice() [1/2]

NcDevice * NcDetectorUnit::GetDevice ( Int_t i) const
// Return the i-th device of this detector unit.
// The first device corresponds to i=1.

Definition at line 495 of file NcDetectorUnit.cxx.

◆ GetDevice() [2/2]

NcDevice * NcDetectorUnit::GetDevice ( TString name,
Bool_t follow )
// Return the device with name tag "name".
//
// follow = kTRUE ==> Search all devices related this NcDetectorUnit at any level
// kFALSE ==> Only search the devices directly linked to this NcDetectorUnit

Definition at line 524 of file NcDetectorUnit.cxx.

◆ GetDevices()

TObjArray * NcDetectorUnit::GetDevices ( TString classname,
Bool_t follow,
TObjArray * devices = 0 )
// Provide the references to the various devices derived from the specified class.
// For classname="*", no selection on the device class will be performed.
//
// follow = kTRUE ==> Search all devices related this NcDetectorUnit at any level
// kFALSE ==> Only search the devices directly linked to this NcDetectorUnit
//
// Note :
// ------
// In case devices=0 the selected device pointers are returned via a multi-purpose array,
// which will be overwritten by subsequent selections.
// It is recommended to provide a user defined array via the argument "devices" in order to
// omit the danger of overwriting the selection and to allow to use the selected device list
// amongst other selections.
// In case a user defined array "devices" is provided, this memberfunction returns 0 for the
// return argument.
//
// The default is devices=0.

Definition at line 652 of file NcDetectorUnit.cxx.

◆ GetHitsDevices()

TObjArray * NcDetectorUnit::GetHitsDevices ( TString classname,
Bool_t follow,
Bool_t inc,
TObjArray * hits = 0,
TString name = "none",
Int_t mode = 0,
Int_t opt = 0 )
// Provide the references to all the hits registered to the device (or derived) class
// as specified by the input argument "classname".
// The specified device class has to be derived from NcDevice.
// For classname="*", no selection on the device class will be performed.
//
// follow = kTRUE ==> Search all hits related this NcDetectorUnit at any level
// kFALSE ==> Only search the hits directly linked to this NcDetectorUnit
//
// inc = kFALSE --> Do NOT include the hits stored in the NcDetectorUnit itself
// kTRUE --> Include the hits stored in the NcDetectorUnit itself
// if it satisfies the specified device class.
//
// It is possible to indicate with the argument "classname" a specific
// device instead of a whole class of devices. However, in such a case
// it is more efficient to use the GetDevice() memberfunction directly.
//
// The argument "hits" may be used to retreive the required hit pointers.
// In case hits=0 the selected hit pointers are returned via a multi-purpose array,
// which will be overwritten by subsequent selections.
// It is recommended to provide a user defined array via the argument "hits"
// to omit the danger of overwriting the selection and to allow to use the selected hit list
// amongst other selections.
//
// The input arguments "inc", "name", "mode" and "opt" allow for further selection criteria
// as indicated below.
//
// name : The user provided hit or signal slot name to be used for the hit selection.
// If name="none", no selections will be made on the name matching.
//
// mode = 0 --> Hits with a matching hit name will be selected
// 1 --> Hits with a matching signal slot name will be selected
// 2 --> Hits matching in either hit name or signal slot name will be selected
// -1 --> Hits with NO matching hit name will be selected
// -2 --> Hits with NO matching signal slot name will be selected
// -3 --> Hits with NO matching hit name nor signal slot name will be selected
//
// opt = 0 --> The specified name has to match exactly the hit or slotname
// 1 --> The specified name string has to be contained in the hit or slotname
//
// The defaults are : hits=0, name="none", mode=0 and opt=0.

Definition at line 1098 of file NcDetectorUnit.cxx.

◆ GetIdDetectorUnit() [1/2]

NcDetectorUnit * NcDetectorUnit::GetIdDetectorUnit ( Int_t id,
Bool_t follow,
TObjArray * devs = 0 )
// Return the detector unit with identifier "id" from the specified array "devs".
// In case devs=0 (which is the default) the devices stored in the current detector unit
// structure will be evaluated.
//
// follow = kTRUE ==> Search all devices related this NcDetectorUnit at any level
// kFALSE ==> Only search the devices directly linked to this NcDetectorUnit
//
// Note : In case of multiple occurrences of identifier "id", the first
// encountered matching device will be returned.

Definition at line 746 of file NcDetectorUnit.cxx.

◆ GetIdDetectorUnit() [2/2]

NcDetectorUnit * NcDetectorUnit::GetIdDetectorUnit ( Int_t id,
TString classname,
Bool_t follow )
// Return the detector unit with identifier "id" of the specified class.
// For classname="*", no selection on the detector unit class will be performed.
//
// follow = kTRUE ==> Search all devices related this NcDetectorUnit at any level
// kFALSE ==> Only search the devices directly linked to this NcDetectorUnit
//
// Note : In case of multiple occurrences of identifier "id", the first
// encountered matching detector unit will be returned.

Definition at line 798 of file NcDetectorUnit.cxx.

◆ GetIdDevice() [1/2]

NcDevice * NcDetectorUnit::GetIdDevice ( Int_t id,
Bool_t follow,
TObjArray * devs = 0 )
// Return the NcDevice with identifier "id" from the specified array "devs".
// In case devs=0 (which is the default) the devices stored in the detector unit
// structure will be evaluated.
//
// follow = kTRUE ==> Search all devices related this NcDetectorUnit at any level
// kFALSE ==> Only search the devices directly linked to this NcDetectorUnit
//
// Note : In case of multiple occurrences of identifier "id", the first
// encountered matching device will be returned.

Definition at line 559 of file NcDetectorUnit.cxx.

◆ GetIdDevice() [2/2]

NcDevice * NcDetectorUnit::GetIdDevice ( Int_t id,
TString classname,
Bool_t follow )
// Return the device with identifier "id" of the specified class.
// For classname="*", no selection on the device class will be performed.
//
// follow = kTRUE ==> Search all devices related this NcDetectorUnit at any level
// kFALSE ==> Only search the devices directly linked to this NcDetectorUnit
//
// Note : In case of multiple occurrences of identifier "id", the first
// encountered matching device will be returned.

Definition at line 611 of file NcDetectorUnit.cxx.

◆ GetIdHit()

NcSignal * NcDetectorUnit::GetIdHit ( Int_t id,
TString classname,
Bool_t follow,
Bool_t inc )
// Return the hit with unique identifier "id" for the specified device (or derived) class.
// For classname="*", no selection on the device class will be performed.
//
// follow = kTRUE ==> Search all hits related this NcDetectorUnit at any level
// kFALSE ==> Only search the hits directly linked to this NcDetectorUnit
//
// inc = kFALSE --> Do NOT include the hits stored in the NcDetectorUnit itself
// kTRUE --> Include the hits stored in the NcDetectorUnit itself
// if it satisfies the specified device class.

Definition at line 1168 of file NcDetectorUnit.cxx.

◆ GetNdevices() [1/2]

Int_t NcDetectorUnit::GetNdevices ( Bool_t follow)
// Provide the number of stored devices.
//
// follow = kTRUE ==> Count the number of all devices related this NcDetectorUnit at any level
// kFALSE ==> Only count the number of devices directly linked to this NcDetectorUnit

Definition at line 390 of file NcDetectorUnit.cxx.

◆ GetNdevices() [2/2]

Int_t NcDetectorUnit::GetNdevices ( TString classname,
Bool_t follow,
TObjArray * hits = 0 )
// Provide the number of devices of the specified class.
// For classname="*", no selection on the device class will be performed.
//
// follow = kTRUE ==> Count the number of all devices related this NcDetectorUnit at any level
// kFALSE ==> Only count the number of devices directly linked to this NcDetectorUnit
//
// In case an array "hits" is provided, the contents of the provided
// hit array are used to determine the number of different devices of the
// specified class to which the hits belong.
// Note that identification of the different hit parent devices only works
// for devices that have been given a unique identifier.
// In case no hit array is provided, just the number of stored devices of the
// specified class is returned.
//
// By default hits=0.

Definition at line 417 of file NcDetectorUnit.cxx.

◆ GetNhitsDevices()

Int_t NcDetectorUnit::GetNhitsDevices ( TString classname,
Bool_t follow,
Bool_t inc )
// Provide the number of hits registered to the specified device (or derived) class.
// The specified device class has to be derived from NcDevice.
// For classname="*", no selection on the device class will be performed.
//
// follow = kTRUE ==> Search all hits related this NcDetectorUnit at any level
// kFALSE ==> Only search the devices directly linked to this NcDetectorUnit
//
// inc = kFALSE --> Do NOT include the hits stored in the NcDetectorUnit itself
// kTRUE --> Include the hits stored in the NcDetectorUnit itself
// if it satisfies the specified device class.
//
// It is possible to indicate with the argument "classname" a specific
// device instead of a whole class of devices. However, in such a case
// it is more efficient to use the GetDevice() memberfunction directly.

Definition at line 1069 of file NcDetectorUnit.cxx.

◆ LoadDevices()

void NcDetectorUnit::LoadDevices ( TString classname,
Bool_t follow,
TObjArray * hits = 0,
NcDetectorUnit * unit = 0 )
protected
// Internal memberfunction to load the references to the various devices derived from the specified device class.
// The specified device class has to be derived from NcDevice.
// For classname="*", no selection on the device class will be performed.
//
// follow = kTRUE ==> Load all devices related this NcDetectorUnit at any level
// kFALSE ==> Only load the devices directly linked to this NcDetectorUnit
//
// This memberfunction is invoked recursively to access also the device data of stored NcDetectorUnit objects (if any).
//
// Note :
// ------
// In case devs=0 the selected device pointers are returned via a multi-purpose array,
// which will be overwritten by subsequent selections.
// It is recommended to provide a user defined array via the argument "devs"
// to omit the danger of overwriting the selection and to allow to use the selected hit list
// amongst other selections.
//
// The default are devs=0 and unit=0.

Definition at line 1984 of file NcDetectorUnit.cxx.

◆ LoadHits()

void NcDetectorUnit::LoadHits ( TString classname,
Bool_t follow,
Bool_t inc,
TObjArray * hits = 0,
NcDetectorUnit * unit = 0 )
protected
// Internal memberfunction to load the references to the various hits registered to the specified device (or derived) class.
// The specified device class has to be derived from NcDevice.
// For classname="*", no selection on the device class will be performed.
//
// follow = kTRUE ==> Load all hits related to this NcDetectorUnit at any level
// kFALSE ==> Only load the hits directly linked to this NcDetectorUnit
//
// inc = kFALSE --> Do NOT include the hits stored in the NcDetectorUnit itself
// kTRUE --> Include the hits stored in the NcDetectorUnit itself
// if it satisfies the specified device class.
//
// This memberfunction is invoked recursively to access also the hit data of stored NcDetectorUnit objects (if any).
//
// Note :
// ------
// In case hits=0 the selected hit pointers are returned via a multi-purpose array,
// which will be overwritten by subsequent selections.
// It is recommended to provide a user defined array via the argument "hits"
// to omit the danger of overwriting the selection and to allow to use the selected hit list
// amongst other selections.
//
// The default are hits=0 and unit=0.

Definition at line 1878 of file NcDetectorUnit.cxx.

◆ RemoveDevice()

void NcDetectorUnit::RemoveDevice ( NcDevice * d)
// Remove the specified device from the detector unit.

Definition at line 372 of file NcDetectorUnit.cxx.

◆ Reset()

void NcDetectorUnit::Reset ( Int_t mode = 0)
virtual
// Reset registered devices, hits and NcSignal attributes.
// Note : The status word, DevCopy and HitCopy flag are NOT modified.
// Use SetStatus(), SetDevCopy() and SetHitCopy() to modify these parameters.
// See NcSignal::Reset() for further details.

Reimplemented from NcDevice.

Definition at line 297 of file NcDetectorUnit.cxx.

◆ SetDevCopy()

void NcDetectorUnit::SetDevCopy ( Int_t j)
// (De)activate the creation of private copies of the added devices.
// j=0 ==> No private copies are made; pointers of original devices are stored.
// j=1 ==> Private copies of the devices are made and these pointers are stored.
//
// By default private copies will be made of the added devices.
//
// Notes :
// In case a private copy is made, this is performed via the Clone() memberfunction.
// All devices (i.e. classes derived from TObject) have the default TObject::Clone()
// memberfunction.
// However, devices generally contain an internal (signal) data structure
// which may include pointers to other objects. Therefore it is recommended to provide
// for all devices a specific copy constructor and override the default Clone()
// memberfunction using this copy constructor.
// An example for this may be seen from NcCalorimeter.
//
// Once the storage contains pointer(s) to device(s) one cannot
// change the DevCopy mode anymore.
// To change the DevCopy mode for an existing NcDetectorUnit containing
// devices one first has to invoke Reset().

Definition at line 196 of file NcDetectorUnit.cxx.

◆ SetOwner()

void NcDetectorUnit::SetOwner ( Bool_t own = kTRUE)
virtual
// Set ownership of all added objects.
// The default parameter is own=kTRUE.
//
// Invokation of this memberfunction also sets all the copy modes
// (e.g. HitCopy and DevCopy) according to the value of own.
//
// This function (with own=kTRUE) is particularly useful when reading data
// from a tree/file, since Reset() will then actually remove all the
// added objects from memory irrespective of the copy mode settings
// during the tree/file creation process. In this way it provides a nice way
// of preventing possible memory leaks in the reading/analysis process.
//
// In addition this memberfunction can also be used as a shortcut to set all
// copy modes in one go during a tree/file creation process.
// However, in this case the user has to take care to only set/change the
// ownership (and copy mode) for empty objects (e.g. newly created objects
// or after invokation of the Reset() memberfunction) otherwise it will
// very likely result in inconsistent destructor behaviour.

Reimplemented from NcDevice.

Definition at line 264 of file NcDetectorUnit.cxx.

◆ ShowDevices() [1/2]

void NcDetectorUnit::ShowDevices ( Int_t mode = 1,
Bool_t header = kTRUE )
// Provide an overview of the available devices.
// The input argument "header" determines whether header info is printed (kTRUE) or not (kFALSE).
//
// The argument mode determines the amount of information as follows :
// mode = 0 ==> Only printout of the number of directly linked devices
// 1 ==> Provide a listing with 1 line of info for each directly linked device
// 2 ==> Provide a listing with 1 line of info for each linked device at any level
//
// The default values are mode=1 and header=kTRUE.

Definition at line 913 of file NcDetectorUnit.cxx.

◆ ShowDevices() [2/2]

void NcDetectorUnit::ShowDevices ( TString classname,
Int_t mode = 1,
Bool_t header = kTRUE )
// Provide an overview of the available devices of the specified (or derived) class.
// For classname="*", no selection on the device class will be performed.
// The input argument "header" determines whether header info is printed (kTRUE) or not (kFALSE).
//
// The argument mode determines the amount of information as follows :
// mode = 0 ==> Only printout of the number of directly linked devices
// 1 ==> Provide a listing with 1 line of info for each directly linked device
// 2 ==> Provide a listing with 1 line of info for each linked device at any level
//
// The default values are mode=1 and header=kTRUE.

Definition at line 932 of file NcDetectorUnit.cxx.

◆ ShowDevicesTree()

void NcDetectorUnit::ShowDevicesTree ( TString classname,
Int_t mode = 1,
NcDetectorUnit * unit = 0 )
protected
// Internal memberfunction to provide an overview of the available devices of the specified class.
// For classname="*", no selection on the device class will be performed.
//
// The argument mode determines the amount of information as follows :
// mode = 0 ==> Only printout of the number of directly linked devices
// 1 ==> Provide a listing with 1 line of info for each directly linked device
// 2 ==> Provide a listing with 1 line of info for each device at any level
//
// This memberfunction is invoked recursively to access also the devices of stored NcDetectorUnit objects (if any).
//
// The defaults are mode=1 and unit=0.

Definition at line 966 of file NcDetectorUnit.cxx.

◆ ShowHits()

void NcDetectorUnit::ShowHits ( TString classname,
Bool_t follow,
Bool_t inc,
Int_t mode = 1,
TString f = "car",
TString u = "rad" )
// Show all the hits registered to the specified device (or derived) class.
// For classname="*", no selection on the device class will be performed.
//
// follow = kTRUE ==> Search all hits related this NcDetectorUnit at any level
// kFALSE ==> Only search the hits directly linked to this NcDetectorUnit
//
// inc = kFALSE --> Do NOT include the hits stored in the NcDetectorUnit itself
// kTRUE --> Include the hits stored in the NcDetectorUnit itself
// if it satisfies the specified device class.
//
// mode = 0 ==> Only the number of hits will be provided.
// 1 ==> Full listing of all the hits will be provided.
// 2 ==> Same as mode=1 but with additional location info of the owning device.
//
// The arguments "f" and "u" have the same meaning as in the memberfunction Data().
//
// Default values are mode=1, f="car" and u="rad".
//
// Note : This memberfunction will show hits in printable format.
// To obtain a graphic hit display please refer to DisplayHits().

Definition at line 1209 of file NcDetectorUnit.cxx.

◆ SortDevices() [1/4]

TObjArray * NcDetectorUnit::SortDevices ( TObjArray * hits,
Int_t idx = 1,
Int_t mode = -1,
Int_t mcal = 1,
Int_t deadcheck = 1,
TObjArray * ordered = 0 )
// Order the references to the various devices based on hit signals contained
// in the input array.
// The ordered array is returned as a TObjArray either via a user provided array "ordered"
// or as a returned pointer.
// A "hit" represents an abstract object which is derived from NcSignal.
// The user can specify the index of the signal slot to perform the sorting on.
// By default the slotindex will be 1.
// Via the "mode" argument the user can specify ordering in decreasing
// order (mode=-1), ordering in increasing order (mode=1) or no ordering (mode=0).
// The latter option provides a means to quickly obtain an ordered devices list
// when the hits in the array were already ordered by the user. In this case
// the input argument "idx" is irrelevant.
// The default is mode=-1.
// The gain etc... corrected signals will be used in the ordering process as
// specified by the "mcal" argument. The definition of this "mcal" parameter
// corresponds to the signal correction mode described in the GetSignal
// memberfunction of class NcSignal.
// The default is mcal=1 (for backward compatibility reasons).
// The argument "deadcheck" allows to reject signals which were declared as "Dead".
// If deadcheck=0 the dead signals will be treated in the same way as the other signals.
// To achieve an identical treatment of dead and alive signals, the setting of deadcheck=0
// will automatically set also mcal=0 to retrieve the stored signal values "as is".
// The default is deadcheck=1 (for backward compatibility reasons).
//
// Note :
// ------
// In case ordered=0 the ordered device pointers are returned via a multi-purpose array,
// which may be overwritten by other memberfunctions (not restricted to device ordering).
// It is recommended to provide a user defined array via the argument "ordered" to omit
// the danger of overwriting (or being overwritten by) other selections and to allow to use
// the ordered device list amongst other selections.
// In case a user defined array "ordered" is provided, this memberfunction returns 0 for the
// return argument.
//
// The default is ordered=0.

Definition at line 1772 of file NcDetectorUnit.cxx.

◆ SortDevices() [2/4]

TObjArray * NcDetectorUnit::SortDevices ( TObjArray * hits,
TString name,
Int_t mode = -1,
Int_t mcal = 1,
Int_t deadcheck = 1,
TObjArray * ordered = 0 )
// Order the references to the various devices based on hit signals contained
// in the input array.
// The ordered array is returned as a TObjArray either via a user provided array "ordered"
// or as a returned pointer.
// A "hit" represents an abstract object which is derived from NcSignal.
// The user can specify the name of the signal slot to perform the sorting on.
// In case no matching slotname is found, the signal will be skipped.
// Via the "mode" argument the user can specify ordering in decreasing
// order (mode=-1), ordering in increasing order (mode=1) or no ordering (mode=0).
// The latter option provides a means to quickly obtain an ordered devices list
// when the hits in the array were already ordered by the user. In this case
// the input argument "name" is irrelevant.
// The default is mode=-1.
// The gain etc... corrected signals will be used in the ordering process as
// specified by the "mcal" argument. The definition of this "mcal" parameter
// corresponds to the signal correction mode described in the GetSignal
// memberfunction of class NcSignal.
// The default is mcal=1 (for backward compatibility reasons).
// The argument "deadcheck" allows to reject signals which were declared as "Dead".
// If deadcheck=0 the dead signals will be treated in the same way as the other signals.
// To achieve an identical treatment of dead and alive signals, the setting of deadcheck=0
// will automatically set also mcal=0 to retrieve the stored signal values "as is".
// The default is deadcheck=1 (for backward compatibility reasons).
//
// Note :
// ------
// In case ordered=0 the ordered device pointers are returned via a multi-purpose array,
// which may be overwritten by other memberfunctions (not restricted to device ordering).
// It is recommended to provide a user defined array via the argument "ordered" to omit
// the danger of overwriting (or being overwritten by) other selections and to allow to use
// the ordered device list amongst other selections.
// In case a user defined array "ordered" is provided, this memberfunction returns 0 for the
// return argument.
//
// The default is ordered=0.

Definition at line 1666 of file NcDetectorUnit.cxx.

◆ SortDevices() [3/4]

TObjArray * NcDetectorUnit::SortDevices ( TString classname,
Bool_t follow,
Bool_t inc,
Int_t idx = 1,
Int_t mode = -1,
Int_t mcal = 1,
Int_t deadcheck = 1,
TObjArray * ordered = 0 )
// Order the references to the various devices based on hit signals registered
// to the specified device (or derived) class.
// For classname="*", no selection on the device class will be performed.
//
// follow = kTRUE ==> Search all hits related this NcDetectorUnit at any level
// kFALSE ==> Only search the hits directly linked to this NcDetectorUnit
//
// inc = kFALSE --> Do NOT include the hits stored in the NcDetectorUnit itself
// kTRUE --> Include the hits stored in the NcDetectorUnit itself
// if it satisfies the specified device class.
//
// The ordered array is returned as a TObjArray either via a user provided array "ordered"
// or as a returned pointer.
// A "hit" represents an abstract object which is derived from NcSignal.
// The user can specify the index of the signal slot to perform the sorting on.
// By default the slotindex will be 1.
// Via the "mode" argument the user can specify ordering in decreasing
// order (mode=-1) or ordering in increasing order (mode=1).
// The default is mode=-1.
// The gain etc... corrected signals will be used in the ordering process as
// specified by the "mcal" argument. The definition of this "mcal" parameter
// corresponds to the signal correction mode described in the GetSignal
// memberfunction of class NcSignal.
// The default is mcal=1 (for backward compatibility reasons).
// The argument "deadcheck" allows to reject signals which were declared as "Dead".
// If deadcheck=0 the dead signals will be treated in the same way as the other signals.
// To achieve an identical treatment of dead and alive signals, the setting of deadcheck=0
// will automatically set also mcal=0 to retrieve the stored signal values "as is".
// The default is deadcheck=1 (for backward compatibility reasons).
//
// Note :
// ------
// In case ordered=0 the ordered device pointers are returned via a multi-purpose array,
// which may be overwritten by other memberfunctions (not restricted to device ordering).
// It is recommended to provide a user defined array via the argument "ordered" to omit
// the danger of overwriting (or being overwritten by) other selections and to allow to use
// the ordered device list amongst other selections.
// In case a user defined array "ordered" is provided, this memberfunction returns 0 for the
// return argument.
//
// The default is ordered=0.

Definition at line 1599 of file NcDetectorUnit.cxx.

◆ SortDevices() [4/4]

TObjArray * NcDetectorUnit::SortDevices ( TString classname,
Bool_t follow,
Bool_t inc,
TString name,
Int_t mode = -1,
Int_t mcal = 1,
Int_t deadcheck = 1,
TObjArray * ordered = 0 )
// Order the references to the various devices based on hit signals registered
// to the specified device (or derived) class.
// For classname="*", no selection on the device class will be performed.
//
// follow = kTRUE ==> Search all hits related this NcDetectorUnit at any level
// kFALSE ==> Only search the hits directly linked to this NcDetectorUnit
//
// inc = kFALSE --> Do NOT include the hits stored in the NcDetectorUnit itself
// kTRUE --> Include the hits stored in the NcDetectorUnit itself
// if it satisfies the specified device class.
//
// The ordered array is returned as a TObjArray either via a user provided array "ordered"
// or as a returned pointer.
// A "hit" represents an abstract object which is derived from NcSignal.
// The user can specify the name of the signal slot to perform the sorting on.
// In case no matching slotname is found, the signal will be skipped.
// Via the "mode" argument the user can specify ordering in decreasing
// order (mode=-1) or ordering in increasing order (mode=1).
// The default is mode=-1.
// The gain etc... corrected signals will be used in the ordering process as
// specified by the "mcal" argument. The definition of this "mcal" parameter
// corresponds to the signal correction mode described in the GetSignal
// memberfunction of class NcSignal.
// The default is mcal=1 (for backward compatibility reasons).
// The argument "deadcheck" allows to reject signals which were declared as "Dead".
// If deadcheck=0 the dead signals will be treated in the same way as the other signals.
// To achieve an identical treatment of dead and alive signals, the setting of deadcheck=0
// will automatically set also mcal=0 to retrieve the stored signal values "as is".
// The default is deadcheck=1 (for backward compatibility reasons).
//
// Note :
// ------
// In case ordered=0 the ordered device pointers are returned via a multi-purpose array,
// which may be overwritten by other memberfunctions (not restricted to device ordering).
// It is recommended to provide a user defined array via the argument "ordered" to omit
// the danger of overwriting (or being overwritten by) other selections and to allow to use
// the ordered device list amongst other selections.
// In case a user defined array "ordered" is provided, this memberfunction returns 0 for the
// return argument.
//
// The default is ordered=0.

Definition at line 1532 of file NcDetectorUnit.cxx.

◆ SortHits() [1/4]

TObjArray * NcDevice::SortHits ( Int_t idx = 1,
Int_t mode = -1,
TObjArray * hits = 0,
Int_t mcal = 1,
Int_t deadcheck = 1,
TObjArray * ordered = 0 )
// Order the references to an array of hits by looping over the input array "hits"
// and checking the signal value.
// The ordered array is returned as a TObjArray either via a user provided array "ordered"
// or as a returned pointer.
// In case hits=0 (default), the registered hits of the current device are used.
// Note that the original hit array is not modified.
// A "hit" represents an abstract object which is derived from NcSignal.
// The user can specify the index of the signal slot to perform the sorting on.
// By default the slotindex will be 1.
// Via the "mode" argument the user can specify ordering in decreasing
// order (mode=-1) or ordering in increasing order (mode=1).
// The default is mode=-1.
// The gain etc... corrected signals will be used in the ordering process as
// specified by the "mcal" argument. The definition of this "mcal" parameter
// corresponds to the signal correction mode described in the GetSignal
// memberfunction of class NcSignal.
// The default is mcal=1 (for backward compatibility reasons).
// The argument "deadcheck" allows to reject signals which were declared as "Dead".
// If deadcheck=0 the dead signals will be treated in the same way as the other signals.
// To achieve an identical treatment of dead and alive signals, the setting of deadcheck=0
// will automatically set also mcal=0 to retrieve the stored signal values "as is".
// The default is deadcheck=1 (for backward compatibility reasons).
//
// Note :
// ------
// In case ordered=0 the ordered hit pointers are returned via a multi-purpose array,
// which may be overwritten by other memberfunctions (not restricted to hit ordering).
// It is recommended to provide a user defined array via the argument "ordered" to omit
// the danger of overwriting (or being overwritten by) other selections and to allow to use
// the ordered hit list amongst other selections.
// In case a user defined array "ordered" is provided, this memberfunction returns 0 for the
// return argument.
//
// The default is ordered=0.

Definition at line 43 of file NcDevice.cxx.

◆ SortHits() [2/4]

TObjArray * NcDetectorUnit::SortHits ( TString classname,
Bool_t follow,
Bool_t inc,
Int_t idx = 1,
Int_t mode = -1,
Int_t mcal = 1,
Int_t deadcheck = 1,
TObjArray * ordered = 0 )
// Order the references to the various hits registered to the specified device (or derived) class.
// For classname="*", no selection on the device class will be performed.
//
// The ordered array is returned as a TObjArray either via a user provided array "ordered"
// or as a returned pointer.
//
// follow = kTRUE ==> Search all hits related this NcDetectorUnit at any level
// kFALSE ==> Only search the hits directly linked to this NcDetectorUnit
//
// inc = kFALSE --> Do NOT include the hits stored in the NcDetectorUnit itself
// kTRUE --> Include the hits stored in the NcDetectorUnit itself
// if it satisfies the specified device class.
//
// A "hit" represents an abstract object which is derived from NcSignal.
// The user can specify the index of the signal slot to perform the sorting on.
// By default the slotindex will be 1.
// Via the "mode" argument the user can specify ordering in decreasing
// order (mode=-1) or ordering in increasing order (mode=1).
// The default is mode=-1.
// The gain etc... corrected signals will be used in the ordering process as
// specified by the "mcal" argument. The definition of this "mcal" parameter
// corresponds to the signal correction mode described in the GetSignal
// memberfunction of class NcSignal.
// The default is mcal=1 (for backward compatibility reasons).
// The argument "deadcheck" allows to reject signals which were declared as "Dead".
// If deadcheck=0 the dead signals will be treated in the same way as the other signals.
// To achieve an identical treatment of dead and alive signals, the setting of deadcheck=0
// will automatically set also mcal=0 to retrieve the stored signal values "as is".
// The default is deadcheck=1 (for backward compatibility reasons).
//
// Note :
// ------
// In case ordered=0 the ordered hit pointers are returned via a multi-purpose array,
// which may be overwritten by other memberfunctions (not restricted to hit ordering).
// It is recommended to provide a user defined array via the argument "ordered" to omit
// the danger of overwriting (or being overwritten by) other selections and to allow to use
// the ordered hit list amongst other selections.
// In case a user defined array "ordered" is provided, this memberfunction returns 0 for the
// return argument.
//
// The default is ordered=0.
//
// For more extended functionality see class NcDevice.

Definition at line 1264 of file NcDetectorUnit.cxx.

◆ SortHits() [3/4]

TObjArray * NcDetectorUnit::SortHits ( TString classname,
Bool_t follow,
Bool_t inc,
TString name,
Int_t mode = -1,
Int_t mcal = 1,
Int_t deadcheck = 1,
TObjArray * ordered = 0 )
// Order the references to the various hits registered to the specified device (or derived) class.
// For classname="*", no selection on the device class will be performed.
//
// The ordered array is returned as a TObjArray either via a user provided array "ordered"
// or as a returned pointer.
//
// follow = kTRUE ==> Search all hits related this NcDetectorUnit at any level
// kFALSE ==> Only search the hits directly linked to this NcDetectorUnit
//
// inc = kFALSE --> Do NOT include the hits stored in the NcDetectorUnit itself
// kTRUE --> Include the hits stored in the NcDetectorUnit itself
// if it satisfies the specified device class.
//
// A "hit" represents an abstract object which is derived from NcSignal.
// The user can specify the name of the signal slot to perform the sorting on.
// In case no matching slotname is found, the signal will be skipped.
// Via the "mode" argument the user can specify ordering in decreasing
// order (mode=-1) or ordering in increasing order (mode=1).
// The default is mode=-1.
// The gain etc... corrected signals will be used in the ordering process as
// specified by the "mcal" argument. The definition of this "mcal" parameter
// corresponds to the signal correction mode described in the GetSignal
// memberfunction of class NcSignal.
// The default is mcal=1 (for backward compatibility reasons).
// The argument "deadcheck" allows to reject signals which were declared as "Dead".
// If deadcheck=0 the dead signals will be treated in the same way as the other signals.
// To achieve an identical treatment of dead and alive signals, the setting of deadcheck=0
// will automatically set also mcal=0 to retrieve the stored signal values "as is".
// The default is deadcheck=1 (for backward compatibility reasons).
//
// Note :
// ------
// In case ordered=0 the ordered hit pointers are returned via a multi-purpose array,
// which may be overwritten by other memberfunctions (not restricted to hit ordering).
// It is recommended to provide a user defined array via the argument "ordered" to omit
// the danger of overwriting (or being overwritten by) other selections and to allow to use
// the ordered hit list amongst other selections.
// In case a user defined array "ordered" is provided, this memberfunction returns 0 for the
// return argument.
//
// The default is ordered=0.
//
// For more extended functionality see class NcDevice.

Definition at line 1336 of file NcDetectorUnit.cxx.

◆ SortHits() [4/4]

TObjArray * NcDevice::SortHits ( TString name,
Int_t mode = -1,
TObjArray * hits = 0,
Int_t mcal = 1,
Int_t deadcheck = 1,
TObjArray * ordered = 0 )
// Order the references to an array of hits by looping over the input array "hits"
// and checking the signal value.
// The ordered array is returned as a TObjArray either via a user provided array "ordered"
// or as a returned pointer.
// In case hits=0 (default), the registered hits of the current device are used.
// Note that the input array is not modified.
// A "hit" represents an abstract object which is derived from NcSignal.
// The user can specify the name of the signal slot to perform the sorting on.
// In case no matching slotname is found, the signal will be skipped.
// Via the "mode" argument the user can specify ordering in decreasing
// order (mode=-1) or ordering in increasing order (mode=1).
// The default is mode=-1.
// The gain etc... corrected signals will be used in the ordering process as
// specified by the "mcal" argument. The definition of this "mcal" parameter
// corresponds to the signal correction mode described in the GetSignal
// memberfunction of class NcSignal.
// The default is mcal=1 (for backward compatibility reasons).
// The argument "deadcheck" allows to reject signals which were declared as "Dead".
// If deadcheck=0 the dead signals will be treated in the same way as the other signals.
// To achieve an identical treatment of dead and alive signals, the setting of deadcheck=0
// will automatically set also mcal=0 to retrieve the stored signal values "as is".
// The default is deadcheck=1 (for backward compatibility reasons).
//
// Note :
// ------
// In case ordered=0 the ordered hit pointers are returned via a multi-purpose array,
// which may be overwritten by other memberfunctions (not restricted to hit ordering).
// It is recommended to provide a user defined array via the argument "ordered" to omit
// the danger of overwriting (or being overwritten by) other selections and to allow to use
// the ordered hit list amongst other selections.
// In case a user defined array "ordered" is provided, this memberfunction returns 0 for the
// return argument.
//
// The default is ordered=0.

Definition at line 42 of file NcDevice.cxx.

Member Data Documentation

◆ fDevCopy

Int_t NcDetectorUnit::fDevCopy
protected

Definition at line 60 of file NcDetectorUnit.h.

◆ fDevices

TObjArray* NcDetectorUnit::fDevices
protected

Definition at line 59 of file NcDetectorUnit.h.

◆ fDevs

TObjArray* NcDetectorUnit::fDevs
protected

! Temp. array to hold references to user selected devices

Definition at line 61 of file NcDetectorUnit.h.

◆ fDisplay

TObject* NcDetectorUnit::fDisplay
protected

! Temp. pointer to hold objects which serve event displays

Definition at line 64 of file NcDetectorUnit.h.

◆ fOrdered

TObjArray* NcDetectorUnit::fOrdered
protected

! Temp. array to hold references to various ordered objects

Definition at line 63 of file NcDetectorUnit.h.

◆ fThits

TObjArray* NcDetectorUnit::fThits
protected

! Temp. array to hold references to the registered NcDevice hits

Definition at line 62 of file NcDetectorUnit.h.


The documentation for this class was generated from the following files: