Hall C ROOT/C++ Analyzer (hcana)
THcDriftChamber Class Reference

Subdetector class for a single drift chamber with several planes.

This class will be created by the THcDC class which will also create the plane objects.

The THcDC class will then pass this class a list of the planes.

Definition at line 37 of file THcDriftChamber.h.

Public Member Functions

virtual void AddPlane (THcDriftChamberPlane *plane)
 
virtual Int_t ApplyCorrections (void)
 
virtual void Clear (Option_t *opt="")
 
virtual void CorrectHitTimes (void)
 
virtual Int_t Decode (const THaEvData &)
 
virtual Int_t FindSpacePoints (void)
 
Int_t GetChamberNum () const
 
Int_t GetNHits () const
 
Int_t GetNSpacePoints () const
 
Int_t GetNTracks () const
 
TClonesArrayGetSpacePointsP () const
 
const TClonesArrayGetTrackHits () const
 
Double_t GetZPos () const
 
virtual EStatus Init (const TDatime &run_time)
 
virtual void LeftRight (void)
 
virtual Int_t NewFindSpacePoints (void)
 
virtual void PrintDecode (void)
 
virtual void ProcessHits (void)
 
void SetHMSStyleFlag (Int_t flag)
 
 THcDriftChamber (const char *name, const char *description, Int_t chambernum, THaDetectorBase *parent=NULL)
 
 THcDriftChamber ()
 
virtual ~THcDriftChamber ()
 

Protected Member Functions

void ChooseSingleHit (void)
 
UInt_t Count1Bits (UInt_t x)
 
virtual Int_t DefineVariables (EMode mode=kDefine)
 
void DeleteArrays ()
 
Int_t DestroyPoorSpacePoints (void)
 
Int_t FindEasySpacePoint_HMS (Int_t yplane_hitind, Int_t yplanep_hitind)
 
Int_t FindEasySpacePoint_SOS (Int_t xplane_hitind, Int_t xplanep_hitind)
 
Int_t FindHardSpacePoints (void)
 
Double_t FindStub (Int_t nhits, THcSpacePoint *sp, Int_t *plane_list, UInt_t bitpat, Int_t *plusminus, Double_t *stub)
 
virtual Int_t ReadDatabase (const TDatime &date)
 
void SelectSpacePoints (void)
 
void Setup (const char *name, const char *description)
 
Int_t SpacePointMultiWire (void)
 

Protected Attributes

Int_t f
 
std::map< int, TMatrixDfAA3Inv
 
Int_t fChamberNum
 
Double_tfCosBeta
 
Int_t fdebugstubchisq
 
Int_t fEasySpacePoint
 
Int_t fFixPropagationCorrection
 
Int_t fhdebugflagpr
 
std::vector< THcDCHit * > fHits
 
Int_t fHMSStyleChambers
 
Double_t fMaxDist
 
Int_t fMaxHits
 
Int_t fMinCombos
 
Int_t fMinHits
 
Int_t fN_True_RawHits
 
Int_t fNhits
 
Int_t fNPlanes
 
Int_t fNSpacePoints
 
Int_t fNthits
 
Int_t fNUPlaneClusters
 
Int_t fNUXPlaneClusters
 
Int_t fNVPlaneClusters
 
Int_t fNVXPlaneClusters
 
Int_t fNXPlaneClusters
 
THaDetectorBase * fParent
 
std::vector< THcDriftChamberPlane * > fPlanes
 
Double_tfPsi0
 
Double_t fRatio_xpfp_to_xfp
 
Int_t fRemove_Sppt_If_One_YPlane
 
Double_tfSigma
 
Double_tfSinBeta
 
Int_t fSmallAngleApprox
 
Double_t fSpacePointCriterion
 
TClonesArrayfSpacePoints
 
SpacePointHitOutputData fSpHit
 
Double_t ** fStubCoefs
 
Double_t fStubMaxXPDiff
 
Double_tfTanBeta
 
TClonesArrayfTrackProj
 
TClonesArrayfUPlaneClusters
 
TClonesArrayfUXPlaneClusters
 
TClonesArrayfVPlaneClusters
 
TClonesArrayfVXPlaneClusters
 
Double_t fWireVelocity
 
Double_t fXCenter
 
TClonesArrayfXPlaneClusters
 
Double_t fYCenter
 
Double_t fZPos
 
Double_tstubcoef [4]
 
Int_t XPlaneInd
 
Int_t XPlaneNum
 
Int_t XPlanePInd
 
Int_t XPlanePNum
 
Int_t YPlaneInd
 
Int_t YPlaneNum
 
Int_t YPlanePInd
 
Int_t YPlanePNum
 

#include <THcDriftChamber.h>

Inheritance diagram for THcDriftChamber:

Constructor & Destructor Documentation

THcDriftChamber::THcDriftChamber ( const char *  name,
const char *  description,
Int_t  chambernum,
THaDetectorBase *  parent = NULL 
)

Definition at line 39 of file THcDriftChamber.cxx.

THcDriftChamber::~THcDriftChamber ( )
virtual

Definition at line 1612 of file THcDriftChamber.cxx.

THcDriftChamber::THcDriftChamber ( )

Definition at line 64 of file THcDriftChamber.cxx.

Member Function Documentation

void THcDriftChamber::AddPlane ( THcDriftChamberPlane plane)
virtual

Definition at line 105 of file THcDriftChamber.cxx.

Int_t THcDriftChamber::ApplyCorrections ( void  )
virtual

Definition at line 1662 of file THcDriftChamber.cxx.

void THcDriftChamber::ChooseSingleHit ( void  )
protected

Look at all hits in a space point. If two hits are in the same plane, reject the one with the longer drift time.

Definition at line 1109 of file THcDriftChamber.cxx.

void THcDriftChamber::Clear ( Option_t opt = "")
inlinevirtual

Definition at line 1651 of file THcDriftChamber.cxx.

void THcDriftChamber::CorrectHitTimes ( void  )
virtual

Use the rough hit positions in the chambers to correct the drift time for hits in the space points.

Assume all wires for a plane are read out on the same side (l/r or t/b). If the wire is closer to horizontal, read out left/right. If nearer vertical, assume top/bottom. (Note, this is not always true for the SOS u and v planes. They have 1 card each on the side, but the overall time offset per card will cancel much of the error caused by this. The alternative is to check by card, rather than by plane and this is harder.

Definition at line 1203 of file THcDriftChamber.cxx.

UInt_t THcDriftChamber::Count1Bits ( UInt_t  x)
protected

Definition at line 1333 of file THcDriftChamber.cxx.

Int_t THcDriftChamber::Decode ( const THaEvData evdata)
virtual

Definition at line 85 of file THcDriftChamber.cxx.

Int_t THcDriftChamber::DefineVariables ( EMode  mode = kDefine)
protectedvirtual

Definition at line 237 of file THcDriftChamber.cxx.

void THcDriftChamber::DeleteArrays ( )
protected

Definition at line 1637 of file THcDriftChamber.cxx.

Int_t THcDriftChamber::DestroyPoorSpacePoints ( void  )
protected

Definition at line 895 of file THcDriftChamber.cxx.

Int_t THcDriftChamber::FindEasySpacePoint_HMS ( Int_t  yplane_hitind,
Int_t  yplanep_hitind 
)
protected

Simplified HMS find_space_point routing. It is given all y hits and checks to see if all x-like hits are close enough together to make a space point.

This is used for the old style HMS drift chambers, so is not used for any data since the new HMS chambers were installed before the Fall 2017 run.

Definition at line 635 of file THcDriftChamber.cxx.

Int_t THcDriftChamber::FindEasySpacePoint_SOS ( Int_t  xplane_hitind,
Int_t  xplanep_hitind 
)
protected

Simplified SOS find_space_point routing. It is given all x hits and checks to see if all y-like hits are close enough together to make a space point.

This is used for the SHMS and HMS (since Fall 2017) drift chambers which are of the same style as the old SOS chambers (XUV).

Definition at line 686 of file THcDriftChamber.cxx.

Int_t THcDriftChamber::FindHardSpacePoints ( void  )
protected

Definition at line 739 of file THcDriftChamber.cxx.

Int_t THcDriftChamber::FindSpacePoints ( void  )
virtual
  1. First check if number of hits is between fMinHits=min_hit and fMaxHits=max_pr_hits if fails then fNSpacePoints=0
  2. Determines if it is an easy spacepoint.
    1. if HMS style chambers finds the Y and Y' planes if not HMS style chambers finds the X and X' planes
    2. if both planes ahve only one hit and the difference in hit position between the hits < fSpacePointCriterion and less than 6 hits . then easy spacepoint and calls either method FindEasySpacePoint_HMS or FindEasySpacePoint_SOS
    3. FindEasySpacePoint_SOS
      1. Loops through hits and gets y_pos from the non-X planes and determines average Yt
      2. Loops through hits and sees if any of "Y-planes" hits has difference of y_pos -Yt > TMath::Sqrt(fSpacePointCriterion/2.0)
      3. Adds a spacepoint and set ncombos to zero.
  3. if not EasySpacePoint calls FindHardSpacePoints
    1. loops though hits and determines pairs of hits in planes with angles grerater then 17.5 degs between them. These are test pairs and stores the x and y position of pair
    1. Double loops through the test pairs to determine number of pair combinations.
      1. Calculates d2 = (xi -xj)^2 + (yi-yj)^2 from the two pairs (i,j).
      2. If d2 < fSpacePointCriterion then fills combos structure with pair info and increments ncombos. c. Loop through ncombos
      1. First combo is set as spacepoint which is loaded with hit info from combos.
      2. Next combo
        1. Loops through previous space points
        2. calculates d2 = (x_c -x_sp)^2 + (y_c-y_sp)^2 between combos and spacepoint if d2 < fSpacePointCriterion then adds combos hit info to that spacepoint which is not already in the spacepoint.
        3. if that combo is not already added to existing spacepoint then new spacepoint is made from the combo.
  4. If it found a spacepoint
    1. For HMS-style chamber it would DestroyPoorSpacePoints if fRemove_Sppt_If_One_YPlane
    2. Presently if HMS-style chamber calls SpacePointMultiWire()
    3. Calls ChooseSingleHit this looks to see if two hits in the same plane. If two hits then rejects on with longer drift time.
    4. calls SelectSpacePoints. Goes through the spacepoints and eliminates spacepoints that do not have nhits > min_hits and ncombos> min_combos ( exception for easyspacepoint)

Definition at line 519 of file THcDriftChamber.cxx.

Double_t THcDriftChamber::FindStub ( Int_t  nhits,
THcSpacePoint sp,
Int_t plane_list,
UInt_t  bitpat,
Int_t plusminus,
Double_t stub 
)
protected

Definition at line 1566 of file THcDriftChamber.cxx.

Int_t THcDriftChamber::GetChamberNum ( ) const
inline

Definition at line 64 of file THcDriftChamber.h.

Int_t THcDriftChamber::GetNHits ( ) const
inline

Definition at line 59 of file THcDriftChamber.h.

Int_t THcDriftChamber::GetNSpacePoints ( ) const
inline

Definition at line 60 of file THcDriftChamber.h.

Int_t THcDriftChamber::GetNTracks ( ) const
inline

Definition at line 61 of file THcDriftChamber.h.

TClonesArray* THcDriftChamber::GetSpacePointsP ( ) const
inline

Definition at line 63 of file THcDriftChamber.h.

const TClonesArray* THcDriftChamber::GetTrackHits ( ) const
inline

Definition at line 62 of file THcDriftChamber.h.

Double_t THcDriftChamber::GetZPos ( ) const
inline

Definition at line 65 of file THcDriftChamber.h.

THaAnalysisObject::EStatus THcDriftChamber::Init ( const TDatime run_time)
virtual

Definition at line 91 of file THcDriftChamber.cxx.

void THcDriftChamber::LeftRight ( void  )
virtual

For each space point, Fit stubs to all possible left-right combinations of drift distances and choose the set with the minimum chi**2.

Definition at line 1342 of file THcDriftChamber.cxx.

Int_t THcDriftChamber::NewFindSpacePoints ( void  )
virtual

Definition at line 304 of file THcDriftChamber.cxx.

void THcDriftChamber::PrintDecode ( void  )
virtual

Definition at line 294 of file THcDriftChamber.cxx.

void THcDriftChamber::ProcessHits ( void  )
virtual

Definition at line 276 of file THcDriftChamber.cxx.

Int_t THcDriftChamber::ReadDatabase ( const TDatime date)
protectedvirtual

Definition at line 143 of file THcDriftChamber.cxx.

void THcDriftChamber::SelectSpacePoints ( void  )
protected

This routine goes through the list of space_points and space_point_hits found by find_space_points and only accepts those with number of hits > min_hits number of combinations > min_combos

Definition at line 1157 of file THcDriftChamber.cxx.

void THcDriftChamber::SetHMSStyleFlag ( Int_t  flag)
inline

Definition at line 67 of file THcDriftChamber.h.

void THcDriftChamber::Setup ( const char *  name,
const char *  description 
)
protected

Definition at line 79 of file THcDriftChamber.cxx.

Int_t THcDriftChamber::SpacePointMultiWire ( void  )
protected

This method is only used for the old style HMS chambers (before Fall 2017).

This routine loops over space points and looks at all hits in the space point. If more than 1 hit is in the same plane then the space point is cloned with all combinations of 1 wire per plane. The requirements for cloning are: 1) at least 4 planes fire, and 2) no more than 6 planes have multiple hits.

Definition at line 959 of file THcDriftChamber.cxx.

Member Data Documentation

Int_t THcDriftChamber::f
protected

Definition at line 72 of file THcDriftChamber.h.

std::map<int,TMatrixD> THcDriftChamber::fAA3Inv
protected

Definition at line 161 of file THcDriftChamber.h.

Int_t THcDriftChamber::fChamberNum
protected

Definition at line 83 of file THcDriftChamber.h.

Double_t* THcDriftChamber::fCosBeta
protected

Definition at line 115 of file THcDriftChamber.h.

Int_t THcDriftChamber::fdebugstubchisq
protected

Definition at line 107 of file THcDriftChamber.h.

Int_t THcDriftChamber::fEasySpacePoint
protected

Definition at line 157 of file THcDriftChamber.h.

Int_t THcDriftChamber::fFixPropagationCorrection
protected

Definition at line 104 of file THcDriftChamber.h.

Int_t THcDriftChamber::fhdebugflagpr
protected

Definition at line 106 of file THcDriftChamber.h.

std::vector<THcDCHit*> THcDriftChamber::fHits
protected

Definition at line 144 of file THcDriftChamber.h.

Int_t THcDriftChamber::fHMSStyleChambers
protected

Definition at line 105 of file THcDriftChamber.h.

Double_t THcDriftChamber::fMaxDist
protected

Definition at line 113 of file THcDriftChamber.h.

Int_t THcDriftChamber::fMaxHits
protected

Definition at line 98 of file THcDriftChamber.h.

Int_t THcDriftChamber::fMinCombos
protected

Definition at line 99 of file THcDriftChamber.h.

Int_t THcDriftChamber::fMinHits
protected

Definition at line 97 of file THcDriftChamber.h.

Int_t THcDriftChamber::fN_True_RawHits
protected

Definition at line 79 of file THcDriftChamber.h.

Int_t THcDriftChamber::fNhits
protected

Definition at line 77 of file THcDriftChamber.h.

Int_t THcDriftChamber::fNPlanes
protected

Definition at line 81 of file THcDriftChamber.h.

Int_t THcDriftChamber::fNSpacePoints
protected

Definition at line 156 of file THcDriftChamber.h.

Int_t THcDriftChamber::fNthits
protected

Definition at line 78 of file THcDriftChamber.h.

Int_t THcDriftChamber::fNUPlaneClusters
protected

Definition at line 152 of file THcDriftChamber.h.

Int_t THcDriftChamber::fNUXPlaneClusters
protected

Definition at line 154 of file THcDriftChamber.h.

Int_t THcDriftChamber::fNVPlaneClusters
protected

Definition at line 153 of file THcDriftChamber.h.

Int_t THcDriftChamber::fNVXPlaneClusters
protected

Definition at line 155 of file THcDriftChamber.h.

Int_t THcDriftChamber::fNXPlaneClusters
protected

Definition at line 151 of file THcDriftChamber.h.

THaDetectorBase* THcDriftChamber::fParent
protected

Definition at line 163 of file THcDriftChamber.h.

std::vector<THcDriftChamberPlane*> THcDriftChamber::fPlanes
protected

Definition at line 121 of file THcDriftChamber.h.

Double_t* THcDriftChamber::fPsi0
protected

Definition at line 118 of file THcDriftChamber.h.

Double_t THcDriftChamber::fRatio_xpfp_to_xfp
protected

Definition at line 108 of file THcDriftChamber.h.

Int_t THcDriftChamber::fRemove_Sppt_If_One_YPlane
protected

Definition at line 100 of file THcDriftChamber.h.

Double_t* THcDriftChamber::fSigma
protected

Definition at line 117 of file THcDriftChamber.h.

Double_t* THcDriftChamber::fSinBeta
protected

Definition at line 114 of file THcDriftChamber.h.

Int_t THcDriftChamber::fSmallAngleApprox
protected

Definition at line 102 of file THcDriftChamber.h.

Double_t THcDriftChamber::fSpacePointCriterion
protected

Definition at line 112 of file THcDriftChamber.h.

TClonesArray* THcDriftChamber::fSpacePoints
protected

Definition at line 145 of file THcDriftChamber.h.

SpacePointHitOutputData THcDriftChamber::fSpHit
protected

Definition at line 158 of file THcDriftChamber.h.

Double_t** THcDriftChamber::fStubCoefs
protected

Definition at line 119 of file THcDriftChamber.h.

Double_t THcDriftChamber::fStubMaxXPDiff
protected

Definition at line 103 of file THcDriftChamber.h.

Double_t* THcDriftChamber::fTanBeta
protected

Definition at line 116 of file THcDriftChamber.h.

TClonesArray* THcDriftChamber::fTrackProj
protected

Definition at line 124 of file THcDriftChamber.h.

TClonesArray* THcDriftChamber::fUPlaneClusters
protected

Definition at line 148 of file THcDriftChamber.h.

TClonesArray* THcDriftChamber::fUXPlaneClusters
protected

Definition at line 150 of file THcDriftChamber.h.

TClonesArray* THcDriftChamber::fVPlaneClusters
protected

Definition at line 147 of file THcDriftChamber.h.

TClonesArray* THcDriftChamber::fVXPlaneClusters
protected

Definition at line 149 of file THcDriftChamber.h.

Double_t THcDriftChamber::fWireVelocity
protected

Definition at line 101 of file THcDriftChamber.h.

Double_t THcDriftChamber::fXCenter
protected

Definition at line 110 of file THcDriftChamber.h.

TClonesArray* THcDriftChamber::fXPlaneClusters
protected

Definition at line 146 of file THcDriftChamber.h.

Double_t THcDriftChamber::fYCenter
protected

Definition at line 111 of file THcDriftChamber.h.

Double_t THcDriftChamber::fZPos
protected

Definition at line 109 of file THcDriftChamber.h.

Double_t* THcDriftChamber::stubcoef[4]
protected

Definition at line 160 of file THcDriftChamber.h.

Int_t THcDriftChamber::XPlaneInd
protected

Definition at line 91 of file THcDriftChamber.h.

Int_t THcDriftChamber::XPlaneNum
protected

Definition at line 93 of file THcDriftChamber.h.

Int_t THcDriftChamber::XPlanePInd
protected

Definition at line 92 of file THcDriftChamber.h.

Int_t THcDriftChamber::XPlanePNum
protected

Definition at line 94 of file THcDriftChamber.h.

Int_t THcDriftChamber::YPlaneInd
protected

Definition at line 86 of file THcDriftChamber.h.

Int_t THcDriftChamber::YPlaneNum
protected

Definition at line 88 of file THcDriftChamber.h.

Int_t THcDriftChamber::YPlanePInd
protected

Definition at line 87 of file THcDriftChamber.h.

Int_t THcDriftChamber::YPlanePNum
protected

Definition at line 89 of file THcDriftChamber.h.

Collaboration diagram for THcDriftChamber:

The documentation for this class was generated from the following files: