Exemplo n.º 1
0
 protected void ConstructSRSection(INCCStyleSection sec, Multiplicity mu, Detector det)
 {
     // if this is based on a virtual SR then show it
     if (det.Id.source.UsingVirtualSRCounting(det.Id.SRType))
     {
         sec.AddTwo(" Virtual shift register:", mu.ToString());
     }
     sec.AddTwo("Predelay:", mu.SR.predelayMS);
     sec.AddTwo("Gate length:", mu.SR.gateLengthMS);
     if (det.Id.SRType == InstrType.DGSR)
     {
         sec.AddTwo("Gate length2:", mu.SR.gateLengthMS);
     }
     sec.AddIntegerRow("High voltage:", (Int32)mu.SR.highVoltage);
     sec.SetFPCurrentFormatPrecision(4);
     sec.AddTwo("Die away time:", mu.SR.dieAwayTimeMS);
     sec.AddTwo("Efficiency:", mu.SR.efficiency);
     sec.AddTwo("Multiplicity deadtime:", mu.SR.deadTimeCoefficientMultiplicityinNanoSecs);
     sec.AddTwo("Coefficient A deadtime:", mu.SR.deadTimeCoefficientAinMicroSecs);
     sec.AddTwo("Coefficient B deadtime:", mu.SR.deadTimeCoefficientBinPicoSecs);
     sec.AddTwo("Coefficient C deadtime:", mu.SR.deadTimeCoefficientCinNanoSecs);
     sec.AddTwo("Doubles gate fraction:", mu.SR.doublesGateFraction);
     sec.AddTwo("Triples gate fraction:", mu.SR.triplesGateFraction);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Create parameter list for the results on a cycle
        /// </summary>
        /// <param name="mkey">The multiplicity parameters used to select the specific results. There can be more than one such results set per cycle.</param>
        public void GenParamList(Multiplicity mkey)
        {
            GenParamList(); // ^ does the basic INCC5 and new LM cycle stuff

            // now add the mkey stuff
            Table = "cycles";
            MultiplicityCountingRes pmcr   = null;
            QCTestStatus            status = QCTestStatus.None;

            if (CountingAnalysisResults.HasMultiplicity)
            {
                try
                {
                    pmcr   = (MultiplicityCountingRes)CountingAnalysisResults[mkey];
                    status = qcstatus[mkey].status;
                }
                catch (Exception) // mkey not found happens when a param is changed on a VSR that is not reflected back to the default [0] SR
                {
                    logger?.TraceEvent(LogLevels.Warning, 7832, "Cycle status not set in DB, mkey mismatch: " + mkey.ToString());
                }
            }
            if (pmcr == null)
            {
                pmcr = new MultiplicityCountingRes();  // null results
            }
            ps.Add(new DBParamEntry("scaler1", pmcr.Scaler1.v));
            ps.Add(new DBParamEntry("scaler2", pmcr.Scaler2.v));
            ps.Add(new DBParamEntry("reals_plus_acc", pmcr.RASum));
            ps.Add(new DBParamEntry("acc", pmcr.ASum));
            ps.Add(new DBParamEntry("mult_reals_plus_acc", pmcr.RAMult));
            ps.Add(new DBParamEntry("mult_acc", pmcr.NormedAMult));
            ps.Add(new DBParamEntry("scaler1_rate", pmcr.Scaler1Rate.v));
            ps.Add(new DBParamEntry("scaler2_rate", pmcr.Scaler2Rate.v));
            ps.Add(new DBParamEntry("doubles_rate", pmcr.RawDoublesRate.v));
            ps.Add(new DBParamEntry("triples_rate", pmcr.RawTriplesRate.v));
            ps.Add(new DBParamEntry("multiplicity_mult", pmcr.multiplication));
            ps.Add(new DBParamEntry("multiplicity_alpha", pmcr.multiAlpha));
            ps.Add(new DBParamEntry("multiplicity_efficiency", pmcr.efficiency));
            ps.Add(new DBParamEntry("mass", pmcr.mass));
            ps.Add(new DBParamEntry("status", (int)status));
            {                   // la super hack-a-whack
                DB.DB db = new DB.DB(true);
                if (db.TableHasColumn(Table, "mult_acc_un"))
                {
                    ps.Add(new DBParamEntry("mult_acc_un", pmcr.UnAMult));
                }
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// create the results structures, including the methods map from (detector+multcounter) -> (detector+material) -> (results, method results)
        /// </summary>
        public void PrepareINCCResults()
        {
            IEnumerator iter = CountingAnalysisResults.GetATypedParameterEnumerator(typeof(AnalysisDefs.Multiplicity));

            while (iter.MoveNext())
            {
                Multiplicity mcr = (Multiplicity)iter.Current;
                try
                {
                    logger.TraceEvent(NCCReporter.LogLevels.Verbose, 4028, "Preparing INCC {0} results for {1}", MeasOption.PrintName(), mcr.ToString());
                    INCCAnalysisState.PrepareINCCResults(MeasOption, mcr, (MultiplicityCountingRes)CountingAnalysisResults[mcr]);
                    logger.TraceEvent(NCCReporter.LogLevels.Verbose, 4029, "Preparing INCC method {0} results for {1}", INCCAnalysisState.Methods.selector.ToString(), mcr.ToString());
                    INCCAnalysisState.PrepareINCCMethodResults(mcr, new INCCSelector(INCCAnalysisState.Methods.selector), this);
                }
                catch (Exception ex)
                {
                    logger.TraceEvent(NCCReporter.LogLevels.Error, 4027, "PrepareINCCResults error: " + ex.Message);
                }
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// create the results structures, including the methods map from (detector+multcounter) -> (detector+material) -> (results, method results)
        /// </summary>
        public void PrepareINCCResults()
        {
            IEnumerator iter = CountingAnalysisResults.GetATypedParameterEnumerator(typeof(Multiplicity));

            while (iter.MoveNext())
            {
                bool         existed = false;
                Multiplicity mcr     = (Multiplicity)iter.Current;
                try
                {
                    existed = INCCAnalysisState.PrepareINCCResults(MeasOption, mcr, (MultiplicityCountingRes)CountingAnalysisResults[mcr]);
                    if (!existed)                     // it was created just now in PrepareINCCResults
                    {
                        if (logger != null)
                        {
                            logger.TraceEvent(LogLevels.Verbose, 4028, "Preparing INCC {0} results for {1}", MeasOption.PrintName(), mcr.ToString());
                        }
                    }
                    existed = INCCAnalysisState.PrepareINCCMethodResults(mcr, new INCCSelector(INCCAnalysisState.Methods.selector), this);
                    if (!existed)                     // it was created just now in PrepareINCCMethodResults
                    {
                        if (logger != null)
                        {
                            logger.TraceEvent(LogLevels.Verbose, 4029, "Preparing INCC method {0} results for {1}", INCCAnalysisState.Methods.selector.ToString(), mcr.ToString());
                        }
                    }
                }
                catch (Exception ex)
                {
                    if (logger != null)
                    {
                        logger.TraceEvent(LogLevels.Error, 4027, "PrepareINCCResults error: " + ex.Message);
                    }
                }
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// Create parameter list for the results on a cycle
        /// </summary>
        /// <param name="mkey">The multiplicity parameters used to select the specific results. There can be more than one such results set per cycle.</param>
        public void GenParamList(Multiplicity mkey)
        {
            GenParamList(); // does the basic INCC5 and new LM cycle stuff

            //now add the mkey stuff
            Table = "cycles";
            MultiplicityCountingRes pmcr   = null;
            QCTestStatus            status = QCTestStatus.None;

            if (CountingAnalysisResults.HasMultiplicity)
            {
                try
                {
                    pmcr   = (MultiplicityCountingRes)CountingAnalysisResults[mkey];
                    status = qcstatus[mkey].status;
                }
                catch (Exception) // mkey not found happens when a param is changed on a VSR that is not reflected back to the default [0] SR
                {
                    logger.TraceEvent(NCCReporter.LogLevels.Warning, 7832, "Status not set due to mkey issue: " + mkey.ToString());
                }
            }
            if (pmcr == null)
            {
                pmcr = new MultiplicityCountingRes();  // null results
            }
            ps.Add(new DBParamEntry("scaler1", pmcr.Scaler1.v));
            ps.Add(new DBParamEntry("scaler2", pmcr.Scaler2.v));
            ps.Add(new DBParamEntry("reals_plus_acc", pmcr.RASum));
            ps.Add(new DBParamEntry("acc", pmcr.ASum));
            ps.Add(new DBParamEntry("mult_reals_plus_acc", pmcr.RAMult));
            ps.Add(new DBParamEntry("mult_acc", pmcr.NormedAMult));
            ps.Add(new DBParamEntry("scaler1_rate", pmcr.Scaler1Rate.v));
            ps.Add(new DBParamEntry("scaler2_rate", pmcr.Scaler2Rate.v));
            ps.Add(new DBParamEntry("doubles_rate", pmcr.RawDoublesRate.v));
            ps.Add(new DBParamEntry("triples_rate", pmcr.RawTriplesRate.v));
            ps.Add(new DBParamEntry("multiplicity_mult", pmcr.multiplication));
            ps.Add(new DBParamEntry("multiplicity_alpha", pmcr.multiAlpha));
            ps.Add(new DBParamEntry("multiplicity_efficiency", pmcr.efficiency));
            ps.Add(new DBParamEntry("mass", pmcr.mass));
            ps.Add(new DBParamEntry("status", (Int32)status));
        }