Skip to content
Snippets Groups Projects
Commit eeae921b authored by Stephen A. Wood's avatar Stephen A. Wood Committed by Stephen Wood
Browse files

Change threshold for helicity signals.

  For KaonLT, the kPulsePedestal values being returned for
  the helicity signal channels was 0 and 16380.  For SIDIS, the
  values for off and on are ~2000 and ~1400.  Made the default
  threshold 8000 instead of 1000.  Also added an optional parameter,
  "helicity_fadcthreshold" so that this threshold can be changed
  at run time.
parent 47c908bc
No related branches found
No related tags found
No related merge requests found
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
#include "THcHelicityReader.h" #include "THcHelicityReader.h"
#include "THaEvData.h" #include "THaEvData.h"
#include "THcGlobals.h"
#include "THcParmList.h"
#include "TMath.h" #include "TMath.h"
#include "TError.h" #include "TError.h"
#include "VarDef.h" #include "VarDef.h"
...@@ -59,6 +61,15 @@ Int_t THcHelicityReader::ReadDatabase( const char* /*dbfilename*/, ...@@ -59,6 +61,15 @@ Int_t THcHelicityReader::ReadDatabase( const char* /*dbfilename*/,
SetROCinfo(kMPS,2,14,10); SetROCinfo(kMPS,2,14,10);
SetROCinfo(kQrt,2,14,7); SetROCinfo(kQrt,2,14,7);
SetROCinfo(kTime,2,21,2); SetROCinfo(kTime,2,21,2);
fADCThreshold = 8000;
DBRequest list[] = {
{"helicity_adcthreshold",&fADCThreshold, kInt, 0, 1},
{0}
};
gHcParms->LoadParmValues(list, "");
return THaAnalysisObject::kOK; return THaAnalysisObject::kOK;
} }
...@@ -124,27 +135,27 @@ Int_t THcHelicityReader::ReadData( const THaEvData& evdata ) ...@@ -124,27 +135,27 @@ Int_t THcHelicityReader::ReadData( const THaEvData& evdata )
// Get the helicity control signals. These are from the pedestals // Get the helicity control signals. These are from the pedestals
// acquired by FADC channels. // acquired by FADC channels.
UInt_t helpraw = evdata.GetData(Decoder::kPulsePedestal, Int_t helpraw = evdata.GetData(Decoder::kPulsePedestal,
fROCinfo[kHel].roc, fROCinfo[kHel].roc,
fROCinfo[kHel].slot, fROCinfo[kHel].slot,
fROCinfo[kHel].index, 0); fROCinfo[kHel].index, 0);
UInt_t helmraw = evdata.GetData(Decoder::kPulsePedestal, Int_t helmraw = evdata.GetData(Decoder::kPulsePedestal,
fROCinfo[kHelm].roc, fROCinfo[kHelm].roc,
fROCinfo[kHelm].slot, fROCinfo[kHelm].slot,
fROCinfo[kHelm].index, 0); fROCinfo[kHelm].index, 0);
UInt_t mpsraw = evdata.GetData(Decoder::kPulsePedestal, Int_t mpsraw = evdata.GetData(Decoder::kPulsePedestal,
fROCinfo[kMPS].roc, fROCinfo[kMPS].roc,
fROCinfo[kMPS].slot, fROCinfo[kMPS].slot,
fROCinfo[kMPS].index, 0); fROCinfo[kMPS].index, 0);
UInt_t qrtraw = evdata.GetData(Decoder::kPulsePedestal, Int_t qrtraw = evdata.GetData(Decoder::kPulsePedestal,
fROCinfo[kQrt].roc, fROCinfo[kQrt].roc,
fROCinfo[kQrt].slot, fROCinfo[kQrt].slot,
fROCinfo[kQrt].index, 0); fROCinfo[kQrt].index, 0);
fIsQrt = qrtraw > 1000; fIsQrt = qrtraw > fADCThreshold;
fIsMPS = mpsraw > 1000; fIsMPS = mpsraw > fADCThreshold;
fIsHelp = helpraw > 1000; fIsHelp = helpraw > fADCThreshold;
fIsHelm = helmraw > 1000; fIsHelm = helmraw > fADCThreshold;
return 0; return 0;
} }
......
...@@ -52,6 +52,8 @@ protected: ...@@ -52,6 +52,8 @@ protected:
Bool_t fIsHelp; Bool_t fIsHelp;
Bool_t fIsHelm; Bool_t fIsHelm;
Int_t fADCThreshold; // Threshold for On/Off of helicity signals
ROCinfo fROCinfo[kCount]; ROCinfo fROCinfo[kCount];
Int_t fQWEAKDebug; // Debug level Int_t fQWEAKDebug; // Debug level
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment