To use StEEmcSmdGeom
  1. Login to one of the Linux RCAS machines (rcas60XX) at BNL.
    Class StEEmcSmdGeom is in cvs repository already.
  2. CVS check out an example StEEmcSmdAnalysisMaker (Modify it as you wish) cvs co StRoot/StEEmcPool/StEEmcSmdAnalysisMaker
  3. Core codes of StSmdAnalysisMaker.cxx
    // instacne of database StEESmdGeom     
    
       if(mAllSector)
         mEEmcSmdGeom = StEEmcSmdGeom::instance(); // only one instance!
       else {
          intVec sIdVec;
          for(int iSec = 0; iSec < kEEmcNumSectors; iSec++)
            if(mIsSectorIn[iSec]) sIdVec.push_back(iSec+1);
            mEEmcSmdGeom = StEEmcSmdGeom::instance(sIdVec);
       }
    
    //   ......................
    
                                                                                
    // search for strip of DCA
          float* dca = new float;
          *dca = maxEEmcR;
          StructEEmcStrip *stripPtr =
                        mEEmcSmdGeom->getDcaStripPtr(iPlane,iSec,hitAtSmd,dca);
          if(stripPtr->stripStructId.stripId != 0) {
             mEEmcSmdGeom->printStrip(*stripPtr)
          }           
    
     
    // The following shows printout of printStrip()
    /*
    ------StEEmcSmdGeom::printStrip()------
    Strip:  sectorId, stripId, planeId    =  V6 57 3
            x1, y1, x2, y2, z     =  24.0295 -74.4641 -33.3111 -131.805 280.757
            phi1, phi2, length    =  -72.1151 -104.183 81.0919
    ------------------------------------
    */
      
    
    //   ......................
    
    // match the found strip with SMD hits
          bool matchHit;
          p = smdUHitVec.begin();
          while(p != smdUHitVec.end() && nHitsU < maxNumOfSmdHitsOnTrk) {
            if(mEEmcSmdGeom->matchStrips(stripPtr->stripStructId,
                                     p->stripStructId, mMaxGapForMatch)) {
              matchHit = true;
             p++;
          }
    
    //   ......................
    
    
  4. cvs check out an example macro doEEmcSmd.C cvs co StRoot/StEEmcPool/macros/doEEmcSmd.C Reconfigure sector configuration by setSectors(int s1,int s2,int s3,int s4)
    All 12 setctors will be brought up unless setSectors is called. Up to
    4 sectors can be set. S1 to s4 are either sector ID or zero for void.
    Redefine maxGapForMatch (an integer in unit of number of strips) by setMaxGapForMatch(int nStrips)
    An extrapolated StTrack is assumed to be matched with a SMD hit
    if they are no more than maxGapForMatch strips (Default = 3) apart.
    Redefine the name of a histogram file by setHistoFileName(char* filenamne)
  5. Examples of reconfiguration of doEEmcSmd.C
    analysisMaker->setMaxGapForMatch(2); // analysisMaker->setSectors(3,6,7,9); analysisMaker->setSectors(6,0,0,0); analysisMaker->setHistoFileName("MuonAna.root");
  6. Execute
    root4star -b -q doEEmcSmd.C'(nEvents,"filename.event.root")'