13#include "G4TrackStatus.hh"
14#include "G4VPhysicalVolume.hh"
15#include "G4TransportationManager.hh"
16#include "G4FieldManager.hh"
18#include "G4LogicalVolume.hh"
33ExtSteppingAction::ExtSteppingAction():chicc(0.0),initialPath(0.),myPathIntoCrystal(0.),myPathOutCrystal(0.),myPathInCrystal(0.),myBetaInMDC(0.),extXpErr(0),myExtTrack(0),msgFlag(
true),myUseMucKalFlag(
true),m_trackstop(
false),myMucnfit_(0),myMucchisq_(0.),myMucdepth_(-99.),myMucbrLastLay_(-1),myMucecLastLay_(-1),myMucnhits_(-1),myMucWindow(6)
51 myPathIntoCrystal = 0.;
52 myPathOutCrystal = 0.;
106 G4Track* currentTrack = currentStep->GetTrack();
109 cout<<
"Can't get currentTrack"<<endl;
112 G4TrackStatus currentTrackStatus = currentTrack->GetTrackStatus();
114 int stepNumber = currentTrack->GetCurrentStepNumber();
115 if(msgFlag) cout<<
"STEP "<<stepNumber<<
":"<<endl;
118 Hep3Vector currentPosition = currentTrack->GetPosition();
119 Hep3Vector currentMomentum = currentTrack->GetMomentum();
123 G4VPhysicalVolume* oldVolume;
124 G4VPhysicalVolume* newVolume;
125 if(!currentTrack->GetTouchableHandle()) cout<<
"Can't get currentTrack->GetTouchableHandle()"<<endl;
126 else oldVolume= currentTrack->GetTouchableHandle()->GetVolume();
127 if(!currentTrack->GetNextTouchableHandle()) cout<<
"Can't get currentTrack->GetNextTouchableHandle()"<<endl;
128 else newVolume= currentTrack->GetNextTouchableHandle()->GetVolume();
129 if(!oldVolume) cout<<
"Can't get oldVolume!"<<endl;
132 if(stepNumber>50000) {
133 cout<<
"infinite steps in the track "<<endl;
134 currentTrack->SetTrackStatus(fStopAndKill); m_trackstop =
true;
137 G4String ParticleName = currentTrack->GetDefinition()->GetParticleName();
138 double x_ = currentPosition.x();
139 double y_ = currentPosition.y();
140 double z_ = currentPosition.z();
141 bool inner = (oldVolume!=newVolume)&&(!( (fabs(x_)>=myMucR) || (fabs(y_)>=myMucR) || ((fabs(x_-y_)/sqrt(2.))>=myMucR) || ((fabs(x_+y_)/sqrt(2.))>=myMucR) || (fabs(z_)>=myMucZ)) );
142 bool mucdec = (fabs(x_)>=myMucR) || (fabs(y_)>=myMucR) || ((fabs(x_-y_)/sqrt(2.))>=myMucR) || ((fabs(x_+y_)/sqrt(2.))>=myMucR) || (fabs(z_)>=myMucZ);
145 if(currentTrackStatus == fAlive)
151 double currentPoint[3]={currentPosition.x(),currentPosition.y(),currentPosition.z()};
152 double currentBfield[3]={0.0,0.0,0.0};
153 Hep3Vector currentB(0.0,0.0,1.0);
154 if(G4TransportationManager::GetTransportationManager())
156 G4FieldManager* fieldManager=G4TransportationManager::GetTransportationManager()->GetFieldManager();
159 if(fieldManager->GetDetectorField())
161 fieldManager->GetDetectorField()->GetFieldValue(currentPoint,currentBfield);
162 currentB.set(currentBfield[0]/tesla,currentBfield[1]/tesla,currentBfield[2]/tesla);
163 if(msgFlag) cout<<
"B:"<<currentB.x()<<
","<<currentB.y()<<
","<<currentB.z()<<endl;
169 G4Material* oldMaterial = oldVolume->GetLogicalVolume()->GetMaterial();
170 if(!oldMaterial) std::cout<<
"Can't get oldMaterial"<<std::endl;
171 else CalculateChicc(oldMaterial);
174 if(!(extXpErr->
move(currentPosition,currentMomentum,currentB,1,chicc)))
175 if(msgFlag) cout<<
"can not update Error Matrix!!"<<endl;
180 cout<<
"Volume name:"<<newVolume->GetName()<<endl;
181 cout<<
"Volume number:"<<newVolume->GetCopyNo()<<endl;
182 cout<<
"x:"<<currentPoint[0]<<
"//y:"<<currentPoint[1]<<
"//z:"<<currentPoint[2]
183 <<
"||px:"<<currentMomentum.x()<<
"//py:"<<currentMomentum.y()<<
"//pz:"
184 <<currentMomentum.z()<<endl;
185 cout<<
"Error matrix is:"<<extXpErr->
get_err()<<endl;
186 cout<<
"phi:"<<atan(currentPoint[1]/currentPoint[0])<<endl;
187 Hep3Vector nz(0.,0.,1.);
188 cout<<
"Projected z error:"<<extXpErr->
get_plane_err(currentMomentum.unit(),nz)
194 Hep3Vector nt(-y/R,
x/R,0.);
195 cout<<
"Projected phi error:"<<(extXpErr->
get_plane_err(currentMomentum.unit(),nt))/R
200 Hep3Vector xVector(1.0,0,0);
201 Hep3Vector yVector(0,1.0,0);
202 Hep3Vector zVector(0,0,1.0);
204 tzVector.setRThetaPhi(1.0,
M_PI/2.0,currentPosition.phi());
205 double r = currentPosition.perp();
206 double x = currentPosition.x();
207 double y = currentPosition.y();
208 double z = currentPosition.z();
209 G4String newVolumeName = newVolume->GetName();
210 G4String oldVolumeName = oldVolume->GetName();
211 G4StepPoint* postStepPoint = currentStep->GetPostStepPoint();
212 G4TouchableHistory* theTouchable = (G4TouchableHistory*)(postStepPoint->GetTouchable());
213 int newVolumeNumber=newVolume->GetCopyNo();
227 if( (!myTofFlag) && (!myTof1Flag) && (newVolumeName.contains(
"Tof") ))
229 newVolumeNumber = -2;
230 double currentTrackLength = currentTrack->GetTrackLength();
231 double totalTrackLength = currentTrackLength + initialPath;
235 double localTime = currentTrack->GetLocalTime();
237 double totalTOF = localTime + initialTof;
244 double xError = extXpErr->
get_plane_err(currentMomentum.unit(),xVector);
245 double yError = extXpErr->
get_plane_err(currentMomentum.unit(),yVector);
246 double zError = extXpErr->
get_plane_err(currentMomentum.unit(),zVector);
247 double tzError= extXpErr->
get_plane_err(currentMomentum.unit(),tzVector);
248 myExtTrack->
SetTof1Data(currentPosition/10.0,currentMomentum/1000.0,newVolumeName,newVolumeNumber,totalTOF,totalTrackLength/10,myOutputSymMatrix(extXpErr->
get_err()),zError/10,tzError/10,xError/10,yError/10);
261 if( (!myTof1Flag) && (newVolumeName==
"logicalScinBr1" || newVolumeName.contains(
"ScinEc") ||
262 newVolumeName.contains(
"logical_sensitive_detector_east") || newVolumeName.contains(
"logical_sensitive_detector_west") ) )
264 double currentTrackLength = currentTrack->GetTrackLength();
265 double totalTrackLength = currentTrackLength+initialPath;
267 double localTime = currentTrack->GetLocalTime();
268 double totalTOF = localTime + initialTof;
270 myPathIntoTof1 = currentTrackLength;
271 if(msgFlag) cout <<
"myPathIntoTof1 = " << myPathIntoTof1 << endl;
275 newVolumeNumber=theTouchable->GetReplicaNumber(2);
276 help_mrpc_nb = theTouchable->GetReplicaNumber(3);
278 if(newVolumeName.contains(
"ScinEc")) {
279 newVolumeNumber=(95-newVolumeNumber)/2;
280 newVolumeNumber=newVolumeNumber+176;
282 if(newVolumeName.contains(
"East")) newVolumeNumber=newVolumeNumber+48;
286 else if( newVolumeName.contains(
"_west_1"))
289 newVolumeNumber = (help_mrpc_nb)*(-0.5)+18.5;
305 else if(newVolumeName.contains(
"_east_1") )
308 newVolumeNumber = (help_mrpc_nb)*(0.5)+0.5;
326 else if( newVolumeName.contains(
"_west_2"))
328 newVolumeNumber = (help_mrpc_nb)*(-0.5)+18;
344 else if(newVolumeName.contains(
"_east_2") )
346 newVolumeNumber = (help_mrpc_nb)*(0.5)+1;
363 else{ newVolumeNumber=(527-newVolumeNumber)/3;}
369 double xError = extXpErr->
get_plane_err(currentMomentum.unit(),xVector);
370 double yError = extXpErr->
get_plane_err(currentMomentum.unit(),yVector);
371 double zError = extXpErr->
get_plane_err(currentMomentum.unit(),zVector);
372 double tzError= extXpErr->
get_plane_err(currentMomentum.unit(),tzVector);
373 myExtTrack->
SetTof1Data(currentPosition/10,currentMomentum/1000,newVolumeName,newVolumeNumber,totalTOF,totalTrackLength/10,myOutputSymMatrix(extXpErr->
get_err()),zError/10,tzError/10,xError/10,yError/10);
382 if( myInTof1 && ( oldVolumeName==
"logicalScinBr1" || oldVolumeName.contains(
"ScinEc") ||
383 newVolumeName.contains(
"logical_sensitive_detector_east") || newVolumeName.contains(
"logical_sensitive_detector_west")) ) {
386 myPathOutTof1 = currentTrack->GetTrackLength();
387 myPathInTof1.push_back(myPathOutTof1 - myPathIntoTof1);
388 if(msgFlag) cout <<
"myPathOutTof1 = " << myPathOutTof1 << endl;
391 if( myOutTof1 && ( newVolumeName==
"logicalScinBr1" || newVolumeName.contains(
"ScinEc") ||
392 newVolumeName.contains(
"logical_sensitive_detector_east") || newVolumeName.contains(
"logical_sensitive_detector_west")) ) {
395 myPathIntoTof1 = currentTrack->GetTrackLength();
396 if(msgFlag) cout <<
"myPathIntoTof1 = " << myPathIntoTof1 << endl;
402 if( (!myTof2Flag) && newVolumeName==
"logicalScinBr2" )
404 double currentTrackLength = currentTrack->GetTrackLength();
405 double totalTrackLength = currentTrackLength+initialPath;
407 double localTime = currentTrack->GetLocalTime();
408 double totalTOF = localTime + initialTof;
409 newVolumeNumber=(527-theTouchable->GetReplicaNumber(2))/3;
412 myPathIntoTof2 = currentTrackLength;
413 if(msgFlag) cout <<
"myPathIntoTof2 = " << myPathIntoTof2 << endl;
417 double xError = extXpErr->
get_plane_err(currentMomentum.unit(),xVector);
418 double yError = extXpErr->
get_plane_err(currentMomentum.unit(),yVector);
419 double zError = extXpErr->
get_plane_err(currentMomentum.unit(),zVector);
420 double tzError= extXpErr->
get_plane_err(currentMomentum.unit(),tzVector);
421 myExtTrack->
SetTof2Data(currentPosition/10,currentMomentum/1000,newVolumeName,newVolumeNumber,totalTOF,totalTrackLength/10,myOutputSymMatrix(extXpErr->
get_err()),zError/10,tzError/10,xError/10,yError/10);
427 if( myInTof2 && oldVolumeName==
"logicalScinBr2" ) {
430 myPathOutTof2 = currentTrack->GetTrackLength();
431 myPathInTof2.push_back(myPathOutTof2 - myPathIntoTof2);
432 if(msgFlag) cout <<
"myPathOutTof2 = " << myPathOutTof2 << endl;
435 if( myOutTof2 && newVolumeName==
"logicalScinBr2" ) {
438 myPathIntoTof2 = currentTrack->GetTrackLength();
439 if(msgFlag) cout <<
"myPathIntoTof2 = " << myPathIntoTof2 << endl;
443 if( (!myPhyEmcFlag) && (!myEmcFlag) && (newVolumeName==
"EMC" || newVolumeName.contains(
"BSC") || newVolumeName==
"EndPhi"))
445 newVolumeNumber = -2;
449 Hep3Vector
nPhi(-y/r,
x/r,0.);
452 Hep3Vector aPosition = currentPosition;
453 double R = aPosition.r();
454 double aTheta = aPosition.theta();
455 aPosition.setTheta(aTheta + M_PI_2);
457 errorTheta =(extXpErr->
get_plane_err(currentMomentum.unit(),aPosition.unit()))/R;
458 if(msgFlag) cout<<
"Theta direction: "<<aPosition<<endl;
459 myExtTrack->
SetEmcData(currentPosition/10,currentMomentum/1000,newVolumeName,newVolumeNumber,errorTheta,errorPhi,myOutputSymMatrix(extXpErr->
get_err()));
466 if(!myEmcPathFlag && newVolumeName.contains(
"Crystal") )
468 myPathIntoCrystal = currentTrack->GetTrackLength();
470 myEmcPathFlag =
true;
474 if( (!myEmcFlag) && newVolumeName.contains(
"Crystal") )
479 int npart,ntheta,nphi;
480 if(currentTrack->GetNextTouchableHandle()->GetVolume(1)->GetName().contains(
"BSC")) {
482 std::istringstream thetaBuf((currentTrack->GetNextTouchableHandle()->GetVolume(1)->GetName()).substr(16,2));
484 nphi = 308-currentTrack->GetNextTouchableHandle()->GetCopyNumber(2);
486 npart=2-2*currentTrack->GetNextTouchableHandle()->GetCopyNumber(3);
487 int endSector=currentTrack->GetNextTouchableHandle()->GetCopyNumber(2);
489 std::istringstream thetaBuf((currentTrack->GetNextTouchableHandle()->GetVolume(0)->GetName()).substr(20,2));
495 ostringstream strEmc;
497 strEmc<<
"EmcPart"<<npart<<
"Theta0"<<ntheta<<
"Phi"<<nphi;
499 strEmc<<
"EmcPart"<<npart<<
"Theta"<<ntheta<<
"Phi"<<nphi;
503 Hep3Vector
nPhi(-y/r,
x/r,0.);
506 Hep3Vector aPosition = currentPosition;
507 double R = aPosition.r();
508 double aTheta = aPosition.theta();
509 aPosition.setTheta(aTheta + M_PI_2);
511 errorTheta =(extXpErr->
get_plane_err(currentMomentum.unit(),aPosition.unit()))/R;
512 if(msgFlag) cout<<
"Theta direction: "<<aPosition<<endl;
513 myExtTrack->
SetEmcData(currentPosition/10,currentMomentum/1000,strEmc.str(),
515 newVolumeNumber,errorTheta,errorPhi,myOutputSymMatrix(extXpErr->
get_err()));
522 if(myEmcPathFlag && oldVolumeName.contains(
"Crystal") )
524 myPathOutCrystal = currentTrack->GetTrackLength();
525 myPathInCrystal = myPathInCrystal+myPathOutCrystal-myPathIntoCrystal;
532 if( (!myMucFlag) && ( (fabs(
x)>=myMucR) || (fabs(y)>=myMucR) || ((fabs(
x-y)/sqrt(2.))>=myMucR) || ((fabs(
x+y)/sqrt(2.))>=myMucR) || (fabs(z)>=myMucZ) ) )
534 int newVolumeNumber = newVolume->GetCopyNo();
537 Hep3Vector xVector(1.0,0,0);
538 Hep3Vector yVector(0,1.0,0);
539 Hep3Vector zVector(0,0,1.0);
540 double xError = extXpErr->
get_plane_err(currentMomentum.unit(),xVector);
541 double yError = extXpErr->
get_plane_err(currentMomentum.unit(),yVector);
542 double zError = extXpErr->
get_plane_err(currentMomentum.unit(),zVector);
544 double phi = currentPosition.phi();
545 if(phi<0.) phi+=
M_PI;
546 int i = int(8.0*phi/
M_PI);
547 if( i==0 || i==7 || i==8 )
553 Hep3Vector tzVector(-1.0,1.0,0.);
554 tzError =extXpErr->
get_plane_err(currentMomentum.unit(),tzVector.unit());
562 Hep3Vector tzVector(1.0,1.0,0.);
563 tzError =extXpErr->
get_plane_err(currentMomentum.unit(),tzVector.unit());
565 myExtTrack->
SetMucData(currentPosition/10,currentMomentum/1000,newVolumeName,newVolumeNumber,myOutputSymMatrix(extXpErr->
get_err()),zError/10,tzError/10,xError/10,yError/10);
568 if(!(ParticleName.contains(
"mu")&&myUseMucKalFlag))
571 currentStep->GetTrack()->SetTrackStatus(fStopAndKill);
580 HepSymMatrix XpErr = extXpErr->
get_err();
581 int namesize = oldVolumeName.size();
582 bool Flag1(
false),Flag2(
false),Flag3(
false),Flag4(
false),Flag5(
false);
583 Flag1 = m_mucdigicol->size()>0;
584 Flag2 = myUseMucKalFlag;
585 Flag3 = ParticleName.contains(
"mu")&&oldVolumeName.contains(
"lMuc")&&oldVolumeName.contains(
"P")&&oldVolumeName.contains(
"S")&&(oldVolumeName.contains(
"G")||oldVolumeName.contains(
"Ab"));
586 Flag4 = oldVolumeName.contains(
"lMuc")&&oldVolumeName.contains(
"P")&&oldVolumeName.contains(
"S")&&((namesize==10&&oldVolumeName.contains(
"G"))||(namesize==11&&oldVolumeName.contains(
"Ab")));
587 Flag5 = !((RemID[0]==1&&RemID[2]==9)||((RemID[0]==0||RemID[0]==2)&&RemID[2]==8));
589 if(Flag1&&Flag2&&Flag3&&Flag5)
592 double depth = currentStep-> GetStepLength();
593 if(oldVolumeName.contains(
"Ab"))
594 RemDepth = RemDepth+ depth;
595 if(RemStep==0&&Flag4)
597 Hep3Vector ID_1 =
GetGapID(oldVolumeName);
600 bool LastLay = (ID_1[0]==1&&ID_1[2]<9)||((ID_1[0]==0||ID_1[0]==2)&&ID_1[2]<8);
601 if(RememberID[2]!=ID_1[2]&&LastLay)
604 double dist = fabs(pos_loc.z());
605 RemPositon = currentPosition;
606 RemMomentum = currentMomentum;
614 bool WillFilter =
false;
615 bool LastLay_ =
false;
616 double dist_b = 99999.;
621 LastLay_ =(ID_2[0]==1&&ID_2[2]<9)||((ID_2[0]==0||ID_2[0]==2)&&ID_2[2]<8);
622 if(LastLay_)dist_b=fabs(
MucGeoGeneral::Instance()->GetGap(ID_2[0],ID_2[1],ID_2[2])->TransformToGap(currentPosition).z());
629 double dist = fabs(pos_loc.z());
631 if(!WillFilter&&RemDist>dist)
633 RemPositon = currentPosition;
634 RemMomentum = currentMomentum;
637 RemVol = oldVolumeName;
649 vector<MucRecHit*> tmp = muckal->
TrackHit();
652 double chi2 = muckal->
GetChi2();
659 myMucchisq_ = myMucchisq_+chi2;
660 muckal->
XPmod(m_pos_mod,m_mom_mod,m_err_mod);
662 if(RememberID[0]==1)myMucbrLastLay_=RememberID[2];
663 if(RememberID[0]==0||RememberID[0]==2)myMucecLastLay_=RememberID[2];
664 if(oldVolumeName.contains(
"Ab"))
665 RemDepth = RemDepth-depth;
667 myMucdepth_ = RemDepth;
669 myMucdepth_=myMucdepth_+RemDepth;
677 currentStep->GetTrack()->SetTrackStatus(fStopAndKill);
683 RemPositon = currentPosition;
684 RemMomentum = currentMomentum;
688 if(oldVolumeName.contains(
"Ab"))
693 if(msgFlag)cout<<
"---------Filter is OK---------- "<<endl;
699 RemPositon = currentPosition;
700 RemMomentum = currentMomentum;
709 if(myExtTrack)myExtTrack->
SetMucKalData(myMucchisq_,myMucnfit_,myMucdepth_,myMucbrLastLay_,myMucecLastLay_,myMucnhits_);
779 if(msgFlag) cout<<
"x:"<<currentPosition.x()<<
"//y:"<<currentPosition.y()<<
"//z:"<<currentPosition.z()<<
"||px:"<<currentMomentum.x()<<
"//py:"<<currentMomentum.y()<<
"//pz:"<<currentMomentum.z()<<endl;
780 double x = currentPosition.x();
781 double y = currentPosition.y();
782 double z = currentPosition.z();
783 if( (fabs(
x)>=2*myMucR) || (fabs(y)>=2*myMucR) || (fabs(z)>=2*myMucZ) )
785 {currentStep->GetTrack()->SetTrackStatus(fStopAndKill);m_trackstop=
true;}
789 else if(currentTrackStatus == fStopAndKill)
792 if(myEmcFlag) myExtTrack->
SetEmcPath(myPathInCrystal/10.);
796 cout <<
"myPathInTof1 = " ;
797 for(
int i=0; i!=myPathInTof1.size(); i++)
798 cout << myPathInTof1[i] <<
" ";
800 cout <<
"myPathInTof2 = " ;
801 for(
int i=0; i!=myPathInTof2.size(); i++)
802 cout << myPathInTof2[i] <<
" ";
810 std::cout<<
"x:"<<currentPosition.x()<<
"//y:"<<currentPosition.y()<<
"//z:"<<currentPosition.z()<<
"||px:"<<currentMomentum.x()<<
"//py:"<<currentMomentum.y()<<
"//pz:"<<currentMomentum.z()<<
"//stoped"<<endl;
811 cout<<
"Error matrix is:"<<extXpErr->
get_err()<<endl;
814 cout<<
"x:"<<currentPosition.x()<<
"//y:"<<currentPosition.y()<<
"//z:"<<currentPosition.z()<<
"||px:"<<currentMomentum.x()<<
"//py:"<<currentMomentum.y()<<
"//pz:"<<currentMomentum.z()<<
"//escaped"<<std::endl;
815 std::cout<<
"Error matrix is:"<<extXpErr->
get_err()<<std::endl;
823void ExtSteppingAction::CalculateChicc(G4Material* currentMaterial)
825 int n = currentMaterial->GetNumberOfElements();
826 const double *p = currentMaterial->GetFractionVector();
827 double density = (currentMaterial->GetDensity())/(g/cm3);
831 const G4Element* mElement = currentMaterial->GetElement(i);
832 double z = mElement->GetZ();
833 double a = mElement->GetN();
835 temp += *(p++)/a*z*(z+1);
837 chicc = 0.39612e-3*std::sqrt(density*temp);
842HepSymMatrix & ExtSteppingAction::myOutputSymMatrix(
const HepSymMatrix & m1)
850 {
for(
int j=0;j<=i;j++)
855 m[i][j]=m[i][j]/10000;
858 m[i][j]=m[i][j]/1000000;
871 if((sector>=0)&&(sector<3))
878 nphi = (sector-3)*4+nb;
880 else if((nb>=4)&&(nb<8))
883 nphi = (sector-3)*4+nb-4;
885 else if((nb>=8)&&(nb<13))
888 nphi = (sector-3)*5+nb-8;
890 else if((nb>=13)&&(nb<18))
893 nphi = (sector-3)*5+nb-13;
895 else if((nb>=18)&&(nb<24))
898 nphi = (sector-3)*6+nb-18;
900 else if((nb>=24)&&(nb<30))
903 nphi = (sector-3)*6+nb-24;
956 }
else if(
num==2||
num==3) {
1001 int par(-1),se(-1),ga(-1);
1002 G4String strPart = vol.substr(5,1);
1005 G4String strSeg = vol.substr(7,1);
1007 if(vol.contains(
"G")) strGap= vol.substr(9,1);
1008 if(vol.contains(
"Ab")) strGap= vol.substr(10,1);
1009 std::istrstream partBuf(strPart.c_str(), strlen(strPart.c_str()));
1010 std::istrstream segBuf(strSeg.c_str(), strlen(strSeg.c_str()));
1011 std::istrstream gapBuf(strGap.c_str(), strlen(strGap.c_str()));
1016 if(vol.contains(
"Ab")&&par==1) ga = ga+1;
static G4int Produce_unique_identifier(G4int module_mrpc_f, G4int readoutstripnumber_f)
static G4int Calculate_Readoutstrip_number_continuum(G4double x_mm, G4double y_mm, G4int partId_f, G4int module_mrpc_f)
void SetTof1Data(Hep3Vector aPosition, Hep3Vector aMomentum, string aVolumeName, int aVolumeNumber, double aTof, double aPath, HepSymMatrix aErrorMatrix, double aZSigma=0., double aTSigma=0., double aXSigma=0., double aYSigma=0.)
void SetEmcData(Hep3Vector aPosition, Hep3Vector aMomentum, string aVolumeName, int aVolumeNumber, double aThetaSigma, double aPhiSigma, HepSymMatrix aErrorMatrix)
void SetTof2Data(Hep3Vector aPosition, Hep3Vector aMomentum, string aVolumeName, int aVolumeNumber, double aTof, double aPath, HepSymMatrix aErrorMatrix, double aZSigma=0., double aTSigma=0., double aXSigma=0., double aYSigma=0.)
void SetMucData(Hep3Vector aPosition, Hep3Vector aMomentum, string aVolumeName, int aVolumeNumber, HepSymMatrix aErrorMatrix, double aZSigma=0., double aTSigma=0., double aXSigma=0., double aYSigma=0.)
void SetEmcPath(double path)
void SetMucKalData(double chi2, int dof, double depth, int brLastLay, int ecLastLay, int nhits)
void SetGapID(Hep3Vector id)
void SetPosMomErr(Hep3Vector pos, Hep3Vector mom, HepSymMatrix err)
void SetMucWindow(int aMucWindow)
void XPmod(Hep3Vector &pos, Hep3Vector &mom, HepSymMatrix &err)
void SetMucDigiCol(MucDigiCol *amucdigi)
vector< MucRecHit * > TrackHit()
Hep3Vector GetGapID(G4String vol)
void CalculateEmcEndThetaPhi(int npart, int sector, int nb, int &ntheta, int &nphi)
void InfmodMuc(Hep3Vector &pos, Hep3Vector &mom, HepSymMatrix &err)
void UserSteppingAction(const G4Step *currentStep)
int CalculateEmcEndCopyNb(int num)
int CalculateEmcEndPhiNb(int num)
void put_err(const double error[])
const HepSymMatrix & get_err() const
double get_plane_err(const Hep3Vector &np, const Hep3Vector &nr) const
void set_mom(const Hep3Vector &mom)
bool move(const Hep3Vector &xv1, const Hep3Vector &pv1, const Hep3Vector &B, const int ms_on, const double chi_cc)
void set_pos(const Hep3Vector &pos)
HepPoint3D TransformToGap(const HepPoint3D gPoint) const
Transform a point from global coordinate to gap coordinate.
MucGeoGap * GetGap(const int part, const int seg, const int gap) const
Get a pointer to the gap identified by (part,seg,gap).
static MucGeoGeneral * Instance()
Get a pointer to the single instance of MucGeoGeneral.
void setPathInTof1(vector< double > x)
void setPathInTof2(vector< double > x)