From f5da09b2dd766cce816b5fe2a61049a4d7980e3a Mon Sep 17 00:00:00 2001 From: Zafar <ahmed24z@uregina.ca> Date: Tue, 19 Aug 2014 14:12:13 -0600 Subject: [PATCH] Golden track. Goldent track is moved to THcHallCSpectrometer::TrackCalc() if fSelUsingScin == 0 then golden track is calculated just like podd. i.e. it is the first track with minimum chi2/ndf with sorting ON if fSelUsingScin == 1 then golden track is calculetd just like engine/HTRACKING/h_select_best_track_using_scin.h. This method gives the best track with minimum value of chi2/ndf but with additional cuts on the tracks. These cuts are on dedx, beta and on energy. This commit also corrects and modifies the beta code written in the THcHodoscope::FineProcess At this point we have godlend track and in additoion to previous vlues the following values are set to a track: Energy, beta, chi2 of beta and dedx[track][first hit]. NOTE: For some tracks we have large differences in value of chi square between ENGINE and hcana and this is already discussed in the last group meeting. Following emails are exchanged regarding this difference of chisquare. email to Mark: Hi Mark, I tried to trace the origin of difference of the chi square value between ENGINE and hcana. Please see the attached file, it has long table which I cannot present in this email. Or you can see the file at the following link, thanks. https://userweb.jlab.org/~zahmed/chi2diff.txt Ahmed Mark's reply: Ahmed, Thanks. I agree with what you see, but there is also another reason for the difference. For the space point in ch2 the engine and hcana choose different left/right combinations. That is why you see the large jump in the summed chi2 from planes 9 and 10. The two codes pick different left/right because there is a cut on the difference between the measured stub xp and an expected xp = sp->GetX()/875 and one code has a combination slightly below the cut value and the other slightly above. I do not see a way to make the codes agree more exactly since the stub fitting involves a matrix inversion. Cheers, Mark --------------------------------------------------------------------------------------- --- src/THcHallCSpectrometer.cxx | 294 +++++++++++++++++++++++++++++++++-- src/THcHallCSpectrometer.h | 57 +++++++ src/THcHodoscope.cxx | 49 +----- src/THcHodoscope.h | 6 +- src/THcScintillatorPlane.cxx | 10 -- 5 files changed, 344 insertions(+), 72 deletions(-) diff --git a/src/THcHallCSpectrometer.cxx b/src/THcHallCSpectrometer.cxx index 7ce0bfc..a5abf58 100644 --- a/src/THcHallCSpectrometer.cxx +++ b/src/THcHallCSpectrometer.cxx @@ -40,6 +40,19 @@ // 'reference distance', corresponding to the pathlength correction // matrix. // +// +// Golden track using scin. Zafar Ahmed. August 19 2014 +// Goldent track is moved to THcHallCSpectrometer::TrackCalc() +// if fSelUsingScin == 0 then golden track is calculated just +// like podd. i.e. it is the first track with minimum chi2/ndf +// with sorting ON +// +// if fSelUsingScin == 1 then golden track is calculetd just like +// engine/HTRACKING/h_select_best_track_using_scin.h. This method +// gives the best track with minimum value of chi2/ndf but with +// additional cuts on the tracks. These cuts are on dedx, beta +// and on energy. +// ////////////////////////////////////////////////////////////////////////// #include "THcHallCSpectrometer.h" @@ -51,11 +64,21 @@ #include "THaTriggerTime.h" #include "TMath.h" #include "TList.h" + +#include "THcRawShowerHit.h" +#include "THcSignalHit.h" #include "THcShower.h" +#include "THcHitList.h" +#include "THcHodoscope.h" +#include <vector> +#include <cstring> +#include <cstdio> +#include <cstdlib> #include <iostream> #include <fstream> +using std::vector; using namespace std; //_____________________________________________________________________________ @@ -74,6 +97,13 @@ THcHallCSpectrometer::THcHallCSpectrometer( const char* name, const char* descri THcHallCSpectrometer::~THcHallCSpectrometer() { // Destructor + + delete [] fX2D; fX2D = NULL; // Ahmed + delete [] fY2D; fY2D = NULL; // Ahmed + + delete [] f2XHits; f2XHits = NULL; // Ahmed + delete [] f2YHits; f2YHits = NULL; // Ahmed + } //_____________________________________________________________________________ @@ -123,6 +153,33 @@ Int_t THcHallCSpectrometer::ReadDatabase( const TDatime& date ) cout << "In THcHallCSpectrometer::ReadDatabase()" << endl; #endif + MAXHODHITS = 30; + + fX2D = new Double_t [MAXHODHITS]; + fY2D = new Double_t [MAXHODHITS]; + + f2XHits = new Int_t [16]; + f2YHits = new Int_t [16]; + + // --------------- To get energy from THcShower ---------------------- + + const char* detector_name = "hod"; + //THaApparatus* app = GetDetector(); + THaDetector* det = GetDetector("hod"); + // THaDetector* det = app->GetDetector( shower_detector_name ); + + if( !dynamic_cast<THcHodoscope*>(det) ) { + Error("THcHallCSpectrometer", "Cannot find hodoscope detector %s", + detector_name ); + return fStatus = kInitError; + } + + fHodo = static_cast<THcHodoscope*>(det); // fHodo is a membervariable + // fShower = static_cast<THcShower*>(det); // fShower is a membervariable + + // --------------- To get energy from THcShower ---------------------- + + // Get the matrix element filename from the variable store // Read in the matrix @@ -137,19 +194,34 @@ Int_t THcHallCSpectrometer::ReadDatabase( const TDatime& date ) string reconCoeffFilename; DBRequest list[]={ - {"_recon_coeff_filename",&reconCoeffFilename,kString}, - {"theta_offset",&fThetaOffset,kDouble}, - {"phi_offset",&fPhiOffset,kDouble}, - {"delta_offset",&fDeltaOffset,kDouble}, - {"thetacentral_offset",&fThetaCentralOffset,kDouble}, - {"_oopcentral_offset",&fOopCentralOffset,kDouble}, - {"pcentral_offset",&fPCentralOffset,kDouble}, - {"pcentral",&fPCentral,kDouble}, - {"theta_lab",&fTheta_lab,kDouble}, + {"_recon_coeff_filename", &reconCoeffFilename, kString }, + {"theta_offset", &fThetaOffset, kDouble }, + {"phi_offset", &fPhiOffset, kDouble }, + {"delta_offset", &fDeltaOffset, kDouble }, + {"thetacentral_offset", &fThetaCentralOffset, kDouble }, + {"_oopcentral_offset", &fOopCentralOffset, kDouble }, + {"pcentral_offset", &fPCentralOffset, kDouble }, + {"pcentral", &fPCentral, kDouble }, + {"theta_lab", &fTheta_lab, kDouble }, + {"sel_using_scin", &fSelUsingScin, kInt, 0, 1}, + {"sel_ndegreesmin", &fSelNDegreesMin, kDouble, 0, 1}, + {"sel_dedx1min", &fSeldEdX1Min, kDouble, 0, 1}, + {"sel_dedx1max", &fSeldEdX1Max, kDouble, 0, 1}, + {"sel_betamin", &fSelBetaMin, kDouble, 0, 1}, + {"sel_betamax", &fSelBetaMax, kDouble, 0, 1}, + {"sel_etmin", &fSelEtMin, kDouble, 0, 1}, + {"sel_etmax", &fSelEtMax, kDouble, 0, 1}, + {"hodo_num_planes", &fNPlanes, kInt }, + {"scin_2x_zpos", &fScin2XZpos, kDouble, 0, 1}, + {"scin_2x_dzpos", &fScin2XdZpos, kDouble, 0, 1}, + {"scin_2y_zpos", &fScin2YZpos, kDouble, 0, 1}, + {"scin_2y_dzpos", &fScin2YdZpos, kDouble, 0, 1}, {0} }; gHcParms->LoadParmValues((DBRequest*)&list,prefix); // + + cout << "\n\n\nhodo planes = " << fNPlanes << endl; cout << " fPcentral = " << fPCentral << " " <<fPCentralOffset << endl; cout << " fThate_lab = " << fTheta_lab << " " <<fThetaCentralOffset << endl; fPCentral= fPCentral*(1.+fPCentralOffset/100.); @@ -228,6 +300,8 @@ Int_t THcHallCSpectrometer::FindVertices( TClonesArray& tracks ) // In Hall C, we do the target traceback here since the traceback should // not depend on which tracking detectors are used. + fNtracks = tracks.GetLast()+1; + for (Int_t it=0;it<tracks.GetLast()+1;it++) { THaTrack* track = static_cast<THaTrack*>( tracks[it] ); @@ -281,6 +355,10 @@ Int_t THcHallCSpectrometer::FindVertices( TClonesArray& tracks ) track->SetMomentum(fPCentral*(1+track->GetDp()/100.0)); } + + // ------------------ Moving it to TrackCalc -------------------- + + /* // If enabled, sort the tracks by chi2/ndof if( GetTrSorting() ) fTracks->Sort(); @@ -305,13 +383,208 @@ Int_t THcHallCSpectrometer::FindVertices( TClonesArray& tracks ) } else fGoldenTrack = NULL; + */ + // ------------------ Moving it to TrackCalc -------------------- + return 0; } //_____________________________________________________________________________ Int_t THcHallCSpectrometer::TrackCalc() { - // Additioal track calculations. At present, we only calculate beta here. + + if ( fSelUsingScin == 0 ) { + + if( GetTrSorting() ) + fTracks->Sort(); + + // Find the "Golden Track". + // if( GetNTracks() > 0 ) { + if( fNtracks > 0 ) { + // Select first track in the array. If there is more than one track + // and track sorting is enabled, then this is the best fit track + // (smallest chi2/ndof). Otherwise, it is the track with the best + // geometrical match (smallest residuals) between the U/V clusters + // in the upper and lower VDCs (old behavior). + // + // Chi2/dof is a well-defined quantity, and the track selected in this + // way is immediately physically meaningful. The geometrical match + // criterion is mathematically less well defined and not usually used + // in track reconstruction. Hence, chi2 sortiing is preferable, albeit + // obviously slower. + + fGoldenTrack = static_cast<THaTrack*>( fTracks->At(0) ); + fTrkIfo = *fGoldenTrack; + fTrk = fGoldenTrack; + } else + fGoldenTrack = NULL; + } + + if ( fSelUsingScin == 1 ){ + if( fNtracks > 0 ) { + + Double_t fY2Dmin, fX2Dmin, fZap, ft, fChi2PerDeg; //, fShowerEnergy; + Double_t fHitPos4, fHitPos3, fHitDist3, fHitDist4; //, fChi2Min; + Int_t i, j, itrack, ip, ihit; //, fGoodTimeIndex = -1; + Int_t fHitCnt4, fHitCnt3, fRawIndex = -1, fGoodRawPad; + + fChi2Min = 10000000000.0; fGoodTrack = -1; fY2Dmin = 100.; + fX2Dmin = 100.; fZap = 0.; + + for ( itrack = 0; itrack < fNtracks; itrack++ ){ + + THaTrack* goodTrack = static_cast<THaTrack*>( fTracks->At(itrack) ); + if (!goodTrack) return -1; + + if ( goodTrack->GetNDoF() > fSelNDegreesMin ){ + fChi2PerDeg = goodTrack->GetChi2() / goodTrack->GetNDoF(); + + if( ( goodTrack->GetDedx() > fSeldEdX1Min ) && + ( goodTrack->GetDedx() < fSeldEdX1Max ) && + ( goodTrack->GetBeta() > fSelBetaMin ) && + ( goodTrack->GetBeta() < fSelBetaMax ) && + ( goodTrack->GetEnergy() > fSelEtMin ) && + ( goodTrack->GetEnergy() < fSelEtMax ) ) + { + + for ( j = 0; j < 16; j++ ){ f2XHits[j] = 0; } + for ( j = 0; j < 16; j++ ){ f2YHits[j] = 0; } + + for ( ip = 0; ip < fNPlanes; ip++ ){ + for ( ihit = 0; ihit < fHodo->GetNScinHits(ip); ihit++ ){ + fRawIndex ++; + fGoodRawPad = fHodo->GetGoodRawPad(fRawIndex)-1; + + if ( ip == 2 ) + f2XHits[fGoodRawPad] = 0; + + if ( ip == 3 ) + f2YHits[fGoodRawPad] = 0; + + } // loop over hits of a plane + } // loop over planes + + fHitPos4 = goodTrack->GetY() + goodTrack->GetPhi() * ( fScin2YZpos + 0.5 * fScin2YdZpos ); + fHitCnt4 = TMath::Nint( ( fHodo->GetHodoCenter4() - fHitPos4 ) / fHodo->GetScin2YSpacing() ) + 1; + fHitCnt4 = TMath::Max( TMath::Min(fHitCnt4,TMath::Nint(10) ) , 1); // scin_2y_nr = 10 + fHitDist4 = fHitPos4 - ( fHodo->GetHodoCenter4() - fHodo->GetScin2YSpacing() * ( fHitCnt4 - 1 ) ); + + //---------------------------------------------------------------- + + if ( fNtracks > 1 ){ // Plane 4 + fZap = 0.; + ft = 0; + + for ( i = 0; i < 10; i++ ){ + + if ( f2YHits[fGoodRawPad] == 1 ) { + + fY2D[itrack] = TMath::Abs(fHitCnt4-i-1); + ft ++; + + if ( ft == 1 ) fZap = fY2D[itrack]; + if ( ( ft == 2 ) && ( fY2D[itrack] < fZap ) ) fZap = fY2D[itrack]; + if ( ( ft == 3 ) && ( fY2D[itrack] < fZap ) ) fZap = fY2D[itrack]; + if ( ( ft == 4 ) && ( fY2D[itrack] < fZap ) ) fZap = fY2D[itrack]; + if ( ( ft == 5 ) && ( fY2D[itrack] < fZap ) ) fZap = fY2D[itrack]; + if ( ( ft == 6 ) && ( fY2D[itrack] < fZap ) ) fZap = fY2D[itrack]; + + } // condition for fHodScinHit[4][i] + } // loop over 10 + fY2D[itrack] = fZap; + } // condition for track. Plane 4 + + if ( fNtracks == 1 ) fY2D[itrack] = 0.; + + fHitPos3 = goodTrack->GetX() + goodTrack->GetTheta() * ( fScin2XZpos + 0.5 * fScin2XdZpos ); + fHitCnt3 = TMath::Nint( ( fHitPos3 - fHodo->GetHodoCenter3() ) / fHodo->GetScin2XSpacing() ) + 1; + fHitCnt3 = TMath::Max( TMath::Min(fHitCnt3,TMath::Nint(16) ) , 1); // scin_2x_nr = 16 + fHitDist3 = fHitPos3 - ( fHodo->GetScin2XSpacing() * ( fHitCnt3 - 1 ) + fHodo->GetHodoCenter3() ); + + //---------------------------------------------------------------- + + if ( fNtracks > 1 ){ // Plane 3 + fZap = 0.; + ft = 0; + + for ( i = 0; i < 16; i++ ){ + if ( f2XHits[fGoodRawPad] == 1 ) { + fX2D[itrack] = TMath::Abs(fHitCnt3-i-1); + ft ++; + if ( ft == 1 ) fZap = fX2D[itrack]; + if ( ( ft == 2 ) && ( fX2D[itrack] < fZap ) ) fZap = fX2D[itrack]; + if ( ( ft == 3 ) && ( fX2D[itrack] < fZap ) ) fZap = fX2D[itrack]; + if ( ( ft == 4 ) && ( fX2D[itrack] < fZap ) ) fZap = fX2D[itrack]; + if ( ( ft == 5 ) && ( fX2D[itrack] < fZap ) ) fZap = fX2D[itrack]; + if ( ( ft == 6 ) && ( fX2D[itrack] < fZap ) ) fZap = fX2D[itrack]; + + } // condition for fHodScinHit[4][i] + } // loop over 16 + fX2D[itrack] = fZap; + } // condition for track. Plane 3 + + //---------------------------------------------------------------- + + if ( fNtracks == 1 ) + fX2D[itrack] = 0.; + + if ( fY2D[itrack] <= fY2Dmin ) { + if ( fY2D[itrack] < fY2Dmin ) { + fX2Dmin = 100.; + fChi2Min = 10000000000.; + } // fY2D min + + if ( fX2D[itrack] <= fX2Dmin ){ + if ( fX2D[itrack] < fX2Dmin ){ + fChi2Min = 10000000000.0; + } // condition fX2D + if ( fChi2PerDeg < fChi2Min ){ + + fGoodTrack = itrack; // fGoodTrack = itrack + fY2Dmin = fY2D[itrack]; + fX2Dmin = fX2D[itrack]; + fChi2Min = fChi2PerDeg; + + fGoldenTrack = static_cast<THaTrack*>( fTracks->At( fGoodTrack ) ); + fTrkIfo = *fGoldenTrack; + fTrk = fGoldenTrack; + } + } // condition fX2D + } // condition fY2D + } // conditions for dedx, beta and trac energy + + } // confition for fNFreeFP greater than fSelNDegreesMin + } // loop over tracks + + if ( fGoodTrack == -1 ){ + + fChi2Min = 10000000000.0; + for (Int_t iitrack = 0; iitrack < fNtracks; iitrack++ ){ + THaTrack* aTrack = dynamic_cast<THaTrack*>( fTracks->At(iitrack) ); + if (!aTrack) return -1; + + if ( aTrack->GetNDoF() > fSelNDegreesMin ){ + fChi2PerDeg = aTrack->GetChi2() / aTrack->GetNDoF(); + + if ( fChi2PerDeg < fChi2Min ){ + + fGoodTrack = iitrack; + fChi2Min = fChi2PerDeg; + + fGoldenTrack = static_cast<THaTrack*>( fTracks->At(fGoodTrack) ); + fTrkIfo = *fGoldenTrack; + fTrk = fGoldenTrack; + + } + } + } // loop over trakcs + + } // Condition for fNtrack > 0 + + } else // condtion fSelUsingScin == 1 + fGoldenTrack = NULL; + + } return TrackTimes( fTracks ); } @@ -323,6 +596,7 @@ Int_t THcHallCSpectrometer::TrackTimes( TClonesArray* Tracks ) { // // To be useful, a meaningful timing resolution should be assigned // to each Scintillator object (part of the database). + return 0; } diff --git a/src/THcHallCSpectrometer.h b/src/THcHallCSpectrometer.h index f906546..0bbb522 100644 --- a/src/THcHallCSpectrometer.h +++ b/src/THcHallCSpectrometer.h @@ -9,6 +9,29 @@ #include "THaSpectrometer.h" +#include <vector> + +#include "TClonesArray.h" +#include "THaNonTrackingDetector.h" +#include "THcHitList.h" +#include "THcHodoscopeHit.h" +#include "THcScintillatorPlane.h" +#include "THcShower.h" + +//#include "THaTrackingDetector.h" +//#include "THcHitList.h" +#include "THcRawDCHit.h" +#include "THcSpacePoint.h" +#include "THcDriftChamberPlane.h" +#include "THcDriftChamber.h" +#include "TMath.h" + +#include "THaSubDetector.h" +#include "TClonesArray.h" +#include <iostream> +#include <fstream> + + //class THaScintillator; class THcHallCSpectrometer : public THaSpectrometer { @@ -30,6 +53,40 @@ public: protected: void InitializeReconstruction(); + Int_t MAXHODHITS; + + Int_t fGoodTrack; + Int_t fSelUsingScin; + Int_t fNPlanes; + Int_t fNtracks; + + Int_t* f2XHits; + Int_t* f2YHits; + + Double_t* fX2D; + Double_t* fY2D; + + Double_t fChi2Min; + Double_t fSelNDegreesMin; + Double_t fSeldEdX1Min; + Double_t fSeldEdX1Max; + Double_t fSelBetaMin; + Double_t fSelBetaMax; + Double_t fSelEtMin; + Double_t fSelEtMax; + Double_t fScin2XZpos; + Double_t fScin2XdZpos; + Double_t fScin2YZpos; + Double_t fScin2YdZpos; + + Double_t fHodoCenter4, fHodoCenter3; + Double_t fScin2YSpacing, fScin2XSpacing; + + // Int_t** fHodScinHit; // [4] Array + + THcShower* fShower; + THcHodoscope* fHodo; + // Should look at the ThaMatrixElement class in THaVDC.h for better way // to store matrix element data #define fMaxReconElements 1000 diff --git a/src/THcHodoscope.cxx b/src/THcHodoscope.cxx index d00b98d..ff575d4 100644 --- a/src/THcHodoscope.cxx +++ b/src/THcHodoscope.cxx @@ -441,18 +441,8 @@ Int_t THcHodoscope::ReadDatabase( const TDatime& date ) fHodoNegInvAdcAdc=new Double_t [fMaxHodoScin]; - prefix[1]='\0'; DBRequest list[]={ - // {"scin_2x_zpos", &fScin2XZpos, kDouble, 0, 1}, - // {"scin_2x_dzpos", &fScin2XdZpos, kDouble, 0, 1}, - // {"scin_2y_zpos", &fScin2YZpos, kDouble, 0, 1}, - // {"scin_2y_dzpos", &fScin2YdZpos, kDouble, 0, 1}, - // {"sel_betamin", &fSelBetaMin, kDouble, 0, 1}, - // {"sel_dedx1min", &fSeldEdX1Min, kDouble, 0, 1}, - // {"sel_dedx1max", &fSeldEdX1Max, kDouble, 0, 1}, - // {"sel_using_scin", &fSelUsingScin, kInt, 0, 1}, - // {"sel_ndegreesmin", &fSelNDegreesMin, kDouble, 0, 1}, {"start_time_center", &fStartTimeCenter, kDouble}, {"start_time_slop", &fStartTimeSlop, kDouble}, {"scin_tdc_to_time", &fScinTdcToTime, kDouble}, @@ -478,20 +468,6 @@ Int_t THcHodoscope::ReadDatabase( const TDatime& date ) fTofTolerance = 3.0; // Default if not defined gHcParms->LoadParmValues((DBRequest*)&list,prefix); - - cout << "\n\n\n\n\n\nPaddles1x = " << fNPaddle[0] - << "\nscin_2y_zpos = " << fScin2YZpos - << "\nscin_2y_dzpos = " << fScin2YdZpos - << endl; - // << "\ndedx max = " << fSeldEdX1Max - // << "\nbeta min = " << fSelBetaMin - // << "\nbeta max = " << fSelBetaMax - // << "\net min = " << fSelEtMin - // << "\net max = " << fSelEtMax - - // << endl; - - if (fTofUsingInvAdc) { DBRequest list2[]={ {"hodo_pos_invadc_offset",&fHodoPosInvAdcOffset[0],kDouble,fMaxHodoScin}, @@ -1202,14 +1178,6 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks ) // } // --------------------------------------------------------------------------- - - // fdEdX[itrack][ihit] = 5.0; - - - // -------------------------------------------------------------------------------------------- - // Date: July 8 201 May be we need this, not sure. - // - if ( fGoodTDCPos[fGoodTimeIndex] ){ if ( fGoodTDCNeg[fGoodTimeIndex] ){ @@ -1245,11 +1213,6 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks ) } // Second loop over hits of a scintillator plane ends here } // Loop over scintillator planes ends here - //------------------------------------------------------------------------------ - //------------------------------------------------------------------------------ - //------------------------------------------------------------------------------ - //------------------------------------------------------------------------------ - //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ @@ -1336,13 +1299,7 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks ) // -------------------------------------------------------------------- // -------------------------------------------------------------------- - // -------------------------------------------------------------------- - // -------------------------------------------------------------------- - // -------------------------------------------------------------------- - // -------------------------------------------------------------------- - // -------------------------------------------------------------------- - // -------------------------------------------------------------------- - + // -------------------------------------------------------------------- } else { @@ -1371,10 +1328,6 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks ) } } - - // fBetaChisq[itrack] - // fFPTime[ind] - theTrack->SetDedx(fdEdX[itrack][0]); theTrack->SetBeta(fBeta[itrack]); theTrack->SetBetaChi2( fBetaChisq[itrack] ); diff --git a/src/THcHodoscope.h b/src/THcHodoscope.h index 87c9f5a..a41a2dd 100644 --- a/src/THcHodoscope.h +++ b/src/THcHodoscope.h @@ -78,7 +78,7 @@ public: // Double_t GetBeta() const {return fBeta[];} - Double_t GetBeta(Int_t iii) const {return fBeta[iii];} // Ahmed + Double_t GetBeta(Int_t iii) const {return fBeta[iii];} Int_t GetEvent(){ return fCheckEvent;} Double_t GetHodoPosSigma(Int_t iii) const {return fHodoPosSigma[iii];} @@ -92,8 +92,6 @@ public: THcHodoscope(); // for ROOT I/O protected: - // std::vector<bool> myScinGoodTime; // Ahmed - Int_t fAnalyzePedestals; // Calibration @@ -143,7 +141,7 @@ protected: TClonesArray* fTrackProj; // projection of track onto scintillator plane // and estimated match to TOF paddle - //-------------------------- Ahmed ----------------------------- + //-------------------------- Beta variables ----------------------------- THcShower* fShower; diff --git a/src/THcScintillatorPlane.cxx b/src/THcScintillatorPlane.cxx index f85baad..a107ba0 100644 --- a/src/THcScintillatorPlane.cxx +++ b/src/THcScintillatorPlane.cxx @@ -338,10 +338,6 @@ Int_t THcScintillatorPlane::ProcessHits(TClonesArray* rawhits, Int_t nexthit) fGoodRawPadNum[fNScinHits] = hit->fCounter; - // cout << " plane = " << fPlaneNum << " hit = " << fNScinHits + 1 - // << " index = " << fNScinHits - // << " raw pad = " << fGoodRawPadNum[fNScinHits] << endl; - //TDC positive hit THcSignalHit *sighit = (THcSignalHit*) fPosTDCHits->ConstructedAt(nPosTDCHits++); sighit->Set(padnum, hit->fTDC_pos); @@ -357,9 +353,6 @@ Int_t THcScintillatorPlane::ProcessHits(TClonesArray* rawhits, Int_t nexthit) fNScinHits++; } else { - //cout <<"pos TDC "<<hit->fTDC_pos<<" "<<mintdc<<" "<<maxtdc<<endl; - //cout <<"neg TDC "<<hit->fTDC_neg<<" "<<mintdc<<" "<<maxtdc<<endl; - //cout <<"skipping BAD tdc event\n"; } ihit++; } @@ -425,9 +418,6 @@ Int_t THcScintillatorPlane::PulseHeightCorrection() postime[i]=((THcSignalHit*) fPosTDCHits->At(i))->GetData()*tdctotime; j=((THcSignalHit*)fPosTDCHits->At(i))->GetPaddleNumber()-1; index=((THcHodoscope *)GetParent())->GetScinIndex(fPlaneNum-1,j); - - // cout << "THcScintillatorPlane: index = " << index << endl; - postime[i]=postime[i]-((THcHodoscope *)GetParent())->GetHodoPosPhcCoeff(index)* TMath::Sqrt(TMath::Max(0.,(pos_ph[i]/((THcHodoscope *)GetParent())->GetHodoPosMinPh(index)-1))); postime[i]=postime[i]-((THcHodoscope *)GetParent())->GetHodoPosTimeOffset(index); -- GitLab