JAPAn
Just Another Parity Analyzer
Loading...
Searching...
No Matches
QwBlinder Class Reference

Data blinding utilities for parity violation analysis. More...

#include <QwBlinder.h>

+ Collaboration diagram for QwBlinder:

Public Types

enum  EQwBlindingStrategy { kDisabled , kAdditive , kMultiplicative , kAdditiveMultiplicative }
 Available blinding strategies. More...
 
enum  EQwBlinderStatus { kIndeterminate = 0 , kNotBlindable , kBlindable , kBlindableFail }
 Status of the blinding process or intermediate steps of the process. More...
 

Public Member Functions

 QwBlinder (const EQwBlindingStrategy blinding_strategy=kAdditive)
 Default constructor with optional database.
 
virtual ~QwBlinder ()
 Default destructor.
 
void ProcessOptions (QwOptions &options)
 Update the status with new external information.
 
void Update ()
 Update the status using a random number.
 
void Update (QwParityDB *db)
 Update the status with new external information.
 
void Update (const QwSubsystemArrayParity &detectors)
 Update the status with new external information.
 
void Update (const QwEPICSEvent &epics)
 Update the status with new external information.
 
void ClearEventData ()
 
void WriteFinalValuesToDB (QwParityDB *db)
 
void PrintCountersValues (std::vector< Int_t > fCounters, TString counter_type)
 
void PrintFinalValues (Int_t kVerbosity=1)
 
void ModifyThisErrorCode (UInt_t &errorcode) const
 
void BlindValue (Double_t &value) const
 Asymmetry blinding.
 
void UnBlindValue (Double_t &value) const
 Asymmetry unblinding.
 
void BlindValue (Double_t &value, const Double_t &yield) const
 Difference blinding.
 
void UnBlindValue (Double_t &value, const Double_t &yield) const
 Difference unblinding.
 
void Blind (QwSubsystemArrayParity &diff)
 Blind the asymmetry of an array of subsystems.
 
void BlindPair (QwSubsystemArrayParity &diff)
 
void UnBlind (QwSubsystemArrayParity &diff)
 Unblind the asymmetry of an array of subsystems.
 
void Blind (QwSubsystemArrayParity &diff, const QwSubsystemArrayParity &yield)
 Blind the difference of an array of subsystems.
 
void BlindPair (QwSubsystemArrayParity &diff, const QwSubsystemArrayParity &yield)
 Blind the pair difference of an array of subsystems.
 
void UnBlind (QwSubsystemArrayParity &diff, const QwSubsystemArrayParity &yield)
 Unblind the difference of an array of subsystems.
 
const Bool_t & IsBlinderOkay () const
 
void ConstructObjects (TDirectory *folder, TString &prefix)
 

Static Public Member Functions

static void DefineOptions (QwOptions &options)
 

Static Public Attributes

static const TString fStatusName [4]
 
static const UInt_t kErrorFlag_BlinderFail = 0x200
 Error flag value.
 
static constexpr const Double_t kValue_BlinderFail = -1.0
 

Private Member Functions

void SetTargetBlindability (EQwBlinderStatus status)
 Set the current target blindability status.
 
void SetWienState (EQwWienMode wienmode)
 
void SetIHWPPolarity (Int_t ihwppolarity)
 
EQwBlinderStatus CheckBlindability (std::vector< Int_t > &fCounters)
 
 QwBlinder (const QwBlinder &__attribute__((unused)) blinder)
 Private copy constructor.
 
const QwBlinderoperator= (const QwBlinder &__attribute__((unused)) blinder)
 Private assignment operator.
 
void InitBlinders (const UInt_t seed_id)
 Vector of test values, after unblinding.
 
void InitTestValues (const int n)
 Initializes fBlindingFactor from fSeed.
 
Bool_t CheckTestValues ()
 
Int_t UseMD5 (const TString &barestring)
 Recomputes fBlindTestValue to check for memory errors.
 
Int_t UseStringManip (const TString &barestring)
 Returns an integer from a string using MD5.
 
Int_t UsePseudorandom (const TString &barestring)
 
Int_t ReadSeed (QwParityDB *db, const UInt_t seed_id)
 Reads the seed with specified id from the database object.
 
Int_t ReadSeed (QwParityDB *db)
 Reads the seed from the database object.
 
Int_t ReadRandomSeed ()
 Read the seed string generated utilizing a random number generator.
 
void WriteChecksum (QwParityDB *db)
 
void WriteTestValues (QwParityDB *db)
 Writes fSeedID and fBFChecksum to DB for this analysis ID.
 
std::vector< UChar_t > GenerateDigest (const TString &input) const
 Writes fTestNumber and fBlindTestValue to DB for this analysis ID.
 

Private Attributes

EQwBlinderStatus fTargetBlindability_firstread
 Indicates the first value received of the blindability of the target.
 
EQwBlinderStatus fTargetBlindability
 
Bool_t fTargetPositionForced
 
EQwWienMode fWienMode_firstread
 
EQwWienMode fWienMode
 
Int_t fIHWPPolarity_firstread
 
Int_t fIHWPPolarity
 
Bool_t fSpinDirectionForced
 
Int_t fCREXTargetIndex
 
Int_t kCREXTgtIndexMin = 1
 
Int_t kCREXTgtIndexMax = 2
 
Double_t fBeamCurrentThreshold
 
Bool_t fBeamIsPresent
 
Bool_t fBlinderIsOkay
 
EQwBlindingStrategy fBlindingStrategy
 
Double_t fBlindingOffset
 Blinding strategy.
 
Double_t fBlindingOffset_Base
 The term to be added to detector asymmetries.
 
Double_t fBlindingFactor
 The term to be added to detector asymmetries, before polarity correction.
 
Double_t fMaximumBlindingAsymmetry
 Default maximum blinding factor (in fraction from identity)
 
Double_t fMaximumBlindingFactor
 Maximum blinding asymmetry (in ppm)
 
UInt_t fSeedID
 Maximum blinding factor (in fraction from identity)
 
TString fSeed
 ID of seed used (seeds.seed_id)
 
std::vector< UChar_t > fDigest
 Default seed.
 
std::string fChecksum
 Checksum in raw hex.
 
std::vector< double > fTestValues
 Checksum in ASCII hex.
 
std::vector< double > fBlindTestValues
 Vector of test values, original.
 
std::vector< double > fUnBlindTestValues
 Vector of test values, after blinding.
 
std::vector< Int_t > fPatternCounters
 Counts the number of events in each failure mode.
 
std::vector< Int_t > fPairCounters
 Counts the number of helicity pairs in each failure mode.
 

Static Private Attributes

static const Double_t kDefaultMaximumBlindingAsymmetry = 0.150
 The factor to be multiplied to detector asymmetries.
 
static const Double_t kDefaultMaximumBlindingFactor = 0.0
 Default maximum blinding asymmetry (in ppm)
 
static const TString kDefaultSeed = "Default seed, should not be used!"
 Seed string (seeds.seed)
 

Detailed Description

Data blinding utilities for parity violation analysis.

Implements cryptographic data blinding to prevent bias in parity violation measurements. Supports multiple blinding strategies (additive, multiplicative, or combined) with encrypted offsets and factors. Provides both asymmetry and difference blinding schemes to maintain analysis integrity while preserving statistical properties of the data.

Definition at line 57 of file QwBlinder.h.

Member Enumeration Documentation

◆ EQwBlinderStatus

Status of the blinding process or intermediate steps of the process.

Enumerator
kIndeterminate 
kNotBlindable 
kBlindable 
kBlindableFail 

Definition at line 69 of file QwBlinder.h.

69 {
74 };
@ kBlindableFail
Definition QwBlinder.h:73
@ kIndeterminate
Definition QwBlinder.h:70
@ kNotBlindable
Definition QwBlinder.h:71

◆ EQwBlindingStrategy

Available blinding strategies.

Enumerator
kDisabled 
kAdditive 
kMultiplicative 
kAdditiveMultiplicative 

Definition at line 62 of file QwBlinder.h.

62 {
67 };
@ kMultiplicative
Definition QwBlinder.h:65
@ kAdditiveMultiplicative
Definition QwBlinder.h:66

Constructor & Destructor Documentation

◆ QwBlinder() [1/2]

QwBlinder::QwBlinder ( const EQwBlindingStrategy blinding_strategy = kAdditive)

Default constructor with optional database.

Default constructor using optional database connection and blinding strategy

Parameters
blinding_strategyBlinding strategy

Definition at line 83 of file QwBlinder.cc.

83 :
87 //
93 //
95 fBeamIsPresent(kFALSE),
96 fBlindingStrategy(blinding_strategy),
97 fBlindingOffset(0.0),
99 fBlindingFactor(1.0),
100 //
103{
104 // Set up the blinder with seed_id 0
106 fSeedID = 0;
107
108 fCREXTargetIndex = -1;
109
110 Int_t tgt_index;
111
112 // Read parameter file
113 QwParameterFile blinder("blinder.map");
114 if (blinder.FileHasVariablePair("=", "seed", fSeed))
115 QwVerbose << "Using seed from file: " << fSeed << QwLog::endl;
116 if (blinder.FileHasVariablePair("=", "max_asymmetry", fMaximumBlindingAsymmetry))
117 QwVerbose << "Using blinding box: " << fMaximumBlindingAsymmetry << " ppm" << QwLog::endl;
118 if (blinder.FileHasVariablePair("=", "max_factor", fMaximumBlindingFactor))
119 QwVerbose << "Using blinding factor: " << fMaximumBlindingFactor << QwLog::endl;
120 if (blinder.FileHasVariablePair("=", "crex_target_index", tgt_index)){
121 if (tgt_index>=kCREXTgtIndexMin && tgt_index<=kCREXTgtIndexMax){
122 fCREXTargetIndex = tgt_index;
123 } else {
124 QwError << "Invalid CREX target index for blindable events! Exiting!"
125 << QwLog::endl;
126 exit(100);
127 }
128 }
129 QwMessage << "What is the blindable CREX target position (-1 means we're using the PREX positions)? " << fCREXTargetIndex << QwLog::endl;
131 fSeed.Prepend(TString("[Using CREX positions!] "));
132 QwMessage << "Updated the seed string: " << fSeed << QwLog::endl;
133 }
134 std::string strategy;
135 if (blinder.FileHasVariablePair("=", "strategy", strategy)) {
136 std::transform(strategy.begin(), strategy.end(), strategy.begin(), ::tolower);
137 QwVerbose << "Using blinding strategy from file: " << strategy << QwLog::endl;
138 if (strategy == "disabled") fBlindingStrategy = kDisabled;
139 else if (strategy == "additive") fBlindingStrategy = kAdditive;
140 else if (strategy == "multiplicative") fBlindingStrategy = kMultiplicative;
141 else if (strategy == "additivemultiplicative") fBlindingStrategy = kAdditiveMultiplicative;
142 else QwWarning << "Blinding strategy " << strategy << " not recognized" << QwLog::endl;
143 }
144
145 std::string spin_direction;
146 if (blinder.FileHasVariablePair("=", "force-spin-direction", spin_direction)) {
147 std::transform(spin_direction.begin(), spin_direction.end(), spin_direction.begin(), ::tolower);
148 if (spin_direction == "spin-forward"){
149 QwWarning << "QwBlinder::QwBlinder: Spin direction forced with force-spin-direction==spin-forward" << QwLog::endl;
151 SetIHWPPolarity(+1);
152 fSpinDirectionForced = kTRUE;
153 } else if (spin_direction == "spin-backward"){
154 QwWarning << "QwBlinder::QwBlinder: Spin direction forced with force-spin-direction==spin-backward" << QwLog::endl;
156 SetIHWPPolarity(+1);
157 fSpinDirectionForced = kTRUE;
158 } else if (spin_direction == "spin-vertical"){
159 QwWarning << "QwBlinder::QwBlinder: Spin direction forced with force-spin-direction==spin-vertical" << QwLog::endl;
161 SetIHWPPolarity(+1);
162 fSpinDirectionForced = kTRUE;
163 } else if (spin_direction == "spin-horizontal"){
164 QwWarning << "QwBlinder::QwBlinder: Spin direction forced with force-spin-direction==spin-horizontal" << QwLog::endl;
166 SetIHWPPolarity(+1);
167 fSpinDirectionForced = kTRUE;
168 } else {
169 QwError << "QwBlinder::QwBlinder: Unrecognized option given to force-spin-direction in blinder.map; "
170 << "force-spin-direction==" << spin_direction << ". Exit and correct the file."
171 << QwLog::endl;
172 exit(10);
173 }
174 }
175
176 std::string target_type;
177 if (blinder.FileHasVariablePair("=", "force-target-type", target_type)) {
178 std::transform(target_type.begin(), target_type.end(), target_type.begin(), ::tolower);
179 if (target_type == "target-blindable"){
180 QwWarning << "QwBlinder::QwBlinder: Target position forced with force-target-type==target-blindable" << QwLog::endl;
181 fTargetPositionForced = kTRUE;
183 } else if (target_type == "target-out"){
184 QwWarning << "QwBlinder::QwBlinder: Target position forced with force-target-type==target-out" << QwLog::endl;
185 fTargetPositionForced = kTRUE;
187 } else {
188 QwError << "QwBlinder::QwBlinder: Unrecognized option given to force-target-type in blinder.map; "
189 << "force-target-type==" << target_type << ". Exit and correct the file."
190 << QwLog::endl;
191 exit(10);
192 }
193 }
194
195 // Initialize blinder from seed
196 InitBlinders(0);
197 // Calculate set of test values
198 InitTestValues(10);
199
201 if (fWienMode == kWienForward){
203 } else if (fWienMode == kWienBackward){
205 } else {
206 fBlindingOffset = 0.0;
207 }
208 }
209
210 // Resize counters
213}
#define QwVerbose
Predefined log drain for verbose messages.
Definition QwLog.h:54
#define QwError
Predefined log drain for errors.
Definition QwLog.h:39
#define QwWarning
Predefined log drain for warnings.
Definition QwLog.h:44
#define QwMessage
Predefined log drain for regular messages.
Definition QwLog.h:49
@ kWienIndeterminate
Definition QwTypes.h:309
@ kWienBackward
Definition QwTypes.h:311
@ kWienVertTrans
Definition QwTypes.h:312
@ kWienForward
Definition QwTypes.h:310
@ kWienHorizTrans
Definition QwTypes.h:313
@ kBlinderCount_NumCounters
Definition QwBlinder.cc:53
static std::ostream & endl(std::ostream &)
End of the line.
Definition QwLog.cc:297
Int_t kCREXTgtIndexMax
Definition QwBlinder.h:244
void InitTestValues(const int n)
Initializes fBlindingFactor from fSeed.
Definition QwBlinder.cc:759
Int_t fIHWPPolarity
Definition QwBlinder.h:232
Int_t fCREXTargetIndex
Definition QwBlinder.h:242
EQwBlinderStatus fTargetBlindability_firstread
Indicates the first value received of the blindability of the target.
Definition QwBlinder.h:226
Bool_t fTargetPositionForced
Definition QwBlinder.h:228
Bool_t fBeamIsPresent
Definition QwBlinder.h:247
EQwWienMode fWienMode
Definition QwBlinder.h:230
Double_t fBlindingOffset_Base
The term to be added to detector asymmetries.
Definition QwBlinder.h:265
static const TString kDefaultSeed
Seed string (seeds.seed)
Definition QwBlinder.h:277
std::vector< Int_t > fPatternCounters
Counts the number of events in each failure mode.
Definition QwBlinder.h:316
Double_t fBlindingFactor
The term to be added to detector asymmetries, before polarity correction.
Definition QwBlinder.h:266
Double_t fBlindingOffset
Blinding strategy.
Definition QwBlinder.h:264
Double_t fBeamCurrentThreshold
Definition QwBlinder.h:246
std::vector< Int_t > fPairCounters
Counts the number of helicity pairs in each failure mode.
Definition QwBlinder.h:317
Double_t fMaximumBlindingAsymmetry
Default maximum blinding factor (in fraction from identity)
Definition QwBlinder.h:272
static const Double_t kDefaultMaximumBlindingAsymmetry
The factor to be multiplied to detector asymmetries.
Definition QwBlinder.h:269
void SetTargetBlindability(EQwBlinderStatus status)
Set the current target blindability status.
void SetWienState(EQwWienMode wienmode)
Int_t kCREXTgtIndexMin
Definition QwBlinder.h:243
TString fSeed
ID of seed used (seeds.seed_id)
Definition QwBlinder.h:276
EQwWienMode fWienMode_firstread
Definition QwBlinder.h:229
void SetIHWPPolarity(Int_t ihwppolarity)
Bool_t fSpinDirectionForced
Definition QwBlinder.h:233
static const Double_t kDefaultMaximumBlindingFactor
Default maximum blinding asymmetry (in ppm)
Definition QwBlinder.h:270
Double_t fMaximumBlindingFactor
Maximum blinding asymmetry (in ppm)
Definition QwBlinder.h:273
void InitBlinders(const UInt_t seed_id)
Vector of test values, after unblinding.
Definition QwBlinder.cc:667
EQwBlindingStrategy fBlindingStrategy
Definition QwBlinder.h:263
UInt_t fSeedID
Maximum blinding factor (in fraction from identity)
Definition QwBlinder.h:275
Int_t fIHWPPolarity_firstread
Definition QwBlinder.h:231
EQwBlinderStatus fTargetBlindability
Definition QwBlinder.h:227

References QwLog::endl(), fBeamCurrentThreshold, fBeamIsPresent, fBlindingFactor, fBlindingOffset, fBlindingOffset_Base, fBlindingStrategy, fCREXTargetIndex, fIHWPPolarity, fIHWPPolarity_firstread, QwParameterFile::FileHasVariablePair(), fMaximumBlindingAsymmetry, fMaximumBlindingFactor, fPairCounters, fPatternCounters, fSeed, fSeedID, fSpinDirectionForced, fTargetBlindability, fTargetBlindability_firstread, fTargetPositionForced, fWienMode, fWienMode_firstread, InitBlinders(), InitTestValues(), kAdditive, kAdditiveMultiplicative, kBlindable, kBlinderCount_NumCounters, kCREXTgtIndexMax, kCREXTgtIndexMin, kDefaultMaximumBlindingAsymmetry, kDefaultMaximumBlindingFactor, kDefaultSeed, kDisabled, kIndeterminate, kMultiplicative, kNotBlindable, kWienBackward, kWienForward, kWienHorizTrans, kWienIndeterminate, kWienVertTrans, QwError, QwMessage, QwVerbose, QwWarning, SetIHWPPolarity(), SetTargetBlindability(), and SetWienState().

Referenced by operator=(), and QwBlinder().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~QwBlinder()

QwBlinder::~QwBlinder ( )
virtual

Default destructor.

Destructor checks the validity of the blinding and unblinding

Definition at line 219 of file QwBlinder.cc.

220{
221 // Check the blinded values
223}
void PrintFinalValues(Int_t kVerbosity=1)

References PrintFinalValues().

+ Here is the call graph for this function:

◆ QwBlinder() [2/2]

QwBlinder::QwBlinder ( const QwBlinder &__attribute__((unused)) blinder)
inlineprivate

Private copy constructor.

Definition at line 258 of file QwBlinder.h.

References fBlindingStrategy, kDisabled, and QwBlinder().

+ Here is the call graph for this function:

Member Function Documentation

◆ Blind() [1/2]

void QwBlinder::Blind ( QwSubsystemArrayParity & diff)
inline

Blind the asymmetry of an array of subsystems.

Definition at line 174 of file QwBlinder.h.

174 {
176 diff.Blind(this);
177 };
EQwBlinderStatus CheckBlindability(std::vector< Int_t > &fCounters)
void Blind(const QwBlinder *blinder)
Blind the asymmetry of this subsystem.

References QwSubsystemArrayParity::Blind(), CheckBlindability(), fPatternCounters, and kNotBlindable.

+ Here is the call graph for this function:

◆ Blind() [2/2]

void QwBlinder::Blind ( QwSubsystemArrayParity & diff,
const QwSubsystemArrayParity & yield )
inline

Blind the difference of an array of subsystems.

Definition at line 191 of file QwBlinder.h.

191 {
193 diff.Blind(this, yield);
194 };

References QwSubsystemArrayParity::Blind(), CheckBlindability(), fPatternCounters, and kNotBlindable.

+ Here is the call graph for this function:

◆ BlindPair() [1/2]

void QwBlinder::BlindPair ( QwSubsystemArrayParity & diff)
inline

Blind the pair asymmetry and only check fBlindingStrategy to avoid overcounting fPatternCounters

Definition at line 180 of file QwBlinder.h.

180 {
182 diff.Blind(this);
183 };

References QwSubsystemArrayParity::Blind(), CheckBlindability(), fPairCounters, and kNotBlindable.

+ Here is the call graph for this function:

◆ BlindPair() [2/2]

void QwBlinder::BlindPair ( QwSubsystemArrayParity & diff,
const QwSubsystemArrayParity & yield )
inline

Blind the pair difference of an array of subsystems.

Definition at line 196 of file QwBlinder.h.

196 {
198 diff.Blind(this, yield);
199 };

References QwSubsystemArrayParity::Blind(), CheckBlindability(), fPairCounters, and kNotBlindable.

+ Here is the call graph for this function:

◆ BlindValue() [1/2]

void QwBlinder::BlindValue ( Double_t & value) const
inline

Asymmetry blinding.

Definition at line 124 of file QwBlinder.h.

124 {
125 switch (fBlindingStrategy) {
126 case kAdditive:
127 value += fBlindingOffset; break;
128 case kMultiplicative:
129 value *= fBlindingFactor; break;
131 value = (value + fBlindingOffset) * fBlindingFactor; break;
132 default: break;
133 }
134 };

References fBlindingFactor, fBlindingOffset, fBlindingStrategy, kAdditive, kAdditiveMultiplicative, and kMultiplicative.

Referenced by QwADC18_Channel::Blind(), QwADC18_Channel::Blind(), QwMollerADC_Channel::Blind(), QwMollerADC_Channel::Blind(), QwVQWK_Channel::Blind(), QwVQWK_Channel::Blind(), and InitTestValues().

+ Here is the caller graph for this function:

◆ BlindValue() [2/2]

void QwBlinder::BlindValue ( Double_t & value,
const Double_t & yield ) const
inline

Difference blinding.

Definition at line 149 of file QwBlinder.h.

149 {
150 switch (fBlindingStrategy) {
151 case kAdditive:
152 value += yield * fBlindingOffset; break;
153 case kMultiplicative:
154 value *= fBlindingFactor; break;
156 value = (value + fBlindingOffset * yield) * fBlindingFactor; break;
157 default: break;
158 }
159 };

References fBlindingFactor, fBlindingOffset, fBlindingStrategy, kAdditive, kAdditiveMultiplicative, and kMultiplicative.

◆ CheckBlindability()

QwBlinder::EQwBlinderStatus QwBlinder::CheckBlindability ( std::vector< Int_t > & fCounters)
private

Definition at line 1298 of file QwBlinder.cc.

1299{
1302 status = QwBlinder::kNotBlindable;
1303 fCounters.at(kBlinderCount_Disabled)++;
1305 QwDebug << "QwBlinder::CheckBlindability: The target blindability is not determined. "
1306 << "Fail this pattern." << QwLog::endl;
1308 fCounters.at(kBlinderCount_UnknownTarget)++;
1311 QwDebug << "QwBlinder::CheckBlindability: The target blindability has changed. "
1312 << "Fail this pattern." << QwLog::endl;
1314 fCounters.at(kBlinderCount_ChangedTarget)++;
1315 } else if (fTargetBlindability==kNotBlindable) {
1316 // This isn't a blindable target, so don't do anything.
1317 status = QwBlinder::kNotBlindable;
1318 fCounters.at(kBlinderCount_NonBlindable)++;
1319 } else if (fTargetBlindability==kBlindable &&
1321 // Wien status changed. Fail
1323 fCounters.at(kBlinderCount_ChangedWien)++;
1324 } else if (fTargetBlindability==kBlindable &&
1326 // IHWP status changed. Fail
1328 fCounters.at(kBlinderCount_ChangedIHWP)++;
1329 } else if (fTargetBlindability==kBlindable &&
1331 // Wien status isn't determined. Fail.
1333 fCounters.at(kBlinderCount_UndefinedWien)++;
1334 } else if (fTargetBlindability==kBlindable &&
1335 fIHWPPolarity==0) {
1336 // IHWP status isn't determined. Fail.
1338 fCounters.at(kBlinderCount_UndefinedIHWP)++;
1339 } else if (fTargetBlindability==kBlindable &&
1341 // We don't have longitudinal beam, so don't blind.
1342 status = QwBlinder::kNotBlindable;
1343 fCounters.at(kBlinderCount_Transverse)++;
1345 && fBeamIsPresent) {
1346 // This is a blindable target and the beam is sufficient.
1347 status = QwBlinder::kBlindable;
1348 fCounters.at(kBlinderCount_Blindable)++;
1350 && (! fBeamIsPresent) ) {
1351 // This is a blindable target but there is insufficient beam present
1352 status = QwBlinder::kNotBlindable;
1353 fCounters.at(kBlinderCount_NoBeam)++;
1354 } else {
1355 QwError << "QwBlinder::CheckBlindability: The pattern blindability is unclear. "
1356 << "Fail this pattern." << QwLog::endl;
1358 fCounters.at(kBlinderCount_OtherFailure)++;
1359 }
1360 //
1362
1363 return status;
1364}
#define QwDebug
Predefined log drain for debugging output.
Definition QwLog.h:59
@ kBlinderCount_ChangedIHWP
Definition QwBlinder.cc:51
@ kBlinderCount_NoBeam
Definition QwBlinder.cc:45
@ kBlinderCount_UndefinedIHWP
Definition QwBlinder.cc:50
@ kBlinderCount_Blindable
Definition QwBlinder.cc:41
@ kBlinderCount_UnknownTarget
Definition QwBlinder.cc:46
@ kBlinderCount_OtherFailure
Definition QwBlinder.cc:52
@ kBlinderCount_NonBlindable
Definition QwBlinder.cc:42
@ kBlinderCount_ChangedWien
Definition QwBlinder.cc:49
@ kBlinderCount_ChangedTarget
Definition QwBlinder.cc:47
@ kBlinderCount_Transverse
Definition QwBlinder.cc:43
@ kBlinderCount_UndefinedWien
Definition QwBlinder.cc:48
@ kBlinderCount_Disabled
Definition QwBlinder.cc:44
EQwBlinderStatus
Status of the blinding process or intermediate steps of the process.
Definition QwBlinder.h:69
Bool_t fBlinderIsOkay
Definition QwBlinder.h:250

References QwLog::endl(), fBeamIsPresent, fBlinderIsOkay, fBlindingStrategy, fIHWPPolarity, fIHWPPolarity_firstread, fTargetBlindability, fTargetBlindability_firstread, fTargetPositionForced, fWienMode, fWienMode_firstread, kBlindable, kBlindableFail, kBlinderCount_Blindable, kBlinderCount_ChangedIHWP, kBlinderCount_ChangedTarget, kBlinderCount_ChangedWien, kBlinderCount_Disabled, kBlinderCount_NoBeam, kBlinderCount_NonBlindable, kBlinderCount_OtherFailure, kBlinderCount_Transverse, kBlinderCount_UndefinedIHWP, kBlinderCount_UndefinedWien, kBlinderCount_UnknownTarget, kDisabled, kIndeterminate, kNotBlindable, kWienHorizTrans, kWienIndeterminate, kWienVertTrans, QwDebug, and QwError.

Referenced by Blind(), Blind(), BlindPair(), and BlindPair().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckTestValues()

Bool_t QwBlinder::CheckTestValues ( )
private

Initializes the test values: fTestNumber, fTestValue, fBlindTestValue, if fBlindingFactor is set.

--------------------------------------------------------—

Function to write the checksum into the analysis table

Parameters: void

Return: void

Note: This function assumes that the analysis table has already

been filled for the run.



This routines checks to see if the stored fBlindTestValues[i] match a recomputed blinded test value. The values are cast into floats, and their difference must be less than a change

of the least-significant-bit of fBlindTestValues[i].

First test: compare a blinded value with a second computation

Second test: compare the unblinded value with the original value

Definition at line 1017 of file QwBlinder.cc.

1018{
1019 Bool_t status = kTRUE;
1020
1021 Double_t tmp_offset = fBlindingOffset;
1023 double epsilon = std::numeric_limits<double>::epsilon();
1024 for (size_t i = 0; i < fTestValues.size(); i++) {
1025
1026 /// First test: compare a blinded value with a second computation
1027 double checkval = fBlindTestValues[i];
1028 UnBlindValue(checkval);
1029
1030 double test1 = fTestValues[i];
1031 double test2 = checkval;
1032 if ((test1 - test2) <= -epsilon || (test1 - test2) >= epsilon) {
1033 QwError << "QwBlinder::CheckTestValues(): Unblinded test value "
1034 << i
1035 << " does not agree with original test value, "
1036 << "with a difference of "
1037 << (test1 - test2)
1038 << " (epsilon==" << epsilon << ")"
1039 << "." << QwLog::endl;
1040 status = kFALSE;
1041 }
1042
1043 /// Second test: compare the unblinded value with the original value
1044 test1 = fUnBlindTestValues[i];
1045 test2 = fTestValues[i];
1046 if ((test1 - test2) <= -epsilon || (test1 - test2) >= epsilon) {
1047 QwError << "QwBlinder::CheckTestValues(): Unblinded test value "
1048 << i
1049 << " does not agree with original test value, "
1050 << "with a difference of "
1051 << (test1 - test2) << "." << QwLog::endl;
1052 status = kFALSE;
1053 }
1054 }
1055 fBlindingOffset = tmp_offset;
1056 return status;
1057}
std::vector< double > fBlindTestValues
Vector of test values, original.
Definition QwBlinder.h:283
std::vector< double > fTestValues
Checksum in ASCII hex.
Definition QwBlinder.h:282
void UnBlindValue(Double_t &value) const
Asymmetry unblinding.
Definition QwBlinder.h:136
std::vector< double > fUnBlindTestValues
Vector of test values, after blinding.
Definition QwBlinder.h:284

References QwLog::endl(), fBlindingOffset, fBlindingOffset_Base, fBlindTestValues, fTestValues, fUnBlindTestValues, QwError, and UnBlindValue().

Referenced by PrintFinalValues().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ClearEventData()

void QwBlinder::ClearEventData ( )
inline

Definition at line 101 of file QwBlinder.h.

101 {
102 fBeamIsPresent = kTRUE;
103 };

References fBeamIsPresent.

◆ ConstructObjects()

void QwBlinder::ConstructObjects ( TDirectory * folder,
TString & prefix )
inline

Definition at line 208 of file QwBlinder.h.

208 {
209 if (folder != NULL) folder->cd();
210 const TObjString* seed = new TObjString(fSeed);
211 folder->WriteTObject(seed, prefix + "seed", "WriteDelete");
212 const TObjString* seedID = new TObjString(Form("%u",fSeedID));
213 folder->WriteTObject(seedID, prefix + "seedID", "WriteDelete");
214 const TObjString* strategy = new TObjString(Form("%u", fBlindingStrategy));
215 folder->WriteTObject(strategy, prefix + "strategy", "WriteDelete");
216 const TObjString* max_asymmetry = new TObjString(Form("%f",fMaximumBlindingAsymmetry));
217 folder->WriteTObject(max_asymmetry, prefix + "max_asymmetry", "WriteDelete");
218 const TObjString* max_factor = new TObjString(Form("%f",fMaximumBlindingFactor));
219 folder->WriteTObject(max_factor, prefix + "max_factor", "WriteDelete");
220 const TObjString* checksum = new TObjString(fChecksum.c_str());
221 folder->WriteTObject(checksum, prefix + "checksum", "WriteDelete");
222 };
std::string fChecksum
Checksum in raw hex.
Definition QwBlinder.h:280

References fBlindingStrategy, fChecksum, fMaximumBlindingAsymmetry, fMaximumBlindingFactor, fSeed, and fSeedID.

◆ DefineOptions()

void QwBlinder::DefineOptions ( QwOptions & options)
static

Definition at line 69 of file QwBlinder.cc.

69 {
70 options.AddOptions("Blinder")("blinder.force-target-blindable", po::value<bool>()->default_bool_value(false),
71 "Forces the blinder to interpret the target as being in a blindable position");
72 options.AddOptions("Blinder")("blinder.force-target-out", po::value<bool>()->default_bool_value(false),
73 "Forces the blinder to interpret the target position as target-out");
74 options.AddOptions("Blinder")("blinder.beam-current-threshold", po::value<double>()->default_value(2.5),
75 "Beam current in microamps below which data will not be blinded");
76}
po::options_description_easy_init AddOptions(const std::string &blockname="Specialized options")
Add an option to a named block or create new block.
Definition QwOptions.h:170

References QwOptions::AddOptions().

Referenced by QwHelicityPattern::DefineOptions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GenerateDigest()

std::vector< UChar_t > QwBlinder::GenerateDigest ( const TString & input) const
private

Writes fTestNumber and fBlindTestValue to DB for this analysis ID.

Generate an MD5 digest of the blinding parameters

Parameters
inputInput string
Returns
MD5 digest of the input string

Definition at line 1065 of file QwBlinder.cc.

1066{
1067 // Initialize MD5 checksum array
1068 const UInt_t length = 16;
1069 UChar_t value[length];
1070 for (UInt_t i = 0; i < length; i++)
1071 value[i] = 0;
1072
1073 // Calculate MD5 checksum from input and store in md5_value
1074 TMD5 md5;
1075 md5.Update((UChar_t*) input.Data(), input.Length());
1076 md5.Final(value);
1077
1078 // Copy the MD5 checksum in an STL vector
1079 std::vector<UChar_t> output;
1080 for (UInt_t i = 0; i < length; i++)
1081 output.push_back(value[i]);
1082
1083 return output;
1084}

Referenced by InitBlinders(), and UseMD5().

+ Here is the caller graph for this function:

◆ InitBlinders()

void QwBlinder::InitBlinders ( const UInt_t seed_id)
private

Vector of test values, after unblinding.

--------------------------------------------------------—

Function to read the seed in from the database.

Parameters: seed_id = ID number of seed to use (0 = most recent seed)

Return: Int_t



Initialize the blinder parameters

The blinding constants are determined in two steps.

First, the blinding asymmetry (offset) is determined. It is generated from a signed number between +/- 0.244948974 that is squared to get a number between +/- 0.06 ppm.

Secondly, the multiplicative blinding factor is determined. This number is generated from the blinding asymmetry between, say, 0.9 and 1.1 by an oscillating but uniformly distributed sawtooth function.

TODO: This section of InitBlinders doesn't calculate a reasonable fBlindingFactor but we don't use it for anything.

Definition at line 667 of file QwBlinder.cc.

668{
669 // If the blinding strategy is disabled
671
673 fSeedID = 0;
674 fBlindingFactor = 1.0;
675 fBlindingOffset = 0.0;
677 QwWarning << "Blinding parameters have been disabled!"<< QwLog::endl;
678
679 // Else blinding is enabled
680 } else {
681
682 Int_t finalseed = UseMD5(fSeed);
683
684 Double_t newtempout;
685 if ((finalseed & 0x80000000) == 0x80000000) {
686 newtempout = -1.0 * (finalseed & 0x7FFFFFFF);
687 } else {
688 newtempout = 1.0 * (finalseed & 0x7FFFFFFF);
689 }
690
691
692 /// The blinding constants are determined in two steps.
693 ///
694 /// First, the blinding asymmetry (offset) is determined. It is
695 /// generated from a signed number between +/- 0.244948974 that
696 /// is squared to get a number between +/- 0.06 ppm.
697 static Double_t maximum_asymmetry_sqrt = sqrt(fMaximumBlindingAsymmetry);
698 Double_t tmp1 = maximum_asymmetry_sqrt * (newtempout / Int_t(0x7FFFFFFF));
699 fBlindingOffset = tmp1 * fabs(tmp1) * 0.000001;
700
701 // Do another little calculation to round off the blinding asymmetry
702 Double_t tmp2;
703 tmp1 = fBlindingOffset * 4; // Exactly shifts by two binary places
704 tmp2 = tmp1 + fBlindingOffset; // Rounds 5*fBlindingOffset
705 fBlindingOffset = tmp2 - tmp1; // fBlindingOffset has been rounded.
706
707 // Set the base blinding offset.
709
710 /// Secondly, the multiplicative blinding factor is determined. This
711 /// number is generated from the blinding asymmetry between, say, 0.9 and 1.1
712 /// by an oscillating but uniformly distributed sawtooth function.
713 fBlindingFactor = 1.0;
714 if (fMaximumBlindingAsymmetry > 0.0) {
715 /// TODO: This section of InitBlinders doesn't calculate a reasonable fBlindingFactor but we don't use it for anything.
718 }
719
720 QwMessage << "Blinding parameters have been calculated."<< QwLog::endl;
721
722 }
723
724 // Generate checksum
725#if __cplusplus < 202002L
726 ULong64_t factor_bits, offset_bits;
727 memcpy(&factor_bits, &fBlindingFactor, sizeof(ULong64_t));
728 memcpy(&offset_bits, &fBlindingOffset, sizeof(ULong64_t));
729#else
730 auto factor_bits = std::bit_cast<ULong64_t>(fBlindingFactor);
731 auto offset_bits = std::bit_cast<ULong64_t>(fBlindingOffset);
732#endif
733 TString hex_string;
734 hex_string.Form("%.16llx%.16llx", factor_bits, offset_bits);
735 fDigest = GenerateDigest(hex_string);
736 fChecksum = "";
737 for (size_t i = 0; i < fDigest.size(); i++)
738 fChecksum += string(Form("%.2x",fDigest[i]));
739}
unsigned long long ULong64_t
Definition QwBlinder.h:41
std::vector< UChar_t > GenerateDigest(const TString &input) const
Writes fTestNumber and fBlindTestValue to DB for this analysis ID.
std::vector< UChar_t > fDigest
Default seed.
Definition QwBlinder.h:279
Int_t UseMD5(const TString &barestring)
Recomputes fBlindTestValue to check for memory errors.
Definition QwBlinder.cc:916

References QwLog::endl(), fBlindingFactor, fBlindingOffset, fBlindingOffset_Base, fBlindingStrategy, fChecksum, fDigest, fMaximumBlindingAsymmetry, fSeed, fSeedID, GenerateDigest(), kDefaultSeed, kDisabled, QwMessage, QwWarning, and UseMD5().

Referenced by QwBlinder(), and Update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InitTestValues()

void QwBlinder::InitTestValues ( const int n)
private

Initializes fBlindingFactor from fSeed.

Generate a set of test values of similar size as measured asymmetries

Parameters
nNumber of test values

Definition at line 759 of file QwBlinder.cc.

760{
761 // Use the stored seed to get a pseudorandom number
762 Int_t finalseed = UsePseudorandom(fSeed);
763
764 fTestValues.clear();
765 fBlindTestValues.clear();
766 fUnBlindTestValues.clear();
767
768 Double_t tmp_offset = fBlindingOffset;
770 // For each test case
771 for (int i = 0; i < n; i++) {
772
773 // Generate a pseudorandom number
774 for (Int_t j = 0; j < 16; j++) {
775 finalseed &= 0x7FFFFFFF;
776 if ((finalseed & 0x800000) == 0x800000) {
777 finalseed = ((finalseed ^ 0x00000d) << 1) | 0x1;
778 } else {
779 finalseed <<= 1;
780 }
781 }
782
783 // Mask out the low digits of the finalseed, multiply by two,
784 // divide by the mask value, subtract from 1, and divide result by
785 // 1.0e6 to get a range of about -1000 to +1000 ppb.
786 Int_t mask = 0xFFFFFF;
787 Double_t tempval = (1.0 - 2.0*(finalseed&mask)/mask) / (1.0e6);
788
789 // Store the test values
790 fTestValues.push_back(tempval);
791 BlindValue(tempval);
792 fBlindTestValues.push_back(tempval);
793 UnBlindValue(tempval);
794 fUnBlindTestValues.push_back(tempval);
795 }
796 fBlindingOffset = tmp_offset;
797 QwMessage << "QwBlinder::InitTestValues(): A total of " << fTestValues.size()
798 << " test values have been calculated successfully." << QwLog::endl;
799}
Int_t UsePseudorandom(const TString &barestring)
Definition QwBlinder.cc:851
void BlindValue(Double_t &value) const
Asymmetry blinding.
Definition QwBlinder.h:124

References BlindValue(), QwLog::endl(), fBlindingOffset, fBlindingOffset_Base, fBlindTestValues, fSeed, fTestValues, fUnBlindTestValues, QwMessage, UnBlindValue(), and UsePseudorandom().

Referenced by QwBlinder(), and Update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsBlinderOkay()

const Bool_t & QwBlinder::IsBlinderOkay ( ) const
inline

Definition at line 206 of file QwBlinder.h.

206{return fBlinderIsOkay;};

References fBlinderIsOkay.

Referenced by QwADC18_Channel::Blind(), QwADC18_Channel::Blind(), QwMollerADC_Channel::Blind(), QwMollerADC_Channel::Blind(), QwVQWK_Channel::Blind(), and QwVQWK_Channel::Blind().

+ Here is the caller graph for this function:

◆ ModifyThisErrorCode()

void QwBlinder::ModifyThisErrorCode ( UInt_t & errorcode) const
inline

Modifies the device error code variable passed to it, if the blinder is not okay.

Definition at line 119 of file QwBlinder.h.

119 {
120 errorcode |= kErrorFlag_BlinderFail;
121 };
static const UInt_t kErrorFlag_BlinderFail
Error flag value.
Definition QwBlinder.h:78

References kErrorFlag_BlinderFail.

Referenced by QwADC18_Channel::Blind(), QwADC18_Channel::Blind(), QwMollerADC_Channel::Blind(), QwMollerADC_Channel::Blind(), QwVQWK_Channel::Blind(), and QwVQWK_Channel::Blind().

+ Here is the caller graph for this function:

◆ operator=()

const QwBlinder & QwBlinder::operator= ( const QwBlinder &__attribute__((unused)) blinder)
inlineprivate

Private assignment operator.

Definition at line 260 of file QwBlinder.h.

260{ return *this; };

References QwBlinder().

+ Here is the call graph for this function:

◆ PrintCountersValues()

void QwBlinder::PrintCountersValues ( std::vector< Int_t > fCounters,
TString counter_type )

Definition at line 1135 of file QwBlinder.cc.

1136{
1137 QwMessage << "Blinder Passed " << counter_type << QwLog::endl;
1138 QwMessage << "\t" << counter_type
1139 << " with blinding disabled: " << fCounters.at(kBlinderCount_Disabled) << QwLog::endl;
1140 QwMessage << "\t" << counter_type
1141 << " on a non-blindable target: " << fCounters.at(kBlinderCount_NonBlindable) << QwLog::endl;
1142 QwMessage << "\t" << counter_type
1143 << " with transverse beam: " << fCounters.at(kBlinderCount_Transverse) << QwLog::endl;
1144 QwMessage << "\t" << counter_type
1145 << " on blindable target with beam present: " << fCounters.at(kBlinderCount_Blindable) << QwLog::endl;
1146 QwMessage << "Blinder Failed " << counter_type << QwLog::endl;
1147 QwMessage << "\t" << counter_type
1148 << " with unknown target position: " << fCounters.at(kBlinderCount_UnknownTarget) << QwLog::endl;
1149 QwMessage << "\t" << counter_type
1150 << " with changed target position: " << fCounters.at(kBlinderCount_ChangedTarget) << QwLog::endl;
1151 QwMessage << "\t" << counter_type
1152 << " with an undefined Wien setting: " << fCounters.at(kBlinderCount_UndefinedWien) << QwLog::endl;
1153 QwMessage << "\t" << counter_type
1154 << " with a changed Wien setting: " << fCounters.at(kBlinderCount_ChangedWien) << QwLog::endl;
1155 QwMessage << "\t" << counter_type
1156 << " with an undefined IHWP setting: " << fCounters.at(kBlinderCount_UndefinedIHWP) << QwLog::endl;
1157 QwMessage << "\t" << counter_type
1158 << " with a changed IHWP setting: " << fCounters.at(kBlinderCount_ChangedIHWP) << QwLog::endl;
1159 QwMessage << "\t" << counter_type
1160 << " on blindable target with no beam: " << fCounters.at(kBlinderCount_NoBeam) << QwLog::endl;
1161 QwMessage << "\t" << counter_type
1162 << " with other blinding failure: " << fCounters.at(kBlinderCount_OtherFailure) << QwLog::endl;
1163
1164}

References QwLog::endl(), kBlinderCount_Blindable, kBlinderCount_ChangedIHWP, kBlinderCount_ChangedTarget, kBlinderCount_ChangedWien, kBlinderCount_Disabled, kBlinderCount_NoBeam, kBlinderCount_NonBlindable, kBlinderCount_OtherFailure, kBlinderCount_Transverse, kBlinderCount_UndefinedIHWP, kBlinderCount_UndefinedWien, kBlinderCount_UnknownTarget, and QwMessage.

Referenced by PrintFinalValues().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PrintFinalValues()

void QwBlinder::PrintFinalValues ( Int_t kVerbosity = 1)

Print a summary of the blinding/unblinding test

Definition at line 1090 of file QwBlinder.cc.

1091{
1092 Int_t total_count = 0;
1093 for (size_t i=0; i<kBlinderCount_NumCounters; i++){
1094 total_count += fPatternCounters.at(i);
1095 }
1096 if (total_count<=0) return;
1097
1098 QwMessage << "QwBlinder::PrintFinalValues(): Begin summary" << QwLog::endl;
1099 QwMessage << "================================================" << QwLog::endl;
1101 if(kVerbosity==1){
1102 QwMessage << "================================================" << QwLog::endl;
1104 }
1105 QwMessage << "================================================" << QwLog::endl;
1106 QwMessage << "The blinding parameters checksum for seed ID "
1107 << fSeedID << " is:" << QwLog::endl;
1109 QwMessage << "================================================" << QwLog::endl;
1111 double epsilon = std::numeric_limits<double>::epsilon();
1112 TString diff;
1113 QwMessage << "The test results are:" << QwLog::endl;
1114 QwMessage << std::setw(8) << "Index"
1115 << std::setw(16) << "Original value"
1116 << std::setw(16) << "Blinded value"
1117 << std::setw(22) << "Orig.-Unblind value"
1118 << QwLog::endl;
1119 for (size_t i = 0; i < fTestValues.size(); i++) {
1120 if ((fTestValues[i]-fUnBlindTestValues[i]) < -epsilon
1121 || (fTestValues[i]-fUnBlindTestValues[i]) > epsilon )
1122 diff = Form("% 9g ppb", fTestValues[i]-fUnBlindTestValues[i]*1e9);
1123 else
1124 diff = "epsilon";
1125 QwMessage << std::setw(8) << i
1126 << std::setw(16) << Form(" [CENSORED]")
1127 << std::setw(16) << Form("% 9.3f ppb",fBlindTestValues[i]*1e9)
1128 << std::setw(22) << diff
1129 << QwLog::endl;
1130 }
1131 QwMessage << "================================================" << QwLog::endl;
1132 QwMessage << "QwBlinder::PrintFinalValues(): End of summary" << QwLog::endl;
1133}
Bool_t CheckTestValues()
void PrintCountersValues(std::vector< Int_t > fCounters, TString counter_type)

References CheckTestValues(), QwLog::endl(), fBlindTestValues, fChecksum, fPairCounters, fPatternCounters, fSeedID, fTestValues, fUnBlindTestValues, kBlinderCount_NumCounters, PrintCountersValues(), and QwMessage.

Referenced by ~QwBlinder().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ProcessOptions()

void QwBlinder::ProcessOptions ( QwOptions & options)

Update the status with new external information.

Update the blinder status with new external information

Parameters
optionsQweak option handler

Definition at line 230 of file QwBlinder.cc.

231{
232 if (options.GetValue<bool>("blinder.force-target-out")
233 && options.GetValue<bool>("blinder.force-target-blindable")){
234 QwError << "QwBlinder::ProcessOptions: Both blinder.force-target-blindable and blinder.force-target-out are set. "
235 << "Only one can be in force at one time. Exit and choose one option."
236 << QwLog::endl;
237 exit(10);
238 } else if (options.GetValue<bool>("blinder.force-target-blindable")){
239 QwWarning << "QwBlinder::ProcessOptions: Target position forced with blinder.force-target-blindable." << QwLog::endl;
240 fTargetPositionForced = kTRUE;
242 } else if (options.GetValue<bool>("blinder.force-target-out")){
243 QwWarning << "QwBlinder::ProcessOptions: Target position forced with blinder.force-target-out." << QwLog::endl;
244 fTargetPositionForced = kTRUE;
246 }
247
248 fBeamCurrentThreshold = options.GetValue<double>("blinder.beam-current-threshold");
249}
T GetValue(const std::string &key)
Get a templated value.
Definition QwOptions.h:236

References QwLog::endl(), fBeamCurrentThreshold, fTargetPositionForced, QwOptions::GetValue(), kBlindable, kNotBlindable, QwError, QwWarning, and SetTargetBlindability().

+ Here is the call graph for this function:

◆ ReadRandomSeed()

Int_t QwBlinder::ReadRandomSeed ( )
private

Read the seed string generated utilizing a random number generator.

--------------------------------------------------------—

Function to read the seed in from the database.

Parameters:

Return: Int_t



--------------------------------------------------------—

Function to read the seed string generated utilizing a random number generator

Parameters: none

Return: Int_t



Definition at line 523 of file QwBlinder.cc.

524{
525 static const Char_t alphanum[] =
526 "0123456789"
527 "!@#$%^&*"
528 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
529 "abcdefghijklmnopqrstuvwxyz";
530
531 Int_t strLen = sizeof(alphanum) - 1;
532 const size_t length = 20;
533 Char_t randomchar[length];
534 // Initialize random number generator.
535 srand(time(0));
536 //get a "random" positive integer
537
538 for (size_t i = 0; i < length; ++i) {
539 randomchar[i] = alphanum[rand() % strLen];
540 }
541 fSeedID=rand();
542 TString frandomSeed(randomchar, length);
543 fSeed=frandomSeed;//a random string
544 return fSeedID;
545}

References fSeed, and fSeedID.

Referenced by Update().

+ Here is the caller graph for this function:

◆ ReadSeed() [1/2]

Int_t QwBlinder::ReadSeed ( QwParityDB * db)
private

Reads the seed from the database object.

◆ ReadSeed() [2/2]

Int_t QwBlinder::ReadSeed ( QwParityDB * db,
const UInt_t seed_id )
private

Reads the seed with specified id from the database object.

Returns an integer from a string using a version of the helicity bit pseudorandom algorithm.

◆ SetIHWPPolarity()

void QwBlinder::SetIHWPPolarity ( Int_t ihwppolarity)
private

Definition at line 1287 of file QwBlinder.cc.

1288{
1289 fIHWPPolarity = ihwppolarity;
1290 if (fIHWPPolarity_firstread == 0 && fIHWPPolarity != 0){
1292 QwMessage << "QwBlinder: First set IHWP state to "
1294 }
1295}

References QwLog::endl(), fIHWPPolarity, fIHWPPolarity_firstread, and QwMessage.

Referenced by QwBlinder(), Update(), and Update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetTargetBlindability()

void QwBlinder::SetTargetBlindability ( QwBlinder::EQwBlinderStatus status)
private

Set the current target blindability status.

Write the blinding parameters to the database

For each analyzed run the database contains a digest of the blinding parameters and a number of blinded test entries.

Definition at line 1265 of file QwBlinder.cc.

1266{
1267 fTargetBlindability = status;
1271 QwMessage << "QwBlinder: First set target blindability to "
1273 }
1274}
static const TString fStatusName[4]
Definition QwBlinder.h:58

References QwLog::endl(), fStatusName, fTargetBlindability, fTargetBlindability_firstread, kIndeterminate, and QwMessage.

Referenced by ProcessOptions(), QwBlinder(), Update(), and Update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetWienState()

void QwBlinder::SetWienState ( EQwWienMode wienmode)
private

Definition at line 1276 of file QwBlinder.cc.

1277{
1278 fWienMode = wienmode;
1282 QwMessage << "QwBlinder: First set Wien state to "
1284 }
1285}
std::string WienModeName(EQwWienMode type)
Definition QwTypes.cc:150

References QwLog::endl(), fWienMode, fWienMode_firstread, kWienIndeterminate, QwMessage, and WienModeName().

Referenced by QwBlinder(), Update(), and Update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UnBlind() [1/2]

void QwBlinder::UnBlind ( QwSubsystemArrayParity & diff)
inline

Unblind the asymmetry of an array of subsystems.

Definition at line 186 of file QwBlinder.h.

186 {
187 diff.UnBlind(this);
188 };
void UnBlind(const QwBlinder *)
Unblind the asymmetry of this subsystem.

References QwSubsystemArrayParity::UnBlind().

+ Here is the call graph for this function:

◆ UnBlind() [2/2]

void QwBlinder::UnBlind ( QwSubsystemArrayParity & diff,
const QwSubsystemArrayParity & yield )
inline

Unblind the difference of an array of subsystems.

Definition at line 202 of file QwBlinder.h.

202 {
203 diff.UnBlind(this, yield);
204 };

References QwSubsystemArrayParity::UnBlind().

+ Here is the call graph for this function:

◆ UnBlindValue() [1/2]

void QwBlinder::UnBlindValue ( Double_t & value) const
inline

Asymmetry unblinding.

Definition at line 136 of file QwBlinder.h.

136 {
137 switch (fBlindingStrategy) {
138 case kAdditive:
139 value -= fBlindingOffset; break;
140 case kMultiplicative:
141 value /= fBlindingFactor; break;
143 value = value / fBlindingFactor - fBlindingOffset; break;
144 default: break;
145 }
146 };

References fBlindingFactor, fBlindingOffset, fBlindingStrategy, kAdditive, kAdditiveMultiplicative, and kMultiplicative.

Referenced by CheckTestValues(), and InitTestValues().

+ Here is the caller graph for this function:

◆ UnBlindValue() [2/2]

void QwBlinder::UnBlindValue ( Double_t & value,
const Double_t & yield ) const
inline

Difference unblinding.

Definition at line 161 of file QwBlinder.h.

161 {
162 switch (fBlindingStrategy) {
163 case kAdditive:
164 value -= yield * fBlindingOffset; break;
165 case kMultiplicative:
166 value /= fBlindingFactor; break;
168 value = value / fBlindingFactor - yield * fBlindingOffset; break;
169 default: break;
170 }
171 };

References fBlindingFactor, fBlindingOffset, fBlindingStrategy, kAdditive, kAdditiveMultiplicative, and kMultiplicative.

◆ Update() [1/4]

void QwBlinder::Update ( )

Update the status using a random number.

Update the blinder status using a random number

Definition at line 276 of file QwBlinder.cc.

277{
278 // Update the seed ID then tell us if it has changed.
279 UInt_t old_seed_id = fSeedID;
281 // Force the target to blindable, Wien to be forward,
282 // and IHWP polarity to be +1
285 SetIHWPPolarity(+1);
286 // If the blinding seed has changed, re-initialize the blinder
287 if (fSeedID != old_seed_id ||
288 (fSeedID==0 && fSeed!=kDefaultSeed) ) {
289 QwWarning << "Changing blinder seed to " << fSeedID
290 << " from " << old_seed_id << "." << QwLog::endl;
292 InitTestValues(10);
293 }
294}
Int_t ReadRandomSeed()
Read the seed string generated utilizing a random number generator.
Definition QwBlinder.cc:523

References QwLog::endl(), fSeed, fSeedID, InitBlinders(), InitTestValues(), kBlindable, kDefaultSeed, kWienForward, QwWarning, ReadRandomSeed(), SetIHWPPolarity(), SetTargetBlindability(), and SetWienState().

+ Here is the call graph for this function:

◆ Update() [2/4]

void QwBlinder::Update ( const QwEPICSEvent & epics)

Update the status with new external information.

Update the blinder status with new external information

Parameters
epicsCurrent EPICS event

Definition at line 324 of file QwBlinder.cc.

325{
326 // Check for the target information
327 // Position:
328 // QWtgt_name == "HYDROGEN-CELL" || QWTGTPOS > 350
329 // Temperature:
330 // QWT_miA < 22.0 && QWT_moA < 22.0
331 // Pressure:
332 // QW_PT3 in [20,35] && QW_PT4 in [20,35]
334 //TString position = epics.GetDataString("QWtgt_name");
335 Double_t tgt_pos = epics.GetDataValue("pcrex90BDSPOS.VAL");
336 QwDebug << "Target parameters used by the blinder: "
337 // << "QWtgt_name=" << position << " "
338 << "QWTGTPOS=" << tgt_pos << " "
339 << QwLog::endl;
340
341 //
342 // **** Target index 1: Beginning of CREX
343 if (fCREXTargetIndex==1 &&
344 (tgt_pos>14.5e6 && tgt_pos<18.0e6) ){
345 // Calcium-48 target position
347
348 } else if (fCREXTargetIndex==1 &&
349 ( (tgt_pos>-1.0e3 && tgt_pos<14.5e6)
350 || (tgt_pos>18.0e6 && tgt_pos<61.e6) ) ){
351 // Reasonable non-calcium-48 target positions
353
354
355 //
356 // **** Target index 2: After 20January change in target location
357 } else if (fCREXTargetIndex==2 &&
358 (tgt_pos>11.5e6 && tgt_pos<14.5e6) ){
359 // Calcium-48 target position (old Ca-40 position)
361
362 } else if (fCREXTargetIndex==2 &&
363 ( (tgt_pos>-1.0e3 && tgt_pos<11.5e6)
364 || (tgt_pos>14.5e6 && tgt_pos<61.e6) ) ){
365 // Reasonable non-calcium-48 target positions
367
368 //
369 // **** Target index -1: These are the PREX positions
370 } else if ( fCREXTargetIndex==-1 &&
371 (/* Target positions before 1 August 2019.*/
372 ( (tgt_pos > 3e6 && tgt_pos < 6.9e6)
373 || (tgt_pos > 7.3e6 && tgt_pos < 7.7e6))
374 /* Target positions after 1 August 2019.*/
375 ||( (tgt_pos>30.e6 && tgt_pos<69e6)
376 || (tgt_pos>73e6 && tgt_pos<78e6)
377 ) ) ){
378 // Lead-208 target positions
380
381 } else if ( fCREXTargetIndex==-1 &&
382 (/* Target positions before 1 August 2019.*/
383 ((tgt_pos > -1e3 && tgt_pos < 3e6)
384 || (tgt_pos > 6.8e6 && tgt_pos < 7.2e6)
385 || (tgt_pos > 7.7e6 && tgt_pos < 10e6))
386 /* Target positions after 1 August 2019.*/
387 || ( (tgt_pos>17e6 && tgt_pos<30e6)
388 || (tgt_pos>69e6 && tgt_pos<73e6)
389 || (tgt_pos>78e6 && tgt_pos<90e6)
390 )
391 ) ){
392 // Positions are not lead-208 targets.
394
395 } else {
397 QwWarning << "Target parameters used by the blinder are indeterminate: "
398 // << "QWtgt_name=" << position << " "
399 << "QWTGTPOS=" << tgt_pos << " "
400 << QwLog::endl;
401 } // End of tests on target positions
402 }
403 // Check for the beam polarity information
404 // IGL1I00DI24_24M Beam Half-wave plate Read(off=out)
405 //
408 // Use the EPICS class functions to determine the
409 // Wien mode and IHWP polarity.
412
413 if (fWienMode == kWienForward){
415 } else if (fWienMode == kWienBackward){
417 } else {
418 fBlindingOffset = 0.0;
419 }
420 }
421}
Int_t DetermineIHWPPolarity() const
EQwWienMode DetermineWienMode() const
Double_t GetDataValue(const string &tag) const

References QwEPICSEvent::DetermineIHWPPolarity(), QwEPICSEvent::DetermineWienMode(), QwLog::endl(), fBlindingOffset, fBlindingOffset_Base, fBlindingStrategy, fCREXTargetIndex, fIHWPPolarity, fSpinDirectionForced, fTargetBlindability, fTargetPositionForced, fWienMode, QwEPICSEvent::GetDataValue(), kBlindable, kDisabled, kIndeterminate, kNotBlindable, kWienBackward, kWienForward, QwDebug, QwWarning, SetIHWPPolarity(), SetTargetBlindability(), and SetWienState().

+ Here is the call graph for this function:

◆ Update() [3/4]

void QwBlinder::Update ( const QwSubsystemArrayParity & detectors)

Update the status with new external information.

Update the blinder status with new external information

Parameters
detectorsCurrent subsystem array

Definition at line 301 of file QwBlinder.cc.

302{
303 // Check for the target blindability flag
305
306 // Check that the current on target is above acceptable limit
307 Bool_t tmp_beam = kFALSE;
308 const VQwHardwareChannel* q_targ = detectors.RequestExternalPointer("q_targ");
309 if (q_targ != nullptr) {
310 if (q_targ->GetValue() > fBeamCurrentThreshold) {
311 tmp_beam = kTRUE;
312 }
313 }
314
315 fBeamIsPresent &= tmp_beam;
316 }
317}
const VQwHardwareChannel * RequestExternalPointer(const TString &name) const
Retrieve a direct pointer to an external variable Searches for the named variable in external subsyst...
Double_t GetValue() const

References fBeamCurrentThreshold, fBeamIsPresent, fBlindingStrategy, fTargetBlindability, VQwHardwareChannel::GetValue(), kBlindable, kDisabled, and MQwPublishable< U, T >::RequestExternalPointer().

+ Here is the call graph for this function:

◆ Update() [4/4]

void QwBlinder::Update ( QwParityDB * db)

Update the status with new external information.

◆ UseMD5()

Int_t QwBlinder::UseMD5 ( const TString & barestring)
private

Recomputes fBlindTestValue to check for memory errors.

Use an MD5 checksum to get a number from the seed string

Parameters
barestringSeed string
Returns
Integer number

Definition at line 916 of file QwBlinder.cc.

917{
918 Int_t temp = 0;
919 Int_t tempout = 0;
920
921 std::vector<UChar_t> digest = GenerateDigest(barestring);
922 for (size_t i = 0; i < digest.size(); i++)
923 {
924 Int_t j = i%4;
925 if (j == 0)
926 {
927 temp = 0;
928 }
929 temp |= (digest[i])<<(24-(j*8));
930 if ( (j==3) || (i==(digest.size()-1)))
931 {
932 tempout ^= temp;
933 }
934 }
935
936 if ((tempout & 0x80000000) == 0x80000000) {
937 tempout = -1 * (tempout & 0x7FFFFFFF);
938 } else {
939 tempout = (tempout & 0x7FFFFFFF);
940 }
941
942 return tempout;
943}

References GenerateDigest().

Referenced by InitBlinders().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UsePseudorandom()

Int_t QwBlinder::UsePseudorandom ( const TString & barestring)
private

Returns an integer from a string using a character manipulation algorithm

Use pseudo-random number generator to get a number from the seed string

Parameters
barestringSeed string
Returns
Integer number

Definition at line 851 of file QwBlinder.cc.

852{
853 ULong64_t finalseed;
854 Int_t bitcount;
855 Int_t tempout = 0;
856
857 // This is an attempt to build a portable 64-bit constant
858 ULong64_t longmask = (0x7FFFFFFF);
859 longmask<<=32;
860 longmask|=0xFFFFFFFF;
861
862 finalseed = 0;
863 bitcount = 0;
864 for (Int_t i=0; i<barestring.Length(); i++)
865 {
866 if ( ((barestring[i])&0xC0)!=0 && ((barestring[i])&0xC0)!=0xC0)
867 {
868 finalseed = ((finalseed&longmask)<<1) | (((barestring[i])&0x40)>>6);
869 bitcount++;
870 }
871 if ( ((barestring[i])&0x30)!=0 && ((barestring[i])&0x30)!=0x30)
872 {
873 finalseed = ((finalseed&longmask)<<1) | (((barestring[i])&0x10)>>4);
874 bitcount++;
875 }
876 if ( ((barestring[i])&0xC)!=0 && ((barestring[i])&0xC)!=0xC)
877 {
878 finalseed = ((finalseed&longmask)<<1) | (((barestring[i])&0x4)>>2);
879 bitcount++;
880 }
881 if ( ((barestring[i])&0x3)!=0 && ((barestring[i])&0x3)!=0x3)
882 {
883 finalseed = ((finalseed&longmask)<<1) | ((barestring[i])&0x1);
884 bitcount++;
885 }
886 }
887 for (Int_t i=0; i<(192-bitcount); i++)
888 {
889 if ((finalseed & 0x800000) == 0x800000)
890 {
891 finalseed = ((finalseed^0x00000d)<<1) | 0x1;
892 }
893 else
894 {
895 finalseed<<=1;
896 }
897 }
898 tempout = (finalseed&0xFFFFFFFF) ^ ((finalseed>>32)&0xFFFFFFFF);
899 if ((tempout&0x80000000) == 0x80000000)
900 {
901 tempout = -1 * (tempout&0x7FFFFFFF);
902 }
903 else
904 {
905 tempout = 1 * (tempout&0x7FFFFFFF);
906 }
907 return tempout;
908}

Referenced by InitTestValues().

+ Here is the caller graph for this function:

◆ UseStringManip()

Int_t QwBlinder::UseStringManip ( const TString & barestring)
private

Returns an integer from a string using MD5.

Use string manipulation to get a number from the seed string

Parameters
barestringSeed string
Returns
Integer number

Definition at line 806 of file QwBlinder.cc.

807{
808 std::vector<UInt_t> choppedwords;
809 UInt_t tmpword = 0;
810 Int_t finalseed = 0;
811
812 for (Int_t i = 0; i < barestring.Length(); i++)
813 {
814 if (i % 4 == 0) tmpword = 0;
815 tmpword |= (char(barestring[i]))<<(24-8*(i%4));
816 if (i%4 == 3 || i == barestring.Length()-1)
817 {
818 choppedwords.push_back(tmpword);
819 finalseed ^= (tmpword);
820 }
821 }
822 for (Int_t i=0; i<64; i++)
823 {
824 finalseed &= 0x7FFFFFFF;
825 if ((finalseed & 0x800000) == 0x800000)
826 {
827 finalseed = ((finalseed^0x00000d)<<1) | 0x1;
828 }
829 else
830 {
831 finalseed<<=1;
832 }
833 }
834 if ((finalseed&0x80000000) == 0x80000000)
835 {
836 finalseed = -1 * (finalseed&0x7FFFFFFF);
837 }
838 else
839 {
840 finalseed = (finalseed&0x7FFFFFFF);
841 }
842 return finalseed;
843}

◆ WriteChecksum()

void QwBlinder::WriteChecksum ( QwParityDB * db)
private

◆ WriteFinalValuesToDB()

void QwBlinder::WriteFinalValuesToDB ( QwParityDB * db)

◆ WriteTestValues()

void QwBlinder::WriteTestValues ( QwParityDB * db)
private

Writes fSeedID and fBFChecksum to DB for this analysis ID.

Field Documentation

◆ fBeamCurrentThreshold

Double_t QwBlinder::fBeamCurrentThreshold
private

Definition at line 246 of file QwBlinder.h.

Referenced by ProcessOptions(), QwBlinder(), and Update().

◆ fBeamIsPresent

Bool_t QwBlinder::fBeamIsPresent
private

Definition at line 247 of file QwBlinder.h.

Referenced by CheckBlindability(), ClearEventData(), QwBlinder(), and Update().

◆ fBlinderIsOkay

Bool_t QwBlinder::fBlinderIsOkay
private

Definition at line 250 of file QwBlinder.h.

Referenced by CheckBlindability(), and IsBlinderOkay().

◆ fBlindingFactor

Double_t QwBlinder::fBlindingFactor
private

The term to be added to detector asymmetries, before polarity correction.

Definition at line 266 of file QwBlinder.h.

Referenced by BlindValue(), BlindValue(), InitBlinders(), QwBlinder(), UnBlindValue(), and UnBlindValue().

◆ fBlindingOffset

Double_t QwBlinder::fBlindingOffset
private

◆ fBlindingOffset_Base

Double_t QwBlinder::fBlindingOffset_Base
private

The term to be added to detector asymmetries.

Definition at line 265 of file QwBlinder.h.

Referenced by CheckTestValues(), InitBlinders(), InitTestValues(), QwBlinder(), and Update().

◆ fBlindingStrategy

◆ fBlindTestValues

std::vector<double> QwBlinder::fBlindTestValues
private

Vector of test values, original.

Definition at line 283 of file QwBlinder.h.

Referenced by CheckTestValues(), InitTestValues(), and PrintFinalValues().

◆ fChecksum

std::string QwBlinder::fChecksum
private

Checksum in raw hex.

Definition at line 280 of file QwBlinder.h.

Referenced by ConstructObjects(), InitBlinders(), and PrintFinalValues().

◆ fCREXTargetIndex

Int_t QwBlinder::fCREXTargetIndex
private

Definition at line 242 of file QwBlinder.h.

Referenced by QwBlinder(), and Update().

◆ fDigest

std::vector<UChar_t> QwBlinder::fDigest
private

Default seed.

Definition at line 279 of file QwBlinder.h.

Referenced by InitBlinders().

◆ fIHWPPolarity

Int_t QwBlinder::fIHWPPolarity
private

Definition at line 232 of file QwBlinder.h.

Referenced by CheckBlindability(), QwBlinder(), SetIHWPPolarity(), and Update().

◆ fIHWPPolarity_firstread

Int_t QwBlinder::fIHWPPolarity_firstread
private

Definition at line 231 of file QwBlinder.h.

Referenced by CheckBlindability(), QwBlinder(), and SetIHWPPolarity().

◆ fMaximumBlindingAsymmetry

Double_t QwBlinder::fMaximumBlindingAsymmetry
private

Default maximum blinding factor (in fraction from identity)

Definition at line 272 of file QwBlinder.h.

Referenced by ConstructObjects(), InitBlinders(), and QwBlinder().

◆ fMaximumBlindingFactor

Double_t QwBlinder::fMaximumBlindingFactor
private

Maximum blinding asymmetry (in ppm)

Definition at line 273 of file QwBlinder.h.

Referenced by ConstructObjects(), and QwBlinder().

◆ fPairCounters

std::vector<Int_t> QwBlinder::fPairCounters
private

Counts the number of helicity pairs in each failure mode.

Definition at line 317 of file QwBlinder.h.

Referenced by BlindPair(), BlindPair(), PrintFinalValues(), and QwBlinder().

◆ fPatternCounters

std::vector<Int_t> QwBlinder::fPatternCounters
private

Counts the number of events in each failure mode.

Definition at line 316 of file QwBlinder.h.

Referenced by Blind(), Blind(), PrintFinalValues(), and QwBlinder().

◆ fSeed

TString QwBlinder::fSeed
private

ID of seed used (seeds.seed_id)

Definition at line 276 of file QwBlinder.h.

Referenced by ConstructObjects(), InitBlinders(), InitTestValues(), QwBlinder(), ReadRandomSeed(), and Update().

◆ fSeedID

UInt_t QwBlinder::fSeedID
private

Maximum blinding factor (in fraction from identity)

Definition at line 275 of file QwBlinder.h.

Referenced by ConstructObjects(), InitBlinders(), PrintFinalValues(), QwBlinder(), ReadRandomSeed(), and Update().

◆ fSpinDirectionForced

Bool_t QwBlinder::fSpinDirectionForced
private

Definition at line 233 of file QwBlinder.h.

Referenced by QwBlinder(), and Update().

◆ fStatusName

const TString QwBlinder::fStatusName
static
Initial value:
= {"Indeterminate", "NotBlindable",
"Blindable", "BlindableFail"}

Definition at line 58 of file QwBlinder.h.

59 :
60

Referenced by SetTargetBlindability().

◆ fTargetBlindability

EQwBlinderStatus QwBlinder::fTargetBlindability
private

Definition at line 227 of file QwBlinder.h.

Referenced by CheckBlindability(), QwBlinder(), SetTargetBlindability(), Update(), and Update().

◆ fTargetBlindability_firstread

EQwBlinderStatus QwBlinder::fTargetBlindability_firstread
private

Indicates the first value received of the blindability of the target.

Definition at line 226 of file QwBlinder.h.

Referenced by CheckBlindability(), QwBlinder(), and SetTargetBlindability().

◆ fTargetPositionForced

Bool_t QwBlinder::fTargetPositionForced
private

Definition at line 228 of file QwBlinder.h.

Referenced by CheckBlindability(), ProcessOptions(), QwBlinder(), and Update().

◆ fTestValues

std::vector<double> QwBlinder::fTestValues
private

Checksum in ASCII hex.

Definition at line 282 of file QwBlinder.h.

Referenced by CheckTestValues(), InitTestValues(), and PrintFinalValues().

◆ fUnBlindTestValues

std::vector<double> QwBlinder::fUnBlindTestValues
private

Vector of test values, after blinding.

Definition at line 284 of file QwBlinder.h.

Referenced by CheckTestValues(), InitTestValues(), and PrintFinalValues().

◆ fWienMode

EQwWienMode QwBlinder::fWienMode
private

Definition at line 230 of file QwBlinder.h.

Referenced by CheckBlindability(), QwBlinder(), SetWienState(), and Update().

◆ fWienMode_firstread

EQwWienMode QwBlinder::fWienMode_firstread
private

Definition at line 229 of file QwBlinder.h.

Referenced by CheckBlindability(), QwBlinder(), and SetWienState().

◆ kCREXTgtIndexMax

Int_t QwBlinder::kCREXTgtIndexMax = 2
private

Definition at line 244 of file QwBlinder.h.

Referenced by QwBlinder().

◆ kCREXTgtIndexMin

Int_t QwBlinder::kCREXTgtIndexMin = 1
private

Definition at line 243 of file QwBlinder.h.

Referenced by QwBlinder().

◆ kDefaultMaximumBlindingAsymmetry

const Double_t QwBlinder::kDefaultMaximumBlindingAsymmetry = 0.150
staticprivate

The factor to be multiplied to detector asymmetries.

Definition at line 269 of file QwBlinder.h.

Referenced by QwBlinder().

◆ kDefaultMaximumBlindingFactor

const Double_t QwBlinder::kDefaultMaximumBlindingFactor = 0.0
staticprivate

Default maximum blinding asymmetry (in ppm)

Definition at line 270 of file QwBlinder.h.

Referenced by QwBlinder().

◆ kDefaultSeed

const TString QwBlinder::kDefaultSeed = "Default seed, should not be used!"
staticprivate

Seed string (seeds.seed)

Definition at line 277 of file QwBlinder.h.

Referenced by InitBlinders(), QwBlinder(), and Update().

◆ kErrorFlag_BlinderFail

const UInt_t QwBlinder::kErrorFlag_BlinderFail = 0x200
static

◆ kValue_BlinderFail

const Double_t QwBlinder::kValue_BlinderFail = -1.0
staticconstexpr

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