MdcSegData Class Reference

#include <MdcSegData.h>

List of all members.

Public Types

typedef MdcMap< const MdcHit *,
MdcSegUsage * > 
MdcHitDict

Public Member Functions

 MdcSegData (bool skipUsedHit)
virtual ~MdcSegData ()
int nevent () const
int nhits () const
int runNumber () const
const MdcHithit (int hitno) const
const MdcHitDictsegUsage () const
const MdcHitMaphitMap () const
void loadevent (MdcHitCol *col, MdcHitMap *hmap, double tbunch)
double bunchTime (void) const
bool skippingUsed () const
void poisonHits (const MdcDetector *gm, int debug=0)

Private Member Functions

MdcSegDataoperator= (const MdcSegData &)
 MdcSegData (const MdcSegData &)

Private Attributes

bool _skipUsed
int eventNumber
int _runNumber
MdcHitCol_theHits
MdcHitDict _segUsageDict
MdcSegUsage_segUsage
MdcHitMap_hitMap
double _bunchTime


Detailed Description

Definition at line 26 of file MdcSegData.h.


Member Typedef Documentation

typedef MdcMap<const MdcHit*,MdcSegUsage*> MdcSegData::MdcHitDict

Definition at line 29 of file MdcSegData.h.


Constructor & Destructor Documentation

MdcSegData::MdcSegData ( bool  skipUsedHit  ) 

Definition at line 16 of file MdcSegData.cxx.

References _bunchTime, _hitMap, _segUsage, _skipUsed, _theHits, and eventNumber.

00018 {
00019   eventNumber=0;
00020   _segUsage = 0;
00021   _hitMap = 0;
00022   _bunchTime = 0;
00023   _skipUsed = skip;
00024 
00025   _theHits = 0;
00026 }

MdcSegData::~MdcSegData (  )  [virtual]

Definition at line 29 of file MdcSegData.cxx.

References _segUsage.

00029                             {
00030 //------------------------------------------------------------------------
00031   delete [] _segUsage;
00032 }

MdcSegData::MdcSegData ( const MdcSegData  )  [private]


Member Function Documentation

double MdcSegData::bunchTime ( void   )  const [inline]

Definition at line 41 of file MdcSegData.h.

References _bunchTime.

00041 {return _bunchTime;}

const MdcHit * MdcSegData::hit ( int  hitno  )  const

Definition at line 73 of file MdcSegData.cxx.

References _theHits.

00073                                {
00074 //------------------------------------------------------------------------
00075 return (*_theHits)[hitno];
00076 }

const MdcHitMap* MdcSegData::hitMap (  )  const [inline]

Definition at line 39 of file MdcSegData.h.

References _hitMap.

Referenced by poisonHits().

00039 {return _hitMap;}

void MdcSegData::loadevent ( MdcHitCol col,
MdcHitMap hmap,
double  tbunch 
)

Definition at line 43 of file MdcSegData.cxx.

References _bunchTime, _hitMap, _segUsage, _segUsageDict, _theHits, MdcMap< K, V >::clear(), eventNumber, iter(), nhits(), MdcMap< K, V >::put(), and skippingUsed().

00043                                                                      {
00044 //------------------------------------------------------------------------
00045   _bunchTime = tb;
00046   _theHits   = hitcol;
00047   _hitMap    = hitmap;
00048   assert (_hitMap != 0);
00049 
00050   _segUsageDict.clear();
00051   delete [] _segUsage;
00052   _segUsage = 0;
00053   eventNumber++;
00054 
00055   _segUsage = new MdcSegUsage[nhits()];
00056 
00057   MdcHit* aHit = 0;
00058   MdcHitCol::iterator iter = _theHits->begin();
00059   int index = 0;
00060   for (;iter != _theHits->end(); iter++) {
00061     aHit = *iter;
00062     _segUsageDict.put(aHit, &(_segUsage[index]));
00063     if (skippingUsed() && aHit->usedHit()) {
00064       // Mark for later skipping
00065       _segUsage[index].killHit();
00066     }
00067     index++;
00068   }
00069 }

int MdcSegData::nevent (  )  const [inline]

Definition at line 34 of file MdcSegData.h.

References eventNumber.

00034 {return eventNumber;}

int MdcSegData::nhits (  )  const

Definition at line 36 of file MdcSegData.cxx.

References _theHits.

Referenced by loadevent().

00036                         {
00037 //------------------------------------------------------------------------
00038   return _theHits->size();
00039 }

MdcSegData& MdcSegData::operator= ( const MdcSegData  )  [private]

void MdcSegData::poisonHits ( const MdcDetector gm,
int  debug = 0 
)

Definition at line 81 of file MdcSegData.cxx.

References MdcMap< K, V >::get(), hitMap(), MdcHitMap::hitWire(), MdcDetector::Layer(), mdcWrapWire(), MdcDetector::nLayer(), MdcLayer::nWires(), MdcHit::print(), and segUsage().

00081                                                        {
00082 //------------------------------------------------------------------------
00083   // Mark hits as poor candidates for segment-finding, if they are located 
00084   //  within a string of consecutive hits in the same layer (end hits are 
00085   //  not marked).
00086   for (int ilayer = 0; ilayer < gm->nLayer(); ilayer++) {
00087     int nwire = gm->Layer(ilayer)->nWires();
00088     for (int iwire=0; iwire < nwire;++iwire) {
00089       int wireNext = mdcWrapWire(iwire+1, nwire);
00090       if ( 0 == hitMap()->hitWire(ilayer, wireNext) ) { 
00091               //                        0 1 2 3 4
00092               // next wire not there:   ? o ? ? ?
00093               // so the next-to-next wire shouldn't be poisened 
00094               // (it's left neighbour is empty)
00095               // and the next candidate to check is + 3
00096               iwire+=2; continue;
00097       }
00098 
00099       MdcHit* theHit = hitMap()->hitWire(ilayer, iwire);
00100       if (theHit == 0) { 
00101               //                                        0 1 2 3 4
00102               // next wire is there, this one isn't :   o x ? ? ?
00103               // and the next candidate to check is + 2
00104               ++iwire; continue;
00105       }
00106 
00107       int wirePrev = mdcWrapWire(iwire-1, nwire);
00108       if ( 0 != hitMap()->hitWire(ilayer, wirePrev)) { 
00109           segUsage().get(theHit)->killHit();
00110           if(debug>1){
00111             theHit->print(std::cout);
00112             std::cout<< " killed " << std::endl;
00113           }
00114       }else{
00115         if(debug>1){
00116           theHit->print(std::cout);
00117           std::cout<< " ok " << std::endl;
00118         }
00119       }
00120     }      // end wire loop
00121   }        // end layer loop
00122 
00123   return;
00124 }

int MdcSegData::runNumber (  )  const [inline]

Definition at line 36 of file MdcSegData.h.

References _runNumber.

00036 {return _runNumber;}

const MdcHitDict& MdcSegData::segUsage (  )  const [inline]

Definition at line 38 of file MdcSegData.h.

References _segUsageDict.

Referenced by poisonHits().

00038 {return _segUsageDict;}

bool MdcSegData::skippingUsed (  )  const [inline]

Definition at line 42 of file MdcSegData.h.

References _skipUsed.

Referenced by loadevent().

00042 {return _skipUsed;}


Member Data Documentation

double MdcSegData::_bunchTime [private]

Definition at line 53 of file MdcSegData.h.

Referenced by bunchTime(), loadevent(), and MdcSegData().

MdcHitMap* MdcSegData::_hitMap [private]

Definition at line 52 of file MdcSegData.h.

Referenced by hitMap(), loadevent(), and MdcSegData().

int MdcSegData::_runNumber [private]

Definition at line 48 of file MdcSegData.h.

Referenced by runNumber().

MdcSegUsage* MdcSegData::_segUsage [private]

Definition at line 51 of file MdcSegData.h.

Referenced by loadevent(), MdcSegData(), and ~MdcSegData().

MdcHitDict MdcSegData::_segUsageDict [private]

Definition at line 50 of file MdcSegData.h.

Referenced by loadevent(), and segUsage().

bool MdcSegData::_skipUsed [private]

Definition at line 46 of file MdcSegData.h.

Referenced by MdcSegData(), and skippingUsed().

MdcHitCol* MdcSegData::_theHits [private]

Definition at line 49 of file MdcSegData.h.

Referenced by hit(), loadevent(), MdcSegData(), and nhits().

int MdcSegData::eventNumber [private]

Definition at line 47 of file MdcSegData.h.

Referenced by loadevent(), MdcSegData(), and nevent().


Generated on Tue Nov 29 23:20:16 2016 for BOSS_7.0.2 by  doxygen 1.4.7