Newer
Older
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
// ** See if there are any good time measurements in the plane.
if ( goodScinTime[itrack][ihit] ){
goodPlaneTime[itrack][ip] = kTRUE;
}
} // Second loop over hits of a scintillator plane
} // Loop over scintillator planes
// * * Fit beta if there are enough time measurements (one upper, one lower)
if ( ( goodPlaneTime[itrack][0] ) || ( goodPlaneTime[itrack][1] ) ||
( goodPlaneTime[itrack][2] ) || ( goodPlaneTime[itrack][3] ) ){
// FineProcess();
}
else {
beta[itrack] = 0.;
betaChisq[itrack] = -1.;
}
if ( numFPTime != 0 ){
timeAtFP[itrack] = ( sumFPTime / numFPTime );
}
for ( Int_t ind = 0; ind < fNPlanes; ind++ ){
if ( numPlaneTime[ind] != 0 ){
FPTime[ind] = ( sumFPTime / numFPTime );
}
else{
FPTime[ind] = 1000. * ind;
}
}
// h_fptimedif(1)=h_fptime(1)-h_fptime(2);
// h_fptimedif(2)=h_fptime(1)-h_fptime(3);
// h_fptimedif(3)=h_fptime(1)-h_fptime(4);
// h_fptimedif(4)=h_fptime(2)-h_fptime(3);
// h_fptimedif(5)=h_fptime(2)-h_fptime(4);
// h_fptimedif(6)=h_fptime(3)-h_fptime(4);
} // Main loop over tracks ends here.
} // If condition for at least one track
// Calculation of coordinates of particle track cross point with scint
// plane in the detector coordinate system. For this, parameters of track
// reconstructed in THaVDC::CoarseTrack() are used.
//
// Apply corrections and reconstruct the complete hits.
//
// static const Double_t sqrt2 = TMath::Sqrt(2.);
// cout <<"**** in THcHodoscope CoarseProcess ********\n";
/*
for(Int_t i=0;i<fNPlanes;i++) {
cout<<i<<" ";
fPlanes[i]->CoarseProcess(tracks);
}*/
ApplyCorrections();
return 0;
}
//_____________________________________________________________________________
Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
{
// Reconstruct coordinates of particle track cross point with scintillator
// plane, and copy the data into the following local data structure:
//
// Units of measurements are meters.
// Calculation of coordinates of particle track cross point with scint
// plane in the detector coordinate system. For this, parameters of track
// reconstructed in THaVDC::FineTrack() are used.
return 0;
}
Gabriel Niculescu
committed
//_____________________________________________________________________________
Int_t THcHodoscope::GetScinIndex( Int_t nPlane, Int_t nPaddle ) {
// GN: Return the index of a scintillator given the plane # and the paddle #
// This assumes that both planes and
// paddles start counting from 0!
// Result also counts from 0.
return fNPlanes*nPaddle+nPlane;
Gabriel Niculescu
committed
}
//_____________________________________________________________________________
Int_t THcHodoscope::GetScinIndex( Int_t nSide, Int_t nPlane, Int_t nPaddle ) {
return nSide*fMaxHodoScin+fNPlanes*nPaddle+nPlane-1;
}
//_____________________________________________________________________________
Double_t THcHodoscope::GetPathLengthCentral() {
return fPathLengthCentral;
}
ClassImp(THcHodoscope)
////////////////////////////////////////////////////////////////////////////////