JAPAn
Just Another Parity Analyzer
Loading...
Searching...
No Matches
QwBlindDetectorArray.cc
Go to the documentation of this file.
1/*!
2 * \file QwBlindDetectorArray.cc
3 * \brief Blinded detector array implementation for PMT analysis
4 * \author P. M. King
5 * \date 2007-05-08
6 */
7
9
10// Register this subsystem with the factory
12
13
14/**
15 * Blind the asymmetry
16 * @param blinder Blinder
17 */
19{
20 for (size_t i = 0; i < fIntegrationPMT.size(); i++)
21 fIntegrationPMT[i].Blind(blinder);
22 for (size_t i = 0; i < fCombinedPMT.size(); i++)
23 fCombinedPMT[i].Blind(blinder);
24}
25
26/**
27 * Blind the difference using the yield
28 * @param blinder Blinder
29 * @param subsys Subsystem
30 */
31
32void QwBlindDetectorArray::Blind(const QwBlinder *blinder, const VQwSubsystemParity* subsys)
33{
34 /// \todo TODO (wdc) At some point we should introduce const-correctness in
35 /// the Compare() routine to ensure nothing funny happens. This const_casting
36 /// is just an ugly stop-gap measure.
37 if (Compare(const_cast<VQwSubsystemParity*>(subsys))) {
38
39 const QwBlindDetectorArray* yield = dynamic_cast<const QwBlindDetectorArray*>(subsys);
40 if (yield == 0) return;
41
42 for (size_t i = 0; i < fIntegrationPMT.size(); i++)
43 fIntegrationPMT[i].Blind(blinder, yield->fIntegrationPMT[i]);
44 for (size_t i = 0; i < fCombinedPMT.size(); i++)
45 fCombinedPMT[i].Blind(blinder, yield->fCombinedPMT[i]);
46 }
47}
#define REGISTER_SUBSYSTEM_FACTORY(A)
Definition QwFactory.h:270
Blinded detector array for PMT analysis.
Detector array wrapper that applies blinding to asymmetries.
QwBlindDetectorArray()
Private default constructor (not implemented, will throw linker error on use)
void Blind(const QwBlinder *blinder) override
Blind the asymmetry.
Data blinding utilities for parity violation analysis.
Definition QwBlinder.h:57
std::vector< QwIntegrationPMT > fIntegrationPMT
Bool_t Compare(VQwSubsystem *source)
std::vector< QwCombinedPMT > fCombinedPMT
VQwSubsystemParity()
Private default constructor (not implemented, will throw linker error on use)