118 G4Track* currentTrack = currentStep->GetTrack();
121 cout <<
"Can't get currentTrack" << endl;
124 G4TrackStatus currentTrackStatus = currentTrack->GetTrackStatus();
126 int stepNumber = currentTrack->GetCurrentStepNumber();
127 if ( msgFlag ) cout <<
"STEP " << stepNumber <<
":" << endl;
130 Hep3Vector currentPosition = currentTrack->GetPosition();
131 Hep3Vector currentMomentum = currentTrack->GetMomentum();
134 G4VPhysicalVolume* oldVolume =
nullptr;
135 G4VPhysicalVolume* newVolume =
nullptr;
136 if ( !currentTrack->GetTouchableHandle() )
137 cout <<
"Can't get currentTrack->GetTouchableHandle()" << endl;
138 else oldVolume = currentTrack->GetTouchableHandle()->GetVolume();
139 if ( !currentTrack->GetNextTouchableHandle() )
140 cout <<
"Can't get currentTrack->GetNextTouchableHandle()" << endl;
141 else newVolume = currentTrack->GetNextTouchableHandle()->GetVolume();
142 if ( !oldVolume ) cout <<
"Can't get oldVolume!" << endl;
145 if ( stepNumber > 50000 )
147 cout <<
"infinite steps in the track " << endl;
148 currentTrack->SetTrackStatus( fStopAndKill );
152 G4String ParticleName = currentTrack->GetDefinition()->GetParticleName();
153 double x_ = currentPosition.x();
154 double y_ = currentPosition.y();
155 double z_ = currentPosition.z();
157 ( oldVolume != newVolume ) &&
158 ( !( ( fabs( x_ ) >= myMucR ) || ( fabs( y_ ) >= myMucR ) ||
159 ( ( fabs( x_ - y_ ) / sqrt( 2. ) ) >= myMucR ) ||
160 ( ( fabs( x_ + y_ ) / sqrt( 2. ) ) >= myMucR ) || ( fabs( z_ ) >= myMucZ ) ) );
161 bool mucdec = ( fabs( x_ ) >= myMucR ) || ( fabs( y_ ) >= myMucR ) ||
162 ( ( fabs( x_ - y_ ) / sqrt( 2. ) ) >= myMucR ) ||
163 ( ( fabs( x_ + y_ ) / sqrt( 2. ) ) >= myMucR ) || ( fabs( z_ ) >= myMucZ );
166 if ( currentTrackStatus == fAlive )
169 if ( inner || mucdec )
173 double currentPoint[3] = { currentPosition.x(), currentPosition.y(),
174 currentPosition.z() };
175 double currentBfield[3] = { 0.0, 0.0, 0.0 };
176 Hep3Vector currentB( 0.0, 0.0, 1.0 );
177 if ( G4TransportationManager::GetTransportationManager() )
179 G4FieldManager* fieldManager =
180 G4TransportationManager::GetTransportationManager()->GetFieldManager();
183 if ( fieldManager->GetDetectorField() )
185 fieldManager->GetDetectorField()->GetFieldValue( currentPoint, currentBfield );
186 currentB.set( currentBfield[0] / tesla, currentBfield[1] / tesla,
187 currentBfield[2] / tesla );
189 cout <<
"B:" << currentB.x() <<
"," << currentB.y() <<
"," << currentB.z()
196 G4Material* oldMaterial = oldVolume->GetLogicalVolume()->GetMaterial();
197 if ( !oldMaterial ) std::cout <<
"Can't get oldMaterial" << std::endl;
198 else CalculateChicc( oldMaterial );
201 if ( !( extXpErr->move( currentPosition, currentMomentum, currentB, 1, chicc ) ) )
202 if ( msgFlag ) cout <<
"can not update Error Matrix!!" << endl;
207 cout <<
"Volume name:" << newVolume->GetName() << endl;
208 cout <<
"Volume number:" << newVolume->GetCopyNo() << endl;
209 cout <<
"x:" << currentPoint[0] <<
"//y:" << currentPoint[1]
210 <<
"//z:" << currentPoint[2] <<
"||px:" << currentMomentum.x()
211 <<
"//py:" << currentMomentum.y() <<
"//pz:" << currentMomentum.z() << endl;
212 cout <<
"ptot = " << currentMomentum.mag() << endl;
213 cout <<
"trk len = " << currentTrack->GetTrackLength() << endl;
214 cout <<
"Error matrix is:" << extXpErr->get_err() << endl;
215 cout <<
"phi:" << atan( currentPoint[1] / currentPoint[0] ) << endl;
216 Hep3Vector nz( 0., 0., 1. );
217 cout <<
"Projected z error:" << extXpErr->get_plane_err( currentMomentum.unit(), nz )
222 R = sqrt( x * x + y * y );
223 Hep3Vector nt( -y / R, x / R, 0. );
224 cout <<
"Projected phi error:"
225 << ( extXpErr->get_plane_err( currentMomentum.unit(), nt ) ) / R << endl
230 Hep3Vector xVector( 1.0, 0, 0 );
231 Hep3Vector yVector( 0, 1.0, 0 );
232 Hep3Vector zVector( 0, 0, 1.0 );
234 tzVector.setRThetaPhi( 1.0,
M_PI / 2.0, currentPosition.phi() );
235 double r = currentPosition.perp();
236 double x = currentPosition.x();
237 double y = currentPosition.y();
238 double z = currentPosition.z();
239 G4String newVolumeName = newVolume->GetName();
240 G4String oldVolumeName = oldVolume->GetName();
241 G4StepPoint* postStepPoint = currentStep->GetPostStepPoint();
242 G4TouchableHistory* theTouchable =
243 (G4TouchableHistory*)( postStepPoint->GetTouchable() );
244 int newVolumeNumber = newVolume->GetCopyNo();
248 if ( newVolumeName ==
"logical_gasLayer" )
250 name1 = theTouchable->GetVolume( 3 )->GetName();
251 newVolumeNumber = theTouchable->GetReplicaNumber( 3 );
293 if ( ( !myTof1Flag ) &&
294 ( newVolumeName ==
"logicalScinBr1" || newVolumeName.contains(
"ScinEc" ) ||
295 ( newVolumeName ==
"logical_gasLayer" &&
296 ( name1 ==
"logical_container_m0" || name1 ==
"logical_container_m1" ) ) ) )
298 double currentTrackLength = currentTrack->GetTrackLength();
299 double totalTrackLength = currentTrackLength + initialPath;
300 double localTime = currentTrack->GetLocalTime();
301 double totalTOF = localTime + initialTof;
303 myPathIntoTof1 = currentTrackLength;
304 if ( msgFlag ) cout <<
"myPathIntoTof1 = " << myPathIntoTof1 << endl;
306 newVolumeNumber = theTouchable->GetReplicaNumber( 2 );
308 if ( newVolumeName.contains(
"ScinEc" ) )
310 newVolumeNumber = ( 95 - newVolumeNumber ) / 2;
311 newVolumeNumber = newVolumeNumber + 176;
313 if ( newVolumeName.contains(
"East" ) ) newVolumeNumber = newVolumeNumber + 48;
316 double xError = extXpErr->get_plane_err( currentMomentum.unit(), xVector );
317 double yError = extXpErr->get_plane_err( currentMomentum.unit(), yVector );
318 double zError = extXpErr->get_plane_err( currentMomentum.unit(), zVector );
319 double tzError = extXpErr->get_plane_err( currentMomentum.unit(), tzVector );
320 myExtTrack->SetTof1Data(
321 currentPosition / 10, currentMomentum / 1000, newVolumeName, newVolumeNumber,
322 totalTOF, totalTrackLength / 10, myOutputSymMatrix( extXpErr->get_err() ),
323 zError / 10, tzError / 10, xError / 10, yError / 10 );
328 else if ( newVolumeName ==
"logical_gasLayer" )
330 G4ThreeVector currentPostPosition = currentStep->GetPostStepPoint()->GetPosition();
331 G4ThreeVector localPosition =
332 theTouchable->GetHistory()->GetTopTransform().TransformPoint(
333 currentPostPosition );
340 double z_mm = localPosition.z() - 0.5 + ( 24 + 3 ) * 6;
342 if ( z_mm <= 0 ) { strip = 0; }
343 else if ( z_mm > 0 && z_mm < 12 * 27 ) { strip = floor( z_mm / 27 ); }
345 if ( strip < 0 ) strip = 0;
346 if ( strip > 11 ) strip = 11;
348 newVolumeNumber = theTouchable->GetReplicaNumber( 3 );
349 newVolumeNumber = 35 - newVolumeNumber;
350 if ( currentPosition.z() < 0.0 ) { newVolumeNumber = newVolumeNumber + 36; }
351 newVolumeNumber = 12 * newVolumeNumber + strip;
352 newVolumeNumber = newVolumeNumber + 176 + 96;
355 double xError = extXpErr->get_plane_err( currentMomentum.unit(), xVector );
356 double yError = extXpErr->get_plane_err( currentMomentum.unit(), yVector );
357 double zError = extXpErr->get_plane_err( currentMomentum.unit(), zVector );
358 double tzError = extXpErr->get_plane_err( currentMomentum.unit(), tzVector );
360 Hep3Vector( localPosition.x(), localPosition.y(), localPosition.z() );
366 myExtTrack->SetTof1Data( locP / 10, currentMomentum / 1000, newVolumeName,
367 newVolumeNumber, totalTOF, totalTrackLength / 10,
368 myOutputSymMatrix( extXpErr->get_err() ), zError / 10,
369 tzError / 10, xError / 10, yError / 10 );
375 newVolumeNumber = ( 527 - newVolumeNumber ) / 3;
378 double xError = extXpErr->get_plane_err( currentMomentum.unit(), xVector );
379 double yError = extXpErr->get_plane_err( currentMomentum.unit(), yVector );
380 double zError = extXpErr->get_plane_err( currentMomentum.unit(), zVector );
381 double tzError = extXpErr->get_plane_err( currentMomentum.unit(), tzVector );
382 myExtTrack->SetTof1Data(
383 currentPosition / 10, currentMomentum / 1000, newVolumeName, newVolumeNumber,
384 totalTOF, totalTrackLength / 10, myOutputSymMatrix( extXpErr->get_err() ),
385 zError / 10, tzError / 10, xError / 10, yError / 10 );
395 ( oldVolumeName ==
"logicalScinBr1" || oldVolumeName.contains(
"ScinEc" ) ||
396 ( oldVolumeName ==
"logical_gasLayer" &&
397 ( name1 ==
"logical_container_m0" || name1 ==
"logical_container_m1" ) ) ) )
401 myPathOutTof1 = currentTrack->GetTrackLength();
402 myPathInTof1.push_back( myPathOutTof1 - myPathIntoTof1 );
403 if ( msgFlag ) cout <<
"myPathOutTof1 = " << myPathOutTof1 << endl;
407 ( newVolumeName ==
"logicalScinBr1" || newVolumeName.contains(
"ScinEc" ) ||
408 ( newVolumeName ==
"logical_gasLayer" &&
409 ( name1 ==
"logical_container_m0" || name1 ==
"logical_container_m1" ) ) ) )
413 myPathIntoTof1 = currentTrack->GetTrackLength();
414 if ( msgFlag ) cout <<
"myPathIntoTof1 = " << myPathIntoTof1 << endl;
418 if ( ( !myTof2Flag ) &&
419 ( newVolumeName ==
"logicalScinBr2" ||
420 ( newVolumeName ==
"logical_gasLayer" &&
421 ( name1 ==
"logical_container_m2" || name1 ==
"logical_container_m3" ) ) ) )
423 double currentTrackLength = currentTrack->GetTrackLength();
424 double totalTrackLength = currentTrackLength + initialPath;
426 double localTime = currentTrack->GetLocalTime();
427 double totalTOF = localTime + initialTof;
429 myPathIntoTof2 = currentTrackLength;
430 if ( msgFlag ) cout <<
"myPathIntoTof2 = " << myPathIntoTof2 << endl;
431 newVolumeNumber = theTouchable->GetReplicaNumber( 2 );
433 if ( newVolumeName ==
"logical_gasLayer" )
435 G4ThreeVector currentPostPosition = currentStep->GetPostStepPoint()->GetPosition();
436 G4ThreeVector localPosition =
437 theTouchable->GetHistory()->GetTopTransform().TransformPoint(
438 currentPostPosition );
445 double z_mm = localPosition.z() - 0.5 + ( 24 + 3 ) * 6;
447 if ( z_mm <= 0 ) { strip = 0; }
448 else if ( z_mm > 0 && z_mm < 12 * 27 ) { strip = floor( z_mm / 27 ); }
450 if ( strip < 0 ) strip = 0;
451 if ( strip > 11 ) strip = 11;
453 newVolumeNumber = theTouchable->GetReplicaNumber( 3 );
454 newVolumeNumber = 35 - newVolumeNumber;
455 if ( currentPosition.z() < 0.0 ) { newVolumeNumber = newVolumeNumber + 36; }
456 newVolumeNumber = 12 * newVolumeNumber + strip;
457 newVolumeNumber = newVolumeNumber + 176 + 96;
461 double xError = extXpErr->get_plane_err( currentMomentum.unit(), xVector );
462 double yError = extXpErr->get_plane_err( currentMomentum.unit(), yVector );
463 double zError = extXpErr->get_plane_err( currentMomentum.unit(), zVector );
464 double tzError = extXpErr->get_plane_err( currentMomentum.unit(), tzVector );
466 Hep3Vector( localPosition.x(), localPosition.y(), localPosition.z() );
472 myExtTrack->SetTof2Data( locP / 10, currentMomentum / 1000, newVolumeName,
473 newVolumeNumber, totalTOF, totalTrackLength / 10,
474 myOutputSymMatrix( extXpErr->get_err() ), zError / 10,
475 tzError / 10, xError / 10, yError / 10 );
481 newVolumeNumber = ( 527 - newVolumeNumber ) / 3;
484 double xError = extXpErr->get_plane_err( currentMomentum.unit(), xVector );
485 double yError = extXpErr->get_plane_err( currentMomentum.unit(), yVector );
486 double zError = extXpErr->get_plane_err( currentMomentum.unit(), zVector );
487 double tzError = extXpErr->get_plane_err( currentMomentum.unit(), tzVector );
488 myExtTrack->SetTof2Data(
489 currentPosition / 10, currentMomentum / 1000, newVolumeName, newVolumeNumber,
490 totalTOF, totalTrackLength / 10, myOutputSymMatrix( extXpErr->get_err() ),
491 zError / 10, tzError / 10, xError / 10, yError / 10 );
499 ( oldVolumeName ==
"logicalScinBr2" ||
500 ( oldVolumeName ==
"logical_gasLayer" &&
501 ( name1 ==
"logical_container_m2" || name1 ==
"logical_container_m3" ) ) ) )
505 myPathOutTof2 = currentTrack->GetTrackLength();
506 myPathInTof2.push_back( myPathOutTof2 - myPathIntoTof2 );
507 if ( msgFlag ) cout <<
"myPathOutTof2 = " << myPathOutTof2 << endl;
511 ( newVolumeName ==
"logicalScinBr2" ||
512 ( newVolumeName ==
"logical_gasLayer" &&
513 ( name1 ==
"logical_container_m2" || name1 ==
"logical_container_m3" ) ) ) )
517 myPathIntoTof2 = currentTrack->GetTrackLength();
518 if ( msgFlag ) cout <<
"myPathIntoTof2 = " << myPathIntoTof2 << endl;
522 if ( ( !myPhyEmcFlag ) && ( !myEmcFlag ) &&
523 ( newVolumeName ==
"EMC" || newVolumeName.contains(
"BSC" ) ||
524 newVolumeName ==
"EndPhi" ) )
526 newVolumeNumber = -2;
530 Hep3Vector
nPhi( -y / r, x / r, 0. );
531 double errorPhi = ( extXpErr->get_plane_err( currentMomentum.unit(),
nPhi ) ) / r;
533 Hep3Vector aPosition = currentPosition;
534 double R = aPosition.r();
535 double aTheta = aPosition.theta();
536 aPosition.setTheta( aTheta + M_PI_2 );
539 ( extXpErr->get_plane_err( currentMomentum.unit(), aPosition.unit() ) ) / R;
540 if ( msgFlag ) cout <<
"Theta direction: " << aPosition << endl;
541 myExtTrack->SetEmcData( currentPosition / 10, currentMomentum / 1000, newVolumeName,
542 newVolumeNumber, errorTheta, errorPhi,
543 myOutputSymMatrix( extXpErr->get_err() ) );
549 if ( !myEmcPathFlag && newVolumeName.contains(
"Crystal" ) )
551 myPathIntoCrystal = currentTrack->GetTrackLength();
553 myEmcPathFlag =
true;
557 if ( ( !myEmcFlag ) && newVolumeName.contains(
"Crystal" ) )
562 int npart, ntheta, nphi;
563 if ( currentTrack->GetNextTouchableHandle()->GetVolume( 1 )->GetName().contains(
567 std::istringstream thetaBuf(
568 ( currentTrack->GetNextTouchableHandle()->GetVolume( 1 )->GetName() )
571 nphi = 308 - currentTrack->GetNextTouchableHandle()->GetCopyNumber( 2 );
575 npart = 2 - 2 * currentTrack->GetNextTouchableHandle()->GetCopyNumber( 3 );
576 int endSector = currentTrack->GetNextTouchableHandle()->GetCopyNumber( 2 );
577 int endNb, endNbGDML;
578 std::istringstream thetaBuf(
579 ( currentTrack->GetNextTouchableHandle()->GetVolume( 0 )->GetName() )
586 ostringstream strEmc;
588 { strEmc <<
"EmcPart" << npart <<
"Theta0" << ntheta <<
"Phi" << nphi; }
591 strEmc <<
"EmcPart" << npart <<
"Theta" << ntheta <<
"Phi" << nphi;
595 Hep3Vector
nPhi( -y / r, x / r, 0. );
596 double errorPhi = ( extXpErr->get_plane_err( currentMomentum.unit(),
nPhi ) ) / r;
598 Hep3Vector aPosition = currentPosition;
599 double R = aPosition.r();
600 double aTheta = aPosition.theta();
601 aPosition.setTheta( aTheta + M_PI_2 );
604 ( extXpErr->get_plane_err( currentMomentum.unit(), aPosition.unit() ) ) / R;
605 if ( msgFlag ) cout <<
"Theta direction: " << aPosition << endl;
606 myExtTrack->SetEmcData( currentPosition / 10, currentMomentum / 1000, strEmc.str(),
607 newVolumeNumber, errorTheta, errorPhi,
608 myOutputSymMatrix( extXpErr->get_err() ) );
615 if ( myEmcPathFlag && oldVolumeName.contains(
"Crystal" ) )
617 myPathOutCrystal = currentTrack->GetTrackLength();
618 myPathInCrystal = myPathInCrystal + myPathOutCrystal - myPathIntoCrystal;
620 myEmcPathFlag =
false;
624 if ( ( !myMucFlag ) &&
625 ( ( fabs( x ) >= myMucR ) || ( fabs( y ) >= myMucR ) ||
626 ( ( fabs( x - y ) / sqrt( 2. ) ) >= myMucR ) ||
627 ( ( fabs( x + y ) / sqrt( 2. ) ) >= myMucR ) || ( fabs( z ) >= myMucZ ) ) )
629 int newVolumeNumber = newVolume->GetCopyNo();
632 Hep3Vector xVector( 1.0, 0, 0 );
633 Hep3Vector yVector( 0, 1.0, 0 );
634 Hep3Vector zVector( 0, 0, 1.0 );
635 double xError = extXpErr->get_plane_err( currentMomentum.unit(), xVector );
636 double yError = extXpErr->get_plane_err( currentMomentum.unit(), yVector );
637 double zError = extXpErr->get_plane_err( currentMomentum.unit(), zVector );
638 double tzError = 0.0;
639 double phi = currentPosition.phi();
640 if ( phi < 0. ) phi +=
M_PI;
641 int i = int( 8.0 * phi /
M_PI );
642 if ( i == 0 || i == 7 || i == 8 ) { tzError = yError; }
643 if ( i == 1 || i == 2 )
645 Hep3Vector tzVector( -1.0, 1.0, 0. );
646 tzError = extXpErr->get_plane_err( currentMomentum.unit(), tzVector.unit() );
648 if ( i == 3 || i == 4 ) { tzError = xError; }
649 if ( i == 5 || i == 6 )
651 Hep3Vector tzVector( 1.0, 1.0, 0. );
652 tzError = extXpErr->get_plane_err( currentMomentum.unit(), tzVector.unit() );
654 myExtTrack->SetMucData( currentPosition / 10, currentMomentum / 1000, newVolumeName,
655 newVolumeNumber, myOutputSymMatrix( extXpErr->get_err() ),
656 zError / 10, tzError / 10, xError / 10, yError / 10 );
659 if ( !( ParticleName.contains(
"mu" ) && myUseMucKalFlag ) )
662 currentStep->GetTrack()->SetTrackStatus( fStopAndKill );
671 HepSymMatrix XpErr = extXpErr->get_err();
672 int namesize = oldVolumeName.size();
673 bool Flag1(
false ), Flag2(
false ), Flag3(
false ), Flag4(
false ), Flag5(
false );
674 Flag1 = m_mucdigicol->size() > 0;
675 Flag2 = myUseMucKalFlag;
676 Flag3 = ParticleName.contains(
"mu" ) && oldVolumeName.contains(
"lMuc" ) &&
677 oldVolumeName.contains(
"P" ) && oldVolumeName.contains(
"S" ) &&
678 ( oldVolumeName.contains(
"G" ) || oldVolumeName.contains(
"Ab" ) );
679 Flag4 = oldVolumeName.contains(
"lMuc" ) && oldVolumeName.contains(
"P" ) &&
680 oldVolumeName.contains(
"S" ) &&
681 ( ( namesize == 10 && oldVolumeName.contains(
"G" ) ) ||
682 ( namesize == 11 && oldVolumeName.contains(
"Ab" ) ) );
683 Flag5 = !( ( RemID[0] == 1 && RemID[2] == 9 ) ||
684 ( ( RemID[0] == 0 || RemID[0] == 2 ) && RemID[2] == 8 ) );
686 if ( Flag1 && Flag2 && Flag3 && Flag5 )
689 double depth = currentStep->GetStepLength();
690 if ( oldVolumeName.contains(
"Ab" ) ) RemDepth = RemDepth + depth;
691 if ( RemStep == 0 && Flag4 )
693 Hep3Vector ID_1 =
GetGapID( oldVolumeName );
696 bool LastLay = ( ID_1[0] == 1 && ID_1[2] < 9 ) ||
697 ( ( ID_1[0] == 0 || ID_1[0] == 2 ) && ID_1[2] < 8 );
698 if ( RememberID[2] != ID_1[2] && LastLay )
701 ->
GetGap( ID_1[0], ID_1[1], ID_1[2] )
703 double dist = fabs( pos_loc.z() );
704 RemPositon = currentPosition;
705 RemMomentum = currentMomentum;
713 bool WillFilter =
false;
714 bool LastLay_ =
false;
715 double dist_b = 99999.;
720 LastLay_ = ( ID_2[0] == 1 && ID_2[2] < 9 ) ||
721 ( ( ID_2[0] == 0 || ID_2[0] == 2 ) && ID_2[2] < 8 );
724 ->GetGap( ID_2[0], ID_2[1], ID_2[2] )
725 ->TransformToGap( currentPosition )
727 if ( RemID != ID_2 ) WillFilter =
true;
731 ->
GetGap( RemID[0], RemID[1], RemID[2] )
733 double dist = fabs( pos_loc.z() );
735 if ( !WillFilter && RemDist > dist )
737 RemPositon = currentPosition;
738 RemMomentum = currentMomentum;
741 RemVol = oldVolumeName;
749 muckal->
SetPosMomErr( RemPositon, RemMomentum, RemXpErr );
753 vector<MucRecHit*> tmp = muckal->
TrackHit();
756 double chi2 = muckal->
GetChi2();
758 if ( filter && iniOK )
763 myMucchisq_ = myMucchisq_ + chi2;
764 muckal->
XPmod( m_pos_mod, m_mom_mod, m_err_mod );
766 if ( RememberID[0] == 1 ) myMucbrLastLay_ = RememberID[2];
767 if ( RememberID[0] == 0 || RememberID[0] == 2 ) myMucecLastLay_ = RememberID[2];
768 if ( oldVolumeName.contains(
"Ab" ) ) RemDepth = RemDepth - depth;
769 if ( myMucnfit_ == 1 ) myMucdepth_ = RemDepth;
770 else myMucdepth_ = myMucdepth_ + RemDepth;
775 extXpErr->put_err( m_err_mod );
776 extXpErr->set_pos( m_pos_mod );
777 extXpErr->set_mom( m_mom_mod );
778 currentStep->GetTrack()->SetTrackStatus( fStopAndKill );
783 RemPositon = currentPosition;
784 RemMomentum = currentMomentum;
788 if ( oldVolumeName.contains(
"Ab" ) ) RemDepth = depth;
791 if ( msgFlag ) cout <<
"---------Filter is OK---------- " << endl;
797 RemPositon = currentPosition;
798 RemMomentum = currentMomentum;
808 myExtTrack->SetMucKalData( myMucchisq_, myMucnfit_, myMucdepth_, myMucbrLastLay_,
809 myMucecLastLay_, myMucnhits_ );
881 cout <<
"x:" << currentPosition.x() <<
"//y:" << currentPosition.y()
882 <<
"//z:" << currentPosition.z() <<
"||px:" << currentMomentum.x()
883 <<
"//py:" << currentMomentum.y() <<
"//pz:" << currentMomentum.z() << endl;
884 double x = currentPosition.x();
885 double y = currentPosition.y();
886 double z = currentPosition.z();
887 if ( ( fabs( x ) >= 2 * myMucR ) || ( fabs( y ) >= 2 * myMucR ) ||
888 ( fabs( z ) >= 2 * myMucZ ) )
892 currentStep->GetTrack()->SetTrackStatus( fStopAndKill );
897 else if ( currentTrackStatus == fStopAndKill )
900 if ( myEmcFlag ) myExtTrack->SetEmcPath( myPathInCrystal / 10. );
901 if ( myTof1Flag ) myExtTrack->setPathInTof1( myPathInTof1 );
902 if ( myTof2Flag ) myExtTrack->setPathInTof2( myPathInTof2 );
905 cout <<
"myPathInTof1 = ";
906 for (
int i = 0; i != myPathInTof1.size(); i++ ) cout << myPathInTof1[i] <<
" ";
908 cout <<
"myPathInTof2 = ";
909 for (
int i = 0; i != myPathInTof2.size(); i++ ) cout << myPathInTof2[i] <<
" ";
915 if ( newVolume != 0 )
917 std::cout <<
"x:" << currentPosition.x() <<
"//y:" << currentPosition.y()
918 <<
"//z:" << currentPosition.z() <<
"||px:" << currentMomentum.x()
919 <<
"//py:" << currentMomentum.y() <<
"//pz:" << currentMomentum.z()
920 <<
"//stoped" << endl;
921 cout <<
"Error matrix is:" << extXpErr->get_err() << endl;
925 cout <<
"x:" << currentPosition.x() <<
"//y:" << currentPosition.y()
926 <<
"//z:" << currentPosition.z() <<
"||px:" << currentMomentum.x()
927 <<
"//py:" << currentMomentum.y() <<
"//pz:" << currentMomentum.z() <<
"//escaped"
929 std::cout <<
"Error matrix is:" << extXpErr->get_err() << std::endl;