CMS 3D CMS Logo

Public Member Functions | Public Attributes

HcalDetDiagLaserData Class Reference

List of all members.

Public Member Functions

void add_statistics (double *data, int nTS)
void change_status (int val)
bool get_average_amp (double *ave, double *rms)
bool get_average_amp1 (double *ave, double *rms)
bool get_average_time (double *ave, double *rms)
bool get_average_time1 (double *ave, double *rms)
int get_overflow ()
int get_overflow1 ()
bool get_reference (double *val, double *rms, double *time, double *time_rms)
int get_statistics ()
int get_statistics1 ()
int get_status ()
int get_undeflow ()
int get_undeflow1 ()
double GetEnergy (double *data, int n)
double GetTime (double *data, int n=10)
 HcalDetDiagLaserData ()
void reset ()
void reset1 ()
void set_reference (float val, float rms, float time, float time_rms)

Public Attributes

bool IsRefetence
double n
double n1
float nBadEnergy
float nBadTime
float nChecks
int overflow
int overflow1
float ref_amp
float ref_rms
float ref_time
float ref_time_rms
int status
int undeflow
int undeflow1
double Xe
double Xe1
double Xt
double Xt1
double XXe
double XXe1
double XXt
double XXt1

Detailed Description

Definition at line 85 of file HcalDetDiagLaserMonitor.cc.


Constructor & Destructor Documentation

HcalDetDiagLaserData::HcalDetDiagLaserData ( ) [inline]

Definition at line 87 of file HcalDetDiagLaserMonitor.cc.

References IsRefetence, nBadEnergy, nBadTime, nChecks, reset(), reset1(), and status.


Member Function Documentation

void HcalDetDiagLaserData::add_statistics ( double *  data,
int  nTS 
) [inline]

Definition at line 104 of file HcalDetDiagLaserMonitor.cc.

References ExpressReco_HICollisions_FallBack::e, GetEnergy(), GetTime(), n, n1, overflow, overflow1, matplotRender::t, undeflow, undeflow1, Xe, Xe1, Xt, Xt1, XXe, XXe1, XXt, and XXt1.

Referenced by HcalDetDiagLaserMonitor::analyze().

                                              {
             double e=GetEnergy(data,nTS);
             double t=GetTime(data,nTS);
             if(e<20){ undeflow++;undeflow1++; }else if(e>10000){ overflow++;overflow1++; }else{
                n++; Xe+=e; XXe+=e*e; Xt+=t; XXt+=t*t;
                n1++; Xe1+=e; XXe1+=e*e; Xt1+=t; XXt1+=t*t;
             }     
          }
void HcalDetDiagLaserData::change_status ( int  val) [inline]

Definition at line 117 of file HcalDetDiagLaserMonitor.cc.

References status.

                                {
             status|=val;
          }       
bool HcalDetDiagLaserData::get_average_amp ( double *  ave,
double *  rms 
) [inline]

Definition at line 128 of file HcalDetDiagLaserMonitor.cc.

References n, mathSSE::sqrt(), Xe, and XXe.

Referenced by HcalDetDiagLaserMonitor::fillHistos(), and HcalDetDiagLaserMonitor::get_ave_subdet().

                                                  {
             if(n>0){ *ave=Xe/n; *rms=sqrt(XXe/n-(Xe*Xe)/(n*n));} else return false;
             return true; 
          }
bool HcalDetDiagLaserData::get_average_amp1 ( double *  ave,
double *  rms 
) [inline]

Definition at line 145 of file HcalDetDiagLaserMonitor.cc.

References n1, mathSSE::sqrt(), Xe1, and XXe1.

Referenced by HcalDetDiagLaserMonitor::SaveReference().

                                                   {
             if(n1>0){ *ave=Xe1/n1; *rms=sqrt(XXe1/n1-(Xe1*Xe1)/(n1*n1));} else return false;
             return true; 
          }
bool HcalDetDiagLaserData::get_average_time ( double *  ave,
double *  rms 
) [inline]

Definition at line 132 of file HcalDetDiagLaserMonitor.cc.

References n, mathSSE::sqrt(), Xt, and XXt.

Referenced by HcalDetDiagLaserMonitor::fillHistos(), and HcalDetDiagLaserMonitor::get_ave_subdet().

                                                   {
             if(n>0){ *ave=Xt/n; *rms=sqrt(XXt/n-(Xt*Xt)/(n*n));} else return false;
             return true; 
          }
bool HcalDetDiagLaserData::get_average_time1 ( double *  ave,
double *  rms 
) [inline]

Definition at line 149 of file HcalDetDiagLaserMonitor.cc.

References n1, mathSSE::sqrt(), Xt1, and XXt1.

Referenced by HcalDetDiagLaserMonitor::SaveReference().

                                                    {
             if(n1>0){ *ave=Xt1/n1; *rms=sqrt(XXt1/n1-(Xt1*Xt1)/(n1*n1));} else return false;
             return true; 
          }
int HcalDetDiagLaserData::get_overflow ( ) [inline]

Definition at line 139 of file HcalDetDiagLaserMonitor.cc.

References overflow.

                        {
             return overflow;
          }   
int HcalDetDiagLaserData::get_overflow1 ( ) [inline]

Definition at line 156 of file HcalDetDiagLaserMonitor.cc.

References overflow1.

                         {
             return overflow1;
          }   
bool HcalDetDiagLaserData::get_reference ( double *  val,
double *  rms,
double *  time,
double *  time_rms 
) [inline]

Definition at line 123 of file HcalDetDiagLaserMonitor.cc.

References IsRefetence, ref_amp, ref_rms, ref_time, and ref_time_rms.

                                                                              {
             *val=ref_amp; *rms=ref_rms;
             *time=ref_time; *time_rms=ref_time_rms;
             return IsRefetence;
          }       
int HcalDetDiagLaserData::get_statistics ( ) [inline]

Definition at line 136 of file HcalDetDiagLaserMonitor.cc.

References n.

                          {
             return (int)n;
          } 
int HcalDetDiagLaserData::get_statistics1 ( ) [inline]

Definition at line 153 of file HcalDetDiagLaserMonitor.cc.

References n1.

Referenced by HcalDetDiagLaserMonitor::SaveReference().

                           {
             return (int)n1;
          } 
int HcalDetDiagLaserData::get_status ( ) [inline]

Definition at line 120 of file HcalDetDiagLaserMonitor.cc.

References status.

Referenced by HcalDetDiagLaserMonitor::SaveReference().

                      {
             return status;
          }       
int HcalDetDiagLaserData::get_undeflow ( ) [inline]

Definition at line 142 of file HcalDetDiagLaserMonitor.cc.

References undeflow.

                        {
             return undeflow;
          }   
int HcalDetDiagLaserData::get_undeflow1 ( ) [inline]

Definition at line 159 of file HcalDetDiagLaserMonitor.cc.

References undeflow1.

                         {
             return undeflow1;
          }
double HcalDetDiagLaserData::GetEnergy ( double *  data,
int  n 
) [inline]

Definition at line 162 of file HcalDetDiagLaserMonitor.cc.

References j, and n.

Referenced by add_statistics().

                                       {
             int MaxI=0; double Energy,MaxE=0;
             for(int j=0;j<n;++j) if(MaxE<data[j]){ MaxE=data[j]; MaxI=j; }
             Energy=data[MaxI];
             if(MaxI>0) Energy+=data[MaxI-1];
             if(MaxI>1) Energy+=data[MaxI-2];
             if(MaxI<(n-1)) Energy+=data[MaxI+1];
             if(MaxI<(n-2)) Energy+=data[MaxI+2];
             return Energy;
          }
double HcalDetDiagLaserData::GetTime ( double *  data,
int  n = 10 
) [inline]

Definition at line 172 of file HcalDetDiagLaserMonitor.cc.

References j, and n.

Referenced by add_statistics().

                                        {
             int MaxI=-100; double Time=-9999,SumT=0,MaxT=-10;
             for(int j=0;j<n;++j) if(MaxT<data[j]){ MaxT=data[j]; MaxI=j; }
             if (MaxI>=0) // dummy protection so that compiler doesn't think MaxI=-100
               {
                 Time=MaxI*data[MaxI];
                 SumT=data[MaxI];
                 if(MaxI>0){ Time+=(MaxI-1)*data[MaxI-1]; SumT+=data[MaxI-1]; }
                 if(MaxI<(n-1)){ Time+=(MaxI+1)*data[MaxI+1]; SumT+=data[MaxI+1]; }
                 Time=Time/SumT;
               }
             return Time;
         }
void HcalDetDiagLaserData::reset ( void  ) [inline]

Definition at line 94 of file HcalDetDiagLaserMonitor.cc.

References n, overflow, undeflow, Xe, Xt, XXe, and XXt.

Referenced by HcalDetDiagLaserData().

                 {
             Xe=XXe=Xt=XXt=n=0;
             overflow=0;
             undeflow=0;
          }
void HcalDetDiagLaserData::reset1 ( ) [inline]

Definition at line 99 of file HcalDetDiagLaserMonitor.cc.

References n1, overflow1, undeflow1, Xe1, Xt1, XXe1, and XXt1.

Referenced by HcalDetDiagLaserData().

void HcalDetDiagLaserData::set_reference ( float  val,
float  rms,
float  time,
float  time_rms 
) [inline]

Member Data Documentation

Definition at line 191 of file HcalDetDiagLaserMonitor.cc.

Referenced by get_reference(), HcalDetDiagLaserData(), and set_reference().

Definition at line 185 of file HcalDetDiagLaserMonitor.cc.

Referenced by add_statistics(), get_overflow(), and reset().

Definition at line 187 of file HcalDetDiagLaserMonitor.cc.

Referenced by add_statistics(), get_overflow1(), and reset1().

Definition at line 192 of file HcalDetDiagLaserMonitor.cc.

Referenced by get_reference(), and set_reference().

Definition at line 193 of file HcalDetDiagLaserMonitor.cc.

Referenced by get_reference(), and set_reference().

Definition at line 194 of file HcalDetDiagLaserMonitor.cc.

Referenced by get_reference(), and set_reference().

Definition at line 195 of file HcalDetDiagLaserMonitor.cc.

Referenced by get_reference(), and set_reference().

Definition at line 196 of file HcalDetDiagLaserMonitor.cc.

Referenced by change_status(), get_status(), and HcalDetDiagLaserData().

Definition at line 186 of file HcalDetDiagLaserMonitor.cc.

Referenced by add_statistics(), get_undeflow(), and reset().

Definition at line 188 of file HcalDetDiagLaserMonitor.cc.

Referenced by add_statistics(), get_undeflow1(), and reset1().

Definition at line 189 of file HcalDetDiagLaserMonitor.cc.

Referenced by add_statistics(), get_average_amp(), and reset().

Definition at line 190 of file HcalDetDiagLaserMonitor.cc.

Referenced by add_statistics(), get_average_amp1(), and reset1().

Definition at line 189 of file HcalDetDiagLaserMonitor.cc.

Referenced by add_statistics(), get_average_time(), and reset().

Definition at line 190 of file HcalDetDiagLaserMonitor.cc.

Referenced by add_statistics(), get_average_time1(), and reset1().

Definition at line 189 of file HcalDetDiagLaserMonitor.cc.

Referenced by add_statistics(), get_average_amp(), and reset().

Definition at line 190 of file HcalDetDiagLaserMonitor.cc.

Referenced by add_statistics(), get_average_amp1(), and reset1().

Definition at line 189 of file HcalDetDiagLaserMonitor.cc.

Referenced by add_statistics(), get_average_time(), and reset().

Definition at line 190 of file HcalDetDiagLaserMonitor.cc.

Referenced by add_statistics(), get_average_time1(), and reset1().