4 #include "KVFAZIADetector.h"
5 #include "KVIDTelescope.h"
98 KVDetector::Copy(obj);
111 KVDetector::Clear(opt);
152 SetLabel(sname.
Next());
180 Info(
"SetProperties",
"Unkown format for the detector %s", GetName());
188 if (!strcmp(GetLabel(),
"SI1")) {
189 lsignals =
"QH1,I1,QL1";
191 else if (!strcmp(GetLabel(),
"SI2")) {
194 else if (!strcmp(GetLabel(),
"CSI")) {
196 dsigs +=
",Q3.FastAmplitude,Q3.FastFPGAEnergy";
199 Warning(
"SetProperties",
"Unknown label \"%s\" for this detector : %s\n", GetLabel(), GetName());
203 KVString sigtypes =
"Amplitude,RawAmplitude,FPGAEnergy,RiseTime,BaseLine,SigmaBaseLine";
205 while (!lsignals.
End()) {
208 while (!sigtypes.
End()) {
210 if (sig.
BeginsWith(
"I") && (stype ==
"FPGAEnergy" || stype ==
"RiseTime"))
continue;
211 if (sig ==
"QL1" && stype ==
"FPGAEnergy")
continue;
217 if (lsignals ==
"Q3") AddDetectorSignalExpression(
"Q3.SlowAmplitude",
"Q3.Amplitude - 0.8*Q3.FastAmplitude");
220 while (!lsignals.
End()) {
254 if (!oldname.
End()) {
255 lab = oldname.
Next();
257 if (!oldname.
End()) {
258 tmp = oldname.
Next();
262 if (!oldname.
End()) {
263 tmp = oldname.
Next();
267 if (!oldname.
End()) {
268 tmp = oldname.
Next();
273 newname.
Form(
"%s-%d", lab.
Data(), bb * 100 + qq * 10 +
tt);
274 return newname.
Data();
305 if (!IsDetecting())
return kFALSE;
306 if (IsSimMode())
return (GetActiveLayer()->GetEnergyLoss() > 0.);
353 Warning(
"Fired",
"%s : No signal attached to this detector ...", GetName());
378 Warning(
"SetSignal",
"%s : No signal of name #%s# is available", GetName(), signal_name);
460 while ((sig = (
KVSignal*)nexts())) {
478 if (idx == 0)
return SetQH1FPGAEnergy(energy);
485 if (idx == 0)
return SetQ2FPGAEnergy(energy);
490 if (idx == 0)
return SetQ3FPGAEnergy(energy);
491 if (idx == 1)
return SetQ3FastFPGAEnergy(energy);
510 return SetQH1BaseLine(baseline);
517 return SetQ2BaseLine(baseline);
522 return SetQ3BaseLine(baseline);
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 Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
char * Form(const char *fmt,...)
KVString GetDataSetEnv(const Char_t *type, const Char_t *defval="") const
Base class for output signal data produced by a detector.
Base class for FAZIA detectors.
Bool_t fIsFiredFromSignals
KVSignal * GetSignal(const Char_t *name) const
Bool_t Fired(Option_t *opt="any") const override
const KVSeqCollection * GetListOfSignals() const
Double_t fQH1Threshold
thresholds defined for this detector
virtual ~KVFAZIADetector()
Destructor.
KVUniqueNameList fSignals
list of electronics signal (current, charge, etc... )
void Clear(Option_t *opt="") override
If opt="N" we do not reset any raw data, signals, etc.
void SetSignal(TGraph *signal, const Char_t *signal_name)
KVFAZIADetector()
Default constructor.
Int_t GetIdentifier() const
Bool_t HasSignal() const
Returns kTRUE if detector has at least 1 associated signal.
void SetName(const char *name) override
KVDetectorSignal * SetBaseLine(int sigid, Float_t baseline)
KVSignal * GetSignalByType(const Char_t *type) const
Access detector signal of given type: "I1", "I2", "Q2", "Q3", "QH1", "QL1".
Double_t GetSetupParameter(const Char_t *parname)
Int_t GetNumberOfSignals() const
void ComputePSA()
Perform Pulse Shape Analysis on all signals.
Int_t fIdentifier
SI1=0(kSI1) SI2=1(kSI2) CSI=2(kCSI)
static const Char_t * GetNewName(KVString oldname)
void Copy(TObject &obj) const override
void init()
default initialisations
KVDetectorSignal * SetFPGAEnergy(int sigid, Int_t idx, Double_t energy)
Int_t fIndex
100*block+10*quartet+telescope
void AddDetectorLabel(const Char_t *label)
KaliVeda extensions to ROOT collection classes.
void Execute(const char *method, const char *params, Int_t *error=0) override
TObject * FindObject(const char *name) const override
Int_t GetSize() const override
void Clear(Option_t *option="") override
virtual TObject * FindObjectByType(const Char_t *) const
TObject * At(Int_t idx) const override
virtual Bool_t IsCharge() const
virtual void TreateSignal()
void SetData(Int_t nn, Double_t *xx, Double_t *yy)
operation on data arrays
void SetDetectorName(const Char_t *name)
virtual void LoadPSAParameters()
static KVSignal * MakeSignal(const char *sig_type)
Create new KVSignal instance corresponding to sig_type.
virtual void GetPSAResult(KVDetector *) const
Bool_t IsFired()
ComputeBaseLine and ComputeEndLine methods have to be called before.
void SetType(const Char_t *type)
Bool_t PSAHasBeenComputed() const
virtual Double_t ComputeEndLine()
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
void Add(TObject *obj) override
virtual Int_t GetEntries() const
virtual const char * GetValue(const char *name, const char *dflt) const
void SetName(const char *name="") override
virtual void SetName(const char *name)
const char * Data() const
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
void Form(const char *fmt,...)
TString & ReplaceAll(const char *s1, const char *s2)