Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

IslMatrix Class Reference

#include <IslMatrix.h>

List of all members.

Public Methods

 IslMatrix ()
virtual ~IslMatrix ()
TH2F GetUZ () const
TH2F GetVZ () const
void Fill (const MomNavigator *mom, Float_t ChargeThreshold)

Private Methods

CandDigitListHandleGetDigitList (const MomNavigator *mom)

Private Attributes

TH2F fUZ
TH2F fVZ


Constructor & Destructor Documentation

IslMatrix::IslMatrix  
 

IslMatrix::~IslMatrix   [virtual]
 

Definition at line 15 of file IslMatrix.cxx.

00016 {
00017 }


Member Function Documentation

void IslMatrix::Fill const MomNavigator   mom,
Float_t    ChargeThreshold
 

Definition at line 19 of file IslMatrix.cxx.

References fUZ, fVZ, PlexSEIdAltL::GetCurrentSEId(), CandHandle::GetDaughterIterator(), GetDigitList(), CandDigitHandle::GetPlexSEIdAltL(), PlexStripEndId::GetStrip(), PlexSEIdAltL::IsValid(), PlexSEIdAltL::Next(), and PlexSEIdAltL::SetFirst().

Referenced by IslElectronModule::Reco().

00020 {
00021   fUZ.Reset();
00022   fVZ.Reset();
00023 
00024   Float_t U0Charge = 0.;
00025   Float_t V0Charge = 0.;
00026   Int_t U0PlaneNo = -1;
00027   Int_t V0PlaneNo = -1;
00028   Int_t PeakPlaneNo=-1;
00029   Int_t U0StripNo=-1;
00030   Int_t V0StripNo=-1;
00031 
00032   CandDigitListHandle *cdlh = this->GetDigitList(mom);
00033   if (cdlh) {
00034 
00035     CandDigitHandleItr cdhItr1(cdlh->GetDaughterIterator());
00036     for (; cdhItr1.IsValid(); cdhItr1.Next()) {
00037       Float_t Charge1 = (*cdhItr1)->GetCharge()/100.;
00038       Int_t End1 = (*cdhItr1)->GetPlexSEIdAltL().GetEnd();
00039       if ((Charge1>ChargeThreshold)&&(End1==1)) {
00040         Int_t PlaneNo1 = (*cdhItr1)->GetPlexSEIdAltL().GetPlane();
00041         CandDigitHandle Channel1 = *(*cdhItr1);
00042 
00043         CandDigitHandleItr cdhItr2(cdlh->GetDaughterIterator());
00044         for (; cdhItr2.IsValid(); cdhItr2.Next()) {
00045           Float_t Charge2 = (*cdhItr2)->GetCharge()/100.;
00046           Int_t End2 = (*cdhItr2)->GetPlexSEIdAltL().GetEnd();
00047           Int_t PlaneNo2 = (*cdhItr2)->GetPlexSEIdAltL().GetPlane();
00048           if ((Charge2>ChargeThreshold)&&(End2!=End1)&&(PlaneNo2==PlaneNo1)) {
00049             CandDigitHandle Channel2 = *(*cdhItr2);
00050 
00051             if ((((PlaneNo1%2)==0)&&(Charge1+Charge2>U0Charge))||
00052                 (((PlaneNo1%2)==1)&&(Charge1+Charge2>V0Charge))) {
00053               for (Channel1.GetPlexSEIdAltL().SetFirst(); Channel1.GetPlexSEIdAltL().IsValid(); Channel1.GetPlexSEIdAltL().Next()) {
00054                 Int_t StripNo1 = Channel1.GetPlexSEIdAltL().GetCurrentSEId().GetStrip();
00055                 for (Channel2.GetPlexSEIdAltL().SetFirst(); Channel2.GetPlexSEIdAltL().IsValid(); Channel2.GetPlexSEIdAltL().Next()) {
00056                   Int_t StripNo2 = Channel2.GetPlexSEIdAltL().GetCurrentSEId().GetStrip();
00057 
00058                   if (StripNo1==StripNo2) {
00059                     if ((PlaneNo1%2)==0) {
00060                       U0Charge=Charge1+Charge2;
00061                       U0StripNo=StripNo1;
00062                       U0PlaneNo=PlaneNo1;
00063                     }
00064                     if ((PlaneNo1%2)==1) {
00065                       V0Charge=Charge1+Charge2;
00066                       V0StripNo=StripNo1;
00067                       V0PlaneNo=PlaneNo1;
00068                     }
00069                   }
00070 
00071                 }
00072               }
00073             }
00074 
00075           }
00076         }
00077 
00078       }
00079     }
00080 
00081     if ((U0StripNo!=-1)&&(V0StripNo!=-1)) {
00082 
00083       if (U0Charge>V0Charge) PeakPlaneNo=U0PlaneNo;
00084       else PeakPlaneNo=V0PlaneNo;
00085 
00086       //        cout << "PeakPlaneNo:" << PeakPlaneNo << " U0StripNo:" << U0StripNo << " V0StripNo:" << V0StripNo << " ... ";
00087 
00088       Int_t NStripsToSides = 10;
00089       Int_t NPlanesUpStream = 9;
00090       Int_t NPlanesDownStream = 20;
00091 
00092       if ((PeakPlaneNo%2)==0) {
00093         fUZ.SetBins(2*NStripsToSides+1,U0StripNo-NStripsToSides-0.5,U0StripNo+NStripsToSides+0.5,(NPlanesUpStream+NPlanesDownStream+1)/2,PeakPlaneNo-NPlanesUpStream,PeakPlaneNo+NPlanesDownStream+1.);
00094         fVZ.SetBins(2*NStripsToSides+1,V0StripNo-NStripsToSides-0.5,V0StripNo+NStripsToSides+0.5,(NPlanesUpStream+NPlanesDownStream+1)/2,PeakPlaneNo-NPlanesUpStream-1.,PeakPlaneNo+NPlanesDownStream);
00095       }
00096       if ((PeakPlaneNo%2)==1) {
00097         fUZ.SetBins(2*NStripsToSides+1,U0StripNo-NStripsToSides-0.5,U0StripNo+NStripsToSides+0.5,(NPlanesUpStream+NPlanesDownStream+1)/2,PeakPlaneNo-NPlanesUpStream-1.,PeakPlaneNo+NPlanesDownStream);
00098         fVZ.SetBins(2*NStripsToSides+1,V0StripNo-NStripsToSides-0.5,V0StripNo+NStripsToSides+0.5,(NPlanesUpStream+NPlanesDownStream+1)/2,PeakPlaneNo-NPlanesUpStream,PeakPlaneNo+NPlanesDownStream+1.);
00099       }
00100 
00101       CandDigitHandleItr cdhItr3(cdlh->GetDaughterIterator());
00102       for (; cdhItr3.IsValid(); cdhItr3.Next()) {
00103         Float_t Charge = (*cdhItr3)->GetCharge()/100.;
00104         if (Charge>ChargeThreshold) {
00105           Int_t PlaneNo = (*cdhItr3)->GetPlexSEIdAltL().GetPlane();
00106           // loop over possible strip ends
00107           Int_t BestStripNo = -1;
00108           for ((*cdhItr3)->GetPlexSEIdAltL().SetFirst(); (*cdhItr3)->GetPlexSEIdAltL().IsValid(); (*cdhItr3)->GetPlexSEIdAltL().Next()) {
00109             
00110             if ((PlaneNo<=PeakPlaneNo+NPlanesDownStream)&&
00111                 (PlaneNo>=PeakPlaneNo-NPlanesUpStream)) {
00112 
00113               Int_t TestStripNo = (*cdhItr3)->GetPlexSEIdAltL().GetCurrentSEId().GetStrip();
00114               if (((PlaneNo%2)==0)&&
00115                   (TestStripNo<=U0StripNo+NStripsToSides)&&
00116                   (TestStripNo>=U0StripNo-NStripsToSides)) BestStripNo=TestStripNo;
00117               if (((PlaneNo%2)==1)&&
00118                   (TestStripNo<=V0StripNo+NStripsToSides)&&
00119                   (TestStripNo>=V0StripNo-NStripsToSides)) BestStripNo=TestStripNo;
00120 
00121             } // channel within event slice
00122           } // loop over candidate strips
00123 
00124           if (BestStripNo!=-1) {
00125             //        cout << "Charge:" << Charge << " PlaneNo:" << PlaneNo << " StripNo:" << BestStripNo << endl;
00126             if ((PlaneNo%2)==0) fUZ.Fill((Float_t)BestStripNo,(Float_t)PlaneNo,Charge);
00127             if ((PlaneNo%2)==1) fVZ.Fill((Float_t)BestStripNo,(Float_t)PlaneNo,Charge);
00128           } // candidate strip in fiducial area
00129 
00130         } // channel below threshold
00131       } // loop over channels
00132       
00133     } else cout << "==> Not enough information to demux." << endl;
00134   } else cout << "No CandDigitList" << endl;
00135 
00136   return;
00137 }

CandDigitListHandle * IslMatrix::GetDigitList const MomNavigator   mom [private]
 

Definition at line 139 of file IslMatrix.cxx.

References CandRecord::FindCandHandle(), and MomNavigator::GetFragment().

Referenced by Fill().

00140 {
00141   CandRecord* candrec = 
00142     dynamic_cast<CandRecord*>
00143     (mom->GetFragment("CandRecord", "PrimaryCandidateRecord"));
00144   if (candrec==0) {
00145     cout << "No PrimaryCandidateRecord in MOM." << endl;
00146     return 0;
00147   }
00148   CandDigitListHandle* cdlh =
00149     dynamic_cast<CandDigitListHandle*>
00150     (candrec->FindCandHandle("CandDigitListHandle", "canddigitlist"));
00151   return cdlh;
00152 }

TH2F IslMatrix::GetUZ   const [inline]
 

Definition at line 24 of file IslMatrix.h.

References fUZ.

Referenced by IslElectronModule::Display(), and IslCluster::FindIslands().

00024 {return fUZ;}

TH2F IslMatrix::GetVZ   const [inline]
 

Definition at line 25 of file IslMatrix.h.

References fVZ.

Referenced by IslElectronModule::Display(), and IslCluster::FindIslands().

00025 {return fVZ;}


Member Data Documentation

TH2F IslMatrix::fUZ [private]
 

Definition at line 30 of file IslMatrix.h.

Referenced by Fill(), and GetUZ().

TH2F IslMatrix::fVZ [private]
 

Definition at line 31 of file IslMatrix.h.

Referenced by Fill(), and GetVZ().


The documentation for this class was generated from the following files:
Generated on Wed Sep 4 19:22:54 2002 for loon by doxygen1.2.16