32 fSlopeX = direction.X() / direction.Z();
33 fSlopeY = direction.Y() / direction.Z();
63 if (that == 0)
return;
90 if (
this == &that)
return *
this;
104 for (
size_t i = 0; i < 4; ++i)
105 for (
size_t j = 0; j < 4; ++j)
113 for (
size_t i=0;i< 12;++i)
123 for (
size_t i = 0; i < 3; ++i) {
154 for(
int i=0; i< 12;++i)
174 return weight * weight *
fChi;
190 int numTreeLines = 0;
191 double sumResiduals = 0.0;
234 for (
const QwTreeLine *treeline = treelinelist;
235 treeline; treeline = treeline->
next){
236 if (treeline->IsValid()){
245 for (std::vector<QwTreeLine*>::const_iterator treeline = treelinelist.begin();
246 treeline != treelinelist.end(); treeline++)
270 for (std::vector<QwTreeLine*>::const_iterator treeline =
fQwTreeLines.begin();
272 std::cout << **treeline << std::endl;
275 std::cout << *tl << std::endl;
309 stream <<
"d(x,y)/dz = (" << pt.
fSlopeX <<
", " << pt.
fSlopeY <<
")";
313 stream <<
" downstream target: " << x <<
", " << y;
315 stream <<
", chi = " << pt.
fChi;
320 if (pt.
IsVoid()) stream <<
" (void)";
346 direction.SetZ(1 / kz);
370 theta = gRandom->Gaus(theta, sigma);
371 fSlopeX = sin(theta) * cos(phi);
372 fSlopeY = sin(theta) * sin(phi);
384 phi = gRandom->Gaus(phi, sigma);
385 fSlopeX = sin(theta) * cos(phi);
386 fSlopeY = sin(theta) * sin(phi);
407 QwMessage <<
"No support for intersections of partial tracks "
427 QwVerbose <<
"Target vertex at : (" << primary.X() <<
"," << primary.Y() <<
"," << primary.Z() <<
")" <<
QwLog::endl;
444 for (
size_t i = 0; i < trigscint.size(); i++) {
446 if (vertex)
return vertex;
464 for (
size_t i = 0; i < cerenkov.size(); i++) {
466 if (vertex)
return vertex;
483 for (
size_t i = 0; i < hdc.size(); i++) {
485 if (vertex)
return vertex;
499 double x1=0,y1=0,x2=0,y2=0;
500 double x3=0,y3=0,x4=0,y4=0;
507 double rotate=oct==8? 135: (3-oct)*45;
508 double Cos=cos(rotate*PI/180);
509 double Sin=sin(rotate*PI/180);
524 double z1=476.7,z2=500.0;
525 double x1=0,y1=0,x2=0,y2=0;
526 double pitch=0,yaw=0,roll=0;
527 double rotatorZpos = 476.7;
534 z1 = z1 - rotatorZpos;
535 z2 = z2 - rotatorZpos;
537 TVector3 v1(x1,y1,z1);
538 TVector3 v2(x2,y2,z2);
540 TVector3 xaxis(1,0,0);
541 TVector3 yaxis(0,1,0);
542 TVector3 zaxis(0,0,1);
548 v1.Rotate(pitch,xaxis);
549 v2.Rotate(pitch,xaxis);
550 yaxis.Rotate(pitch,xaxis);
551 zaxis.Rotate(pitch,xaxis);
553 v1.Rotate(yaw,yaxis);
554 v2.Rotate(yaw,yaxis);
555 zaxis.Rotate(yaw,yaxis);
557 v1.Rotate(roll,zaxis);
558 v2.Rotate(roll,zaxis);
560 v1.SetZ( v1.Z() + rotatorZpos );
561 v2.SetZ( v2.Z() + rotatorZpos );
563 fSlopeX = (v2.X()-v1.X())/(v2.Z()-v1.Z());
564 fSlopeY = (v2.Y()-v1.Y())/(v2.Z()-v1.Z());
#define QwMessage
Predefined log drain for regular messages.
QwPartialTrack & SmearAngleTheta(const double sigma)
Smear the theta angle.
QwPartialTrack & SmearPosition(const double sigma_x, const double sigma_y)
Smear the position.
QwPartialTrack & SmearAnglePhi(const double sigma)
Smear the phi angle.
std::ostream & operator<<(std::ostream &out, const QwColor &color)
Output stream operator which uses the enum-to-escape-code mapping.
Int_t GetNumberOfTreeLines() const
Get the number of tree lines.
const QwVertex * DeterminePositionInHDC(const QwGeometry &geometry)
Determine position in first horizontal drift chamber.
Double_t fOffsetX
x coordinate (at MAGNET_CENTER)
const QwGeometry in(const EQwRegionID &r) const
Get detectors in given region.
Contains vertex information.
QwPartialTrack & operator=(const QwPartialTrack &that)
Assignment operator.
double fAverageResidual
number of Plane 0 Treelines
double GetActiveWidthY() const
double GetAverageResidual() const
Get the average residuals.
int GetOctant() const
Get the octant number.
#define QwVerbose
Predefined log drain for verbose messages.
Double_t GetMomentumDirectionTheta() const
Return the theta angle.
Double_t fChi
combined chi square
Int_t fNQwTreeLines
Number of tree lines in this partial track.
bool IsUsed() const
Is this tree line used?
const TVector3 GetPosition(const double z) const
Return the vertex at position z.
Definition of the partial track class.
QwTreeLine * CreateNewTreeLine()
Create a new tree line.
void AddTreeLine(const QwTreeLine *treeline)
Add an existing tree line as a copy.
double GetRotatorYaw() const
EQwRegionID GetRegion() const
Get the region.
double pR2hit[3]
x-y-z position at R2
double GetDetectorPitch() const
VQwTrackingElement & operator=(const VQwTrackingElement &that)
Assignment operator.
#define QwDebug
Predefined log drain for debugging output.
void RotateCoordinates()
Rotate coordinates to right octant.
A logfile class, based on an identical class in the Hermes analyzer.
const TVector3 GetMomentumDirection() const
Return the direction.
const TVector3 GetPosition() const
const QwTreeLine * GetTreeLine(const int tl) const
Get the specified tree line.
void Reset(Option_t *option="")
const QwVertex * DeterminePositionInTarget(const QwGeometry &geometry)
Determine vertex in the target.
const QwVertex * DeterminePositionInCerenkovBars(const QwGeometry &geometry)
Determine intersection with cerenkov bars.
double CalculateAverageResidual()
Double_t fCov[4][4]
covariance matrix
double uvR3hit[3]
direction at R3
double GetRotatorRoll() const
Bool_t fIsVoid
marked as being void
Double_t TResidual[kNumDirections]
void Clear(Option_t *option="")
One-dimensional (u, v, or x) track stubs and associated hits.
static std::ostream & endl(std::ostream &)
End of the line.
double GetRotatorPitch() const
double uvR2hit[3]
direction at R2
void RotateRotator(const QwDetectorInfo *geometry)
void ResetTreeLines(Option_t *option="")
Reset the list of tree lines.
Collection of QwDetectorInfo pointers that specifies an experimental geometry.
double pR3hit[3]
x-y-z position at R3
const QwVertex * DeterminePositionInDetector(const QwDetectorInfo *geometry)
Determine vertex in detector.
QwPartialTrack()
Default constructor.
Double_t fOffsetY
y coordinate (at MAGNET_CENTER)
Double_t fSignedResidual[12]
void PrintTreeLines(Option_t *option="") const
Print the list of tree lines.
Double_t GetMomentumDirectionPhi() const
Return the phi angle.
const QwVertex * DeterminePositionInTriggerScintillators(const QwGeometry &geometry)
Determine intersection with trigger scintillators.
void Initialize()
Initialization.
Bool_t fIsUsed
used (part of a track)
double GetChiWeight() const
double GetZPosition() const
std::vector< QwTreeLine * > fQwTreeLines
List of tree lines in this partial track.
virtual ~QwPartialTrack()
Destructor.
void AddTreeLineList(const QwTreeLine *treelinelist)
Add a linked list of existing tree lines as a copy.
Int_t fNumMiss
missing hits
Contains the straight part of a track in one region only.
void ClearTreeLines(Option_t *option="")
Clear the list of tree lines.
EQwDetectorPackage GetPackage() const
Get the package.
static const double cm
Length units: base unit is mm.
double GetActiveWidthX() const
Virtual base class for all tracking elements.
void Print(const Option_t *options=0) const