Skip to content
Snippets Groups Projects
THcHodoscope.cxx 41.3 KiB
Newer Older
  • Learn to ignore specific revisions
  • 	  
    	  // ** 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
      
    
      // cout << endl;
    
      // 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);
          }*/
    
      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;
    }
    
    //_____________________________________________________________________________
    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;
    
    }
    //_____________________________________________________________________________
    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)
    ////////////////////////////////////////////////////////////////////////////////