-
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
THcDCTrack.cxx 1.73 KiB
///////////////////////////////////////////////////////////////////////////////
// //
// THcDCTrack //
// //
// Class representing a track found from linking DC Space points //
///////////////////////////////////////////////////////////////////////////////
#include "THcDCHit.h"
#include "THcDCTrack.h"
#include "THcSpacePoint.h"
THcDCTrack::THcDCTrack(Int_t nplanes) : fnSP(0), fNHits(0)
{
fHits.clear();
fCoords.resize(nplanes);
fResiduals.resize(nplanes);
fDoubleResiduals.resize(nplanes);
}
void THcDCTrack::AddHit(THcDCHit * hit, Double_t dist, Int_t lr)
{
// Add a hit to the track
Hit newhit;
newhit.dchit = hit;
newhit.distCorr = dist;
newhit.lr = lr;
fHits.push_back(newhit);
fNHits++;
}
void THcDCTrack::AddSpacePoint( THcSpacePoint* sp )
{
// Add to list of space points in this track
// Need a check for maximum spacepoints of 10
fSp[fnSP++] = sp;
// Copy all the hits from the space point into the track
// Will need to also copy the corrected distance and lr information
for(Int_t ihit=0;ihit<sp->GetNHits();ihit++) {
AddHit(sp->GetHit(ihit),sp->GetHitDist(ihit),sp->GetHitLR(ihit));
}
}
void THcDCTrack::Clear( const Option_t* )
{
// Clear the space point and hit lists
fnSP = 0;
ClearHits();
// Need to set default values (0 or -100)
//fCoords.clear();
//fResiduals.clear();
//fDoubleResiduals.clear();
}
void THcDCTrack::ClearHits( )
{
fNHits = 0;
fHits.clear();
}
ClassImp(THcDCTrack)
///////////////////////////////////////////////////////////////////////////////