• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

onlinemonitor/spadicmonitor/TSpadicParam.cxx (r4864/r3721)

Go to the documentation of this file.
00001 #include "TSpadicParam.h"
00002 
00003 #include "TGo4Log.h"
00004 
00005 TSpadicParam::TSpadicParam(const char* name) : TGo4Parameter(name)
00006 {
00007    numSpadics = 9;
00008    numUsedSpadics = 13;
00009    for (Int_t sid=0;sid<MAX_SPADIC; sid++)
00010    {
00011       idSpadic[sid]=sid; // self mapping as default
00012 
00013       if(sid<=numSpadics)// NOTE: spadic is numbered from 1 to max, id 0 is not in use!
00014          activeSpadic[sid]=kTRUE;
00015       else
00016          activeSpadic[sid]=kFALSE;
00017    }
00018    activeSpadic[0]=kFALSE; // id 0 is never used
00019    spadic_movie = 0;
00020 
00021    //    // // // Seting Parameters of FFM analysis development
00022    //    NoiseAnalyse=kFALSE; // Enables Noise analysis Histogramms
00023    //    NoiseCorrectionVersion=2; // Version of Noise Correction: 0=OFF, 1=Only Pedestle 2=Pedestle + two lowest Channels, 3=Pedestle + Corelation Matrix
00024    //    NoiseCorrectionPedestle=10; // Hight of Pedestle set by Noise Correction
00025    //    IgnoreOverflowBins=kTRUE; // kTRUE=Keep overflow bins at 255  kFALSE=correct overflow bins
00026    //    HitThreshold=100; // Threshold for Hits (ADC)
00027    //    NoiseCorrelationThreshold=0.095; // Threshold for Noise Correction using correlation matrix (highly experimental)
00028    //    ClusterizerVersion=1; // Version of Clusterizer: 0=OFF, 1=Simple Geometric, 2=not implemented yet
00029    //    ClusterizerMaxTimeBin=35; // Clusterizer: Maximal time bin for cluster search
00030    //    ClusterizerMinTimeBin=3; // Clusterizer: Minimal time bin for cluster search
00031    //    ClusterizerThreshold=40; // Clusterizer: Threshold for Clusterizer
00032    //    SpadicSpectral=0; // Enables filling of Spectral hilstos: 0=OFF, 1=All chanels, 2=Only in found cluster (requires Clusterizer)
00033 
00034 
00035    // // // Switches:
00036    Run_RawSignalStatistics=kTRUE; // Raw Signal Statistics is ON=kTRUE
00037    Run_PedestleCorrection=kFALSE;  // Pedestle Correction is ON=kTRUE
00038    pedestalTB = 3;
00039    Run_NoiseCorrection=kTRUE; // Noise Correction is ON=kTRUE
00040    Run_PadResponseFunction=kTRUE; // Calculating Pad Response Function is ON=kTRUE
00041    Run_SimpleAnalysis=kFALSE;
00042    Run_SimpleNoiseReduction=kFALSE;//kTRUE;
00043    Run_TimeClustering=kTRUE;
00044    Run_AmplitudeClustering=kFALSE;
00045    UseClusteredSignal=kTRUE;
00046    // // // Thresholds and function steering:
00047    HitThreshold=100; //Threshold, when channel is counted as hit (Occupancy)
00048    //IgnoreOverflowBins=kTRUE; // kTRUE=Keep overflow bins at 255  kFALSE=correct overflow bins
00049    //Version_PedestleCorr=2; // Version of Pedestle Correction: 0=OFF, 1=Fix Value, 2=Average of the first 3 Timebins, 3=Value calculated in spill pause event
00050    //PedestleCorrV1value=20; // Fix value for PedestleCorr version 1
00051    //PedestleOffset=10; // Hight of Pedestle to be add to avoid undershoots
00052    //Version_NoiseCorrection=1; // Version of NoiseCorrection: 0=OFF, 1=two lowest (integral) Channels, 2=CorrelationMatrix (STILL UNSTABLE), 3=Sergeys Compensate method
00053    //NoiseCorrelationThreshold=0.095; // Threshold for Noise Correction using correlation matrix (highly experimental)
00054    idMappingEnabled=kFALSE;
00055 
00056 
00057 }
00058 
00059 Bool_t TSpadicParam::UpdateFrom(TGo4Parameter* rhs)
00060 {
00061    TGo4Log::Info("TSpadicParam::UpdateFrom");
00062    if(!TGo4Parameter::UpdateFrom(rhs)) return kFALSE;
00063    for (Int_t sid=0;sid<MAX_SPADIC; sid++) {
00064       if(sid>numSpadics) activeSpadic[sid]=kFALSE; // NOTE: spadic is numbered from 1 to max, id 0 is not in use!
00065       // we do not change active state of valid spadic ids
00066    }
00067    activeSpadic[0]=kFALSE;
00068    return SetConfigSpadics();
00069 }
00070 
00071 void TSpadicParam::ResetConfigSpadics()
00072 {
00073    for (UInt_t sid=0;sid<MAX_SPADIC; sid++) {
00074       activeSpadic[sid]=kFALSE;
00075    }
00076    numSpadics = 0;
00077    numUsedSpadics = 0;
00078 }
00079 
00080 
00081 Bool_t TSpadicParam::SetConfigSpadics()
00082 {
00083    for (UInt_t sid=0;sid<MAX_SPADIC; sid++) {
00084       TSpadicEvent::ConfigSpadics[sid] = (activeSpadic[sid] ? 1 : 0);
00085       TGo4Log::Info("TSpadicParam::SetConfigSpadics sets sid %u to active: %s", sid, activeSpadic[sid] ? "true" : "false");
00086    }
00087    return kTRUE;
00088 }

Generated on Tue Dec 10 2013 04:52:23 for ROCsoft by  doxygen 1.7.1