-
Stephen A. Wood authored
{prefix}dc_fix_lr Historically, in the ENGINE, if a hit is used in multiple space points/stubs, the left/right assignment for that hit, which is later used in track fitting, is that assigned for the last stub encountered with that hit. Properly, the left right assignment should be allowed to be different in different space points. If this parameter is set to zero (e.g. in hcana.param), then the ENGINE behavior is used. For new analyses, it should be set to one. (Which is the default) {prefix}dc_fix_propcorr When a hit gets put into a stub, the distance of the hit from the discriminator can then be estimated. In the engine, a correction to the drift time (and thus drift distance) is applied. However, if that hit ends up in another stub, the correction will get applied again, resulting in a over correction. Setting this flag to 1 will give that hit a different corection for each stub that it is in. These flags will default to the new "correct" way of handling hits if the above parameters are not set in a parameter file. Currently, both flags are set to zero in hcana.param to replicate the ENGINE behavior. To implement these changes, the propagation correction and L/R information for each hit is saved in space point and track classes. This information is still saved in the hit class, but only used if in ENGINE compatibility mode. The THcDCTrack class now saves a list of space point pointers instead of space point indices. The AddSpacePoint method now also copies all the hit information into the track object so that THcDC doesn't need to explicitely copy all the hits. The FindStub method, which fits a stub track to a space point is passed the space point rather than a list of hits
Stephen A. Wood authored{prefix}dc_fix_lr Historically, in the ENGINE, if a hit is used in multiple space points/stubs, the left/right assignment for that hit, which is later used in track fitting, is that assigned for the last stub encountered with that hit. Properly, the left right assignment should be allowed to be different in different space points. If this parameter is set to zero (e.g. in hcana.param), then the ENGINE behavior is used. For new analyses, it should be set to one. (Which is the default) {prefix}dc_fix_propcorr When a hit gets put into a stub, the distance of the hit from the discriminator can then be estimated. In the engine, a correction to the drift time (and thus drift distance) is applied. However, if that hit ends up in another stub, the correction will get applied again, resulting in a over correction. Setting this flag to 1 will give that hit a different corection for each stub that it is in. These flags will default to the new "correct" way of handling hits if the above parameters are not set in a parameter file. Currently, both flags are set to zero in hcana.param to replicate the ENGINE behavior. To implement these changes, the propagation correction and L/R information for each hit is saved in space point and track classes. This information is still saved in the hit class, but only used if in ENGINE compatibility mode. The THcDCTrack class now saves a list of space point pointers instead of space point indices. The AddSpacePoint method now also copies all the hit information into the track object so that THcDC doesn't need to explicitely copy all the hits. The FindStub method, which fits a stub track to a space point is passed the space point rather than a list of hits
THcDCHit.h 3.27 KiB
#ifndef ROOT_THcDCHit
#define ROOT_THcDCHit
///////////////////////////////////////////////////////////////////////////////
// //
// THcDCHit //
// //
///////////////////////////////////////////////////////////////////////////////
#include "TObject.h"
#include "THcDCWire.h"
#include "THcDriftChamberPlane.h"
#include "THcDriftChamber.h"
#include <cstdio>
class THcDCHit : public TObject {
public:
THcDCHit( THcDCWire* wire=NULL, Int_t rawtime=0, Double_t time=0.0,
THcDriftChamberPlane* wp=0) :
fWire(wire), fRawTime(rawtime), fTime(time), fWirePlane(wp),
fDist(0.0), ftrDist(kBig) {
ConvertTimeToDist();
fCorrected = 0;
}
virtual ~THcDCHit() {}
virtual Double_t ConvertTimeToDist();
Int_t Compare ( const TObject* obj ) const;
Bool_t IsSortable () const { return kTRUE; }
virtual void Print( Option_t* opt="" ) const;
// Get and Set Functions
THcDCWire* GetWire() const { return fWire; }
Int_t GetWireNum() const { return fWire->GetNum(); }
Int_t GetRawTime() const { return fRawTime; }
Double_t GetTime() const { return fTime; }
Double_t GetDist() const { return fDist; }
Double_t GetPos() const { return fWire->GetPos(); } //Position of hit wire
Double_t GetCoord() const { return fCoord; }
Double_t GetdDist() const { return fdDist; }
Int_t GetCorrectedStatus() const { return fCorrected; }
THcDriftChamberPlane* GetWirePlane() const { return fWirePlane; }
void SetWire(THcDCWire * wire) { fWire = wire; }
void SetRawTime(Int_t time) { fRawTime = time; }
void SetTime(Double_t time) { fTime = time; }
void SetDist(Double_t dist) { fDist = dist; }
void SetLeftRight(Int_t lr) { fCoord = GetPos() + lr*fDist; fLR=lr;}
Int_t GetLR() { return fLR; }
void SetdDist(Double_t ddist) { fdDist = ddist; }
void SetFitDist(Double_t dist) { ftrDist = dist; }
Int_t GetPlaneNum() const { return fWirePlane->GetPlaneNum(); }
Int_t GetPlaneIndex() const { return fWirePlane->GetPlaneIndex(); }
Int_t GetChamberNum() const { return fWirePlane->GetChamberNum(); }
void SetCorrectedStatus(Int_t c) { fCorrected = c; }
protected:
static const Double_t kBig; //!
THcDCWire* fWire; // Wire on which the hit occurred
Int_t fRawTime; // TDC value (channels)
Double_t fTime; // Time corrected for time offset of wire (s)
THcDriftChamberPlane* fWirePlane; //! Pointer to parent wire plane
Double_t fDist; // (Perpendicular) Drift Distance
Int_t fLR; // +1/-1 which side of wire
Double_t fCoord; // Actual coordinate of hit
Double_t fdDist; // uncertainty in fDist (for chi2 calc)
Double_t ftrDist; // (Perpendicular) distance from the track
Int_t fCorrected; // Has this hit been corrected?
THcDriftChamber* fChamber; //! Pointer to parent wire plane
private:
THcDCHit( const THcDCHit& );
THcDCHit& operator=( const THcDCHit& );
ClassDef(THcDCHit,2) // VDCHit class
};
////////////////////////////////////////////////////////////////////////////////
#endif