Channel Class Reference

#include <channel.h>

List of all members.

Public Member Functions

 Channel (RawChannelId new_chAdd)
void Clean ()
RawChannelId GetChannelId ()
void SetMean (Double_t value)
void SetEntries (Int_t values)
void SetRMS (Double_t value)
Double_t GetMean ()
Int_t GetEntries ()
Double_t GetRMS ()
void AddEntry (Int_t entries, Double_t new_mean, Double_t new_rms)
void SetEntry (Int_t entries, Double_t new_mean, Double_t new_rms)
 Channel (Int_t number)
void Clean ()
void SetMean (Double_t value)
void SetEntries (Int_t values)
void SetRMS (Double_t value)
Double_t GetMean ()
Int_t GetEntries ()
Double_t GetRMS ()
void AddEntry (Int_t entries, Double_t new_mean, Double_t new_rms)
void SetEntry (Int_t entries, Double_t new_mean, Double_t new_rms)

Protected Attributes

RawChannelId chAdd
Int_t channel_no
Int_t no_entries
Double_t mean
Double_t rms
Double_t sigma1
Double_t sigma2

Detailed Description

Author:
Robert Morse

Definition at line 16 of file channel.h.


Constructor & Destructor Documentation

Channel::Channel ( RawChannelId  new_chAdd  )  [inline]

Definition at line 29 of file channel.h.

References chAdd, channel_no, mean, no_entries, rms, sigma1, and sigma2.

00029                                  {
00030     no_entries=0;
00031     mean=0;
00032     rms=0;
00033     sigma1=0;
00034     sigma2=0;
00035     channel_no = -1;
00036     chAdd = new_chAdd;
00037   }

Channel::Channel ( Int_t  number  )  [inline]

Definition at line 29 of file Gryfindor/detector/channel.h.

References channel_no, mean, no_entries, rms, sigma1, and sigma2.

00029                        {
00030     no_entries=0;
00031     mean=0;
00032     rms=0;
00033     sigma1=0;
00034     sigma2=0;
00035     channel_no = number;
00036   }


Member Function Documentation

void Channel::AddEntry ( Int_t  entries,
Double_t  new_mean,
Double_t  new_rms 
)
void Channel::AddEntry ( Int_t  entries,
Double_t  new_mean,
Double_t  new_rms 
)

Definition at line 52 of file channel.cxx.

References mean, no_entries, sigma1, and sigma2.

Referenced by Detector::AddEntry(), and Chip::AddStats().

00052                                                                             {
00053   if(new_entries > 0){
00054 
00055          sigma1 += Double_t(new_entries)*(pow(new_rms,2) + pow(new_mean,2));
00056          sigma2 += new_mean * Double_t(new_entries);
00057 
00058     mean = mean * ( Double_t(no_entries) / (Double_t(no_entries + new_entries)) )
00059     + new_mean*( Double_t(new_entries) / (Double_t(new_entries+no_entries)) );
00060         no_entries += new_entries;
00061         }
00062 };

void Channel::Clean (  ) 
void Channel::Clean (  ) 

Definition at line 11 of file channel.cxx.

References channel_no, mean, no_entries, rms, sigma1, and sigma2.

Referenced by Chip::Clean(), and Chip::CleanChannel().

00011                    {
00012   no_entries=0;
00013   mean=0;
00014   rms=0;
00015   sigma1=0;
00016   sigma2=0;
00017   channel_no =-1;
00018 };

RawChannelId Channel::GetChannelId (  )  [inline]

Definition at line 41 of file channel.h.

References chAdd.

Referenced by Detector::Update().

00041 { return chAdd;};

Int_t Channel::GetEntries (  ) 
Int_t Channel::GetEntries (  ) 

Definition at line 36 of file channel.cxx.

References no_entries.

Referenced by Chip::GetEntries(), and Detector::Update().

00036                          {
00037   return no_entries;
00038 };

Double_t Channel::GetMean (  ) 
Double_t Channel::GetMean (  ) 

Definition at line 32 of file channel.cxx.

References mean.

Referenced by Chip::GetMean(), and Detector::Update().

00032                          {
00033   return mean;
00034 };

Double_t Channel::GetRMS (  ) 
Double_t Channel::GetRMS (  ) 

Definition at line 40 of file channel.cxx.

References no_entries, rms, sigma1, and sigma2.

Referenced by Chip::GetRMS(), and Detector::Update().

00040                         {
00041         if(sigma1 ==0)
00042                 return rms;
00043          return   rms = pow(( sigma1/Double_t(no_entries) - pow( sigma2/Double_t(no_entries),2)),0.5);
00044 };

void Channel::SetEntries ( Int_t  values  ) 
void Channel::SetEntries ( Int_t  values  ) 

Definition at line 24 of file channel.cxx.

References no_entries.

00024                                     {
00025   no_entries = values;
00026 };

void Channel::SetEntry ( Int_t  entries,
Double_t  new_mean,
Double_t  new_rms 
)
void Channel::SetEntry ( Int_t  entries,
Double_t  new_mean,
Double_t  new_rms 
)

Definition at line 46 of file channel.cxx.

References mean, no_entries, and rms.

Referenced by Chip::SetStats().

00046                                                                         {
00047   no_entries = entries;
00048   mean = new_mean;
00049   rms = new_rms;
00050 };

void Channel::SetMean ( Double_t  value  ) 
void Channel::SetMean ( Double_t  value  ) 

Definition at line 20 of file channel.cxx.

References mean.

00020                                    {
00021   mean = value;
00022 };

void Channel::SetRMS ( Double_t  value  ) 
void Channel::SetRMS ( Double_t  value  ) 

Definition at line 28 of file channel.cxx.

References rms.

00028                                   {
00029   rms = value;
00030 };


Member Data Documentation

Definition at line 20 of file channel.h.

Referenced by Channel(), and GetChannelId().

Int_t Channel::channel_no [protected]

Definition at line 21 of file channel.h.

Referenced by Channel(), and Clean().

Double_t Channel::mean [protected]

Definition at line 23 of file channel.h.

Referenced by AddEntry(), Channel(), Clean(), GetMean(), SetEntry(), and SetMean().

Int_t Channel::no_entries [protected]

Definition at line 22 of file channel.h.

Referenced by AddEntry(), Channel(), Clean(), GetEntries(), GetRMS(), SetEntries(), and SetEntry().

Double_t Channel::rms [protected]

Definition at line 24 of file channel.h.

Referenced by Channel(), Clean(), GetRMS(), SetEntry(), and SetRMS().

Double_t Channel::sigma1 [protected]

Definition at line 25 of file channel.h.

Referenced by AddEntry(), Channel(), Clean(), and GetRMS().

Double_t Channel::sigma2 [protected]

Definition at line 26 of file channel.h.

Referenced by AddEntry(), Channel(), Clean(), and GetRMS().


The documentation for this class was generated from the following files:

Generated on 16 Jan 2018 for loon by  doxygen 1.6.1