#include <DmxMuonPlane.h>
Inheritance diagram for DmxMuonPlane:

Public Member Functions | |
| DmxMuonPlane () | |
| DmxMuonPlane (AlgConfig &acd, CandDeMuxDigitHandleItr &cdhitr, Int_t planenumber) | |
| virtual | ~DmxMuonPlane () |
| Float_t | GetCoG () const |
| Float_t | GetInitialCoG () const |
| Float_t | GetInitialStripCoG () const |
| Float_t | GetStripCoG () const |
| Float_t | GetPlaneCharge () const |
| Int_t | GetNumberOfStrips () const |
| Int_t | GetPlaneNumber () const |
| Int_t | GetHypothesisLowerBound (Float_t tPos) const |
| DmxPlaneTypes::PlaneType_t | GetPlaneType () const |
| PlaneView::PlaneView_t | GetPlaneView () const |
| Bool_t | GetStripsSetFlag () const |
| Float_t | GetTimingOffset () |
| Float_t | GetZPosition () const |
| Bool_t | IsValid () const |
| Bool_t | IsStray () const |
| Bool_t | IsGolden () const |
| void | PrintRecon () |
| void | SetStrips () |
| void | SetStrips (Float_t tPos) |
| void | SetStray (bool stray) |
| void | SetGolden (bool Golden) |
Private Attributes | |
| CandDeMuxDigitHandleItr | fCdhit |
| Float_t | fCoG |
| Float_t | fInitialCoG |
| Int_t | fNumberOfStrips |
| Float_t | fPlaneCharge |
| Int_t | fPlaneNumber |
| DmxPlaneTypes::PlaneType_t | fPlaneType |
| PlaneView::PlaneView_t | fPlaneView |
| Int_t | fStripsSet |
| bool | fIsValid |
| bool | fIsStray |
| bool | fIsGolden |
| UgliGeomHandle * | fUgh |
|
|
Definition at line 31 of file DmxMuonPlane.cxx. 00032 {
00033 }
|
|
||||||||||||||||
|
Definition at line 36 of file DmxMuonPlane.cxx. References fCdhit, fCoG, fInitialCoG, fIsGolden, fIsValid, fPlaneCharge, fPlaneNumber, fPlaneView, fStripsSet, fUgh, PlexSEIdAltL::GetCurrentSEId(), CandDigitHandle::GetPlexSEIdAltL(), CandDigitHandle::GetPlexSEIdAltLWritable(), PlexStripEndId::GetStrip(), PlexSEIdAltL::IsValid(), MSG, PlexSEIdAltL::Next(), PlexSEIdAltL::SetCurrentWeight(), PlexSEIdAltL::SetDemuxVetoFlag(), PlexSEIdAltL::SetFirst(), and SetStrips(). 00038 : 00039 fCdhit(cdhitr), 00040 fCoG(0.), 00041 fInitialCoG(-1.), 00042 fNumberOfStrips(1), //its a muon plane - can only have one strip hit 00043 fPlaneCharge(0.), 00044 fPlaneNumber(planeNumber), 00045 fPlaneType(DmxPlaneTypes::kMuon), 00046 fPlaneView(PlaneView::kUnknown), 00047 fStripsSet(0), 00048 fIsValid(false), 00049 fIsStray(false), 00050 fIsGolden(false), 00051 fUgh(0) 00052 { 00053 fCdhit.Reset(); 00054 00055 //get the plane orientation 00056 fPlaneView = fCdhit.Ptr()->GetPlexSEIdAltL().GetPlaneView(); 00057 00058 //get the ugli geometry handle from a cand digit 00059 fUgh = new UgliGeomHandle(*fCdhit.Ptr()->GetVldContext()); 00060 00061 Int_t numDigits = 0; 00062 while( fCdhit.IsValid() ){ 00063 if( fCdhit.Ptr()->GetDeMuxDigitFlagWord() == 0) ++numDigits; 00064 fCdhit.Next(); 00065 } 00066 fCdhit.Reset(); 00067 00068 //MSG("Dmx", Msg::kDebug) << "Number of digits for plane " 00069 // << fPlaneNumber << " = " << numDigits << endl; 00070 00071 if( numDigits == 2){ 00072 //check to see that you have one from each side 00073 Int_t west = 0; 00074 Int_t east = 0; 00075 CandDeMuxDigitHandle *westDigit = fCdhit.Ptr(); 00076 CandDeMuxDigitHandle *eastDigit = fCdhit.Ptr(); 00077 00078 while( fCdhit.IsValid() ){ 00079 fCdhit.Ptr()->GetPlexSEIdAltLWritable().ClearWeights(); 00080 fCdhit.Ptr()->GetPlexSEIdAltL().SetFirst(); 00081 00082 if( fCdhit.Ptr()->GetPlexSEIdAltL().GetEnd() == StripEnd::kEast 00083 && fCdhit.Ptr()->GetDeMuxDigitFlagWord() == 0){ 00084 east = 1; 00085 eastDigit = fCdhit.Ptr(); 00086 } 00087 else if( fCdhit.Ptr()->GetPlexSEIdAltL().GetEnd() == StripEnd::kWest 00088 && fCdhit.Ptr()->GetDeMuxDigitFlagWord() == 0){ 00089 west = 1; 00090 westDigit = fCdhit.Ptr(); 00091 } 00092 00093 fCdhit.Next(); 00094 } 00095 if(west + east == 2){ 00096 //loop over the strip possibilities to see if they match up on each side 00097 Int_t westStrip = -1; 00098 Int_t eastStrip = -2; 00099 00100 //reset the SEId alt lists 00101 westDigit->GetPlexSEIdAltL().SetFirst(); 00102 00103 while( westDigit->GetPlexSEIdAltL().IsValid() ){ 00104 westStrip = westDigit->GetPlexSEIdAltL().GetCurrentSEId().GetStrip(); 00105 //MSG("Dmx", Msg::kDebug) << fPlaneNumber << " west strip = " 00106 // << westStrip << endl; 00107 00108 eastDigit->GetPlexSEIdAltL().SetFirst(); 00109 00110 while( eastDigit->GetPlexSEIdAltL().IsValid() ){ 00111 eastStrip = eastDigit->GetPlexSEIdAltL().GetCurrentSEId().GetStrip(); 00112 //MSG("Dmx", Msg::kDebug) << "\teast strip = " << eastStrip << endl; 00113 00114 if(eastStrip == westStrip){ 00115 westDigit->GetPlexSEIdAltLWritable().SetCurrentWeight(1.0); 00116 eastDigit->GetPlexSEIdAltLWritable().SetCurrentWeight(1.0); 00117 00118 //set the veto flags to 0 00119 westDigit->GetPlexSEIdAltLWritable().SetDemuxVetoFlag(0); 00120 eastDigit->GetPlexSEIdAltLWritable().SetDemuxVetoFlag(0); 00121 00122 //print the association 00123 // MSG("Dmx", Msg::kDebug) << "west strip = " 00124 // << westDigit->GetPlexSEIdAltL().GetCurrentSEId().GetStrip() 00125 // << "\tsignal = " << westDigit->GetCharge() << endl; 00126 // MSG("Dmx", Msg::kDebug) << "east strip = " 00127 // << eastDigit->GetPlexSEIdAltL().GetCurrentSEId().GetStrip() 00128 // << "\tsignal = " << eastDigit->GetCharge() << endl; 00129 00130 //set the center of gravity 00131 fCoG = westDigit->GetPlexSEIdAltL().GetCurrentSEId().GetStrip(); 00132 fInitialCoG = fCoG; 00133 00134 //set the true muon plane flag but be careful - there could be 00135 //multiple solutions for this plane so if the is valid has been 00136 //set to true before, then you have multiple solutions and should 00137 //set it to false 00138 if(!fIsValid){ 00139 fIsValid = true; 00140 fIsGolden = true; 00141 } 00142 else{ 00143 fIsValid = false; 00144 fIsGolden = false; 00145 } 00146 //set the strips set flag 00147 fStripsSet = 1; 00148 } 00149 eastDigit->GetPlexSEIdAltL().Next(); 00150 } 00151 00152 westDigit->GetPlexSEIdAltL().Next(); 00153 } 00154 } 00155 } 00156 00157 MSG("DmxMuonPlane", Msg::kDebug) << "plane = " << fPlaneNumber 00158 << " initial muon cog = " << fInitialCoG << "/" << fCoG << endl; 00159 00160 //if this is a golden plane, set any digits that might not be set because 00161 //of cross talk or low signal 00162 if(fIsGolden) SetStrips(); 00163 00164 //get the charge for the plane 00165 fCdhit.ResetFirst(); 00166 while(fCdhit.IsValid()){ 00167 //if(fCdhit.GetSet()->GetMasks().GetMask(fCdhit.Ptr())){fPlaneCharge += fCdhit.Ptr()->GetCharge();} 00168 if( fCdhit.Ptr()->GetDeMuxDigitFlagWord() == 0) 00169 fPlaneCharge += fCdhit.Ptr()->GetCharge(); 00170 fCdhit.Next(); 00171 } 00172 fCdhit.Reset(); 00173 return; 00174 }
|
|
|
Definition at line 177 of file DmxMuonPlane.cxx. 00178 {
00179 delete fUgh;
00180 // MSG("Dmx", Msg::kDebug) << "deleting Muon Plane for plane "
00181 // << fPlaneNumber << endl;
00182 }
|
|
|
Implements DmxPlane. Definition at line 190 of file DmxMuonPlane.cxx. References fCoG, fPlaneNumber, fUgh, UgliGeomHandle::GetStripHandle(), and UgliStripHandle::GetTPos(). Referenced by AlgDeMuxBeam::DeMuxFirstNPlanesTest(). 00191 {
00192 //get the strip end id for the center of gravity for this hypothesis
00193 PlexStripEndId seid(Detector::kFar,fPlaneNumber,TMath::Nint(fCoG));
00194 UgliStripHandle ush = fUgh->GetStripHandle(seid);
00195
00196 return ush.GetTPos();
00197 //return fCoG;
00198 }
|
|
|
Implements DmxPlane. Definition at line 216 of file DmxMuonPlane.cxx. References fPlaneNumber, fUgh, UgliScintPlnHandle::GetClosestStrip(), UgliGeomHandle::GetScintPlnHandle(), UgliStripHandle::GetSEId(), and PlexStripEndId::GetStrip(). 00217 {
00218 //change the transverse position for the fit into a strip number
00219 PlexStripEndId seid(Detector::kFar, fPlaneNumber, 1);
00220 UgliScintPlnHandle usph = fUgh->GetScintPlnHandle(seid);
00221 UgliStripHandle ush = usph.GetClosestStrip(tPos);
00222 Float_t fitCoG = 1.*ush.GetSEId().GetStrip();
00223
00224 Int_t hypLowerBound = 0;
00225 if(fitCoG >= 11.5 && fitCoG <= 179.5){hypLowerBound = TMath::Nint(fitCoG-11.5);}
00226 else if(fitCoG < 11.5){hypLowerBound = 0;}
00227 else if(fitCoG > 179.5){hypLowerBound = 168;}
00228
00229 return hypLowerBound;
00230 }
|
|
|
Definition at line 201 of file DmxMuonPlane.cxx. References fCoG, fInitialCoG, fPlaneNumber, fUgh, UgliGeomHandle::GetStripHandle(), UgliStripHandle::GetTPos(), and MSG. Referenced by AlgDeMuxBeam::DeMuxFirstNPlanesTest(). 00202 {
00203
00204 MSG("DmxMuonPlane", Msg::kDebug) << "plane = " << fPlaneNumber
00205 << " initial muon cog = " << fInitialCoG << "/" << fCoG << endl;
00206
00207 //get the strip end id for the center of gravity for this hypothesis
00208 PlexStripEndId seid(Detector::kFar,fPlaneNumber,TMath::Nint(fInitialCoG));
00209 UgliStripHandle ush = fUgh->GetStripHandle(seid);
00210
00211 return ush.GetTPos();
00212 //return fCoG;
00213 }
|
|
|
Definition at line 239 of file DmxMuonPlane.cxx. Referenced by AlgDeMuxBeam::DeMuxFirstNPlanesTest(). 00240 {
00241 return fInitialCoG;
00242 }
|
|
|
Implements DmxPlane. Definition at line 185 of file DmxMuonPlane.cxx. 00186 {
00187 return fNumberOfStrips;
00188 }
|
|
|
Implements DmxPlane. Definition at line 245 of file DmxMuonPlane.cxx. 00246 {
00247 return fPlaneCharge;
00248 }
|
|
|
Implements DmxPlane. Definition at line 251 of file DmxMuonPlane.cxx. 00252 {
00253 return fPlaneNumber;
00254 }
|
|
|
Implements DmxPlane. Definition at line 266 of file DmxMuonPlane.cxx. 00267 {
00268 return fPlaneType;
00269 }
|
|
|
Implements DmxPlane. Definition at line 272 of file DmxMuonPlane.cxx. 00273 {
00274 return fPlaneView;
00275 }
|
|
|
Implements DmxPlane. Definition at line 233 of file DmxMuonPlane.cxx. 00234 {
00235 return fCoG;
00236 }
|
|
|
Implements DmxPlane. Definition at line 278 of file DmxMuonPlane.cxx. References fStripsSet. 00279 {
00280 return fStripsSet>0;
00281 }
|
|
|
Implements DmxPlane. Definition at line 503 of file DmxMuonPlane.cxx. References UgliStripHandle::ClearFiber(), digit(), fCdhit, fUgh, PlexSEIdAltL::GetBestSEId(), CandDigitHandle::GetCharge(), CandDeMuxDigitHandle::GetDeMuxDigitFlagWord(), PlexSEIdAltL::GetDemuxVetoFlag(), PlexSEIdAltL::GetEnd(), CandDigitHandle::GetPlexSEIdAltL(), PlexStripEndId::GetStrip(), UgliGeomHandle::GetStripHandle(), CandDigitHandle::GetTime(), and UgliStripHandle::WlsPigtail(). 00504 {
00505 //make arrays to hold the clear fiber + wls pigtail lengths for each digit
00506 Float_t westFiber[192];
00507 Float_t eastFiber[192];
00508 Float_t eastTime[192];
00509 Float_t westTime[192];
00510
00511 //reset the arrays
00512 for(Int_t i = 0; i<192; i++){
00513 westFiber[i] = -1.;
00514 eastFiber[i] = -1.;
00515 eastTime[i] = -1.;
00516 westTime[i] = -1.;
00517 }
00518
00519 fCdhit.Reset();
00520
00521 while(fCdhit.IsValid()){
00522
00523 CandDeMuxDigitHandle *digit = fCdhit.Ptr();
00524
00525 if(digit->GetPlexSEIdAltL().GetDemuxVetoFlag() == 0 && digit->GetDeMuxDigitFlagWord() == 0){
00526
00527 Int_t strip = digit->GetPlexSEIdAltL().GetBestSEId().GetStrip();
00528
00529 //get the side for this digit and fill the array
00530 UgliStripHandle ush = fUgh->GetStripHandle(digit->GetPlexSEIdAltL().GetBestSEId());
00531
00532 if( digit->GetPlexSEIdAltL().GetEnd() == StripEnd::kEast ){
00533 eastFiber[strip] = ush.ClearFiber(StripEnd::kEast) + ush.WlsPigtail(StripEnd::kEast);
00534 eastTime[strip] = 1e9*digit->GetTime(CalTimeType::kT0) - 2093./(102.+TMath::Power(1.*digit->GetCharge(),1.2));
00535 }
00536 else if( digit->GetPlexSEIdAltL().GetEnd() == StripEnd::kWest ){
00537 westFiber[strip] = ush.ClearFiber(StripEnd::kWest) + ush.WlsPigtail(StripEnd::kWest);
00538 westTime[strip] = 1e9*digit->GetTime(CalTimeType::kT0) - 2093./(102.+TMath::Power(1.*digit->GetCharge(),1.2));
00539 }
00540
00541 }
00542 fCdhit.Next();
00543 }
00544
00545 //find the average offset from center for this plane based on timing and fill the array
00546 Float_t avTimeNum = 0.;
00547 Float_t avTimeDenom = 0.;
00548 Float_t offset = -10.;
00549 for(Int_t k=0; k<192; k++){
00550
00551 //if the strip has doubled sided readout, then use it
00552 if(westTime[k] != -1.&& eastTime[k] != -1.){
00553 offset = (0.0825*(eastTime[k] - westTime[k]) + (westFiber[k]-eastFiber[k])/2.);
00554 //MSG("DmxTim", Msg::kInfo) << fPlaneNumber << " offset = " << offset << endl;
00555 avTimeNum += offset;
00556 avTimeDenom += 1.;
00557 }
00558 }
00559
00560 if(avTimeDenom>0) offset = avTimeNum/avTimeDenom;
00561
00562 //MSG("DmxTim", Msg::kDebug) << fPlaneNumber << " av offset = " << offset << endl;
00563
00564 //clear the digit slice
00565 fCdhit.Reset();
00566
00567 return offset;
00568 }
|
|
|
Implements DmxPlane. Definition at line 257 of file DmxMuonPlane.cxx. References fPlaneNumber, fUgh, UgliGeomHandle::GetScintPlnHandle(), and UgliPlnHandle::GetZ0(). Referenced by SetStrips(). 00258 {
00259 PlexStripEndId seid(Detector::kFar, fPlaneNumber, 1);
00260 UgliScintPlnHandle usph = fUgh->GetScintPlnHandle(seid);
00261 return usph.GetZ0();
00262 //return 1.*fPlaneNumber;
00263 }
|
|
|
Implements DmxPlane. Definition at line 296 of file DmxMuonPlane.cxx. 00297 {
00298 return fIsGolden;
00299 }
|
|
|
Implements DmxPlane. Definition at line 290 of file DmxMuonPlane.cxx. 00291 {
00292 return fIsStray;
00293 }
|
|
|
Implements DmxPlane. Definition at line 284 of file DmxMuonPlane.cxx. 00285 {
00286 return fIsValid;
00287 }
|
|
|
Implements DmxPlane. Definition at line 302 of file DmxMuonPlane.cxx. References fCdhit, fIsValid, fPlaneNumber, PlexSEIdAltL::GetBestSEId(), CandDigitHandle::GetCharge(), PlexSEIdAltL::GetEnd(), CandDigitHandle::GetPlexSEIdAltL(), PlexStripEndId::GetStrip(), and MSG. 00303 {
00304 fCdhit.Reset();
00305 MSG("Dmx", Msg::kInfo) << "Plane = " << fPlaneNumber
00306 << "\tIsValid = " << (Int_t)fIsValid << endl;
00307 while( fCdhit.IsValid() ){
00308 CandDeMuxDigitHandle *currentDigit = fCdhit.Ptr();
00309
00310 if(currentDigit->GetPlexSEIdAltL().GetEnd() == StripEnd::kWest){
00311 MSG("Dmx", Msg::kInfo) << "\tWest\t" ;
00312 }
00313 else if(currentDigit->GetPlexSEIdAltL().GetEnd() == StripEnd::kEast){
00314 MSG("Dmx", Msg::kInfo) << "\tEast\t" ;
00315 }
00316 MSG("Dmx", Msg::kInfo) << currentDigit->GetPlexSEIdAltL().GetBestSEId().GetStrip() << "\t";
00317 MSG("Dmx", Msg::kInfo) << currentDigit->GetCharge() << endl;
00318
00319 fCdhit.Next();
00320 }
00321 return;
00322 }
|
|
|
Implements DmxPlane. Definition at line 496 of file DmxMuonPlane.cxx. References fIsGolden. 00497 {
00498 fIsGolden = golden;
00499 return;
00500 }
|
|
|
Implements DmxPlane. Definition at line 489 of file DmxMuonPlane.cxx. References fIsStray. 00490 {
00491 fIsStray = stray;
00492 return;
00493 }
|
|
|
Implements DmxPlane. Definition at line 396 of file DmxMuonPlane.cxx. References PlexSEIdAltL::ClearWeights(), fCdhit, fCoG, fPlaneNumber, fStripsSet, fUgh, CandDigitHandle::GetCharge(), UgliScintPlnHandle::GetClosestStrip(), PlexSEIdAltL::GetCurrentSEId(), PlexSEIdAltL::GetCurrentWeight(), CandDeMuxDigitHandle::GetDeMuxDigitFlagWord(), PlexSEIdAltL::GetPlane(), CandDigitHandle::GetPlexSEIdAltL(), CandDigitHandle::GetPlexSEIdAltLWritable(), UgliGeomHandle::GetScintPlnHandle(), UgliStripHandle::GetSEId(), PlexStripEndId::GetStrip(), GetZPosition(), PlexSEIdAltL::IsValid(), MSG, PlexSEIdAltL::Next(), PlexSEIdAltL::SetCurrentWeight(), PlexSEIdAltL::SetDemuxVetoFlag(), and PlexSEIdAltL::SetFirst(). 00397 {
00398 //change the transverse position for the fit into a strip number
00399 PlexStripEndId seid(Detector::kFar, fPlaneNumber, 1);
00400 UgliScintPlnHandle usph = fUgh->GetScintPlnHandle(seid);
00401 UgliStripHandle ush = usph.GetClosestStrip(tPos);
00402 Float_t fitCoG = 1.*ush.GetSEId().GetStrip();
00403 //Float_t fitCoG = tPos;
00404
00405 Int_t hypLower = 0;
00406 if(fitCoG >= 11.5 && fitCoG <= 179.5) hypLower = TMath::Nint(fitCoG-11.5);
00407 else if(fitCoG < 11.5) hypLower = 0;
00408 else if(fitCoG > 179.5) hypLower = 168;
00409
00410 MSG("DmxMuonPlane", Msg::kDebug) << "\tfit in strip vs plane space " << fPlaneNumber
00411 << "\t" << fitCoG << " " << hypLower << endl;
00412 MSG("DmxMuonPlane", Msg::kDebug) << "\tfit in tpos vs z space " << GetZPosition()
00413 << "\t" << tPos << endl;
00414
00415 fStripsSet = 1;
00416 fCdhit.Reset();
00417
00418 Double_t cogNum = 0.;
00419 Double_t cogDenom = 0.;
00420
00421 while( fCdhit.IsValid() ){
00422
00423 //get the next CandDigitHandle object
00424 CandDeMuxDigitHandle *currentDigit = fCdhit.Ptr();
00425
00426 //clear all weights for the digit
00427 currentDigit->GetPlexSEIdAltLWritable().ClearWeights();
00428
00429 //set the alternatives list to the first one
00430 currentDigit->GetPlexSEIdAltLWritable().SetFirst();
00431
00432 //set veto flag to nonzero, if there is a SEId in this hypothesis set it to
00433 //0
00434 currentDigit->GetPlexSEIdAltLWritable().SetDemuxVetoFlag(1);
00435
00436 //loop through the Strip End Alternative list and see which one is
00437 //in the current hypothesis
00438 while( currentDigit->GetPlexSEIdAltLWritable().IsValid() ){
00439
00440 MSG("DmxMuonPlane", Msg::kDebug) << "plane = "
00441 << currentDigit->GetPlexSEIdAltLWritable().GetPlane()
00442 << " strip alt = "
00443 << currentDigit->GetPlexSEIdAltLWritable().GetCurrentSEId().GetStrip()
00444 << endl;
00445
00446 if( currentDigit->GetPlexSEIdAltLWritable().GetCurrentSEId().GetStrip()
00447 >= hypLower && currentDigit->GetPlexSEIdAltLWritable().GetCurrentSEId().GetStrip()
00448 <= (hypLower+23)){
00449
00450 //set the Strip weight to 1 if it is the first choice above the
00451 //lowerbound and set veto flag to 0
00452 currentDigit->GetPlexSEIdAltLWritable().SetCurrentWeight(1.0);
00453 currentDigit->GetPlexSEIdAltLWritable().SetDemuxVetoFlag(0);
00454
00455 MSG("DmxMuonPlane", Msg::kDebug) << "strip = "
00456 << currentDigit->GetPlexSEIdAltLWritable().GetCurrentSEId().GetStrip()
00457 << " " << currentDigit->GetPlexSEIdAltLWritable().GetCurrentWeight()
00458 << endl;
00459
00460 //print the association
00461 //MSG("Dmx", Msg::kVerbose) << "strip = "
00462 // << currentDigit->GetPlexSEIdAltL().GetCurrentSEId().GetStrip()
00463 // << "\tside = "
00464 // << (Int_t)currentDigit->GetPlexSEIdAltL().GetCurrentSEId().GetEnd()
00465 // << "\tsignal = " << currentDigit->GetCharge() << endl;
00466
00467 //set the cog to this strip, if it isnt a cross talk digit
00468 if(currentDigit->GetDeMuxDigitFlagWord() == 0){
00469 cogNum += currentDigit->GetCharge()*currentDigit->GetPlexSEIdAltL().GetCurrentSEId().GetStrip();
00470 cogDenom += currentDigit->GetCharge();
00471 }
00472
00473 //you found the Strip End Id so quit looking
00474 break;
00475 }
00476 //if that Strip End Id wasnt in the hypothesis go to the next one
00477 currentDigit->GetPlexSEIdAltL().Next();
00478 }
00479
00480 fCdhit.Next();
00481 }
00482
00483 if(cogDenom >0.) fCoG = cogNum/cogDenom;
00484
00485 return;
00486 }
|
|
|
Implements DmxPlane. Definition at line 324 of file DmxMuonPlane.cxx. References PlexSEIdAltL::ClearWeights(), fCdhit, fCoG, fStripsSet, CandDigitHandle::GetCharge(), PlexSEIdAltL::GetCurrentSEId(), CandDeMuxDigitHandle::GetDeMuxDigitFlagWord(), CandDigitHandle::GetPlexSEIdAltL(), CandDigitHandle::GetPlexSEIdAltLWritable(), PlexStripEndId::GetStrip(), PlexSEIdAltL::IsValid(), PlexSEIdAltL::Next(), PlexSEIdAltL::SetCurrentWeight(), PlexSEIdAltL::SetDemuxVetoFlag(), and PlexSEIdAltL::SetFirst(). Referenced by DmxMuonPlane(). 00325 {
00326 Float_t fitCoG = fInitialCoG;
00327 Int_t hypLower = 0;
00328 if(fitCoG >= 11.5 && fitCoG <= 179.5){hypLower = TMath::Nint(fitCoG-11.5);}
00329 else if(fitCoG < 11.5){hypLower = 0;}
00330 else if(fitCoG > 179.5){hypLower = 168;}
00331
00332 fStripsSet = 1;
00333 fCdhit.Reset();
00334
00335 Double_t cogNum = 0.;
00336 Double_t cogDenom = 0.;
00337
00338 while( fCdhit.IsValid() ){
00339
00340 //get the next CandDigitHandle object
00341 CandDeMuxDigitHandle *currentDigit = fCdhit.Ptr();
00342
00343 //clear all weights for the digit
00344 currentDigit->GetPlexSEIdAltLWritable().ClearWeights();
00345
00346 //set the alternatives list to the first one
00347 currentDigit->GetPlexSEIdAltL().SetFirst();
00348
00349 //set veto flag to nonzero, if there is a SEId in this hypothesis set it to
00350 //0
00351 currentDigit->GetPlexSEIdAltLWritable().SetDemuxVetoFlag(1);
00352
00353 //loop through the Strip End Alternative list and see which one is
00354 //in the current hypothesis
00355 while( currentDigit->GetPlexSEIdAltL().IsValid() ){
00356
00357 if( currentDigit->GetPlexSEIdAltL().GetCurrentSEId().GetStrip()
00358 >= hypLower && currentDigit->GetPlexSEIdAltL().GetCurrentSEId().GetStrip()
00359 <= (hypLower+23)){
00360
00361 //set the Strip weight to 1 if it is the first choice above the
00362 //lowerbound and set veto flag to 0
00363 currentDigit->GetPlexSEIdAltLWritable().SetCurrentWeight(1.0);
00364 currentDigit->GetPlexSEIdAltLWritable().SetDemuxVetoFlag(0);
00365
00366 //print the association
00367 //MSG("Dmx", Msg::kVerbose) << "strip = "
00368 // << currentDigit->GetPlexSEIdAltL().GetCurrentSEId().GetStrip()
00369 // << "\tside = "
00370 // << (Int_t)currentDigit->GetPlexSEIdAltL().GetCurrentSEId().GetEnd()
00371 // << "\tsignal = " << currentDigit->GetCharge() << endl;
00372
00373 //set the cog to this strip, if it isnt a cross talk digit
00374 if(currentDigit->GetDeMuxDigitFlagWord() == 0){
00375 //if(fCdhit.GetSet()->GetMasks().GetMask(fCdhit.Ptr())){
00376 cogNum += currentDigit->GetCharge()*currentDigit->GetPlexSEIdAltL().GetCurrentSEId().GetStrip();
00377 cogDenom += currentDigit->GetCharge();
00378 }
00379
00380 //you found the Strip End Id so quit looking
00381 break;
00382 }
00383 //if that Strip End Id wasnt in the hypothesis go to the next one
00384 currentDigit->GetPlexSEIdAltL().Next();
00385 }
00386
00387 fCdhit.Next();
00388 }
00389
00390 if(cogDenom >0.) fCoG = cogNum/cogDenom;
00391
00392 return;
00393 }
|
|
|
Definition at line 55 of file DmxMuonPlane.h. Referenced by DmxMuonPlane(), GetTimingOffset(), PrintRecon(), and SetStrips(). |
|
|
Definition at line 56 of file DmxMuonPlane.h. Referenced by DmxMuonPlane(), GetCoG(), GetInitialCoG(), and SetStrips(). |
|
|
Definition at line 57 of file DmxMuonPlane.h. Referenced by DmxMuonPlane(), and GetInitialCoG(). |
|
|
Definition at line 66 of file DmxMuonPlane.h. Referenced by DmxMuonPlane(), and SetGolden(). |
|
|
Definition at line 65 of file DmxMuonPlane.h. Referenced by SetStray(). |
|
|
Definition at line 64 of file DmxMuonPlane.h. Referenced by DmxMuonPlane(), and PrintRecon(). |
|
|
Definition at line 58 of file DmxMuonPlane.h. |
|
|
Definition at line 59 of file DmxMuonPlane.h. Referenced by DmxMuonPlane(). |
|
|
Definition at line 60 of file DmxMuonPlane.h. Referenced by DmxMuonPlane(), GetCoG(), GetHypothesisLowerBound(), GetInitialCoG(), GetZPosition(), PrintRecon(), and SetStrips(). |
|
|
Definition at line 61 of file DmxMuonPlane.h. |
|
|
Definition at line 62 of file DmxMuonPlane.h. Referenced by DmxMuonPlane(). |
|
|
Definition at line 63 of file DmxMuonPlane.h. Referenced by DmxMuonPlane(), GetStripsSetFlag(), and SetStrips(). |
|
|
Definition at line 67 of file DmxMuonPlane.h. Referenced by DmxMuonPlane(), GetCoG(), GetHypothesisLowerBound(), GetInitialCoG(), GetTimingOffset(), GetZPosition(), and SetStrips(). |
1.3.9.1