UtilStrip Namespace Reference

Functions

std::vector< int > GangedStrips (int strip, int end)
std::vector< int > GangedStripsEast (int strip)
std::vector< int > GangedStripsWest (int strip)
std::vector< int > GangedStripsNegative (int strip)
std::vector< int > GangedStripsPositive (int strip)
double SumEnergy (std::set< SetStrip >)
int NStrips (std::set< SetStrip >)
int NDigits (std::set< SetStrip >)

Function Documentation

std::vector< int > UtilStrip::GangedStrips ( int  strip,
int  end 
) [inline]

Definition at line 25 of file UtilStrip.h.

References GangedStripsNegative(), and GangedStripsPositive().

Referenced by TruthHelp::MakeAssociateHits().

00025                                                                 {
00026   if(end==0) return UtilStrip::GangedStripsNegative(strip);
00027   else return UtilStrip::GangedStripsPositive(strip);
00028 }

std::vector< int > UtilStrip::GangedStripsEast ( int  strip  )  [inline]

Definition at line 30 of file UtilStrip.h.

References GangedStripsNegative().

00030                                                            {
00031   return UtilStrip::GangedStripsNegative(strip);
00032 }

std::vector< int > UtilStrip::GangedStripsNegative ( int  strip  ) 

Definition at line 16 of file UtilStrip.cxx.

Referenced by GangedStrips(), and GangedStripsEast().

00016                                                         {
00017   std::vector<int> Gang;
00018   if(strip<0 || strip>191) return Gang;
00019   Gang.push_back(strip);
00020 
00021   int AddStrip = strip;
00022   //Climb Up
00023   while (true) {
00024     if(AddStrip%24 == 0) AddStrip += 47;
00025     else AddStrip += 23;
00026     if(AddStrip > 191) break;
00027     Gang.push_back(AddStrip);
00028   }
00029 
00030   //Climb Down
00031   AddStrip = strip;
00032   while (true) {
00033     if(AddStrip<47) AddStrip -= 23;
00034     else if((AddStrip-47)%24 == 0) AddStrip -= 47;
00035     else AddStrip -= 23;
00036     if(AddStrip < 0) break;
00037     Gang.push_back(AddStrip);
00038   }
00039 
00040   return Gang;
00041 }

std::vector< int > UtilStrip::GangedStripsPositive ( int  strip  ) 

Definition at line 43 of file UtilStrip.cxx.

Referenced by GangedStrips(), and GangedStripsWest().

00043                                                         {
00044   std::vector<int> Gang;
00045   if(strip<0 || strip>191) return Gang;
00046   Gang.push_back(strip);
00047 
00048   int AddStrip = strip;
00049   while (true) {
00050     AddStrip += 24;
00051     if(AddStrip > 191) AddStrip -= 192;
00052     if(AddStrip == strip) break;
00053     Gang.push_back(AddStrip);
00054   }
00055 
00056   return Gang;
00057 }

std::vector< int > UtilStrip::GangedStripsWest ( int  strip  )  [inline]

Definition at line 34 of file UtilStrip.h.

References GangedStripsPositive().

00034                                                            {
00035   return UtilStrip::GangedStripsPositive(strip);
00036 }

int UtilStrip::NDigits ( std::set< SetStrip strips  ) 

Definition at line 73 of file UtilStrip.cxx.

Referenced by Cutter::OverShootCutter(), and AlgCalDetSI::RunAlg().

00073                                               {
00074   int ndigits = 0;
00075   std::set<SetStrip>::iterator itr = strips.begin();
00076   for(; itr!=strips.end(); itr++)
00077     if(itr->Energy>0 && itr->DoubleEnded) ndigits++;
00078   return ndigits;
00079 }

int UtilStrip::NStrips ( std::set< SetStrip strips  ) 

Definition at line 66 of file UtilStrip.cxx.

Referenced by MinosEvent::MinosEvent().

00066                                               {
00067   int nstrips = 0;
00068   std::set<SetStrip>::iterator itr = strips.begin();
00069   for(; itr!=strips.end(); itr++) if(itr->Energy>0) nstrips++;
00070   return nstrips;
00071 }

double UtilStrip::SumEnergy ( std::set< SetStrip strips  ) 

Definition at line 59 of file UtilStrip.cxx.

Referenced by TrackRecoPerf::FillEvent(), and ShowerRecoPerf::FillEvent().

00059                                                    {
00060   double sumenergy = 0.0;
00061   std::set<SetStrip>::iterator itr = strips.begin();
00062   for(; itr!=strips.end(); itr++) sumenergy += itr->Energy;
00063   return sumenergy;
00064 }


Generated on 24 Jul 2018 for loon by  doxygen 1.6.1