#include <CDTrackedHits.h>
Public Member Functions | |
| CDTrackedHits (std::map< Int_t, CandStripHandle > evenHits, std::map< Int_t, CandStripHandle > oddHits, std::map< Int_t, CandStripHandle > ccHits) | |
| Int_t | SetMap (std::map< Int_t, CandStripHandle > anyMap, Int_t mapType) |
| void | GetCCStripInfo (TClonesArray *) |
| void | GetTrackedStripInfo (TClonesArray *) |
| void | GetTrackedStripInfo (TClonesArray *, float *, float *) |
| float | GetTrkRange () |
Protected Attributes | |
| std::map< Int_t, CandStripHandle > | fEvenPlStrips |
| std::map< Int_t, CandStripHandle > | fOddPlStrips |
| std::map< Int_t, CandStripHandle > | fCCStrips |
| float | ftrk_range |
|
||||||||||||||||
|
Definition at line 31 of file CDTrackedHits.cxx. References ftrk_range, and SetMap(). 00034 {
00035 this->SetMap(evenhits,0);
00036 this->SetMap(oddhits,1);
00037 this->SetMap(cchits,-1);
00038 ftrk_range = 0;
00039 }
|
|
|
Definition at line 651 of file CDTrackedHits.cxx. References fCCStrips, CandStripHandle::GetCharge(), Calibrator::GetMIP(), CandStripHandle::GetNDigit(), CandStripHandle::GetPlane(), CandStripHandle::GetStrip(), CandStripHandle::GetTime(), and Calibrator::Instance(). 00652 {
00653 TClonesArray &infar = *infoarray;
00654
00655 Int_t cnt=0;
00656
00657 //get a reference to the calibrator
00658 Calibrator& calibrator=Calibrator::Instance();
00659
00660 map<Int_t,CandStripHandle>::iterator CCIter = fCCStrips.begin();
00661 map<Int_t,CandStripHandle>::iterator CCEndIter = fCCStrips.end();
00662
00663 while(CCIter!=CCEndIter){
00664
00665 CandStripHandle csh = CCIter->second;
00666
00667 if(csh.GetNDigit(StripEnd::kNegative)>0){
00668 new(infar[cnt])
00669 CDTrackedHitInfo
00670 (StripEnd::kNegative,csh.GetPlane(),csh.GetStrip(),
00671 csh.GetCharge(CalDigitType::kNone,StripEnd::kNegative),
00672 csh.GetCharge(CalDigitType::kSigLin,StripEnd::kNegative),
00673 csh.GetCharge(CalDigitType::kSigCorr,StripEnd::kNegative),
00674 csh.GetCharge(CalDigitType::kPE,StripEnd::kNegative),
00675 calibrator.GetMIP(csh.GetCharge(CalDigitType::kSigCorr,
00676 StripEnd::kNegative)),
00677 0.,0.,0.,0.,0.,0.,csh.GetTime(StripEnd::kNegative));
00678 cnt++;
00679 }
00680
00681 if(csh.GetNDigit(StripEnd::kPositive)>0){
00682 new(infar[cnt])
00683 CDTrackedHitInfo
00684 (StripEnd::kPositive,csh.GetPlane(),csh.GetStrip(),
00685 csh.GetCharge(CalDigitType::kNone,StripEnd::kPositive),
00686 csh.GetCharge(CalDigitType::kSigLin,StripEnd::kPositive),
00687 csh.GetCharge(CalDigitType::kSigCorr,StripEnd::kPositive),
00688 csh.GetCharge(CalDigitType::kPE,StripEnd::kPositive),
00689 calibrator.GetMIP(csh.GetCharge(CalDigitType::kSigCorr,
00690 StripEnd::kPositive)),
00691 0.,0.,0.,0.,0.,0.,csh.GetTime(StripEnd::kPositive));
00692 cnt++;
00693 }
00694 CCIter++;
00695 }
00696 infar.Compress();
00697 }
|
|
||||||||||||||||
|
Definition at line 515 of file CDTrackedHits.cxx. References fEvenPlStrips, fOddPlStrips, ftrk_range, CandStripHandle::GetCharge(), Calibrator::GetMIP(), CandStripHandle::GetNDigit(), CandStripHandle::GetPlane(), CandStripHandle::GetStrip(), CandStripHandle::GetTime(), Calibrator::Instance(), and CalScheme::Reset(). 00518 {
00519 TClonesArray &infar = *infoarray;
00520
00521 int cnt=0;
00522
00523 float dydz = TMath::Tan(fevenangle[1]*2.*TMath::Pi()/360.);
00524 float dxdz = TMath::Tan(foddangle[1]*2.*TMath::Pi()/360.);
00525 float dzds = 1./sqrt(1. + dydz*dydz + dxdz*dxdz);
00526
00527 map<int,CandStripHandle>::iterator EvenBegIter=fEvenPlStrips.begin();
00528 map<int,CandStripHandle>::iterator EvenEndIter=fEvenPlStrips.end();
00529
00530 //get a reference to the calibrator
00531 Calibrator& calibrator=Calibrator::Instance();
00532
00533 if(EvenBegIter!=EvenEndIter) {
00534 const VldContext *vc = EvenBegIter->second.GetVldContext();
00535 calibrator.Reset(*vc);
00536 }
00537
00538 int firstplane = 59;
00539 int lastplane = 0;
00540
00541 while(EvenBegIter!=EvenEndIter){
00542
00543 CandStripHandle csh = EvenBegIter->second;
00544
00545 float plcor = 4.10/(4.10+fabs(dydz));
00546 int thePlane = csh.GetPlane();
00547 int theStrip = csh.GetStrip();
00548
00549 if(thePlane<firstplane) firstplane = thePlane;
00550 if(thePlane>lastplane) lastplane = thePlane;
00551
00552 float oddangle=(6.0/4.1)*TMath::Tan(foddangle[1]*TMath::Pi()/180.);
00553 float evenangle=(6.0/4.1)*TMath::Tan(fevenangle[1]*TMath::Pi()/180.);
00554
00555 float transpos = (oddangle*float(thePlane)) + foddangle[0];
00556 float ypos=fevenangle[0]+(float(thePlane)*evenangle)-float(theStrip);
00557
00558 if(csh.GetNDigit(StripEnd::kNegative)>0){
00559 new(infar[cnt])
00560 CDTrackedHitInfo
00561 (StripEnd::kNegative,csh.GetPlane(),csh.GetStrip(),
00562 csh.GetCharge(CalDigitType::kNone,StripEnd::kNegative),
00563 csh.GetCharge(CalDigitType::kSigLin,StripEnd::kNegative),
00564 csh.GetCharge(CalDigitType::kSigCorr,StripEnd::kNegative),
00565 csh.GetCharge(CalDigitType::kPE,StripEnd::kNegative),
00566 calibrator.GetMIP(csh.GetCharge(CalDigitType::kSigCorr,
00567 StripEnd::kNegative)),
00568 dydz,dxdz,dzds,plcor,ypos,transpos,
00569 csh.GetTime(StripEnd::kNegative));
00570 cnt++;
00571 }
00572
00573 if(csh.GetNDigit(StripEnd::kPositive)>0){
00574 new(infar[cnt])
00575 CDTrackedHitInfo
00576 (StripEnd::kPositive,csh.GetPlane(),csh.GetStrip(),
00577 csh.GetCharge(CalDigitType::kNone,StripEnd::kPositive),
00578 csh.GetCharge(CalDigitType::kSigLin,StripEnd::kPositive),
00579 csh.GetCharge(CalDigitType::kSigCorr,StripEnd::kPositive),
00580 csh.GetCharge(CalDigitType::kPE,StripEnd::kPositive),
00581 calibrator.GetMIP(csh.GetCharge(CalDigitType::kSigCorr,
00582 StripEnd::kPositive)),
00583 dydz,dxdz,dzds,plcor,ypos,transpos,
00584 csh.GetTime(StripEnd::kPositive));
00585 cnt++;
00586 }
00587
00588 EvenBegIter++;
00589
00590 }
00591
00592 map<int,CandStripHandle>::iterator OddBegIter = fOddPlStrips.begin();
00593 map<int,CandStripHandle>::iterator OddEndIter = fOddPlStrips.end();
00594
00595 while(OddBegIter!=OddEndIter){
00596
00597 CandStripHandle csh = OddBegIter->second;
00598
00599 float plcor = 4.10/(4.10+fabs(dxdz));
00600 int thePlane = csh.GetPlane();
00601 int theStrip = csh.GetStrip();
00602
00603 if(thePlane<firstplane) firstplane = thePlane;
00604 if(thePlane>lastplane) lastplane = thePlane;
00605
00606 float evenangle = (6.0/4.1)*TMath::Tan(fevenangle[1]*TMath::Pi()/180.);
00607 float oddangle = (6.0/4.1)*TMath::Tan(foddangle[1]*TMath::Pi()/180.);
00608
00609 float transpos = (evenangle*float(thePlane)) + fevenangle[0];
00610 float ypos = foddangle[0]+(float(thePlane)*oddangle)-float(theStrip);
00611
00612 if(csh.GetNDigit(StripEnd::kNegative)>0){
00613 new(infar[cnt])
00614 CDTrackedHitInfo
00615 (StripEnd::kNegative,csh.GetPlane(),csh.GetStrip(),
00616 csh.GetCharge(CalDigitType::kNone,StripEnd::kNegative),
00617 csh.GetCharge(CalDigitType::kSigLin,StripEnd::kNegative),
00618 csh.GetCharge(CalDigitType::kSigCorr,StripEnd::kNegative),
00619 csh.GetCharge(CalDigitType::kPE,StripEnd::kNegative),
00620 calibrator.GetMIP(csh.GetCharge(CalDigitType::kSigCorr,
00621 StripEnd::kNegative)),
00622 dydz,dxdz,dzds,plcor,ypos,transpos,
00623 csh.GetTime(StripEnd::kNegative));
00624 cnt++;
00625 }
00626
00627 if(csh.GetNDigit(StripEnd::kPositive)>0){
00628 new(infar[cnt])
00629 CDTrackedHitInfo
00630 (StripEnd::kPositive,csh.GetPlane(),csh.GetStrip(),
00631 csh.GetCharge(CalDigitType::kNone,StripEnd::kPositive),
00632 csh.GetCharge(CalDigitType::kSigLin,StripEnd::kPositive),
00633 csh.GetCharge(CalDigitType::kSigCorr,StripEnd::kPositive),
00634 csh.GetCharge(CalDigitType::kPE,StripEnd::kPositive),
00635 calibrator.GetMIP(csh.GetCharge(CalDigitType::kSigCorr,
00636 StripEnd::kPositive)),
00637 dydz,dxdz,dzds,plcor,ypos,transpos,
00638 csh.GetTime(StripEnd::kPositive));
00639 cnt++;
00640 }
00641 OddBegIter++;
00642 }
00643
00644 infar.Compress();
00645
00646 ftrk_range = (1./dzds)*float(lastplane-firstplane+1);
00647 }
|
|
|
Definition at line 59 of file CDTrackedHits.cxx. References fEvenPlStrips, fOddPlStrips, ftrk_range, CandStripHandle::GetCharge(), Calibrator::GetMIP(), CandStripHandle::GetNDigit(), CandStripHandle::GetPlane(), CandStripHandle::GetStrip(), CandStripHandle::GetTime(), Calibrator::Instance(), MSG, and CalScheme::Reset(). 00060 {
00061 TClonesArray &infar = *infoarray; //clonesarray to be filled
00062
00063 //Set-up strip weights
00064
00065 float weights[60] = {};
00066 float weightvar[60] = {};
00067 float sum[60] = {};
00068
00069 Int_t num[60] = {};
00070 Int_t lastplane = 0;
00071 Int_t firstplane = -1;
00072
00073 float DSDZ[60] = {};
00074 float DYDZ[60] = {};
00075 float DXDZ[60] = {};
00076 float DYDZ_C[60] = {};
00077 float DXDZ_C[60] = {};
00078
00079 map<Int_t,CandStripHandle>::iterator EvenBegIter=
00080 fEvenPlStrips.begin();
00081 map<Int_t,CandStripHandle>::iterator EvenEndIter=fEvenPlStrips.end();
00082
00083 //get a reference to the calibrator
00084 Calibrator& calibrator=Calibrator::Instance();
00085
00086 //reset Calibrator
00087 if(EvenBegIter!=EvenEndIter){
00088 const VldContext *vc = EvenBegIter->second.GetVldContext();
00089 calibrator.Reset(*vc);
00090 }
00091
00092 Int_t stripbinhit[60][24] = {};
00093
00094 while(EvenBegIter!=EvenEndIter){
00095
00096 CandStripHandle csh = EvenBegIter->second;
00097
00098 Int_t thePlane = csh.GetPlane();
00099 Int_t theStrip = csh.GetStrip();
00100 //Note: not using PEs anymore to calculate quantities. Use SigCorr instead
00101 float thePE = csh.GetCharge(CalDigitType::kSigCorr);
00102
00103 weights[thePlane]+=theStrip*4.1*thePE;
00104 weightvar[thePlane]+=theStrip*theStrip*4.1*4.1*thePE;
00105 sum[thePlane]+=thePE;
00106
00107 if(stripbinhit[thePlane][theStrip]!=1){
00108 num[thePlane]+=1;
00109 stripbinhit[thePlane][theStrip]=1;
00110 }
00111
00112 EvenBegIter++;
00113
00114 }
00115
00116 map<Int_t,CandStripHandle>::iterator OddBegIter=fOddPlStrips.begin();
00117 map<Int_t,CandStripHandle>::iterator OddEndIter=fOddPlStrips.end();
00118
00119 while(OddBegIter!=OddEndIter){
00120
00121 CandStripHandle csh = OddBegIter->second;
00122
00123 Int_t thePlane = csh.GetPlane();
00124 Int_t theStrip = csh.GetStrip();
00125 float thePE = csh.GetCharge(CalDigitType::kSigCorr);
00126
00127 weights[thePlane]+=theStrip*4.1*thePE;
00128 weightvar[thePlane]+=theStrip*theStrip*4.1*4.1*thePE;
00129 sum[thePlane]+=thePE;
00130
00131 if(stripbinhit[thePlane][theStrip]!=1){
00132 num[thePlane]+=1;
00133 stripbinhit[thePlane][theStrip]=1;
00134 }
00135 OddBegIter++;
00136 }
00137
00138 for(Int_t i=0;i<60;i++) {
00139 DYDZ[i] = -1;
00140 DXDZ[i] = -1;
00141 if(num[i]!=0){
00142 if(firstplane==-1) firstplane = i;
00143 lastplane = i;
00144
00145 weights[i]/=sum[i];
00146 if(num[i]==1) weightvar[i] = 4.1/sqrt(12.);
00147 else {
00148 float temp = weightvar[i]/sum[i]-weights[i]*weights[i];
00149 if(temp>0) weightvar[i]= sqrt(temp);
00150 else weightvar[i] = 4.1/sqrt(12.);
00151 }
00152 if(weightvar[i]<4.1/sqrt(12.)) weightvar[i] = 4.1/sqrt(12.);
00153 }
00154 }
00155
00157 //Calculate dydz and dxdz at each plane
00158
00159 TF1 *temp_pol1 = new TF1("temp_pol1","pol1",0,60);
00160
00161 //even planes
00162 for(Int_t ipln=0;ipln<=lastplane;ipln+=2){
00163
00164 if(sum[ipln]>0){
00165
00166 float X[30];
00167 float Y[30];
00168 float XE[30];
00169 float YE[30];
00170 Int_t Num = 0;
00171
00172 X[Num] = 6.0*float(ipln);
00173 Y[Num] = weights[ipln];
00174 XE[Num] = 0.;
00175 YE[Num] = weightvar[ipln];
00176 Num += 1;
00177
00178 float ChiSq = 0;
00179 Int_t step = 2;
00180 float m = 0;
00181 float c = Y[0];
00182 float m_err = 0;
00183 float c_err = YE[0];
00184
00185 float dydz = 0.;
00186 float dydz_c = 0.;
00187 float dydz_err = 0.;
00188 float dydz_c_err = 0.;
00189 Int_t gottoend = false;
00190
00191 while(ChiSq<4.0){
00192
00193 dydz = m;
00194 dydz_c = c;
00195 dydz_err = m_err;
00196 dydz_c_err = c_err;
00197
00198 if(ipln+step>lastplane) {
00199 gottoend = true;
00200 break;
00201 }
00202
00203 if(sum[ipln+step]>0) {
00204
00205 X[Num] = 6.0*float(ipln+step);
00206 Y[Num] = weights[ipln+step];
00207 XE[Num] = 0.;
00208 YE[Num] = weightvar[ipln+step];
00209 Num+=1;
00210
00211 TGraphErrors *temp_gr = new TGraphErrors(Num,X,Y,XE,YE);
00212 temp_gr->Fit("temp_pol1","QN");
00213 c = temp_pol1->GetParameter(0);
00214 m = temp_pol1->GetParameter(1);
00215 c_err = temp_pol1->GetParError(0);
00216 m_err = temp_pol1->GetParError(1);
00217 ChiSq=TMath::Power((weights[ipln+step]
00218 -(dydz*6.0*float(ipln+step)+dydz_c)),2)
00219 /(weightvar[ipln+step]
00220 +dydz_err*dydz_err*36.0*float(ipln+step)*float(ipln+step)
00221 +dydz_c_err*dydz_c_err);
00222 delete temp_gr;
00223
00224 if(Num==2) ChiSq=0;
00225 MSG("CDTrackedHits",Msg::kDebug)<<"ChiSq0 "<<ChiSq<<std::endl;
00226
00227 }
00228 step+=2;
00229 }
00230
00231 Int_t loopstart = ipln;
00232 Int_t loopend = 0;
00233 if(gottoend) {
00234 loopend = lastplane;
00235 if(ipln==lastplane|| ipln==lastplane-1){
00236 Int_t temp = 2;
00237 while(sum[ipln-temp]==0) temp-=2;
00238 X[Num] = 6.0*float(ipln-temp);
00239 Y[Num] = weights[ipln-temp];
00240 XE[Num] = 0.;
00241 YE[Num] = sqrt(weightvar[ipln-temp]);
00242 Num+=1;
00243 TGraphErrors *temp_gr = new TGraphErrors(Num,X,Y,XE,YE);
00244 temp_gr->Fit("temp_pol1","QN");
00245 dydz_c = temp_pol1->GetParameter(0);
00246 dydz = temp_pol1->GetParameter(1);
00247 delete temp_gr;
00248 }
00249 }
00250 else loopend = ipln+step-3;
00251 //-4 since step is incremented twice since last reasonable Chi2
00252 //+ 1 to get next odd plane too
00253
00254 for(Int_t i=loopstart;i<=loopend;i++) {
00255 DYDZ[i] = dydz;
00256 DYDZ_C[i] = dydz_c;
00257 }
00258 ipln = loopend - 1;
00259 MSG("CDTrackedHits",Msg::kDebug)
00260 << loopstart << " " << loopend << endl;
00261 }
00262 }
00263
00264 //odd planes
00265 for(Int_t ipln=1;ipln<=lastplane;ipln+=2){
00266 MSG("CDTrackedHits",Msg::kDebug)
00267 << "New Start Plane: " << ipln << endl;
00268 if(sum[ipln]>0){
00269
00270 float X[30];
00271 float Y[30];
00272 float XE[30];
00273 float YE[30];
00274 Int_t Num = 0;
00275
00276 X[Num] = 6.0*float(ipln);
00277 Y[Num] = weights[ipln];
00278 XE[Num] = 0.;
00279 YE[Num] = sqrt(weightvar[ipln]);
00280 Num += 1;
00281
00282 float ChiSq = 0;
00283 Int_t step = 2;
00284 float m = 0;
00285 float c = Y[0];
00286 float m_err = 0;
00287 float c_err = YE[0];
00288
00289 float dxdz = 0.;
00290 float dxdz_c = 0.;
00291 float dxdz_err = 0.;
00292 float dxdz_c_err = 0.;
00293 Int_t gottoend = false;
00294
00295 while(ChiSq<4.0){
00296
00297 dxdz = m;
00298 dxdz_c = c;
00299 dxdz_err = m_err;
00300 dxdz_c_err = c_err;
00301
00302 if(ipln+step>lastplane) {
00303 MSG("CDTrackedHits",Msg::kDebug)
00304 << "Passed last plane at: " << ipln+step << endl;
00305 gottoend = true;
00306 break;
00307 }
00308
00309 if(sum[ipln+step]>0) {
00310
00311 X[Num] = 6.0*float(ipln+step);
00312 Y[Num] = weights[ipln+step];
00313 XE[Num] = 0.;
00314 YE[Num] = sqrt(weightvar[ipln+step]);
00315 Num+=1;
00316
00317 TGraphErrors *temp_gr = new TGraphErrors(Num,X,Y,XE,YE);
00318 temp_gr->Fit("temp_pol1","QN");
00319 c = temp_pol1->GetParameter(0);
00320 m = temp_pol1->GetParameter(1);
00321 c_err = temp_pol1->GetParError(0);
00322 m_err = temp_pol1->GetParError(1);
00323 ChiSq=TMath::Power((weights[ipln+step]
00324 -(dxdz*6.0*float(ipln+step)+dxdz_c)),2)
00325 /(weightvar[ipln+step]
00326 +dxdz_err*dxdz_err*36.0*float(ipln+step)*float(ipln+step)
00327 +dxdz_c_err*dxdz_c_err);
00328
00329 MSG("CDTrackedHits",Msg::kDebug)
00330 << weights[ipln+step] << " "<< float(ipln+step) << endl;
00331 MSG("CDTrackedHits",Msg::kDebug)
00332 << "Angles: " << dxdz << " " << m << " "
00333 << dxdz_c << " " << c << endl;
00334 MSG("CDTrackedHits",Msg::kDebug)
00335 << weightvar[ipln+step]<<" "<<dxdz_err<<" "<<dxdz_c_err<<endl;
00336
00337 delete temp_gr;
00338
00339 if(Num==2) ChiSq = 0;
00340 MSG("CDTrackedHits",Msg::kDebug) << "ChiSq1 " << ChiSq << std::endl;
00341 }
00342 step+=2;
00343 }
00344
00345 Int_t loopstart = ipln-1; //ipln-1 to get previous even plane
00346 Int_t loopend = 0;
00347 if(gottoend) {
00348 loopend = lastplane;
00349 if(ipln==lastplane|| ipln==lastplane-1){
00350
00351 Int_t temp = 2;
00352 while(sum[ipln-temp]==0) temp-=2;
00353
00354 X[Num] = 6.0*float(ipln-temp);
00355 Y[Num] = weights[ipln-temp];
00356 XE[Num] = 0.;
00357 YE[Num] = weightvar[ipln-temp];
00358 Num+=1;
00359
00360 TGraphErrors *temp_gr = new TGraphErrors(Num,X,Y,XE,YE);
00361 temp_gr->Fit("temp_pol1","QN");
00362 dxdz_c = temp_pol1->GetParameter(0);
00363 dxdz = temp_pol1->GetParameter(1);
00364 delete temp_gr;
00365 }
00366 }
00367 else loopend = ipln+step-4;
00368 //-4 since step is incremented twice since last reasonable Chi2
00369
00370 for(Int_t i=loopstart;i<=loopend;i++) {
00371 DXDZ[i] = dxdz;
00372 DXDZ_C[i] = dxdz_c;
00373 }
00374 ipln = loopend;
00375 MSG("CDTrackedHits",Msg::kDebug)
00376 << "Start and End loops: " << loopstart << " " << loopend << endl;
00377 }
00378 }
00379 delete temp_pol1;
00380
00382 //Make sure DYDZ and DXDZ arrays are filled for all hit planes,
00383 //and calculate DSDZ in order to get track range
00384
00385 float temp_dydz = DYDZ[lastplane];
00386 float temp_dxdz = DXDZ[lastplane];
00387 DSDZ[lastplane] = sqrt(1. + temp_dydz*temp_dydz + temp_dxdz*temp_dxdz);
00388 float trk_range = DSDZ[lastplane];
00389 for(Int_t i=lastplane-1;i>=firstplane;i--){
00390 if(sum[i]>0) {
00391 if(DYDZ[i]==-1) DYDZ[i] = temp_dydz;
00392 if(DXDZ[i]==-1) DXDZ[i] = temp_dxdz;
00393 temp_dydz = DYDZ[i];
00394 temp_dxdz = DXDZ[i];
00395 }
00396 DSDZ[i] = sqrt(1.+temp_dydz*temp_dydz+temp_dxdz*temp_dxdz);
00397 trk_range += DSDZ[i];
00398 }
00399
00401 //Fill clonesarray with TrackedHitInfo Objects:
00402
00403 Int_t cnt=0; //for counting number of entries in clonesarray
00404
00405 EvenBegIter = fEvenPlStrips.begin();
00406
00407 while(EvenBegIter!=EvenEndIter){
00408
00409 CandStripHandle csh = EvenBegIter->second;
00410 Int_t pln = csh.GetPlane();
00411 Int_t stp = csh.GetStrip();
00412
00413 float dydz = DYDZ[pln];
00414 float dxdz = DXDZ[pln];
00415 float dydz_c = DYDZ_C[pln];
00416 float dxdz_c = DXDZ_C[pln];
00417
00418 float dzds = 1./sqrt(1. + dydz*dydz + dxdz*dxdz);
00419 float plcor = 4.10/(4.10+fabs(dydz));
00420
00421 float transpos = 6.0*dxdz*float(pln)/4.1 + dxdz_c/4.1;
00422 float ypos = dydz_c/4.1 + float(pln)*dydz*6.0/4.1 - float(stp);
00423
00424 if(csh.GetNDigit(StripEnd::kNegative)>0){
00425 new(infar[cnt])
00426 CDTrackedHitInfo
00427 (StripEnd::kNegative,csh.GetPlane(),csh.GetStrip(),
00428 csh.GetCharge(CalDigitType::kNone,StripEnd::kNegative),
00429 csh.GetCharge(CalDigitType::kSigLin,StripEnd::kNegative),
00430 csh.GetCharge(CalDigitType::kSigCorr,StripEnd::kNegative),
00431 csh.GetCharge(CalDigitType::kPE,StripEnd::kNegative),
00432 calibrator.GetMIP(csh.GetCharge(CalDigitType::kSigCorr,
00433 StripEnd::kNegative)),
00434 dydz,dxdz,dzds,plcor,ypos,transpos,
00435 csh.GetTime(StripEnd::kNegative));
00436 cnt++;
00437 }
00438
00439 if(csh.GetNDigit(StripEnd::kPositive)>0){
00440 new(infar[cnt])
00441 CDTrackedHitInfo
00442 (StripEnd::kPositive,csh.GetPlane(),csh.GetStrip(),
00443 csh.GetCharge(CalDigitType::kNone,StripEnd::kPositive),
00444 csh.GetCharge(CalDigitType::kSigLin,StripEnd::kPositive),
00445 csh.GetCharge(CalDigitType::kSigCorr,StripEnd::kPositive),
00446 csh.GetCharge(CalDigitType::kPE,StripEnd::kPositive),
00447 calibrator.GetMIP(csh.GetCharge(CalDigitType::kSigCorr,
00448 StripEnd::kPositive)),
00449 dydz,dxdz,dzds,plcor,ypos,transpos,
00450 csh.GetTime(StripEnd::kPositive));
00451 cnt++;
00452 }
00453 EvenBegIter++;
00454 }
00455
00456
00457 OddBegIter = fOddPlStrips.begin();
00458
00459 while(OddBegIter!=OddEndIter){
00460
00461 CandStripHandle csh = OddBegIter->second;
00462 Int_t pln = csh.GetPlane();
00463 Int_t stp = csh.GetStrip();
00464
00465 float dydz = DYDZ[pln];
00466 float dxdz = DXDZ[pln];
00467 float dydz_c = DYDZ_C[pln];
00468 float dxdz_c = DXDZ_C[pln];
00469
00470 float dzds = 1./sqrt(1. + dydz*dydz + dxdz*dxdz);
00471 float plcor = 4.10/(4.10+fabs(dxdz));
00472
00473 float transpos = 6.0*dydz*float(pln)/4.1 + dydz_c/4.1;
00474 float ypos = dxdz_c/4.1 + float(pln)*dxdz*6.0/4.1 - float(stp);
00475
00476 if(csh.GetNDigit(StripEnd::kNegative)>0){
00477 new(infar[cnt])
00478 CDTrackedHitInfo
00479 (StripEnd::kNegative,csh.GetPlane(),csh.GetStrip(),
00480 csh.GetCharge(CalDigitType::kNone,StripEnd::kNegative),
00481 csh.GetCharge(CalDigitType::kSigLin,StripEnd::kNegative),
00482 csh.GetCharge(CalDigitType::kSigCorr,StripEnd::kNegative),
00483 csh.GetCharge(CalDigitType::kPE,StripEnd::kNegative),
00484 calibrator.GetMIP(csh.GetCharge(CalDigitType::kSigCorr,
00485 StripEnd::kNegative)),
00486 dydz,dxdz,dzds,plcor,ypos,transpos,
00487 csh.GetTime(StripEnd::kNegative));
00488 cnt++;
00489 }
00490
00491 if(csh.GetNDigit(StripEnd::kPositive)>0){
00492 new(infar[cnt])
00493 CDTrackedHitInfo
00494 (StripEnd::kPositive,csh.GetPlane(),csh.GetStrip(),
00495 csh.GetCharge(CalDigitType::kNone,StripEnd::kPositive),
00496 csh.GetCharge(CalDigitType::kSigLin,StripEnd::kPositive),
00497 csh.GetCharge(CalDigitType::kSigCorr,StripEnd::kPositive),
00498 csh.GetCharge(CalDigitType::kPE,StripEnd::kPositive),
00499 calibrator.GetMIP(csh.GetCharge(CalDigitType::kSigCorr,
00500 StripEnd::kPositive)),
00501 dydz,dxdz,dzds,plcor,ypos,transpos,
00502 csh.GetTime(StripEnd::kPositive));
00503 cnt++;
00504 }
00505 OddBegIter++;
00506 }
00507
00508 infar.Compress();
00509
00510 ftrk_range = trk_range;
00511 }
|
|
|
Definition at line 37 of file CDTrackedHits.h. 00037 {return ftrk_range;}
|
|
||||||||||||
|
Definition at line 43 of file CDTrackedHits.cxx. References fCCStrips, fEvenPlStrips, fOddPlStrips, and MSG. Referenced by CDTrackedHits(). 00044 {
00045 if(a==0) fEvenPlStrips=hits;
00046 else if(a==1) fOddPlStrips=hits;
00047 else if(a==-1) fCCStrips=hits;
00048 else{
00049 MSG("CDTrackedHits",Msg::kWarning)
00050 << "CDTrackedHits Error: "
00051 << "Not a valid selection for plane orientation. "
00052 << "0==even, 1==odd planes, -1==cosmic counters."<<endl;
00053 }
00054 return 1;
00055 }
|
|
|
Definition at line 43 of file CDTrackedHits.h. Referenced by GetCCStripInfo(), and SetMap(). |
|
|
Definition at line 41 of file CDTrackedHits.h. Referenced by GetTrackedStripInfo(), and SetMap(). |
|
|
Definition at line 42 of file CDTrackedHits.h. Referenced by GetTrackedStripInfo(), and SetMap(). |
|
|
Definition at line 45 of file CDTrackedHits.h. Referenced by CDTrackedHits(), and GetTrackedStripInfo(). |
1.3.9.1