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:754
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:670
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 1293 of file QwBlinder.cc.

1294{
1297 status = QwBlinder::kNotBlindable;
1298 fCounters.at(kBlinderCount_Disabled)++;
1300 QwDebug << "QwBlinder::CheckBlindability: The target blindability is not determined. "
1301 << "Fail this pattern." << QwLog::endl;
1303 fCounters.at(kBlinderCount_UnknownTarget)++;
1306 QwDebug << "QwBlinder::CheckBlindability: The target blindability has changed. "
1307 << "Fail this pattern." << QwLog::endl;
1309 fCounters.at(kBlinderCount_ChangedTarget)++;
1310 } else if (fTargetBlindability==kNotBlindable) {
1311 // This isn't a blindable target, so don't do anything.
1312 status = QwBlinder::kNotBlindable;
1313 fCounters.at(kBlinderCount_NonBlindable)++;
1314 } else if (fTargetBlindability==kBlindable &&
1316 // Wien status changed. Fail
1318 fCounters.at(kBlinderCount_ChangedWien)++;
1319 } else if (fTargetBlindability==kBlindable &&
1321 // IHWP status changed. Fail
1323 fCounters.at(kBlinderCount_ChangedIHWP)++;
1324 } else if (fTargetBlindability==kBlindable &&
1326 // Wien status isn't determined. Fail.
1328 fCounters.at(kBlinderCount_UndefinedWien)++;
1329 } else if (fTargetBlindability==kBlindable &&
1330 fIHWPPolarity==0) {
1331 // IHWP status isn't determined. Fail.
1333 fCounters.at(kBlinderCount_UndefinedIHWP)++;
1334 } else if (fTargetBlindability==kBlindable &&
1336 // We don't have longitudinal beam, so don't blind.
1337 status = QwBlinder::kNotBlindable;
1338 fCounters.at(kBlinderCount_Transverse)++;
1339 } else if (fTargetBlindability==kBlindable
1340 && fBeamIsPresent) {
1341 // This is a blindable target and the beam is sufficient.
1342 status = QwBlinder::kBlindable;
1343 fCounters.at(kBlinderCount_Blindable)++;
1344 } else if (fTargetBlindability==kBlindable
1345 && (! fBeamIsPresent) ) {
1346 // This is a blindable target but there is insufficient beam present
1347 status = QwBlinder::kNotBlindable;
1348 fCounters.at(kBlinderCount_NoBeam)++;
1349 } else {
1350 QwError << "QwBlinder::CheckBlindability: The pattern blindability is unclear. "
1351 << "Fail this pattern." << QwLog::endl;
1353 fCounters.at(kBlinderCount_OtherFailure)++;
1354 }
1355 //
1357
1358 return status;
1359}
#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 1012 of file QwBlinder.cc.

1013{
1014 Bool_t status = kTRUE;
1015
1016 Double_t tmp_offset = fBlindingOffset;
1018 double epsilon = std::numeric_limits<double>::epsilon();
1019 for (size_t i = 0; i < fTestValues.size(); i++) {
1020
1021 /// First test: compare a blinded value with a second computation
1022 double checkval = fBlindTestValues[i];
1023 UnBlindValue(checkval);
1024
1025 double test1 = fTestValues[i];
1026 double test2 = checkval;
1027 if ((test1 - test2) <= -epsilon || (test1 - test2) >= epsilon) {
1028 QwError << "QwBlinder::CheckTestValues(): Unblinded test value "
1029 << i
1030 << " does not agree with original test value, "
1031 << "with a difference of "
1032 << (test1 - test2)
1033 << " (epsilon==" << epsilon << ")"
1034 << "." << QwLog::endl;
1035 status = kFALSE;
1036 }
1037
1038 /// Second test: compare the unblinded value with the original value
1039 test1 = fUnBlindTestValues[i];
1040 test2 = fTestValues[i];
1041 if ((test1 - test2) <= -epsilon || (test1 - test2) >= epsilon) {
1042 QwError << "QwBlinder::CheckTestValues(): Unblinded test value "
1043 << i
1044 << " does not agree with original test value, "
1045 << "with a difference of "
1046 << (test1 - test2) << "." << QwLog::endl;
1047 status = kFALSE;
1048 }
1049 }
1050 fBlindingOffset = tmp_offset;
1051 return status;
1052}
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 1060 of file QwBlinder.cc.

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

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 670 of file QwBlinder.cc.

671{
672 // If the blinding strategy is disabled
674
676 fSeedID = 0;
677 fBlindingFactor = 1.0;
678 fBlindingOffset = 0.0;
680 QwWarning << "Blinding parameters have been disabled!"<< QwLog::endl;
681
682 // Else blinding is enabled
683 } else {
684
685 Int_t finalseed = UseMD5(fSeed);
686
687 Double_t newtempout;
688 if ((finalseed & 0x80000000) == 0x80000000) {
689 newtempout = -1.0 * (finalseed & 0x7FFFFFFF);
690 } else {
691 newtempout = 1.0 * (finalseed & 0x7FFFFFFF);
692 }
693
694
695 /// The blinding constants are determined in two steps.
696 ///
697 /// First, the blinding asymmetry (offset) is determined. It is
698 /// generated from a signed number between +/- 0.244948974 that
699 /// is squared to get a number between +/- 0.06 ppm.
700 static Double_t maximum_asymmetry_sqrt = sqrt(fMaximumBlindingAsymmetry);
701 Double_t tmp1 = maximum_asymmetry_sqrt * (newtempout / Int_t(0x7FFFFFFF));
702 fBlindingOffset = tmp1 * fabs(tmp1) * 0.000001;
703
704 // Do another little calculation to round off the blinding asymmetry
705 Double_t tmp2;
706 tmp1 = fBlindingOffset * 4; // Exactly shifts by two binary places
707 tmp2 = tmp1 + fBlindingOffset; // Rounds 5*fBlindingOffset
708 fBlindingOffset = tmp2 - tmp1; // fBlindingOffset has been rounded.
709
710 // Set the base blinding offset.
712
713 /// Secondly, the multiplicative blinding factor is determined. This
714 /// number is generated from the blinding asymmetry between, say, 0.9 and 1.1
715 /// by an oscillating but uniformly distributed sawtooth function.
716 fBlindingFactor = 1.0;
717 if (fMaximumBlindingAsymmetry > 0.0) {
718 /// TODO: This section of InitBlinders doesn't calculate a reasonable fBlindingFactor but we don't use it for anything.
721 }
722
723 QwMessage << "Blinding parameters have been calculated."<< QwLog::endl;
724
725 }
726
727 // Generate checksum
728 TString hex_string;
729 hex_string.Form("%.16llx%.16llx", *(ULong64_t*)(&fBlindingFactor), *(ULong64_t*)(&fBlindingOffset));
730 fDigest = GenerateDigest(hex_string);
731 fChecksum = "";
732 for (size_t i = 0; i < fDigest.size(); i++)
733 fChecksum += string(Form("%.2x",fDigest[i]));
734}
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:911

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 754 of file QwBlinder.cc.

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

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

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 1085 of file QwBlinder.cc.

1086{
1087 Int_t total_count = 0;
1088 for (size_t i=0; i<kBlinderCount_NumCounters; i++){
1089 total_count += fPatternCounters.at(i);
1090 }
1091 if (total_count<=0) return;
1092
1093 QwMessage << "QwBlinder::PrintFinalValues(): Begin summary" << QwLog::endl;
1094 QwMessage << "================================================" << QwLog::endl;
1096 if(kVerbosity==1){
1097 QwMessage << "================================================" << QwLog::endl;
1099 }
1100 QwMessage << "================================================" << QwLog::endl;
1101 QwMessage << "The blinding parameters checksum for seed ID "
1102 << fSeedID << " is:" << QwLog::endl;
1104 QwMessage << "================================================" << QwLog::endl;
1106 double epsilon = std::numeric_limits<double>::epsilon();
1107 TString diff;
1108 QwMessage << "The test results are:" << QwLog::endl;
1109 QwMessage << std::setw(8) << "Index"
1110 << std::setw(16) << "Original value"
1111 << std::setw(16) << "Blinded value"
1112 << std::setw(22) << "Orig.-Unblind value"
1113 << QwLog::endl;
1114 for (size_t i = 0; i < fTestValues.size(); i++) {
1115 if ((fTestValues[i]-fUnBlindTestValues[i]) < -epsilon
1116 || (fTestValues[i]-fUnBlindTestValues[i]) > epsilon )
1117 diff = Form("% 9g ppb", fTestValues[i]-fUnBlindTestValues[i]*1e9);
1118 else
1119 diff = "epsilon";
1120 QwMessage << std::setw(8) << i
1121 << std::setw(16) << Form(" [CENSORED]")
1122 << std::setw(16) << Form("% 9.3f ppb",fBlindTestValues[i]*1e9)
1123 << std::setw(22) << diff
1124 << QwLog::endl;
1125 }
1126 QwMessage << "================================================" << QwLog::endl;
1127 QwMessage << "QwBlinder::PrintFinalValues(): End of summary" << QwLog::endl;
1128}
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 526 of file QwBlinder.cc.

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

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 1282 of file QwBlinder.cc.

1283{
1284 fIHWPPolarity = ihwppolarity;
1285 if (fIHWPPolarity_firstread == 0 && fIHWPPolarity != 0){
1287 QwMessage << "QwBlinder: First set IHWP state to "
1289 }
1290}

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 1260 of file QwBlinder.cc.

1261{
1262 fTargetBlindability = status;
1266 QwMessage << "QwBlinder: First set target blindability to "
1268 }
1269}
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 1271 of file QwBlinder.cc.

1272{
1273 fWienMode = wienmode;
1277 QwMessage << "QwBlinder: First set Wien state to "
1279 }
1280}
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:526

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 327 of file QwBlinder.cc.

328{
329 // Check for the target information
330 // Position:
331 // QWtgt_name == "HYDROGEN-CELL" || QWTGTPOS > 350
332 // Temperature:
333 // QWT_miA < 22.0 && QWT_moA < 22.0
334 // Pressure:
335 // QW_PT3 in [20,35] && QW_PT4 in [20,35]
337 //TString position = epics.GetDataString("QWtgt_name");
338 Double_t tgt_pos = epics.GetDataValue("pcrex90BDSPOS.VAL");
339 QwDebug << "Target parameters used by the blinder: "
340 // << "QWtgt_name=" << position << " "
341 << "QWTGTPOS=" << tgt_pos << " "
342 << QwLog::endl;
343
344 //
345 // **** Target index 1: Beginning of CREX
346 if (fCREXTargetIndex==1 &&
347 (tgt_pos>14.5e6 && tgt_pos<18.0e6) ){
348 // Calcium-48 target position
350
351 } else if (fCREXTargetIndex==1 &&
352 ( (tgt_pos>-1.0e3 && tgt_pos<14.5e6)
353 || (tgt_pos>18.0e6 && tgt_pos<61.e6) ) ){
354 // Reasonable non-calcium-48 target positions
356
357
358 //
359 // **** Target index 2: After 20January change in target location
360 } else if (fCREXTargetIndex==2 &&
361 (tgt_pos>11.5e6 && tgt_pos<14.5e6) ){
362 // Calcium-48 target position (old Ca-40 position)
364
365 } else if (fCREXTargetIndex==2 &&
366 ( (tgt_pos>-1.0e3 && tgt_pos<11.5e6)
367 || (tgt_pos>14.5e6 && tgt_pos<61.e6) ) ){
368 // Reasonable non-calcium-48 target positions
370
371 //
372 // **** Target index -1: These are the PREX positions
373 } else if ( fCREXTargetIndex==-1 &&
374 (/* Target positions before 1 August 2019.*/
375 ( (tgt_pos > 3e6 && tgt_pos < 6.9e6)
376 || (tgt_pos > 7.3e6 && tgt_pos < 7.7e6))
377 /* Target positions after 1 August 2019.*/
378 ||( (tgt_pos>30.e6 && tgt_pos<69e6)
379 || (tgt_pos>73e6 && tgt_pos<78e6)
380 ) ) ){
381 // Lead-208 target positions
383
384 } else if ( fCREXTargetIndex==-1 &&
385 (/* Target positions before 1 August 2019.*/
386 ((tgt_pos > -1e3 && tgt_pos < 3e6)
387 || (tgt_pos > 6.8e6 && tgt_pos < 7.2e6)
388 || (tgt_pos > 7.7e6 && tgt_pos < 10e6))
389 /* Target positions after 1 August 2019.*/
390 || ( (tgt_pos>17e6 && tgt_pos<30e6)
391 || (tgt_pos>69e6 && tgt_pos<73e6)
392 || (tgt_pos>78e6 && tgt_pos<90e6)
393 )
394 ) ){
395 // Positions are not lead-208 targets.
397
398 } else {
400 QwWarning << "Target parameters used by the blinder are indeterminate: "
401 // << "QWtgt_name=" << position << " "
402 << "QWTGTPOS=" << tgt_pos << " "
403 << QwLog::endl;
404 } // End of tests on target positions
405 }
406 // Check for the beam polarity information
407 // IGL1I00DI24_24M Beam Half-wave plate Read(off=out)
408 //
411 // Use the EPICS class functions to determine the
412 // Wien mode and IHWP polarity.
415
416 if (fWienMode == kWienForward){
418 } else if (fWienMode == kWienBackward){
420 } else {
421 fBlindingOffset = 0.0;
422 }
423 }
424}
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 static QwVQWK_Channel q_targ("q_targ");
305 // Check for the target blindability flag
306
307
308 // Check that the current on target is above acceptable limit
309 Bool_t tmp_beam = kFALSE;
310 // if (detectors.RequestExternalValue(q_targ.GetElementName(), &q_targ)) {
311 if (detectors.RequestExternalValue("q_targ", &q_targ)) {
312 if (q_targ.GetValue() > fBeamCurrentThreshold){
313 // std::cerr << "q_targ.GetValue()=="
314 // << q_targ.GetValue() << std::endl;
315 tmp_beam = kTRUE;
316 }
317 }
318 fBeamIsPresent &= tmp_beam;
319 }
320}
Bool_t RequestExternalValue(const TString &name, VQwHardwareChannel *value) const
Retrieve a variable value from external sources by copying Searches for the named variable in externa...

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

+ 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 911 of file QwBlinder.cc.

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

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 846 of file QwBlinder.cc.

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

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 801 of file QwBlinder.cc.

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

◆ 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: