CDTracker Class Reference

#include <CDTracker.h>

Inheritance diagram for CDTracker:
CDBeamMuTracker CDCosmicTracker

List of all members.

Public Member Functions

 CDTracker ()
 CDTracker (std::map< Int_t, CandStripHandle >, CDTrackerOptions *opt)
virtual ~CDTracker ()
Int_t SetMap (std::map< Int_t, CandStripHandle >)
Int_t SetTrackOptions (CDTrackerOptions *)
std::map< Int_t, CandStripHandleGetTrackedStripMap (PlaneView::EPlaneView view)
std::map< Int_t, CandStripHandleGetCCStripMap ()
CDTrackInfoGetTrackInfo ()
CDTrackInfoGetTrackStripInfo ()
Int_t GetNumCCHits ()

Protected Member Functions

virtual Int_t FindStripTrack (Int_t)=0
Int_t LocateCCStrips ()
bool CCStripsOnTrack (Float_t *, Float_t *)

Protected Attributes

Int_t fevenresult
Int_t foddresult
Int_t fnum_cc_hits
CDTrackerOptionsfcd_to
std::map< Int_t, CandStripHandlefStripMap
std::map< Int_t, CandStripHandlefEvenPlStrips
std::map< Int_t, CandStripHandlefOddPlStrips
std::map< Int_t, CandStripHandlefCCStrips

Detailed Description

Definition at line 23 of file CDTracker.h.


Constructor & Destructor Documentation

CDTracker::CDTracker (  ) 

Definition at line 36 of file CDTracker.cxx.

References fevenresult, foddresult, Msg::kVerbose, and MSG.

00037 {
00038   MSG("CDTracker",Msg::kVerbose)
00039     <<"Running default CDTracker constructor..."<<endl;
00040 
00041   fevenresult=0;
00042   foddresult=0;
00043 
00044   MSG("CDTracker",Msg::kVerbose)
00045     <<"Finished default CDTracker constructor"<<endl;
00046 }

CDTracker::CDTracker ( std::map< Int_t, CandStripHandle ,
CDTrackerOptions opt 
)
virtual CDTracker::~CDTracker (  )  [inline, virtual]

Definition at line 29 of file CDTracker.h.

00029 {};


Member Function Documentation

bool CDTracker::CCStripsOnTrack ( Float_t *  evenangle,
Float_t *  oddangle 
) [protected]

Definition at line 659 of file CDTracker.cxx.

References fnum_cc_hits, and LocateCCStrips().

Referenced by GetTrackStripInfo().

00660 {
00661   //get rid of warnings for now JJH
00662   Float_t* hack1;
00663   Float_t* hack2;
00664   hack1=evenangle;
00665   hack2=oddangle;
00666 
00667   if(fnum_cc_hits==-1) fnum_cc_hits = this->LocateCCStrips();
00668 
00669   bool cchitsontrack = false;
00670   
00671   if(fnum_cc_hits==0){
00672     return cchitsontrack;
00673   }
00674   else cchitsontrack=true;
00675   
00676   return cchitsontrack;
00677 }

virtual Int_t CDTracker::FindStripTrack ( Int_t   )  [protected, pure virtual]

Referenced by GetTrackStripInfo().

map< Int_t, CandStripHandle > CDTracker::GetCCStripMap (  ) 

Definition at line 106 of file CDTracker.cxx.

References fCCStrips, fnum_cc_hits, and LocateCCStrips().

Referenced by CDTrackerModule::Ana().

00107 {
00108   if(fnum_cc_hits==-1) fnum_cc_hits = this->LocateCCStrips();
00109   return fCCStrips;
00110 }

Int_t CDTracker::GetNumCCHits (  )  [inline]

Definition at line 38 of file CDTracker.h.

References fnum_cc_hits.

00038 {return fnum_cc_hits;}

map< Int_t, CandStripHandle > CDTracker::GetTrackedStripMap ( PlaneView::EPlaneView  view  ) 

Definition at line 85 of file CDTracker.cxx.

References Msg::kWarning, PlaneView::kX, PlaneView::kY, and MSG.

Referenced by CDTrackerModule::Ana().

00086 {
00087   if(view==PlaneView::kX) {
00088     if(fevenresult==-1) fevenresult = this->FindStripTrack(0);    
00089     return fEvenPlStrips;
00090   }
00091   else if(view==PlaneView::kY) {
00092     if(foddresult==-1) foddresult = this->FindStripTrack(1);    
00093     return fOddPlStrips;
00094   }
00095   else {
00096     MSG("CDTracker",Msg::kWarning)
00097       <<"Neither Even nor Odd plane " 
00098       <<"tracking requested. Not Tracking. Returning entire Strip Map."
00099       <<endl;
00100   }
00101   return fStripMap;
00102 }

CDTrackInfo * CDTracker::GetTrackInfo (  ) 

Definition at line 114 of file CDTracker.cxx.

References fStripMap, GetTrackStripInfo(), Msg::kDebug, and MSG.

Referenced by CDTrackerModule::Ana().

00115 {
00116   CDTrackInfo *cdti = 0;
00117   if(fStripMap.size()>0) {
00118     while(cdti==0) cdti = GetTrackStripInfo();
00119   }
00120   else{
00121     MSG("CDTracker",Msg::kDebug)
00122       <<"Stripmap is size 0; default CDTrackInfo constructed"<<endl;
00123     cdti=new CDTrackInfo();
00124   }
00125   return cdti;
00126 }

CDTrackInfo * CDTracker::GetTrackStripInfo (  ) 

Definition at line 130 of file CDTracker.cxx.

References CCStripsOnTrack(), CDTrackerOptions::Cosmic(), fcd_to, fEvenPlStrips, fevenresult, FindStripTrack(), fnum_cc_hits, fOddPlStrips, foddresult, fStripMap, MsgService::Instance(), Msg::kDebug, CalDigitType::kPE, CalDigitType::kSigCorr, Msg::kVerbose, LocateCCStrips(), MSG, and CalDetConstants::PLANECONST.

Referenced by GetTrackInfo().

00131 {
00132   //this method determines information such as:
00133   //total pe
00134   //pe per plane in track
00135   //number of hits in track  
00136   //number of odd and even hits
00137 
00138   MSG("CDTracker",Msg::kDebug)
00139       <<"Running GetTrackStripInfo method..."<<endl;
00140 
00141   if(fevenresult==-1) fevenresult = this->FindStripTrack(0);
00142   if(foddresult==-1) foddresult = this->FindStripTrack(1);
00143   if(fnum_cc_hits==-1) fnum_cc_hits = this->LocateCCStrips();
00144 
00145   Float_t stripPos[60] = {};
00146 
00147   Float_t weights[60] = {};
00148   Float_t weightvar[60] = {};
00149   Float_t sum[60] = {};
00150   Int_t num[60] = {};
00151 
00152   Int_t striphitlog[60][24] = {};
00153   Int_t nhits_even = 0;
00154   Int_t nhits_odd = 0;
00155 
00156   Float_t tot_pe = 0;
00157   Float_t trk_pe = 0;
00158   
00159   map<Int_t,CandStripHandle>::iterator stripmapIter = fStripMap.begin();
00160   map<Int_t,CandStripHandle>::iterator stripmapend = fStripMap.end();
00161   
00162   //sum up the total pe
00163   while(stripmapIter!=stripmapend){
00164     
00165     Int_t pln = stripmapIter->second.GetPlane();
00166     Int_t strp = stripmapIter->second.GetStrip();
00167     
00168     if(pln>=0 && pln<=59 && strp<24 && strp>=0)  
00169       tot_pe+=stripmapIter->second.GetCharge(CalDigitType::kPE);
00170     
00171     stripmapIter++;
00172   }
00173   
00174   MSG("CDTracker",Msg::kDebug)<<"Total charge in pe = "<<tot_pe<<endl;
00175   
00176   //get iterators to even hits
00177   map<Int_t,CandStripHandle>::iterator starteven = fEvenPlStrips.begin();
00178   map<Int_t,CandStripHandle>::iterator endeven = fEvenPlStrips.end();
00179 
00180   //While filling the arrays, also check for gaps between "tracked" hit strips
00181   //on the same plane. If a gap is found, take the biggest hit to be the real
00182   //track hit.
00183   float hits[60][24] = {};
00184   int keys[60][24] = {};
00185   int lastHitPlane = 0;
00186 
00187   while(starteven!=endeven){
00188 
00189     Int_t pln=starteven->second.GetPlane();
00190     Int_t strp=starteven->second.GetStrip();
00191 
00192     if(pln>=0 && pln<=59 && strp<24 && strp>=0) {
00193 
00194       //Note: not using PEs anymore to calculate angle. Instead use SigCorr
00195       Float_t temp_pe=starteven->second.GetCharge(CalDigitType::kSigCorr);
00196       
00197       hits[pln][strp] = temp_pe;
00198       keys[pln][strp] = starteven->first;
00199 
00200       if(pln>lastHitPlane) lastHitPlane = pln;
00201 
00202       num[pln]++;
00203       stripPos[pln] += strp*temp_pe;
00204       weights[pln] += strp*4.1*temp_pe;
00205       weightvar[pln]+=strp*strp*4.1*4.1*temp_pe;
00206       sum[pln] += temp_pe;
00207       trk_pe += starteven->second.GetCharge(CalDigitType::kPE);
00208       nhits_even += 1;
00209       striphitlog[pln][strp] = 1;
00210     }
00211     starteven++;
00212   }
00213 
00214   MSG("CDTracker",Msg::kDebug)
00215       <<"Number even planes hit = "<<nhits_even<<endl;
00216 
00217   //get iterators to odd hits
00218   map<Int_t,CandStripHandle>::iterator startodd = fOddPlStrips.begin();
00219   map<Int_t,CandStripHandle>::iterator endodd = fOddPlStrips.end();
00220 
00221   while(startodd!=endodd){
00222 
00223     Int_t pln = startodd->second.GetPlane();
00224     Int_t strp = startodd->second.GetStrip();
00225     
00226     if(pln>=0 && pln<=59 && strp<24 && strp>=0) {
00227       
00228       Float_t temp_pe=startodd->second.GetCharge(CalDigitType::kSigCorr);
00229       
00230       hits[pln][strp] = temp_pe;
00231       keys[pln][strp] = startodd->first;
00232       
00233       if(pln>lastHitPlane) lastHitPlane = pln;
00234 
00235       num[pln]++;
00236       stripPos[pln] += strp*temp_pe;
00237       weights[pln] += strp*4.1*temp_pe;
00238       weightvar[pln]+=strp*strp*4.1*4.1*temp_pe;
00239       sum[pln] += temp_pe;
00240       trk_pe += startodd->second.GetCharge(CalDigitType::kPE);
00241       nhits_odd += 1;
00242       striphitlog[pln][strp] = 1;
00243     }
00244     startodd++;
00245   }
00246   
00247   MSG("CDTracker",Msg::kDebug)
00248     <<"Number odd planes hit = "<<nhits_odd<<endl;
00249 
00250   //Start looking for problems with the track:
00251   bool anyChanges = false;
00252 
00253   if(!fcd_to->Cosmic()){ //if beam tracker is being used
00254     //Check for plane gaps:
00255     //Look for _first_ gap in track >3 planes long
00256     //can remove all hits downstream of first track segment 
00257     //since we only care about beam related events
00258 
00259     int gapCount = -1;
00260     int removeDownstreamOfThisPlane = 0;
00261     for(int i=0;i<=lastHitPlane;i++){
00262       MSG("CDTracker",Msg::kVerbose)
00263         <<"gapCount="<<gapCount<<", plane="<<i<<", sum="<<sum[i]
00264         <<endl;
00265       if(sum[i]>0) {                   //on first plane hit
00266         gapCount = 0;                  //set gapCount to zero
00267         removeDownstreamOfThisPlane = i;
00268       }
00269       else if(gapCount!=-1) {
00270         gapCount+=1; //only increment gapCount 
00271                      //after first hit plane
00272       }
00273       if(gapCount>3) { //any gap larger than 3 planes can't be good
00274         anyChanges=true; //throw out all hits below this
00275         break;
00276       }
00277     }
00278     
00279     if(anyChanges) {
00280       MSG("CDTracker",Msg::kDebug)
00281         <<"Found large gap after plane "<<removeDownstreamOfThisPlane
00282         <<", lastHitPlane="<<lastHitPlane<<endl;
00283       
00284       for(int i=removeDownstreamOfThisPlane+1;i<=lastHitPlane;i++){
00285         for(int j=0;j<24;j++){
00286           if(hits[i][j]!=0){
00287             if(i%2==0) fEvenPlStrips.erase(keys[i][j]);
00288             else fOddPlStrips.erase(keys[i][j]);
00289           }
00290         }
00291       }  
00292       CDTrackInfo *cdti = 0;
00293       return cdti;  
00294     }
00295   }
00296 
00297   //Check for strip gaps: 
00298   //only possible to have one kind of gap topology with the trackers
00299   //hit-gap-hit, so look for this pattern:
00300   for(int i=0;i<60;i++){
00301     int hitstp = -1;
00302     float stppe = 0;
00303     for(int j=0;j<24;j++){
00304       if(hits[i][j]>0) {
00305         if(hitstp==-1) { //found first strip in plane
00306           hitstp=j;
00307           stppe=hits[i][j];
00308         }
00309         else if (j!=hitstp+1){ //second strip hit in plane 
00310           //if it's not next to hitstp:
00311 
00312           //first check to see if surrounding planes are both hit
00313           //if so, pick hit most consistent
00314           if(i-2>=0&&i+2<PLANECONST&&num[i-2]>0&&num[i+2]>0){
00315 
00316             float xtra = 0;
00317             if(int(stripPos[i-2]/sum[i-2])<int(stripPos[i+2]/sum[i+2])) 
00318               xtra=0.5;
00319             else if(int(stripPos[i-2]/sum[i-2])>int(stripPos[i+2]/sum[i+2])) 
00320               xtra=-0.5;
00321             else xtra=0.;
00322             
00323             int predPos = int((stripPos[i-2]/sum[i-2]
00324                                +stripPos[i+2]/sum[i+2])/2.+xtra);
00325 
00326             if(predPos-hitstp==0) {
00327               if(i%2==0) fEvenPlStrips.erase(keys[i][j]);
00328               else fOddPlStrips.erase(keys[i][j]);
00329             }
00330             else if(predPos-j==0) {
00331               if(i%2==0) fEvenPlStrips.erase(keys[i][hitstp]);
00332               else fOddPlStrips.erase(keys[i][hitstp]);
00333             }
00334             else {
00335             //if neither seem to be where expected, resort to throwing out
00336             //the smaller hit from the track
00337               if(stppe>hits[i][j]){
00338                 if(i%2==0) fEvenPlStrips.erase(keys[i][j]);
00339                 else fOddPlStrips.erase(keys[i][j]);
00340               }
00341               else {
00342                 if(i%2==0) fEvenPlStrips.erase(keys[i][hitstp]);
00343                 else fOddPlStrips.erase(keys[i][hitstp]);
00344               }     
00345             }
00346           }
00347 
00348           //else get rid of the smaller hit from the track
00349           else{
00350             if(stppe>hits[i][j]){
00351               if(i%2==0) fEvenPlStrips.erase(keys[i][j]);
00352               else fOddPlStrips.erase(keys[i][j]);
00353             }
00354             else {
00355               if(i%2==0) fEvenPlStrips.erase(keys[i][hitstp]);
00356               else fOddPlStrips.erase(keys[i][hitstp]);
00357             }
00358           }
00359           anyChanges=true;
00360         }
00361       }
00362     }
00363   }
00364 
00365   if(anyChanges) {
00366     CDTrackInfo *cdti = 0;
00367     return cdti;  
00368   }
00369 
00370 
00371   //Do quick Sanity Check.
00372   //The Even and Odd Planes must overlap.
00373   
00374   Int_t firstEven=-1;
00375   Int_t lastEven=-1;
00376   Int_t firstOdd=-1;
00377   Int_t lastOdd=-1;
00378   //get the first and last planes
00379   for(Int_t pln=0;pln<60;pln++) {
00380     if(num[pln]>0) {
00381       if(firstEven==-1) firstEven=pln;
00382       lastEven=pln;
00383     }
00384     if(num[pln]>0) {
00385       if(firstOdd==-1) firstOdd=pln;
00386       lastOdd=pln;
00387     }
00388   }
00389   
00390   MSG("CDTracker",Msg::kDebug)
00391     <<"First even plane="<<firstEven
00392     <<", odd="<<firstOdd<<endl
00393     <<"Last even plane="<<lastEven
00394     <<", odd="<<lastOdd
00395     <<endl;
00396   
00397   //work out if the tracks overlap
00398   if(firstEven==-1 || firstOdd==-1) {
00399     //if there is not a hit in one (or both) views than set result to 0
00400     if(firstEven==-1) fevenresult=0;
00401     if(firstOdd==-1) foddresult=0;
00402   }
00403   else if(firstEven<firstOdd) {
00404     if(lastEven<firstOdd) {
00405       //They don't overlap;
00406       fevenresult=5;
00407       foddresult=5;
00408     }
00409     //else they do overlap
00410   }
00411   else {
00412     if(lastOdd<firstEven) {
00413       //They don't overlap;
00414       fevenresult=5;
00415       foddresult=5;
00416     }
00417     //else they do overlap
00418   }
00419   
00420   Float_t vertex1[2] = {0};
00421   Float_t vertex2[2] = {0};
00422   vertex1[0] = -1;//the lowest plane hit
00423   vertex1[1] = 0;//the sum of strip*pe in the lowest plane hit
00424   vertex2[0] = -1;//the highest plane hit
00425   vertex2[1] = 0;//the sum of strip*pe in the highest plane hit
00426   
00427   Float_t evenZ[30] = {0};
00428   Float_t evenZerr[30] = {0};
00429   Float_t evenT[30] = {0};
00430   Float_t evenTerr[30] = {0};
00431   Int_t evencnt = 0;//number of even planes hit
00432   Float_t oddZ[30] = {0};
00433   Float_t oddZerr[30] = {0};
00434   Float_t oddT[30] = {0};
00435   Float_t oddTerr[30] = {0};
00436   Int_t oddcnt = 0;
00437   
00438   for(Int_t i=0;i<60;i++){
00439     if(sum[i]!=0) {
00440       
00441       Int_t numstrps = 0; //number of *different* strips hit per plane
00442       for(Int_t lp = 0;lp<24;lp++) {
00443         if(striphitlog[i][lp]==1) numstrps+=1;
00444       }
00445       
00446       stripPos[i]/=sum[i];
00447       weights[i]/=sum[i];
00448       weightvar[i]/=sum[i];
00449       if(numstrps==1) weightvar[i] = 4.1/sqrt(12.);
00450       else {
00451         float temp = weightvar[i]-weights[i]*weights[i];
00452         if(temp>0) weightvar[i] = sqrt(temp);
00453         else weightvar[i] = 4.1/sqrt(12.);
00454       }
00455       if(weightvar[i]<4.1/sqrt(12.)) weightvar[i] = 4.1/sqrt(12.);
00456 
00457       //Fill vertex arrays
00458       if(vertex1[0]==-1) {
00459         vertex1[0] = i;
00460         vertex1[1] = stripPos[i];
00461       }
00462       vertex2[0] = i;
00463       vertex2[1] = stripPos[i];
00464 
00465       //Fill arrays for fitting
00466       if(i%2==0) {
00467         evenZ[evencnt] = Float_t(i)*6.0;
00468         evenZerr[evencnt] = 0.;
00469         evenT[evencnt] = weights[i];
00470         evenTerr[evencnt] = weightvar[i];
00471         evencnt++;
00472       }
00473       else {
00474         oddZ[oddcnt] = Float_t(i)*6.0;
00475         oddZerr[oddcnt] = 0.;
00476         oddT[oddcnt] = weights[i];
00477         oddTerr[oddcnt] = weightvar[i];
00478         oddcnt++;
00479       }
00480     }
00481   }
00482   
00483   TF1* form=new TF1("form","pol1",0,60);
00484   
00485   Float_t evenangle[2] = {};
00486   Float_t dydz[2] = {};
00487   Float_t oddangle[2] = {};
00488   Float_t dxdz[2] = {};
00489 
00490   if(evencnt>=3){
00491     
00492     //only loop if debug is set
00493     if (MsgService::Instance()->IsActive("CDTracker",Msg::kDebug)){
00494       for (Int_t i=0;i<evencnt;i++){
00495         MSG("CDTracker",Msg::kDebug)
00496           <<"evencnt = "<<evencnt
00497           <<", plane = "<<evenZ[i]
00498           <<", strip = "<<evenT[i]<<" +/- " << evenTerr[i]<<endl;
00499       } 
00500     }
00501     
00502     TGraphErrors* evengr=new TGraphErrors(evencnt,evenZ,evenT,
00503                                           evenZerr,evenTerr);  
00504     evengr->Fit("form","QN");
00505     
00506     MSG("CDTracker",Msg::kDebug)
00507       <<"Even fit parameters: icept = "<<form->GetParameter(0)
00508       <<", grad = "<<form->GetParameter(1)<<endl;
00509     
00510     evenangle[0]=form->GetParameter(0)/4.1; //in units of "strip"
00511     evenangle[1]=180.0*TMath::ATan(form->GetParameter(1))/TMath::Pi();
00512     dydz[0] = form->GetParameter(0)/4.1; //in units of "strip"
00513     dydz[1] = 6.0*form->GetParameter(1)/4.1;
00514     delete evengr;
00515   }
00516   else evenangle[0]=evenangle[1]=0;
00517   
00518   if(oddcnt>=3){
00519     //only loop if debug is set
00520     if (MsgService::Instance()->IsActive("CDTracker",Msg::kDebug)){
00521       for (Int_t i=0;i<oddcnt;i++){
00522         MSG("CDTracker",Msg::kDebug)
00523           <<"oddcnt = "<<oddcnt
00524           <<", plane = "<<oddZ[i]
00525           <<", strip = "<<oddT[i]<<" +/- "<<oddTerr[i]<<endl;
00526       } 
00527     }
00528 
00529     TGraphErrors* oddgr=new TGraphErrors(oddcnt,oddZ,oddT,oddZerr,oddTerr);
00530     oddgr->Fit("form","QN");
00531 
00532     MSG("CDTracker",Msg::kDebug)
00533       <<"Odd fit parameters: icept = "<<form->GetParameter(0)
00534       <<", grad = "<<form->GetParameter(1)<<endl;
00535     
00536     oddangle[0]=form->GetParameter(0)/4.1;
00537     oddangle[1]=180.0*TMath::ATan(form->GetParameter(1))/TMath::Pi();
00538     dxdz[0] = form->GetParameter(0)/4.1; //in units of "strip"
00539     dxdz[1] = 6.0*form->GetParameter(1)/4.1;
00540     delete oddgr;
00541   }
00542   else oddangle[0]=oddangle[1]=0;
00543 
00544   delete form;
00545 
00546   //check now that hits are not out of the detector for cosmic tracker
00547   if(fcd_to->Cosmic()){
00548     int Ecnt = 0;
00549     int Ocnt = 0;
00550     int *badEvenKeys = new int[fEvenPlStrips.size()];  
00551     int *badOddKeys = new int[fOddPlStrips.size()];
00552     
00553     starteven=fEvenPlStrips.begin(); 
00554     while(starteven!=endeven){
00555       Int_t pln=starteven->second.GetPlane();
00556       
00557       if(pln>=0 && pln<=59) {
00558         float transpos = dxdz[1]*float(pln) + dxdz[0];
00559         float transplus = dxdz[1]*float(pln+(1./12.)) + dxdz[0];
00560         float transminus = dxdz[1]*float(pln-(1./12.)) + dxdz[0];
00561         if(transpos<-0.8){
00562           if(transplus>-0.8||transminus>-0.8) break;
00563           else {
00564             badEvenKeys[Ecnt] = starteven->first;
00565             Ecnt++;
00566           }
00567         }
00568         else if(transpos>23.8){
00569           if(transplus<23.8||transminus<23.8) break;
00570           else {
00571             badEvenKeys[Ecnt] = starteven->first;
00572             Ecnt++;
00573           }     
00574         }
00575       }
00576       starteven++;
00577     }
00578     for(int iE=0;iE<Ecnt;iE++) fEvenPlStrips.erase(badEvenKeys[iE]);
00579     
00580     startodd=fOddPlStrips.begin(); 
00581     while(startodd!=endodd){
00582       Int_t pln=startodd->second.GetPlane();
00583       if(pln>=0 && pln<=59) {
00584         float transpos = dydz[1]*float(pln) + dydz[0];
00585         float transplus = dydz[1]*float(pln+(1./12.)) + dydz[0];
00586         float transminus = dydz[1]*float(pln-(1./12.)) + dydz[0];
00587         
00588         if(transpos<-0.8){
00589           if(transplus>-0.8||transminus>-0.8) break;
00590           else {
00591             badOddKeys[Ocnt] = startodd->first;
00592             Ocnt++;
00593           }
00594         }
00595         else if(transpos>23.8){
00596           if(transplus<23.8||transminus<23.8) break;
00597           else {
00598             badOddKeys[Ocnt] = startodd->first;
00599             Ocnt++;
00600           }     
00601         }
00602       }
00603       startodd++;
00604     }
00605     for(int iO=0;iO<Ocnt;iO++) fOddPlStrips.erase(badOddKeys[iO]);
00606     
00607     if(Ocnt>0||Ecnt>0) {
00608       CDTrackInfo *cdti = 0;
00609       return cdti;
00610     }
00611     delete badEvenKeys;
00612     delete badOddKeys;  
00613   }
00614   
00615   double time=double(fStripMap.begin()->second.GetVldContext()
00616                      ->GetTimeStamp().GetSec());
00617   
00618 
00619   //Following need to be set in TrackerModule::Ana
00620   double abstime = 0;  //abstime from cdlh. leave as zero for now.
00621   Int_t trigtime = 0;    //external trigger time. leave as zero for now.
00622   Float_t trk_range = 0; //track range in scint from track angle(s)
00623   
00624   CDTrackInfo *cdti=new CDTrackInfo(fevenresult,foddresult,
00625                                     nhits_even,nhits_odd,
00626                                     time,tot_pe,trk_pe,
00627                                     vertex1,vertex2,
00628                                     evenangle,oddangle,trk_range,
00629                                     abstime,trigtime,
00630                                     this->CCStripsOnTrack(evenangle,
00631                                                         oddangle));
00632   MSG("CDTracker",Msg::kDebug)
00633       <<"Finished GetTrackStripInfo method"<<endl;
00634   return cdti;
00635 }

Int_t CDTracker::LocateCCStrips (  )  [protected]

Definition at line 639 of file CDTracker.cxx.

References fCCStrips, and fStripMap.

Referenced by CCStripsOnTrack(), GetCCStripMap(), and GetTrackStripInfo().

00640 {
00641   Int_t num_cc_hits = 0;
00642 
00643   map<Int_t,CandStripHandle>::iterator stripmapIter=fStripMap.begin();
00644   map<Int_t,CandStripHandle>::iterator stripmapend=fStripMap.end();
00645   
00646   while(stripmapIter!=stripmapend){
00647     Int_t plane=stripmapIter->second.GetPlane();
00648     if(plane>=61 && plane<=64) {
00649       fCCStrips[stripmapIter->first] = stripmapIter->second;      
00650       num_cc_hits+=1;
00651     }
00652     stripmapIter++;
00653   }
00654   return num_cc_hits;
00655 }

Int_t CDTracker::SetMap ( std::map< Int_t, CandStripHandle  ) 
Int_t CDTracker::SetTrackOptions ( CDTrackerOptions cdto  ) 

Definition at line 73 of file CDTracker.cxx.

References fcd_to.

Referenced by CDBeamMuTracker::CDBeamMuTracker().

00074 {
00075   if(cdto!=0){    
00076     fcd_to=cdto;
00077     return 1;
00078   }
00079   else return 0;
00080 }


Member Data Documentation

std::map<Int_t,CandStripHandle> CDTracker::fCCStrips [protected]

Definition at line 58 of file CDTracker.h.

Referenced by GetCCStripMap(), and LocateCCStrips().

std::map<Int_t,CandStripHandle> CDTracker::fEvenPlStrips [protected]
Int_t CDTracker::fevenresult [protected]
Int_t CDTracker::fnum_cc_hits [protected]
std::map<Int_t,CandStripHandle> CDTracker::fOddPlStrips [protected]
Int_t CDTracker::foddresult [protected]
std::map<Int_t,CandStripHandle> CDTracker::fStripMap [protected]

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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1