Plane Class Reference

#include <plane.h>

List of all members.

Public Member Functions

 Plane (Int_t side_number, Int_t plane_number)
void Clean ()
void CleanChannel (Int_t in_chip, Int_t in_channel)
void AddStats (Int_t in_chip, Int_t in_channel, Int_t new_entries, Double_t new_mean, Double_t new_rms)
void SetStats (Int_t in_chip, Int_t in_channel, Int_t new_entries, Double_t new_mean, Double_t new_rms)
Int_t GetEntries (Int_t in_chip, Int_t in_channel)
Double_t GetMean (Int_t in_chip, Int_t in_channel)
Double_t GetRMS (Int_t in_chip, Int_t in_channel)
Double_t GetMean (Int_t strip_no)
Double_t GetRMS (Int_t strip_no)
Int_t GetEntries (Int_t strip_no)
Int_t GetStrip (Int_t chip, Int_t channel, Int_t led)
Int_t CheckStrip (Int_t led, Int_t strip)
Int_t CheckChannel (Int_t led, Int_t chip, Int_t channel)
void RemoveDemons (Int_t box, Int_t led)
void FillMeanHist (TH1F *meanhist)
void FillStripHist (Int_t box, Int_t led, TH2F *ratiohist)
void FillChipHist (TH2F *chiphist)

Protected Attributes

Chipchips [3]
Int_t plane_no
Int_t side_no
StripInfoinfogiver

Detailed Description

Definition at line 17 of file plane.h.


Constructor & Destructor Documentation

Plane::Plane ( Int_t  side_number,
Int_t  plane_number 
)

Definition at line 46 of file plane.cxx.

References chips, infogiver, n, plane_no, and side_no.

00046                                                  {
00047   for(Int_t n=0;n<3;n++)
00048     chips[n]=0;
00049   plane_no = plane_number;
00050   side_no = side_number;
00051   infogiver = new StripInfo(side_no,plane_no);
00052 };


Member Function Documentation

void Plane::AddStats ( Int_t  in_chip,
Int_t  in_channel,
Int_t  new_entries,
Double_t  new_mean,
Double_t  new_rms 
)

Definition at line 95 of file plane.cxx.

References Chip::AddStats(), and chips.

Referenced by Side::AddStats().

00095                                                                                                           {
00096   if(chips[in_chip] == 0)
00097     chips[in_chip]= new Chip(in_chip);
00098   chips[in_chip]->AddStats(in_channel,new_entries,new_mean,new_rms);
00099 };

Int_t Plane::CheckChannel ( Int_t  led,
Int_t  chip,
Int_t  channel 
)

Definition at line 34 of file plane.cxx.

References StripInfo::CheckChannel(), and infogiver.

Referenced by RemoveDemons().

00034                                                             {
00035   return  infogiver->CheckChannel(led,chip,channel);
00036 
00037 };

Int_t Plane::CheckStrip ( Int_t  led,
Int_t  strip 
)

Definition at line 61 of file plane.cxx.

References StripInfo::CheckStrip(), and infogiver.

Referenced by FillStripHist().

00061                                             {
00062   return infogiver->CheckStrip(led,strip);
00063 };

void Plane::Clean (  ) 

Definition at line 54 of file plane.cxx.

References chips, Chip::Clean(), and n.

Referenced by Side::Clean(), and RemoveDemons().

00054                  {
00055   for(Int_t n=0;n<3;n++)
00056     if(chips[n]!=0)
00057       chips[n]->Clean();
00058 };

void Plane::CleanChannel ( Int_t  in_chip,
Int_t  in_channel 
)

Definition at line 125 of file plane.cxx.

References chips, and Chip::CleanChannel().

Referenced by Side::CleanChannel(), and RemoveDemons().

00125                                                        {
00126   if(chips[in_chip] !=0)
00127     chips[in_chip]->CleanChannel(in_channel);
00128 };

void Plane::FillChipHist ( TH2F *  chiphist  ) 

Definition at line 130 of file plane.cxx.

References chips, GetEntries(), GetMean(), n, and plane_no.

Referenced by Side::FillChipHist().

00130                                       {
00131 for(Int_t n=0;n<3;n++)
00132         for(Int_t i=0;i<22;i++)
00133                 if(chips[n]!=0)         
00134                         if(chips[n]->GetEntries(i) > 0)
00135                                 chiphist->Fill(plane_no,(n*20)+i, chips[n]->GetMean(i));
00136 }

void Plane::FillMeanHist ( TH1F *  meanhist  ) 

Definition at line 40 of file plane.cxx.

References chips, Chip::FillMeanHist(), and n.

Referenced by Side::FillMeanHist().

00040                                       {
00041   for(Int_t n=0;n<3;n++)
00042     if(chips[n]!=0)
00043       chips[n]->FillMeanHist(meanhist);
00044 };

void Plane::FillStripHist ( Int_t  box,
Int_t  led,
TH2F *  ratiohist 
)

Definition at line 12 of file plane.cxx.

References CheckStrip(), GetEntries(), GetMean(), n, and plane_no.

Referenced by Side::FillStripHist().

00012                                                              {
00013   for(Int_t n=0;n<192;n++){
00014     if(GetEntries(n) >0){
00015       if(CheckStrip(led,n) > 0)
00016                                 ratiohist->Fill(plane_no,n,GetMean(n));
00017     }
00018   }
00019 };

Int_t Plane::GetEntries ( Int_t  strip_no  ) 

Definition at line 66 of file plane.cxx.

References chips, StripInfo::GetChannel(), StripInfo::GetChip(), Chip::GetEntries(), and infogiver.

00066                                      {
00067 
00068   if(chips[infogiver->GetChip(strip_no)] !=0){
00069 
00070     return chips[ infogiver->GetChip(strip_no) ]->GetEntries( infogiver->GetChannel(strip_no) );
00071 
00072   }
00073   return 0;
00074 
00075 }

Int_t Plane::GetEntries ( Int_t  in_chip,
Int_t  in_channel 
)

Definition at line 107 of file plane.cxx.

References chips, and Chip::GetEntries().

Referenced by FillChipHist(), FillStripHist(), and Side::GetEntries().

00107                                                       {
00108   if(chips[in_chip] !=0)
00109     return chips[in_chip]->GetEntries(in_channel);
00110   return 0;
00111 };

Double_t Plane::GetMean ( Int_t  strip_no  ) 

Definition at line 77 of file plane.cxx.

References chips, StripInfo::GetChannel(), StripInfo::GetChip(), Chip::GetMean(), and infogiver.

00077                                      {
00078 
00079   if(chips[infogiver->GetChip(strip_no)] !=0)
00080     return chips[ infogiver->GetChip(strip_no) ]->GetMean( infogiver->GetChannel(strip_no) );
00081 
00082   return 0;
00083 }

Double_t Plane::GetMean ( Int_t  in_chip,
Int_t  in_channel 
)

Definition at line 113 of file plane.cxx.

References chips, and Chip::GetMean().

Referenced by FillChipHist(), FillStripHist(), and Side::GetMean().

00113                                                       {
00114   if(chips[in_chip] !=0)
00115     return chips[in_chip]->GetMean(in_channel);
00116   return 0;
00117 };

Double_t Plane::GetRMS ( Int_t  strip_no  ) 

Definition at line 85 of file plane.cxx.

References chips, StripInfo::GetChannel(), StripInfo::GetChip(), Chip::GetRMS(), and infogiver.

00085                                     {
00086 
00087   if(chips[infogiver->GetChip(strip_no)] !=0)
00088     return chips[ infogiver->GetChip(strip_no) ]->GetRMS( infogiver->GetChannel(strip_no) );
00089 
00090   return 0;
00091 }

Double_t Plane::GetRMS ( Int_t  in_chip,
Int_t  in_channel 
)

Definition at line 119 of file plane.cxx.

References chips, and Chip::GetRMS().

Referenced by Side::GetRMS().

00119                                                      {
00120   if(chips[in_chip] !=0)
00121     return chips[in_chip]->GetRMS(in_channel);
00122   return 0;
00123 };

Int_t Plane::GetStrip ( Int_t  chip,
Int_t  channel,
Int_t  led 
)

Definition at line 138 of file plane.cxx.

References StripInfo::GetStrip(), and infogiver.

Referenced by Side::GetStrip().

00138                                                         {
00139         return infogiver->GetStrip(chip,channel,led);
00140 }

void Plane::RemoveDemons ( Int_t  box,
Int_t  led 
)

Definition at line 22 of file plane.cxx.

References CheckChannel(), Clean(), CleanChannel(), n, and plane_no.

Referenced by Side::RemoveDemons().

00022                                            {
00023   if(plane_no > (box/2)*64 && plane_no <  65 + ((box/2)*64)){
00024     for(Int_t n=0;n<3;n++)
00025       for(Int_t i=0;i<22;i++)
00026         if(CheckChannel(led, n, i) <1 && i != 18)
00027           CleanChannel(n,i);
00028   }
00029   else
00030     Clean();
00031 };

void Plane::SetStats ( Int_t  in_chip,
Int_t  in_channel,
Int_t  new_entries,
Double_t  new_mean,
Double_t  new_rms 
)

Definition at line 101 of file plane.cxx.

References chips, and Chip::SetStats().

Referenced by Side::SetStats().

00101                                                                                                           {
00102   if(chips[in_chip] == 0)
00103     chips[in_chip]= new Chip(in_chip);
00104   chips[in_chip]->SetStats(in_channel,new_entries,new_mean,new_rms);
00105 };


Member Data Documentation

Chip* Plane::chips[3] [protected]

Definition at line 23 of file plane.h.

Referenced by CheckChannel(), CheckStrip(), GetEntries(), GetMean(), GetRMS(), GetStrip(), and Plane().

Int_t Plane::plane_no [protected]

Definition at line 21 of file plane.h.

Referenced by FillChipHist(), FillStripHist(), Plane(), and RemoveDemons().

Int_t Plane::side_no [protected]

Definition at line 22 of file plane.h.

Referenced by Plane().


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

Generated on 16 Apr 2018 for loon by  doxygen 1.6.1