-
Zafar authored
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
Zafar authoredGoldent 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
THcScintillatorPlane.h 4.98 KiB
#ifndef ROOT_THcScintillatorPlane
#define ROOT_THcScintillatorPlane
//////////////////////////////////////////////////////////////////////////////
//
// THcScintillatorPlane
//
// A Hall C scintillator plane
//
// May want to later inherit from a THcPlane class if there are similarities
// in what a plane is shared with other detector types (shower, etc.)
//
//////////////////////////////////////////////////////////////////////////////
#include "THaSubDetector.h"
#include "TClonesArray.h"
class THaEvData;
class THaSignalHit;
class THcScintillatorPlane : public THaSubDetector {
public:
THcScintillatorPlane( const char* name, const char* description,
Int_t planenum, THaDetectorBase* parent = NULL);
THcScintillatorPlane( const char* name, const char* description,
Int_t planenum, Int_t totplanes, THaDetectorBase* parent = NULL);
virtual ~THcScintillatorPlane();
virtual void Clear( Option_t* opt="" );
virtual Int_t Decode( const THaEvData& );
virtual EStatus Init( const TDatime& run_time );
virtual Int_t CoarseProcess( TClonesArray& tracks );
virtual Int_t FineProcess( TClonesArray& tracks );
Bool_t IsTracking() { return kFALSE; }
virtual Bool_t IsPid() { return kFALSE; }
virtual Int_t ProcessHits(TClonesArray* rawhits, Int_t nexthit);
virtual Int_t PulseHeightCorrection();
virtual Int_t AccumulatePedestals(TClonesArray* rawhits, Int_t nexthit);
virtual void CalculatePedestals( );
Int_t GetNelem(); // return number of paddles in this plane
Int_t GetNScinHits(); // return the number of hits in this plane (that pass min/max TDC cuts)
Double_t GetSpacing(); // return the spacing of paddles
Double_t GetSize(); // return paddle size
Double_t GetHodoSlop(); // return the hodo slop
Double_t GetZpos(); //return the z position
Double_t GetDzpos();
Double_t GetPosLeft();
Double_t GetPosRight();
Double_t GetPosOffset();
Double_t GetPosCenter(Int_t PaddleNo); // here we're counting from zero!
Double_t CalcFpTime();
Double_t GetFpTime() {return fpTime;};
Double_t GetFpTime(Int_t index) { return fpTimes[index];};
Double_t GetScinTime(Int_t index) { return fScinTime[index];};
Double_t GetScinSigma(Int_t index) { return fScinSigma[index];};
Double_t GetScinZpos(Int_t index) { return fScinZpos[index];};
Int_t GetNScinGoodHits() const {return fNScinGoodHits;};
TClonesArray* fParentHitList;
TClonesArray* GetPosADC() { return fPosADCHits;}; // Ahmed
TClonesArray* GetNegADC() { return fNegADCHits;}; // Ahmed
TClonesArray* GetPosTDC() { return fPosTDCHits;}; // Ahmed
TClonesArray* GetNegTDC() { return fNegTDCHits;}; // Ahmed
protected:
TClonesArray* frPosTDCHits;
TClonesArray* frNegTDCHits;
TClonesArray* frPosADCHits;
TClonesArray* frNegADCHits;
TClonesArray* fPosTDCHits;
TClonesArray* fNegTDCHits;
TClonesArray* fPosADCHits;
TClonesArray* fNegADCHits;
Int_t fPlaneNum; /* Which plane am I 1-4 */
Int_t fTotPlanes; /* so we can read variables that are not indexed by plane id */
Int_t fNelem; /* Need since we don't inherit from
detector base class */
Int_t fNScinHits; /* Number of hits in this plane */
Int_t fMaxHits; /* maximum number of hits to be considered - useful for dimensioning arrays */
Double_t fSpacing; /* paddle spacing */
Double_t fSize; /* paddle size */
Double_t fZpos; /* z position */
Double_t fDzpos;
Double_t fHodoSlop; /* max allowed slop for this plane */
Double_t fPosLeft; /* NOTE: "left" = "top" for a Y scintillator */
Double_t fPosRight; /* NOTE: "right" = "bottom" for a Y scintillator */
Double_t fPosOffset;
Double_t fPosCenter[16]; /* array with centers for all scintillators in the plane */
Double_t fTolerance; /* need this for PulseHeightCorrection */
/* Pedestal Quantities */
Int_t fNPedestalEvents; /* Number of pedestal events */
Int_t fMinPeds; /* Only analyze/update if num events > */
Int_t *fPosPedSum; /* Accumulators for pedestals */
Int_t *fPosPedSum2;
Int_t *fPosPedLimit;
Int_t *fPosPedCount;
Int_t *fNegPedSum;
Int_t *fNegPedSum2;
Int_t *fNegPedLimit;
Int_t *fNegPedCount;
Double_t *fPosPed;
Double_t *fPosSig;
Double_t *fPosThresh;
Double_t *fNegPed;
Double_t *fNegSig;
Double_t *fNegThresh;
//
Int_t fNScinGoodHits; // number of hits for which both ends of the paddle fired in time!
Double_t fpTime; // the original code only has one fpTime per plane!
Double_t *fpTimes; // ... but also allows for more than one hit per plane
Double_t *fScinTime; // array of scintillator times (only filled for goodhits)
Double_t *fScinSigma; // errors for the above
Double_t *fScinZpos; // zpositions for the above
virtual Int_t ReadDatabase( const TDatime& date );
virtual Int_t DefineVariables( EMode mode = kDefine );
virtual void InitializePedestals( );
ClassDef(THcScintillatorPlane,0); // Scintillator bars in a plane
};
#endif