FairRoot/PandaRoot
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
PndTrkTracking2 Class Reference

#include <PndTrkTracking2.h>

Inheritance diagram for PndTrkTracking2:
PndPersistencyTask

Public Member Functions

 PndTrkTracking2 ()
 
 PndTrkTracking2 (Int_t verbose)
 
 PndTrkTracking2 (int istamp, bool iplot, bool doMcComparison)
 
 PndTrkTracking2 (int istamp, bool iplot, bool doMcComparison, bool doSciTil)
 
 ~PndTrkTracking2 ()
 
void Cleanup ()
 
void NOCleanup ()
 
void CleanupStt ()
 
void NOCleanupStt ()
 
void CleanupMvd ()
 
void NOCleanupMvd ()
 
virtual void Exec (Option_t *opt)
 
virtual InitStatus Init ()
 
void NoMvdAloneTracking ()
 
void PrintTime ()
 
void SetInputBranchName (const char *string1, const char *string2, const char *string3)
 
void SetEventsToPlot (int nev)
 
void SetParContainers ()
 
void SetPersistence (Bool_t persistence)
 
void YesMvdAloneTracking ()
 
void WriteHistograms ()
 
void SetPersistency (Bool_t val=kTRUE)
 
Bool_t GetPersistency ()
 

Private Member Functions

void Initialization_ClassVariables ()
 
bool AcceptHitsConformal (Double_t distance, Double_t DriftConfR, Double_t StrawConfR)
 
Short_t AssociateBetterAfterFitSkewHitsToXYTrack (Short_t TemporarynSttSkewhitinTrack, Short_t SkewList[][2], Double_t *S, Double_t *Z, Double_t *ZDrift, Double_t *ZError, Double_t KAPPA, Double_t FI0, Short_t *tempore, Double_t *temporeS, Double_t *temporeZ, Double_t *temporeZDrift, Double_t *temporeZError, Short_t *STATUS)
 
Short_t AssociateSciTilHit (Double_t Oxx, Double_t Oyy, Double_t Rr, Short_t *List, Double_t *esse)
 
Short_t AssociateSkewHitsToXYTrack (bool *InclusionListSkew, Short_t NSkewhits, Short_t *infoskew, Double_t Oxx, Double_t Oyy, Double_t Rr, Double_t info[][7], Double_t *WDX, Double_t *WDY, Double_t *WDZ, Double_t Fi_low_limit, Double_t Fi_up_limit, Short_t Charge, Short_t SkewList[][2], Double_t *S, Double_t *Z, Double_t *ZDrift, Double_t *ZError)
 
Short_t AssociateSkewHitsToXYTrack2 (bool *InclusionListSkew, Short_t NSkewhits, Short_t *infoskew, Double_t Oxx, Double_t Oyy, Double_t Rr, Double_t info[][7], Double_t *WDX, Double_t *WDY, Double_t *WDZ, Double_t Fi_low_limit, Double_t Fi_up_limit, Short_t Charge, Short_t SkewList[][2], Double_t *S, Double_t *Z, Double_t *ZDrift, Double_t *ZError)
 
bool BadTrack_ParStt (Double_t Oxx, Double_t Oyy, Double_t Rr, Short_t Charge, Double_t Xcross[2], Double_t Ycross[2], Short_t nHits, Short_t *ListHits, Double_t info[][7], Double_t cut, Short_t maxnum, Short_t islack)
 
void CalculateSinandCosin ()
 
void CollectParSttHitsagain (Vec< bool > &keepit, Vec< bool > &Mvdhits, Double_t info[][7], Short_t nSttParHit, Short_t StartTrackCand, Short_t EndTrackCand, Double_t *KAPPA, Double_t *FI0, Double_t *Fi_low_limit, Double_t *Fi_up_limit, Short_t *fnSttParHitsinTrack, Short_t fListSttParHitsinTrack[][MAXSTTHITSINTRACK])
 
Short_t CompareTracks (Short_t first_track, Short_t second_track)
 
bool EliminateClones (Short_t nTotalCandidates, Double_t fraction, bool *keepit)
 
void EliminateSpuriousSZ_bis (Short_t ncand, Short_t MaxTurnofTracks, Double_t signPz, Double_t *SchosenPixel, Double_t *SchosenStrip, Double_t *SchosenSkew, Double_t *ZchosenPixel, Double_t *ZchosenStrip, Double_t *ZchosenSkew, Double_t *ErrorchosenPixel, Double_t *ErrorchosenStrip, Double_t *ErrorchosenSkew, Double_t KAPPA, Double_t FI0, Double_t Rr)
 
void EliminateSpuriousSZ_ter (Short_t ncand, Short_t MaxTurnofTracks, Double_t signPz, Double_t *SchosenPixel, Double_t *SchosenStrip, Double_t *SchosenSkew, Double_t *ZchosenPixel, Double_t *ZchosenStrip, Double_t *ZchosenSkew, Double_t *ErrorchosenPixel, Double_t *ErrorchosenStrip, Double_t *ErrorchosenSkew, Double_t KAPPA, Double_t FI0, Double_t Rr)
 
void FindCharge (Double_t oX, Double_t oY, Short_t nHits, Double_t *X, Double_t *Y, Short_t *Charge)
 
Short_t FindTrackStrictCollection (Short_t NFiCELLDISTANCE, Short_t iSeed, Short_t NParallelToSearch, Short_t *ListHitsinTrackinWhichToSearch, bool *InclusionList, Short_t *FiConformalIndex, Short_t *OutputListHitsinTrack)
 
void GetVolumeCharacteristics (TGeoVolume *tgeovol, TGeoHMatrix *mat, Double_t GlobalScal[3], Double_t GlobalTrans[3], Double_t GlobalRot[9])
 
void FixDiscontinuitiesFiangleinSZplane (Short_t TemporarynSkewHitsinTrack, Vec< Double_t > &S, Double_t *Fi_initial_helix_referenceframe, Short_t Charge)
 
void InfoXYZParal (Double_t info[][7], Short_t infopar, Double_t Oxx, Double_t Oyy, Double_t Rr, Double_t KAPPA, Double_t FI0, Short_t Charge, Double_t *Posiz)
 
void Initial_SttParHits_DecreasingR_Ordering (Double_t info[][7], Short_t *ListSttParHi, Int_t nSttParHit)
 
void LoadPndTrack_TrackCand (bool *keepit, bool *SttSZfit, Short_t nTotalCandidates, Short_t *Charge, Int_t nSttTrackCand, Double_t *FI0, Double_t *KAPPA, Double_t info[][7], Double_t SchosenSkew[][MAXSTTHITS], Double_t ZchosenSkew[][MAXSTTHITS], Short_t *daTrackFoundaTrackMC)
 
void LoadSZetc_forSZfit (Short_t ncand, Short_t nhitsinfit, Vec< Double_t > &ErrorDriftRadius, Double_t *ErrorDriftRadiusbis, Vec< Double_t > &DriftRadius, Double_t *DriftRadiusbis, Vec< Double_t > &S, Double_t *Sbis, Vec< Double_t > &ZED, Double_t *ZEDbis)
 
void LoadSZetc_forSZfit2 (Short_t ncand, Short_t nhitsinfit, Double_t *S_Skew, Double_t *TemporaryZ, Double_t *TemporaryZDrift, Double_t *TemporaryZError, Vec< Double_t > &ErrorDriftRadius, Double_t *ErrorDriftRadiusbis, Vec< Double_t > &DriftRadius, Double_t *DriftRadiusbis, Vec< Double_t > &S, Double_t *Sbis, Vec< Double_t > &ZED, Double_t *ZEDbis)
 
void MakeInclusionListStt (Int_t nSttHit, Short_t *TubeID, Double_t info[][7])
 
void MatchMvdHitsToSttTracks (Vec< bool > &keepit, Double_t delta, Double_t highqualitycut, Short_t nSttTrackCand, Double_t *FI0, Double_t *Fifirst, Vec< Short_t > &CHARGE, Short_t *nPixelHitsinTrack, Short_t ListPixelHitsinTrack[][MAXMVDPIXELHITSINTRACK], Short_t *nStripHitsinTrack, Short_t ListStripHitsinTrack[][MAXMVDSTRIPHITSINTRACK])
 
void MatchMvdHitsToSttTracksagain (Vec< bool > &keepit, Vec< bool > &Mvdhits, Double_t delta, Double_t highqualitycut, Short_t nSttTrackCand, Double_t *FI0, Double_t *Fifirst, Vec< Short_t > &CHARGE, Short_t *nPixelHitsinTrack, Short_t ListPixelHitsinTrack[][MAXMVDPIXELHITSINTRACK], Short_t *nStripHitsinTrack, Short_t ListStripHitsinTrack[][MAXMVDSTRIPHITSINTRACK])
 
void MatchMvdHitsToSttTracks2 (bool *keepit, Double_t delta, Double_t highqualitycut, Short_t nSttTrackCand, Double_t *FI0, Double_t *Fifirst, Short_t *CHARGE, Short_t *nPixelHitsinTrack, Short_t ListPixelHitsinTrack[][MAXMVDPIXELHITSINTRACK], Short_t *nStripHitsinTrack, Short_t ListStripHitsinTrack[][MAXMVDSTRIPHITSINTRACK])
 
void OrderingConformal_Loading_ListTrackCandHit (bool *keepit, Short_t ncand, Double_t info[][7], Double_t Trajectory_Start[][2], Short_t *CHARGE, Double_t SchosenSkew[][MAXSTTHITS])
 
void OrderingR_Loading_ListTrackCandHit (bool *keepit, Short_t ncand, Double_t info[][7])
 
void OrderingSttSkewandSttParallel (Double_t oX, Double_t oY, Double_t Rr, Short_t nSkewhit, Short_t *ListSkewHits, Double_t *SList, Short_t Charge, Short_t nParHits, Short_t *ListParHits, Double_t *U, Double_t *V, Short_t *BigList)
 
void OrderingUsingConformal (Double_t oX, Double_t oY, Double_t Traj_Sta[2], Int_t nHits, Double_t XY[][2], Short_t Charge, Int_t *ListHits)
 
void Ordering_Loading_ListTrackCandHit (bool *keepit, Short_t FirstCandidate, Short_t LastCandidate, Double_t info[][7], Double_t Trajectory_Start[][2], Short_t *CHARGE, Double_t SchosenSkew[][MAXSTTHITS])
 
void RefitMvdStt (Short_t nCandHit, Short_t *fListTrackCandHit, Short_t *fListTrackCandHitType, Double_t info[][7], Double_t rotationangle, Double_t trajectory_vertex[2], Short_t iexcl, Double_t *pAlfa, Double_t *pBeta, Double_t *pGamma, bool *status)
 
void StartFromSciTil (Short_t *Charge, Short_t *FiConformalIndex, Double_t *Fi_final_helix_referenceframe, Double_t *Fi_initial_helix_referenceframe, Double_t *Fi_low_limit, Double_t *Fi_up_limit, Short_t HitsinBoxConformal[][NRDIVCONFORMAL][NFIDIVCONFORMAL], Double_t info[][7], Double_t infoparalConformal[][5], Short_t nBoxConformal[][NFIDIVCONFORMAL], Int_t nSttParHit, Int_t &nSttTrackCand, Short_t *RConformalIndex, Double_t *trajectory_vertex, Double_t *UU, Double_t *VV)
 
void SeparateInnerOuterParallel (Short_t nHits, Short_t *ListHits, Double_t info[][7], Double_t RStrawDetInnerParMax, Short_t *nInnerHits, Short_t *ListInnerHits, Short_t *nOuterHits, Short_t *ListOuterHits, Short_t *nInnerHitsLeft, Short_t *ListInnerHitsLeft, Short_t *nInnerHitsRight, Short_t *ListInnerHitsRight, Short_t *nOuterHitsLeft, Short_t *ListOuterHitsLeft, Short_t *nOuterHitsRight, Short_t *ListOuterHitsRight)
 
bool SttParalCleanup (Double_t GAP, Double_t Oxx, Double_t Oyy, Double_t Rr, Short_t Charge, Double_t Start[3], Double_t FI0, Double_t FiLimitAdmissible, Short_t nHits, Short_t *Listofhits, Double_t info[][7], Double_t RStrawDetMin, Double_t RStrawDetInnerParMax, Double_t RStrawDetOuterParMin, Double_t RStrawDetMax)
 
bool SttSkewCleanup (Double_t GAP, Double_t Oxx, Double_t Oyy, Double_t Rr, Short_t Charge, Double_t Start[3], Double_t FI0, Double_t FiLimitAdmissible, Short_t nHits, Short_t *Listofhits, Double_t *S, Double_t info[][7], Double_t RminStrawSkew, Double_t RmaxStrawSkew, Double_t cut, Short_t maxnum)
 
bool TrackCleanup (Double_t GAP, Double_t Oxx, Double_t Oyy, Double_t Rr, Double_t KAPPA, Double_t FI0, Short_t Charge, Double_t Start[3], Short_t &nHitsPar, Short_t *ListHitsPar, Short_t &nHitsSkew, Short_t *ListHitsSkew, Double_t *auxS, Double_t info[][7], Double_t RStrawDetMin, Double_t ApotemaMaxInnerPar, Double_t ApotemaMinSkew, Double_t ApotemaMaxSkew, Double_t ApotemaMinOuterPar, Double_t RStrawDetMax)
 
Short_t TrkAssociatedParallelHitsToHelixQuater (bool *ExclusionList, Double_t m, Double_t q, Short_t Status, Short_t nHitsinTrack, Short_t *ListHitsinTrack, Int_t NhitsParallel, Double_t Oxx, Double_t Oyy, Double_t Rr, Double_t info[][7], Double_t infoparalConformal[][5], Short_t *RConformalIndex, Short_t *FiConformalIndex, Short_t nBoxConformal[][NFIDIVCONFORMAL], Short_t HitsinBoxConformal[][NRDIVCONFORMAL][NFIDIVCONFORMAL], Short_t *auxListHitsinTrack)
 
Short_t TrkAssociatedParallelHitsToHelix5 (bool *ExclusionList, Int_t NhitsParallel, Double_t Oxx, Double_t Oyy, Double_t Rr, Double_t info[][7], Double_t Fi_low, Double_t Fi_up, Short_t *auxListHitsinTrack)
 
void StoreSZ_MvdScitil (Short_t ncand)
 
 ClassDef (PndTrkTracking2, 1)
 

Private Attributes

bool doMcComparison
 
bool fSingleHitListStt [MAXSTTHITS]
 
bool iplotta
 
bool fMvdAloneTracking
 
bool fYesCleanMvd
 
bool fYesCleanStt
 
bool fYesSciTil
 
bool fInclusionListStt [MAXSTTHITS]
 
bool fInclusionListSciTil [MAXSCITILHITS]
 
bool finMvdTrackCandPixel [MAXMVDPIXELHITS]
 
bool finMvdTrackCandStrip [MAXMVDSTRIPHITS]
 
bool fTypeConf [MAXTRACKSPEREVENT]
 
char fSttBranch [200]
 
char fMvdPixelBranch [200]
 
char fMvdStripBranch [200]
 
Short_t fnAxialOuterRight
 
Short_t fnAxialInnerRight
 
Short_t fnAxialOuterLeft
 
Short_t fnAxialInnerLeft
 
Short_t fListAxialOuterRight [NUMBER_STRAWS]
 
Short_t fListAxialInnerRight [NUMBER_STRAWS]
 
Short_t fListAxialOuterLeft [NUMBER_STRAWS]
 
Short_t fListAxialInnerLeft [NUMBER_STRAWS]
 
Short_t fnSkewRight
 
Short_t fnSkewLeft
 
Short_t fListSkewRight [NUMBER_STRAWS]
 
Short_t fListSkewLeft [NUMBER_STRAWS]
 
Short_t fListHitMvdTrackCand [MAXMVDTRACKSPEREVENT][MAXMVDPIXELHITSINTRACK+MAXMVDSTRIPHITSINTRACK]
 
Short_t fListHitTypeMvdTrackCand [MAXMVDTRACKSPEREVENT][MAXMVDPIXELHITSINTRACK+MAXMVDSTRIPHITSINTRACK]
 
Short_t fListMvdDSPixelHitNotTrackCand [MAXMVDPIXELHITS]
 
Short_t fListMvdDSStripHitNotTrackCand [MAXMVDSTRIPHITS]
 
Short_t fListMvdPixelHitsinTrack [MAXTRACKSPEREVENT][MAXMVDPIXELHITSINTRACK]
 
Short_t fListMvdStripHitsinTrack [MAXTRACKSPEREVENT][MAXMVDSTRIPHITSINTRACK]
 
Short_t fListMvdUSPixelHitNotTrackCand [MAXMVDPIXELHITS]
 
Short_t fListMvdUSStripHitNotTrackCand [MAXMVDSTRIPHITS]
 
Short_t fListParContiguous [NUMBER_STRAWS][6]
 
Short_t fListSciTilHitsinTrack [MAXTRACKSPEREVENT][MAXSCITILHITSINTRACK]
 
Short_t fListSttParHitsinTrack [MAXTRACKSPEREVENT][MAXSTTHITSINTRACK]
 
Short_t fListSttParHits [MAXSTTHITS]
 
Short_t fListSttSkewHitsinTrack [MAXTRACKSPEREVENT][MAXSTTHITSINTRACK]
 
Short_t fListSttSkewHitsinTrackSolution [MAXTRACKSPEREVENT][MAXSTTHITSINTRACK]
 
Short_t fListSttSkewHits [MAXSTTHITS]
 
Short_t fListTrackCandHit [MAXTRACKSPEREVENT][MAXSTTHITSINTRACK+MAXMVDPIXELHITSINTRACK+MAXMVDSTRIPHITSINTRACK+MAXSCITILHITSINTRACK]
 
Short_t fListTrackCandHitType [MAXTRACKSPEREVENT][MAXSTTHITSINTRACK+MAXMVDPIXELHITSINTRACK+MAXMVDSTRIPHITSINTRACK+MAXSCITILHITSINTRACK]
 
Short_t fnHitMvdTrackCand [MAXMVDTRACKSPEREVENT]
 
Short_t fnMCTracks
 
Short_t fMCtrack_of_Pixel [MAXMVDPIXELHITS]
 
Short_t fMCtrack_of_Strip [MAXMVDSTRIPHITS]
 
Short_t fnMvdDSPixelHitNotTrackCand
 
Short_t fnMvdDSStripHitNotTrackCand
 
Short_t fnMvdPixelHit
 
Short_t fnMvdPixelHitsinTrack [MAXTRACKSPEREVENT]
 
Short_t fnMvdStripHit
 
Short_t fnMvdStripHitsinTrack [MAXTRACKSPEREVENT]
 
Short_t fnMvdTrackCand
 
Short_t fnMvdUSPixelHitNotTrackCand
 
Short_t fnMvdUSStripHitNotTrackCand
 
Short_t fnParContiguous [NUMBER_STRAWS]
 
Short_t fnSciTilHits
 
Short_t fnSciTilHitsinTrack [MAXTRACKSPEREVENT]
 
Short_t fnSttParHitsinTrack [MAXTRACKSPEREVENT]
 
Short_t fnSttSkewHitsinTrack [MAXTRACKSPEREVENT]
 
Short_t fnTrackCandHit [MAXTRACKSPEREVENT]
 
Short_t fStrawCode [NUMBER_STRAWS]
 
Short_t fStrawCode2 [NUMBER_STRAWS]
 
Short_t fTubeID [MAXSTTHITS]
 
int fNevents_to_plot
 
int istampa
 
int IVOLTE
 
Double_t fALFA [MAXTRACKSPEREVENT]
 
Double_t fBETA [MAXTRACKSPEREVENT]
 
Double_t fBFIELD
 
Double_t fCandidatePixelDriftRadius [MAXMVDPIXELHITS]
 
Double_t fCandidatePixelErrorDriftRadius [MAXMVDPIXELHITS]
 
Double_t fCandidatePixelS [MAXMVDPIXELHITS]
 
Double_t fCandidatePixelZ [MAXMVDPIXELHITS]
 
Double_t fCandidateStripDriftRadius [MAXMVDSTRIPHITS]
 
Double_t fCandidateStripErrorDriftRadius [MAXMVDSTRIPHITS]
 
Double_t fCandidateStripS [MAXMVDSTRIPHITS]
 
Double_t fCandidateStripZ [MAXMVDSTRIPHITS]
 
Double_t fCandidateSciTilDriftRadius
 
Double_t fCandidateSciTilErrorDriftRadius
 
Double_t fCandidateSciTilS
 
Double_t fCandidateSciTilZ
 
Double_t fCandidateSkewS [2 *MAXSTTHITS]
 
Double_t fCandidateSkewZ [2 *MAXSTTHITS]
 
Double_t fCandidateSkewZDrift [2 *MAXSTTHITS]
 
Double_t fCandidateSkewZError [2 *MAXSTTHITS]
 
Double_t fCosine [LEGIANDRE_NTHETADIV]
 
Double_t fCxMC [MAXMCTRACKS]
 
Double_t fCyMC [MAXMCTRACKS]
 
Double_t fDELTATHETA
 
Double_t fFimin
 
Double_t fGAMMA [MAXTRACKSPEREVENT]
 
Double_t fMCSkewAloneX [MAXSTTHITS]
 
Double_t fMCSkewAloneY [MAXSTTHITS]
 
Double_t fMCtruthTrkInfo [15][MAXMCTRACKS]
 
Double_t fOx [MAXTRACKSPEREVENT]
 
Double_t fOy [MAXTRACKSPEREVENT]
 
Double_t fposizSciTil [MAXSCITILHITS][3]
 
Double_t fpSciTilx [MAXSCITILHITS]
 
Double_t fpSciTily [MAXSCITILHITS]
 
Double_t fpSciTilz [MAXSCITILHITS]
 
Double_t fR [MAXTRACKSPEREVENT]
 
Double_t frefindexMvdPixel [MAXMVDPIXELHITS]
 
Double_t frefindexMvdStrip [MAXMVDSTRIPHITS]
 
Double_t fradiaConf [NRDIVCONFORMAL]
 
Double_t fR_MC [MAXMCTRACKS]
 
Double_t fsigmaXMvdPixel [MAXMVDPIXELHITS]
 
Double_t fsigmaYMvdPixel [MAXMVDPIXELHITS]
 
Double_t fsigmaZMvdPixel [MAXMVDPIXELHITS]
 
Double_t fsigmaXMvdStrip [MAXMVDSTRIPHITS]
 
Double_t fsigmaYMvdStrip [MAXMVDSTRIPHITS]
 
Double_t fsigmaZMvdStrip [MAXMVDSTRIPHITS]
 
Double_t fSinus [LEGIANDRE_NTHETADIV]
 
Double_t fS_SciTilHitsinTrack [MAXTRACKSPEREVENT][MAXSCITILHITS]
 
Double_t fxTube [NUMBER_STRAWS]
 
Double_t fxxyyTube [NUMBER_STRAWS]
 
Double_t fyTube [NUMBER_STRAWS]
 
Double_t fzTube [NUMBER_STRAWS]
 
Double_t fXMvdPixel [MAXMVDPIXELHITS]
 
Double_t fXMvdStrip [MAXMVDSTRIPHITS]
 
Double_t fYMvdPixel [MAXMVDPIXELHITS]
 
Double_t fYMvdStrip [MAXMVDSTRIPHITS]
 
Double_t fZMvdPixel [MAXMVDPIXELHITS]
 
Double_t fZMvdStrip [MAXMVDSTRIPHITS]
 
Double_t fctime
 
Double_t fctime2
 
Double_t frtime
 
Double_t frtime2
 
TStopwatch ftimer
 
TStopwatch ftimer2
 
FILE * HANDLE
 
FILE * HANDLE2
 
TH1F * hdeltaRPixel
 
TH1F * hdeltaRStrip
 
TH1F * hdeltaRPixel2
 
TH1F * hdeltaRStrip2
 
TClonesArray * fMCTrackArray
 
TClonesArray * fMvdMCPointArray
 
TClonesArray * fMvdPixelHitArray
 
TClonesArray * fMvdStripHitArray
 
TClonesArray * fMvdTrackCandArray
 
TClonesArray * fSciTHitArray
 
TClonesArray * fSciTPointArray
 
TClonesArray * fSttTubeArray
 
TClonesArray * fSttPointArray
 
TClonesArray * fSttHitArray
 
TClonesArray * fSttTrackArray
 
TClonesArray * fSttTrackCandArray
 
TClonesArray * fSttMvdPndTrackCandArray
 
TClonesArray * fSttMvdPndTrackArray
 
PndGeoSttParfSttParameters
 

Static Private Attributes

static const Short_t LEGIANDRE_NRADIUSDIV = 100
 
static const Short_t LEGIANDRE_NTHETADIV = 2* BOCA_90DEGREES_DIVISIONS
 
static const Short_t MAXMCTRACKS = 100
 
static const Short_t MAXMVDPIXELHITS = 500
 
static const Short_t MAXMVDPIXELHITSINTRACK = 10
 
static const Short_t MAXMVDSTRIPHITS = 500
 
static const Short_t MAXMVDSTRIPHITSINTRACK = 10
 
static const Short_t MAXMVDTRACKSPEREVENT = 400
 
static const Short_t MAXSCITILHITS = 200
 
static const Short_t MAXSCITILHITSINTRACK = 2
 
static const Short_t MAXSTTHITS = 900
 
static const Short_t MAXSTTHITSINTRACK = 40
 
static const Short_t MAXTRACKSPEREVENT = 200
 
static const Short_t NFIDIVCONFORMAL = 282
 
static const Short_t NRDIVCONFORMAL = 10
 
static const Short_t NUMBER_STRAWS = 4542
 

Detailed Description

Definition at line 26 of file PndTrkTracking2.h.

Constructor & Destructor Documentation

PndTrkTracking2::PndTrkTracking2 ( )

Default constructor

Definition at line 67 of file PndTrkTracking2.cxx.

References doMcComparison, fMvdAloneTracking, fMvdPixelBranch, fMvdStripBranch, fNevents_to_plot, fSttBranch, fYesCleanMvd, fYesCleanStt, fYesSciTil, Initialization_ClassVariables(), iplotta, istampa, and PndPersistencyTask::SetPersistency().

67  : PndPersistencyTask("Tracking") {
68  istampa = 0;
69  iplotta = false;
70  doMcComparison = false;
71  fYesCleanMvd = false;
72  fYesCleanStt = false;
73  fYesSciTil = false ;
74  fMvdAloneTracking = false;
75  fNevents_to_plot = 10;
76 
77 
79  sprintf(fSttBranch,"STTHit");
80  sprintf(fMvdPixelBranch,"MVDHitsPixel");
81  sprintf(fMvdStripBranch,"MVDHitsStrip");
82  SetPersistency(kTRUE);
83 }
void SetPersistency(Bool_t val=kTRUE)
void Initialization_ClassVariables()
char fMvdPixelBranch[200]
char fSttBranch[200]
char fMvdStripBranch[200]
PndTrkTracking2::PndTrkTracking2 ( Int_t  verbose)

Second constructor

Definition at line 86 of file PndTrkTracking2.cxx.

References doMcComparison, fMvdAloneTracking, fMvdPixelBranch, fMvdStripBranch, fSttBranch, fYesCleanMvd, fYesCleanStt, fYesSciTil, Initialization_ClassVariables(), iplotta, istampa, PndPersistencyTask::SetPersistency(), and verbose.

86  : PndPersistencyTask("Tracking") {
87  istampa = verbose;
88  iplotta = false;
89  doMcComparison = false;
90  fYesCleanMvd = false;
91  fYesCleanStt = false;
92  fYesSciTil = false ;
93  fMvdAloneTracking = false;
94 
96  sprintf(fSttBranch,"STTHit");
97  sprintf(fMvdPixelBranch,"MVDHitsPixel");
98  sprintf(fMvdStripBranch,"MVDHitsStrip");
99  SetPersistency(kTRUE);
100 }
#define verbose
void SetPersistency(Bool_t val=kTRUE)
void Initialization_ClassVariables()
char fMvdPixelBranch[200]
char fSttBranch[200]
char fMvdStripBranch[200]
PndTrkTracking2::PndTrkTracking2 ( int  istamp,
bool  iplot,
bool  doMcComparison 
)

Third constructor

Definition at line 103 of file PndTrkTracking2.cxx.

References doMcComparison, fMvdAloneTracking, fMvdPixelBranch, fMvdStripBranch, fSttBranch, fYesCleanMvd, fYesCleanStt, fYesSciTil, Initialization_ClassVariables(), iplotta, istampa, and PndPersistencyTask::SetPersistency().

104  : PndPersistencyTask("Tracking") {
105  istampa = istamp;
106  iplotta = iplot;
107  doMcComparison = imc;
108  fYesCleanMvd = false;
109  fYesCleanStt = false;
110  fYesSciTil = false ;
111  fMvdAloneTracking = false;
113  sprintf(fSttBranch,"STTHit");
114  sprintf(fMvdPixelBranch,"MVDHitsPixel");
115 
116  sprintf(fMvdStripBranch,"MVDHitsStrip");
117  SetPersistency(kTRUE);
118 }
void SetPersistency(Bool_t val=kTRUE)
void Initialization_ClassVariables()
char fMvdPixelBranch[200]
char fSttBranch[200]
char fMvdStripBranch[200]
PndTrkTracking2::PndTrkTracking2 ( int  istamp,
bool  iplot,
bool  doMcComparison,
bool  doSciTil 
)

Fourth constructor

Definition at line 123 of file PndTrkTracking2.cxx.

References doMcComparison, fMvdAloneTracking, fMvdPixelBranch, fMvdStripBranch, fSttBranch, fYesCleanMvd, fYesCleanStt, fYesSciTil, Initialization_ClassVariables(), iplotta, istampa, and PndPersistencyTask::SetPersistency().

124  : PndPersistencyTask("Tracking") {
125  istampa = istamp;
126  iplotta = iplot;
127  doMcComparison = imc;
128  fYesCleanMvd = false;
129  fYesCleanStt = false;
130  fYesSciTil = doSciTil ;
131  fMvdAloneTracking = false;
133  sprintf(fSttBranch,"STTHit");
134  sprintf(fMvdPixelBranch,"MVDHitsPixel");
135 
136  sprintf(fMvdStripBranch,"MVDHitsStrip");
137  SetPersistency(kTRUE);
138 }
void SetPersistency(Bool_t val=kTRUE)
void Initialization_ClassVariables()
char fMvdPixelBranch[200]
char fSttBranch[200]
char fMvdStripBranch[200]
PndTrkTracking2::~PndTrkTracking2 ( )

Destructor

Definition at line 140 of file PndTrkTracking2.cxx.

140 {}

Member Function Documentation

bool PndTrkTracking2::AcceptHitsConformal ( Double_t  distance,
Double_t  DriftConfR,
Double_t  StrawConfR 
)
private
Short_t PndTrkTracking2::AssociateBetterAfterFitSkewHitsToXYTrack ( Short_t  TemporarynSttSkewhitinTrack,
Short_t  SkewList[][2],
Double_t S,
Double_t Z,
Double_t ZDrift,
Double_t ZError,
Double_t  KAPPA,
Double_t  FI0,
Short_t *  tempore,
Double_t temporeS,
Double_t temporeZ,
Double_t temporeZDrift,
Double_t temporeZError,
Short_t *  STATUS 
)
private

Definition at line 2784 of file PndTrkTracking2.cxx.

References Double_t, fabs(), i, PI, sign(), sin(), STRAW_SKEW_INCLINATION, and STRAWRADIUS.

2800  {
2801 
2802  Short_t NAssociated;
2803  Short_t sign;
2804  Int_t i;
2805 
2806  Double_t bbb,
2807  tempZ[2],
2808  zmin, zmax, deltaz,
2809  zdist[2],
2810  zdist1,
2811  zdist2;
2812 
2813  Double_t allowed_distance = 4.*STRAWRADIUS/sin(STRAW_SKEW_INCLINATION*PI/180.);
2814 
2815  if(fabs(KAPPA)<1.e-20) {
2816  *STATUS=-1;
2817  return 0;
2818  }
2819 
2820  NAssociated=0;
2821  if(KAPPA>0) {
2822  zmin = -FI0/KAPPA;
2823  zmax = (2.*PI-FI0)/KAPPA;
2824  } else {
2825  zmax = -FI0/KAPPA;
2826  zmin = (2.*PI-FI0)/KAPPA;
2827  }
2828  deltaz = zmax-zmin;
2829 
2830  for(i=0; i<CandidateSkewnSttSkewhitinTrack; i++){
2831  bbb=(S[i]-FI0)/KAPPA;
2832  for(sign=0;sign<=1; sign ++){
2833  tempZ[sign]=Z[i]+(2*sign-1)*ZDrift[i];
2834  if( tempZ[sign] > zmax ){
2835  tempZ[sign]=fmod( tempZ[sign]-zmax, deltaz) + zmin;
2836  } else if (tempZ[sign]<zmin){
2837  tempZ[sign]=fmod( tempZ[sign]-zmin, deltaz) + zmax;
2838  }
2839  zdist1 = fabs( bbb - tempZ[sign]);
2840  zdist2 = deltaz- zdist1;
2841  if(zdist2<0.) zdist2 = 0.; // protect against rounding errors.
2842  zdist[sign] = zdist1 < zdist2 ? zdist1 : zdist2;
2843  } // end of for(sign=0;sign<=1; sign++)
2844  zdist1 = zdist[0] < zdist[1] ? zdist[0] : zdist[1];
2845  if( zdist1 < allowed_distance ){
2846  tempore[NAssociated]=SkewList[ i ][0];
2847  temporeS[NAssociated]=S[i];
2848  temporeZ[NAssociated]=Z[i];
2849  temporeZDrift[NAssociated]=ZDrift[i];
2850  temporeZError[NAssociated]=ZError[i];
2851  NAssociated++;
2852  }
2853  } // end of for(i=0; i<CandidateSkewnSttSkewhitinTrack; i++)
2854 
2855  *STATUS=0;
2856  return NAssociated;
2857  }
Int_t i
Definition: run_full.C:25
friend F32vec4 sin(const F32vec4 &a)
Definition: P4_F32vec4.h:111
const Double_t STRAW_SKEW_INCLINATION
const Double_t PI
Double_t
const Double_t STRAWRADIUS
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
double Z
Definition: anaLmdDigi.C:68
int sign(T val)
Definition: PndCADef.h:48
Short_t PndTrkTracking2::AssociateSciTilHit ( Double_t  Oxx,
Double_t  Oyy,
Double_t  Rr,
Short_t *  List,
Double_t esse 
)
private
Short_t PndTrkTracking2::AssociateSkewHitsToXYTrack ( bool *  InclusionListSkew,
Short_t  NSkewhits,
Short_t *  infoskew,
Double_t  Oxx,
Double_t  Oyy,
Double_t  Rr,
Double_t  info[][7],
Double_t WDX,
Double_t WDY,
Double_t WDZ,
Double_t  Fi_low_limit,
Double_t  Fi_up_limit,
Short_t  Charge,
Short_t  SkewList[][2],
Double_t S,
Double_t Z,
Double_t ZDrift,
Double_t ZError 
)
private

Definition at line 2865 of file PndTrkTracking2.cxx.

References PndTrkCTGeometryCalculations::CalculateSandZ(), Double_t, MAXSTTHITS, PI, sin(), and STRAWRADIUS.

Referenced by Exec().

2886  {
2887 
2888  int
2889  ii,
2890  iii,
2891  location,
2892  NAssociated;
2893 
2894  Double_t
2895  auxS[2], // output;
2896  auxZ[2], // output, Zcoordinate of the central wire.
2897  auxZDrift[2], // output, drift radius projected onto the Helix.
2898  auxZError[2]; // output, 150 micron projected onto the Helix.
2899 
2900 
2901  PndTrkCTGeometryCalculations GeomCalculator;
2902 
2903 
2904  NAssociated=0;
2905  for( iii=0; iii< NSkewhits; iii++) {
2906 
2907  GeomCalculator.CalculateSandZ(
2908  Oxx, // input;
2909  Oyy, // input;
2910  Rr, // input;
2911  infoskew[iii], // input, skew straw original hit number;
2912  info, // input;
2913  WDX, // input;
2914  WDY, // input;
2915  WDZ, // input;
2916  auxS, // output;
2917  auxZ, // output, Zcoordinate of the central wire.
2918  auxZDrift, // output, drift radius projected onto the Helix.
2919  auxZError // output, 150 micron projected onto the Helix.
2920  );
2921 
2922  // store S, Z, ZDrift, ZError as follows :
2923  // if infoskew[iii] is the (original) Skew Hit number, and ii (0 or 1) is
2924  // the solution, then the infos are stored in the infoskew[iii] + ii*MAXSTTHITS location;
2925 
2926  for( ii=0; ii<2; ii++){
2927 
2928  if( auxZ[ii] < 999998.){
2929  location = infoskew[iii] + ii*MAXSTTHITS;
2930  S[location] = auxS[ii];
2931 
2932  if( S[location] < Fi_low_limit) {
2933  if( S[location]+2.*PI > Fi_up_limit) continue;
2934  } else if( S[location] > Fi_up_limit) {
2935  if( S[location]- 2.*PI < Fi_low_limit) continue;
2936  }
2937  Z[location] = auxZ[ii];
2938  ZDrift[location] = auxZDrift[ii];
2939 // ZError[location] = auxZError[ii];
2940  ZError[location] = STRAWRADIUS/sin( 3.*PI/180.) ; // this is 0.5 cm / sin(3 degrees) = 9.55 cm, namely the maximum
2941  // reasonable error projected onto the Helix trajectory cylinder;
2942 
2943  // the list of the selected Skew skew hits instead, is stored sequentially;
2944 
2945  SkewList[NAssociated][0] = infoskew[iii]; // n. skew hit in original hit numbering
2946  SkewList[NAssociated][1] = ii; // solution 0 or solution 1 were accepted
2947 
2948  NAssociated++;
2949  } // end of if( auxZ[ii] < 999998.)
2950 
2951  } // end of for( ii=0; ii<2; ii++)
2952 
2953  } // for( iii=0; iii< NSkewhits; iii++)
2954 
2955  return NAssociated;
2956 
2957 
2958 
2959 }
void CalculateSandZ(Double_t Oxx, Double_t Oyy, Double_t Rr, Short_t skewnum, Double_t info[][7], Double_t *WDX, Double_t *WDY, Double_t *WDZ, Double_t S[2], Double_t Z[2], Double_t Zdrift[2], Double_t Zerror[2])
friend F32vec4 sin(const F32vec4 &a)
Definition: P4_F32vec4.h:111
const Double_t PI
Double_t
const Double_t STRAWRADIUS
double Z
Definition: anaLmdDigi.C:68
static const Short_t MAXSTTHITS
Short_t PndTrkTracking2::AssociateSkewHitsToXYTrack2 ( bool *  InclusionListSkew,
Short_t  NSkewhits,
Short_t *  infoskew,
Double_t  Oxx,
Double_t  Oyy,
Double_t  Rr,
Double_t  info[][7],
Double_t WDX,
Double_t WDY,
Double_t WDZ,
Double_t  Fi_low_limit,
Double_t  Fi_up_limit,
Short_t  Charge,
Short_t  SkewList[][2],
Double_t S,
Double_t Z,
Double_t ZDrift,
Double_t ZError 
)
private
bool PndTrkTracking2::BadTrack_ParStt ( Double_t  Oxx,
Double_t  Oyy,
Double_t  Rr,
Short_t  Charge,
Double_t  Xcross[2],
Double_t  Ycross[2],
Short_t  nHits,
Short_t *  ListHits,
Double_t  info[][7],
Double_t  cut,
Short_t  maxnum,
Short_t  islack 
)
private
void PndTrkTracking2::CalculateSinandCosin ( )
private

Definition at line 2965 of file PndTrkTracking2.cxx.

References cos(), fCosine, fDELTATHETA, fSinus, i, LEGIANDRE_NTHETADIV, sin(), THETAMAX, and THETAMIN.

Referenced by Init().

2966 {
2967 
2968  Short_t i;
2969 
2971  for(i=0;i<LEGIANDRE_NTHETADIV;i++){
2972  fSinus[i] = sin(THETAMIN + (i+0.5)*fDELTATHETA);
2973  fCosine[i] = cos(THETAMIN + (i+0.5)*fDELTATHETA);
2974  }
2975 }
friend F32vec4 cos(const F32vec4 &a)
Definition: P4_F32vec4.h:112
Int_t i
Definition: run_full.C:25
friend F32vec4 sin(const F32vec4 &a)
Definition: P4_F32vec4.h:111
Double_t fCosine[LEGIANDRE_NTHETADIV]
static const Short_t LEGIANDRE_NTHETADIV
static const Double_t THETAMAX
Double_t fSinus[LEGIANDRE_NTHETADIV]
static const Double_t THETAMIN
PndTrkTracking2::ClassDef ( PndTrkTracking2  ,
 
)
private
void PndTrkTracking2::Cleanup ( )
inline

Definition at line 47 of file PndTrkTracking2.h.

References fYesCleanMvd, and fYesCleanStt.

47 {fYesCleanStt=true; fYesCleanMvd=true; return;};
void PndTrkTracking2::CleanupMvd ( )
inline

Definition at line 52 of file PndTrkTracking2.h.

References fYesCleanMvd.

52 {fYesCleanMvd=true; return;};
void PndTrkTracking2::CleanupStt ( )
inline

Definition at line 50 of file PndTrkTracking2.h.

References fYesCleanStt.

50 {fYesCleanStt=true; return;};
void PndTrkTracking2::CollectParSttHitsagain ( Vec< bool > &  keepit,
Vec< bool > &  Mvdhits,
Double_t  info[][7],
Short_t  nSttParHit,
Short_t  StartTrackCand,
Short_t  EndTrackCand,
Double_t KAPPA,
Double_t FI0,
Double_t Fi_low_limit,
Double_t Fi_up_limit,
Short_t *  fnSttParHitsinTrack,
Short_t  fListSttParHitsinTrack[][MAXSTTHITSINTRACK] 
)
private

Definition at line 2981 of file PndTrkTracking2.cxx.

References angle, atan2(), Double_t, fabs(), fListSttParHits, fOx, fOy, fR, fSingleHitListStt, i, PI, sqrt(), and STRAWRADIUS.

2997 {
2998 
2999  Short_t i,
3000  itrack,
3001  ihit/*,
3002  nadd*/; //[R.K. 9/2018] unused
3003 
3004  Double_t angle,
3005  deltaZ,
3006  dist,
3007  dist1,
3008  Zpos;
3009 
3010  const Double_t NTIMES=0.4;
3011 // const Double_t NTIMES=1.;
3012 
3013 
3014  for(itrack=StartTrackCand; itrack<EndTrackCand; itrack++){
3015  if( ! keepit[itrack] ) continue;
3016  if( ! Mvdhits[itrack] ) continue;
3017  if( Fi_low_limit[itrack] < -99998.) continue; // case in which
3018  // the track is completely inside the Mvd region.
3019  nParHitsinTrack[itrack]=0;
3020 
3021 // loop over the STT parallel hits and try to attach to each candidate track; in this
3022 // way in one shot I collect also the previously non collected hits and I remove the
3023 // spurious hits.
3024 
3025  //nadd=0;
3026  for(i=0; i<nSttParHit; i++){
3027  ihit = fListSttParHits[i];
3028 
3029  if( !fSingleHitListStt[ihit] ) continue;
3030  angle = atan2(info[ihit][1]-fOy[itrack],info[ihit][0]-fOx[itrack]);
3031  if(angle<0.) angle += 2.*PI;
3032 
3033  // selection on Zpos under assumption that for parallel STT
3034  // makes 1 turn
3035  if( fabs(KAPPA[itrack]) > 1.e-20){
3036  deltaZ = 2.*PI/KAPPA[itrack];
3037  Zpos = (angle - FI0[itrack])/KAPPA[itrack];
3038 
3039  if(
3040  fabs(Zpos-info[ihit][2])>1.5*info[ihit][4] &&
3041  fabs(Zpos+deltaZ-info[ihit][2])>1.5*info[ihit][4] &&
3042  fabs(Zpos-deltaZ-info[ihit][2])>1.5*info[ihit][4]
3043  ) continue;
3044  }
3045 
3046  if( angle>Fi_up_limit[itrack]){
3047  angle -= 2.*PI;
3048  if(angle < Fi_low_limit[itrack]) continue;
3049  } else if (angle < Fi_low_limit[itrack]){
3050  angle += 2.*PI;
3051  if(angle > Fi_up_limit[itrack]) continue;
3052  }
3053 
3054  dist1 = fabs(
3055  sqrt(
3056  (fOx[itrack]-info[ihit][0])*(fOx[itrack]-info[ihit][0])+
3057  (fOy[itrack]-info[ihit][1])*(fOy[itrack]-info[ihit][1])
3058  ) - fR[itrack]
3059  );
3060  dist = fabs( dist1 - info[ihit][3] );
3061 
3062 
3063  // info[ihit][3] = drift radius; if info[ihit][3]>dist then
3064  // the drift circle of this straw crosses the trajectory.
3065  if(dist<NTIMES*STRAWRADIUS || info[ihit][3]> dist ){
3066  ListParHitsinTrack[itrack][ nParHitsinTrack[itrack] ]
3067  =ihit;
3068  nParHitsinTrack[itrack]++;
3069  }
3070 
3071 
3072  } // end of for(i=0; i<nSttParHit; i++)
3073 
3074 
3075 
3076 
3077  } // end of for(itrack=StartTrackCand; itrack<EndTrackCand; itrack++)
3078 
3079  return;
3080 }
Short_t fListSttParHits[MAXSTTHITS]
Double_t fOy[MAXTRACKSPEREVENT]
Int_t i
Definition: run_full.C:25
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
Double_t fOx[MAXTRACKSPEREVENT]
const Double_t PI
Double_t
const Double_t STRAWRADIUS
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
bool fSingleHitListStt[MAXSTTHITS]
friend F32vec4 atan2(const F32vec4 &y, const F32vec4 &x)
Definition: P4_F32vec4.h:117
Double_t angle
Double_t fR[MAXTRACKSPEREVENT]
Short_t PndTrkTracking2::CompareTracks ( Short_t  first_track,
Short_t  second_track 
)
private

Definition at line 3087 of file PndTrkTracking2.cxx.

References fListMvdPixelHitsinTrack, fListMvdStripHitsinTrack, fListSttParHitsinTrack, fListSttSkewHitsinTrack, fnMvdPixelHitsinTrack, fnMvdStripHitsinTrack, fnSttParHitsinTrack, fnSttSkewHitsinTrack, and i.

Referenced by EliminateClones().

3091 {
3092  Short_t
3093  i,
3094  j,
3095  nCommon = 0;
3096 
3097  // comparison of the Pixel;
3098  for(i=0;i<fnMvdPixelHitsinTrack[first_track];i++){
3099  for(j=0;j<fnMvdPixelHitsinTrack[second_track];j++){
3100  if( fListMvdPixelHitsinTrack[first_track][i] ==
3101  fListMvdPixelHitsinTrack[second_track][j] ) {
3102  nCommon++;
3103  }
3104  }
3105  }
3106 
3107  // comparison of the Strips;
3108  for(i=0;i<fnMvdStripHitsinTrack[first_track];i++){
3109  for(j=0;j<fnMvdStripHitsinTrack[second_track];j++){
3110  if( fListMvdStripHitsinTrack[first_track][i] ==
3111  fListMvdStripHitsinTrack[second_track][j] ) {
3112  nCommon++;
3113  }
3114  }
3115  }
3116 
3117 
3118  // comparison of the Axial Stt;
3119  for(i=0;i<fnSttParHitsinTrack[first_track];i++){
3120  for(j=0;j<fnSttParHitsinTrack[second_track];j++){
3121  if( fListSttParHitsinTrack[first_track][i] ==
3122  fListSttParHitsinTrack[second_track][j] ) {
3123  nCommon++;
3124  }
3125  }
3126  }
3127 
3128 
3129  // comparison of the Skew Stt;
3130  for(i=0;i<fnSttSkewHitsinTrack[first_track];i++){
3131  for(j=0;j<fnSttSkewHitsinTrack[second_track];j++){
3132  if( fListSttSkewHitsinTrack[first_track][i] ==
3133  fListSttSkewHitsinTrack[second_track][j] ) {
3134  nCommon++;
3135  }
3136  }
3137  }
3138 
3139  return nCommon;
3140 }
Short_t fListSttSkewHitsinTrack[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK]
Int_t i
Definition: run_full.C:25
Short_t fListMvdStripHitsinTrack[MAXTRACKSPEREVENT][MAXMVDSTRIPHITSINTRACK]
Short_t fnSttSkewHitsinTrack[MAXTRACKSPEREVENT]
Short_t fnSttParHitsinTrack[MAXTRACKSPEREVENT]
Short_t fnMvdPixelHitsinTrack[MAXTRACKSPEREVENT]
Short_t fListMvdPixelHitsinTrack[MAXTRACKSPEREVENT][MAXMVDPIXELHITSINTRACK]
Short_t fListSttParHitsinTrack[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK]
Short_t fnMvdStripHitsinTrack[MAXTRACKSPEREVENT]
bool PndTrkTracking2::EliminateClones ( Short_t  nTotalCandidates,
Double_t  fraction,
bool *  keepit 
)
private

Definition at line 3147 of file PndTrkTracking2.cxx.

References CompareTracks(), fnMvdPixelHitsinTrack, fnMvdStripHitsinTrack, fnSttParHitsinTrack, fnSttSkewHitsinTrack, i, and istampa.

Referenced by Exec().

3152 {
3153 
3154  Short_t i,
3155  j,
3156  nCommon,
3157  nTotalHits[nTotalCandidates];
3158 
3159 
3160  for(i=0;i<nTotalCandidates;i++){
3161  if(keepit[i]) nTotalHits[i]=fnMvdPixelHitsinTrack[i]+fnMvdStripHitsinTrack[i]
3163  }
3164 
3165  // compare the track candidates with each other;
3166  // compare the Mvd Pixels and Strips, the Stt Skews and Axials; forget about the SciTil;
3167 
3168  for(i=0;i<nTotalCandidates-1;i++){
3169  if( ! keepit[i] ) continue;
3170  for(j=i+1; j<nTotalCandidates;j++){
3171  if( ! keepit[j] ) continue;
3172  nCommon = CompareTracks(i,j); // calculates the total number of Mvd+Stt common hits;
3173 if(istampa>=2) { cout<<"from Eliminateclones, traccia i = "<<i<<", j = "<<j<<", nTotalHits[i] "<<
3174 nTotalHits[i]<<", nTotalHits[j] "<<nTotalHits[j]
3175  <<", nCommon "<<nCommon<<endl;}
3176  // criterion for declaring two tracks clones :
3177  if(nCommon > fraction * nTotalHits[i] || nCommon > fraction * nTotalHits[j]) {
3178  // arbitration;
3179  if( nTotalHits[i]>=nTotalHits[j] ){
3180  keepit[j]=false;
3181  } else {
3182  keepit[i]=false;
3183  // in this case quit analysis of the track number i;
3184  continue;
3185  }
3186  }
3187  } // end of for(j=i+1; j<nTotalCandidates;j++)
3188 
3189 
3190  }
3191 
3192 
3193  return true;
3194 }
Int_t i
Definition: run_full.C:25
Short_t CompareTracks(Short_t first_track, Short_t second_track)
Short_t fnSttSkewHitsinTrack[MAXTRACKSPEREVENT]
Short_t fnSttParHitsinTrack[MAXTRACKSPEREVENT]
Short_t fnMvdPixelHitsinTrack[MAXTRACKSPEREVENT]
Short_t fnMvdStripHitsinTrack[MAXTRACKSPEREVENT]
void PndTrkTracking2::EliminateSpuriousSZ_bis ( Short_t  ncand,
Short_t  MaxTurnofTracks,
Double_t  signPz,
Double_t SchosenPixel,
Double_t SchosenStrip,
Double_t SchosenSkew,
Double_t ZchosenPixel,
Double_t ZchosenStrip,
Double_t ZchosenSkew,
Double_t ErrorchosenPixel,
Double_t ErrorchosenStrip,
Double_t ErrorchosenSkew,
Double_t  KAPPA,
Double_t  FI0,
Double_t  Rr 
)
private

Definition at line 3201 of file PndTrkTracking2.cxx.

References PndTrkCTGeometryCalculations::Dist_SZ_bis(), Double_t, error(), ERRORPIXEL, ERRORSTRIP, fabs(), fCandidatePixelS, fCandidatePixelZ, fCandidateSkewS, fCandidateSkewZ, fCandidateSkewZDrift, fCandidateStripS, fCandidateStripZ, fListMvdPixelHitsinTrack, fListMvdStripHitsinTrack, fListSttSkewHitsinTrack, fListSttSkewHitsinTrackSolution, fnMvdPixelHitsinTrack, fnMvdStripHitsinTrack, fnSttSkewHitsinTrack, fXMvdStrip, fYMvdPixel, fYMvdStrip, i, istampa, m, MAXMVDPIXELHITS, MAXMVDSTRIPHITS, MAXSTTHITS, sqrt(), and Z.

Referenced by Exec().

3218 {
3219 
3220  bool already[MAXSTTHITS];
3221 
3222  Short_t i,
3223  j,
3224  k,
3225  m,
3226  auxnMvdPixel,
3227  auxListMvdPixel[MAXMVDPIXELHITS],
3228  auxnMvdStrip,
3229  auxListMvdStrip[MAXMVDSTRIPHITS],
3230  auxnSttSkew,
3231  auxListSttSkew[MAXSTTHITS],
3232  auxListSttSkewSolution[MAXSTTHITS];
3233 
3234 
3235 // const Double_t MvdCut=1.8,
3236 // const Double_t MvdCut=0.8,
3237  Double_t MvdCut=1.5,
3238  minimumSttDriftError = 1.;
3239 
3240  // for the motivation of this correction see Logbook on page 146; keep in mind that at this point fabs(KAPPA[ncand]) > 1.e-10,
3241  // see code above;
3242  MvdCut = MvdCut*sqrt(1.+Rr*Rr*KAPPA*KAPPA)/(Rr*fabs(KAPPA));
3243  minimumSttDriftError = minimumSttDriftError*sqrt(1.+Rr*Rr*KAPPA*KAPPA)/(Rr*fabs(KAPPA));
3244 
3245  Double_t chosenS,
3246  chosenS2,
3247  ddd,
3248  dista,
3249  //dista1, //[R.K. 9/2018] unused
3250  //dista0, //[R.K. 9/2018] unused
3251  Drift,
3252  error,
3253  Fi,
3254  distance_RS,
3255  distance_Z,
3256  dista_storage[MAXSTTHITS],
3257  Z;
3258 
3260 
3261  int len = sizeof(already);
3262  memset (already,false,len);
3263 
3264  auxnMvdPixel=0;
3265  auxnMvdStrip=0;
3266  auxnSttSkew=0;
3267 
3268  Double_t Pix_distance[fnMvdPixelHitsinTrack[ncand]];
3269 
3270 
3271  for(i=0;i< fnMvdPixelHitsinTrack[ncand] ;i++){
3272  k = fListMvdPixelHitsinTrack[ncand][i];
3273  Z = fCandidatePixelZ[k];
3274  Fi= fCandidatePixelS[k];
3275  dista = GeomC.Dist_SZ_bis(Rr,KAPPA,FI0,Z,Fi,MaxTurnofTracks,signPz,chosenS);
3276  if(istampa>=2){
3277  cout<<"from EliminateSpuriousSZ_bis, Pixel n. "<<fListMvdPixelHitsinTrack[ncand][i]<<
3278  ", Z "<<Z<<", S "<<Fi<<", R*S "<<Rr*Fi<< ", dista "<<dista<<", X "<<
3280  if( dista < MvdCut){
3281  auxListMvdPixel[auxnMvdPixel]=fListMvdPixelHitsinTrack[ncand][i];
3282  SchosenPixel[fListMvdPixelHitsinTrack[ncand][i]]= chosenS;
3283  ZchosenPixel[fListMvdPixelHitsinTrack[ncand][i]]=Z;
3284  ErrorchosenPixel[fListMvdPixelHitsinTrack[ncand][i]]=ERRORPIXEL;
3285  Pix_distance[auxnMvdPixel] = dista;
3286  auxnMvdPixel++;
3287  if(istampa>=2){ cout<<", chosen."<<endl;}
3288  } else {
3289  if(istampa>=2){ cout<<", not chosen. "<<endl;}
3290  }
3291  } // end of for(i=0;i<*nPixelHitsinTrack;i++)
3292 
3293 
3294  Double_t Strip_distance[fnMvdStripHitsinTrack[ncand]];
3295  for(j=0;j<fnMvdStripHitsinTrack[ncand];j++){
3296  i=j+fnMvdPixelHitsinTrack[ncand] ;
3297  k = fListMvdStripHitsinTrack[ncand][j];
3298  Z = fCandidateStripZ[k];
3299  Fi= fCandidateStripS[k];
3300  dista = GeomC.Dist_SZ_bis(Rr,KAPPA,FI0,Z,Fi,MaxTurnofTracks,signPz,chosenS);
3301  if(istampa>=2){
3302  cout<<"from EliminateSpuriousSZ_bis, Strip n. "<<fListMvdStripHitsinTrack[ncand][j]<<
3303  ", Z "<<Z<<", S "<<Fi<<", R*S "<<Rr*Fi<< ", dista "<<dista<<", X "<<
3305  if( dista < MvdCut){
3306  auxListMvdStrip[auxnMvdStrip]=fListMvdStripHitsinTrack[ncand][j];
3307  SchosenStrip[fListMvdStripHitsinTrack[ncand][j]]= chosenS ;
3308  ZchosenStrip[fListMvdStripHitsinTrack[ncand][j]]=Z;
3309  ErrorchosenStrip[fListMvdStripHitsinTrack[ncand][j]]=ERRORSTRIP;
3310  Strip_distance[auxnMvdStrip] = dista;
3311  auxnMvdStrip++;
3312  if(istampa>=2){ cout<<", chosen. "<<endl;}
3313  } else {
3314  if(istampa>=2){ cout<<", not chosen. "<<endl;}
3315  }
3316  } // end of for(j=0;j<*nStripHitsinTrack;j++)
3317 
3318 
3319  for(j=0;j<fnSttSkewHitsinTrack[ncand];j++){
3320 
3321  i=j+ fnMvdPixelHitsinTrack[ncand]+
3322  fnMvdStripHitsinTrack[ncand];
3324  Z = fCandidateSkewZ[k];
3325  Fi = fCandidateSkewS[k];
3326  Drift = fCandidateSkewZDrift[k];
3327 
3328  dista =GeomC.Dist_SZ_bis(Rr,KAPPA,FI0,Z+Drift,Fi,MaxTurnofTracks,signPz,chosenS);
3329  ddd = GeomC.Dist_SZ_bis(Rr,KAPPA,FI0,Z-Drift,Fi,MaxTurnofTracks,signPz,chosenS2);
3330 
3331  if( dista>ddd ) {
3332  dista = ddd;
3333  ZchosenSkew[ fListSttSkewHitsinTrack[ncand][j] ]= Z-Drift;
3334  SchosenSkew[ fListSttSkewHitsinTrack[ncand][j] ]= chosenS2;
3335  } else {
3336  ZchosenSkew[ fListSttSkewHitsinTrack[ncand][j] ] = Z+Drift;
3337  SchosenSkew[ fListSttSkewHitsinTrack[ncand][j] ]= chosenS;
3338 
3339 
3340  }
3341 
3342 
3343  if(istampa>=2){
3344  cout<<"from EliminateSpuriousSZ_bis, Skew Stt n. "<<fListSttSkewHitsinTrack[ncand][j]<<", suo Zed "<<
3345  Z<<", suo S "<< SchosenSkew[ fListSttSkewHitsinTrack[ncand][j] ] <<
3346  ", suo Drift "<<Drift<<", dista+ "<<dista<<", dista- "<<ddd
3347  <<", Maxturns "<< MaxTurnofTracks<<", signPz "<<signPz<< endl;
3348  }
3349 
3350 // error = Drift;
3351  // the following error is 0.5 cm/sin(3 degrees) = 9.55 cm;
3352  error = 9.55;
3353 
3354 
3355  if(
3356  dista < error
3357 // dista < 4.*error
3358 // ||
3359 // dista < 2.*minimumSttDriftError
3360  )
3361  {
3362 
3363  // check now if the other solution of the same hit
3364  // has already been selected before;
3365 
3366  if( already[ fListSttSkewHitsinTrack[ncand][j] ]){
3367  // in this case the other solution has already been
3368  // selected; therefore in dista_storage[ ListSkewHitsinTrack[j] ]
3369  // there must be the distance previously calculated;
3370  if( dista_storage[ fListSttSkewHitsinTrack[ncand][j] ]>dista ){
3371  auxListSttSkew[auxnSttSkew]= fListSttSkewHitsinTrack[ncand][j] ;
3372  auxListSttSkewSolution[auxnSttSkew]= fListSttSkewHitsinTrackSolution[ncand][j];
3373  ErrorchosenSkew[ fListSttSkewHitsinTrack[ncand][j] ]=error;
3374  auxnSttSkew++;
3375  }
3376  } else { // continuation of if( already[ ListSkewHitsinTrack[j] ]
3377 
3378 
3379  already[ fListSttSkewHitsinTrack[ncand][j] ] = true;
3380  // store the distance calculated;
3381  dista_storage[ fListSttSkewHitsinTrack[ncand][j] ]=dista;
3382  auxListSttSkew[auxnSttSkew]= fListSttSkewHitsinTrack[ncand][j] ;
3383  auxListSttSkewSolution[auxnSttSkew]=fListSttSkewHitsinTrackSolution[ncand][j];
3384  ErrorchosenSkew[ fListSttSkewHitsinTrack[ncand][j] ]=error;
3385  auxnSttSkew++;
3386 
3387  } // end of if( already[ ListSkewHitsinTrack[j] ] )
3388 
3389  } // end of if( dista < 4.*error ....)
3390  } // end of for(j=0;j<*nSkewHitsinTrack;j++)
3391 
3392 
3393 
3394 
3395 // reload the list of good hits
3396 
3397  fnMvdPixelHitsinTrack[ncand] = auxnMvdPixel;
3398  fnMvdStripHitsinTrack[ncand] = auxnMvdStrip;
3399  fnSttSkewHitsinTrack[ncand] = auxnSttSkew;
3400  for(j=0;j<fnMvdPixelHitsinTrack[ncand];j++){
3401  fListMvdPixelHitsinTrack[ncand][j]=auxListMvdPixel[j];
3402  }
3403  for(j=0;j<fnMvdStripHitsinTrack[ncand];j++){
3404  fListMvdStripHitsinTrack[ncand][j]=auxListMvdStrip[j];
3405  }
3406  for(j=0;j<fnSttSkewHitsinTrack[ncand];j++){
3407  fListSttSkewHitsinTrack[ncand][j]=auxListSttSkew[j];
3408  fListSttSkewHitsinTrackSolution[ncand][j]=auxListSttSkewSolution[j];
3409  }
3410 
3411 
3412 
3413  // in case of Pixel hits with the same X and Y(and different Z) do arbitration;
3414  bool inclusion[fnMvdPixelHitsinTrack[ncand]];
3415  memset (inclusion,true,sizeof(inclusion));
3416  for(i=0;i<fnMvdPixelHitsinTrack[ncand];i++){
3417  if( !inclusion[i]) continue;
3418  k = fListMvdPixelHitsinTrack[ncand][i];
3419  for(j=i+1;j<fnMvdPixelHitsinTrack[ncand];j++){
3420  m = fListMvdPixelHitsinTrack[ncand][j];
3421  if( !inclusion[j]) continue;
3422  distance_RS = fabs((SchosenPixel[k]- SchosenPixel[m]))*Rr;
3423  distance_Z = fabs(ZchosenPixel[k] - ZchosenPixel[m]);
3424  if( distance_RS <0.2 && distance_Z > 1. ){
3425  if( fabs( Pix_distance[i] ) < fabs( Pix_distance[j])){
3426  inclusion[j]=false;
3427  } else {
3428  inclusion[i]=false;
3429  }
3430  //dista0 = Pix_distance[i]; //[R.K. 9/2018] unused
3431  //dista1 =Pix_distance[j]; //[R.K. 9/2018] unused
3432  }
3433  } // end of for(i=0;i<auxnMvdPixel;i++)
3434  } // end of for(i=0;i<auxnMvdPixel;i++)
3435  // reloading the list of the "arbitrated" Pixels;
3436  auxnMvdPixel=0;
3437  for(j=0;j<fnMvdPixelHitsinTrack[ncand];j++){
3438  if( !inclusion[j]) continue;
3439  fListMvdPixelHitsinTrack[ncand][auxnMvdPixel]=fListMvdPixelHitsinTrack[ncand][j];
3440  auxnMvdPixel++;
3441  } // end of for(j=0;j<*nPixelHitsinTrack;j++)
3442  fnMvdPixelHitsinTrack[ncand] = auxnMvdPixel;
3443 
3444 
3445  // in case of Strips hits with the same S do arbitration;
3446 
3447  bool inclusion2[fnMvdStripHitsinTrack[ncand]];
3448  memset (inclusion2,true,sizeof(inclusion2));
3449  for(i=0;i<fnMvdStripHitsinTrack[ncand];i++){
3450  if( !inclusion2[i]) continue;
3451  k = fListMvdStripHitsinTrack[ncand][i];
3452  for(j=i+1;j<fnMvdStripHitsinTrack[ncand];j++){
3453  if( !inclusion2[j]) continue;
3454  m = fListMvdStripHitsinTrack[ncand][j];
3455 
3456  distance_RS = fabs((SchosenStrip[k]- SchosenStrip[m]))*Rr;
3457  distance_Z = fabs(ZchosenStrip[k] - ZchosenStrip[m]);
3458 
3459  if( distance_RS <0.2 && distance_Z > 1. ){
3460  if( fabs( Strip_distance[i] ) < fabs( Strip_distance[j])){
3461  inclusion2[j]=false;
3462  } else {
3463  inclusion2[i]=false;
3464  }
3465  //dista0 = Strip_distance[i]; //[R.K. 9/2018] unused
3466  //dista1 = Strip_distance[j]; //[R.K. 9/2018] unused
3467  }
3468  } // end of for(i=0;i<auxnMvdStrip;i++)
3469  } // end of for(i=0;i<auxnMvdStrip;i++)
3470  // reloading the list of the "arbitrated" Strips;
3471  auxnMvdStrip=0;
3472  for(j=0;j<fnMvdStripHitsinTrack[ncand];j++){
3473  if( !inclusion2[j]) continue;
3474  fListMvdStripHitsinTrack[ncand][auxnMvdStrip]=fListMvdStripHitsinTrack[ncand][j];
3475  auxnMvdStrip++;
3476  }
3477  fnMvdStripHitsinTrack[ncand] = auxnMvdStrip;
3478 
3479 
3480  return;
3481 
3482 }
Double_t fYMvdStrip[MAXMVDSTRIPHITS]
Double_t fXMvdStrip[MAXMVDSTRIPHITS]
Short_t fListSttSkewHitsinTrack[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK]
Int_t i
Definition: run_full.C:25
__m128 m
Definition: P4_F32vec4.h:28
Short_t fListMvdStripHitsinTrack[MAXTRACKSPEREVENT][MAXMVDSTRIPHITSINTRACK]
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
Double_t fCandidateStripZ[MAXMVDSTRIPHITS]
Short_t fnSttSkewHitsinTrack[MAXTRACKSPEREVENT]
static void error(int no)
Definition: ranlxd.cxx:419
Double_t Dist_SZ_bis(Double_t Rr, Double_t KAPPA, Double_t FI0, Double_t ZED, Double_t S, Short_t n_allowed_rounds, Double_t signPz, Double_t &chosenS)
Double_t
const Double_t ERRORSTRIP
Double_t fCandidatePixelS[MAXMVDPIXELHITS]
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
static const Short_t MAXMVDPIXELHITS
Double_t fYMvdPixel[MAXMVDPIXELHITS]
Short_t fnMvdPixelHitsinTrack[MAXTRACKSPEREVENT]
Double_t fCandidateSkewS[2 *MAXSTTHITS]
Short_t fListSttSkewHitsinTrackSolution[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK]
Short_t fListMvdPixelHitsinTrack[MAXTRACKSPEREVENT][MAXMVDPIXELHITSINTRACK]
Double_t fCandidateSkewZDrift[2 *MAXSTTHITS]
Double_t fCandidateSkewZ[2 *MAXSTTHITS]
double Z
Definition: anaLmdDigi.C:68
const Double_t ERRORPIXEL
Short_t fnMvdStripHitsinTrack[MAXTRACKSPEREVENT]
static const Short_t MAXMVDSTRIPHITS
Double_t fCandidatePixelZ[MAXMVDPIXELHITS]
static const Short_t MAXSTTHITS
Double_t fCandidateStripS[MAXMVDSTRIPHITS]
void PndTrkTracking2::EliminateSpuriousSZ_ter ( Short_t  ncand,
Short_t  MaxTurnofTracks,
Double_t  signPz,
Double_t SchosenPixel,
Double_t SchosenStrip,
Double_t SchosenSkew,
Double_t ZchosenPixel,
Double_t ZchosenStrip,
Double_t ZchosenSkew,
Double_t ErrorchosenPixel,
Double_t ErrorchosenStrip,
Double_t ErrorchosenSkew,
Double_t  KAPPA,
Double_t  FI0,
Double_t  Rr 
)
private

Definition at line 3494 of file PndTrkTracking2.cxx.

References PndTrkCTGeometryCalculations::Dist_SZ_bis(), Double_t, error(), ERRORPIXEL, ERRORSTRIP, fabs(), fCandidatePixelS, fCandidatePixelZ, fCandidateSkewS, fCandidateSkewZ, fCandidateSkewZDrift, fCandidateStripS, fCandidateStripZ, fListMvdPixelHitsinTrack, fListMvdStripHitsinTrack, fListSttSkewHitsinTrack, fListSttSkewHitsinTrackSolution, fnMvdPixelHitsinTrack, fnMvdStripHitsinTrack, fnSttSkewHitsinTrack, fXMvdStrip, fYMvdPixel, fYMvdStrip, i, istampa, MAXMVDPIXELHITS, MAXMVDSTRIPHITS, MAXSTTHITS, sqrt(), and Z.

3511 {
3512 
3513  bool already[MAXSTTHITS];
3514 
3515  Short_t i,
3516  j,
3517  k,
3518  auxnMvdPixel,
3519  auxListMvdPixel[MAXMVDPIXELHITS],
3520  auxnMvdStrip,
3521  auxListMvdStrip[MAXMVDSTRIPHITS],
3522  auxnSttSkew,
3523  auxListSttSkew[MAXSTTHITS],
3524  auxListSttSkewSolution[MAXSTTHITS];
3525 
3526 // the main difference with respect to EliminateSpuriousSZ_bis is that there is no arbitration between hits
3527 // having similar same S. The philosophy is that when this method is called, the trajectory in SZ should be
3528 // already very well determined, consequently to reject spurious Mvd hit it should be enough to use the distance
3529 // criterion;
3530 
3531 
3532 // const Double_t MvdCut=1.8,
3533 // const Double_t MvdCut=0.8,
3534 // const Double_t MvdCut=1.,
3535  Double_t MvdCut= 1.5,
3536  minimumSttDriftError = 1.;
3537 
3538  // for the motivation of this correction see Logbook on page 146; keep in mind that at this point fabs(KAPPA[ncand]) > 1.e-10,
3539  // see code above;
3540  MvdCut = MvdCut*sqrt(1.+Rr*Rr*KAPPA*KAPPA)/(Rr*fabs(KAPPA));
3541 if(istampa>=2) cout<<"from eliminatespurioussz_ter, MvdCut "<<MvdCut<<endl;
3542  minimumSttDriftError = minimumSttDriftError*sqrt(1.+Rr*Rr*KAPPA*KAPPA)/(Rr*fabs(KAPPA));
3543 
3544  Double_t chosenS,
3545  chosenS2,
3546  ddd,
3547  dista,
3548  Drift,
3549  error,
3550  Fi,
3551  dista_storage[MAXSTTHITS],
3552  Z;
3553 
3555 
3556  int len = sizeof(already);
3557  memset (already,false,len);
3558 
3559  auxnMvdPixel=0;
3560  auxnMvdStrip=0;
3561  auxnSttSkew=0;
3562 
3563  //Double_t Pix_distance[fnMvdPixelHitsinTrack[ncand]]; //[R.K. 9/2018] unused
3564 
3565 
3566  for(i=0;i< fnMvdPixelHitsinTrack[ncand] ;i++){
3567  k = fListMvdPixelHitsinTrack[ncand][i];
3568  Z = fCandidatePixelZ[k];
3569  Fi= fCandidatePixelS[k];
3570  dista = GeomC.Dist_SZ_bis(Rr,KAPPA,FI0,Z,Fi,MaxTurnofTracks,signPz,chosenS);
3571  if(istampa>=2){
3572 
3573 
3574  cout<<"from EliminateSpuriousSZ_ter, Pixel n. "<<fListMvdPixelHitsinTrack[ncand][i]<<
3575  ", Z "<<Z<<", R*S "<<Rr*Fi<< ", dista "<<dista<<", X "<<
3577  if( dista < MvdCut){
3578  auxListMvdPixel[auxnMvdPixel]=fListMvdPixelHitsinTrack[ncand][i];
3579  SchosenPixel[fListMvdPixelHitsinTrack[ncand][i]]= chosenS;
3580  ZchosenPixel[fListMvdPixelHitsinTrack[ncand][i]]=Z;
3581  ErrorchosenPixel[fListMvdPixelHitsinTrack[ncand][i]]=ERRORPIXEL;
3582  //Pix_distance[auxnMvdPixel] = dista; //[R.K. 9/2018] unused
3583  auxnMvdPixel++;
3584  if(istampa>=2){ cout<<", chosen. "<<endl;}
3585  } else {
3586  if(istampa>=2){ cout<<", not chosen. "<<endl;}
3587  }
3588  } // end of for(i=0;i<*nPixelHitsinTrack;i++)
3589 
3590 
3591  //Double_t Strip_distance[fnMvdStripHitsinTrack[ncand]]; //[R.K. 9/2018] unused
3592  for(j=0;j<fnMvdStripHitsinTrack[ncand];j++){
3593  i=j+fnMvdPixelHitsinTrack[ncand] ;
3594  k = fListMvdStripHitsinTrack[ncand][j];
3595  Z = fCandidateStripZ[k];
3596  Fi= fCandidateStripS[k];
3597  dista = GeomC.Dist_SZ_bis(Rr,KAPPA,FI0,Z,Fi,MaxTurnofTracks,signPz,chosenS);
3598  if(istampa>=2){
3599  cout<<"from EliminateSpuriousSZ_ter, Strip n. "<<fListMvdStripHitsinTrack[ncand][j]<<
3600  ", Z "<<Z<<", R*S "<<Rr*Fi<< ", dista "<<dista<<", X "<<
3602  if( dista < MvdCut){
3603  auxListMvdStrip[auxnMvdStrip]=fListMvdStripHitsinTrack[ncand][j];
3604  SchosenStrip[fListMvdStripHitsinTrack[ncand][j]]= chosenS ;
3605  ZchosenStrip[fListMvdStripHitsinTrack[ncand][j]]=Z;
3606  ErrorchosenStrip[fListMvdStripHitsinTrack[ncand][j]]=ERRORSTRIP;
3607  //Strip_distance[auxnMvdStrip] = dista; //[R.K. 9/2018] unused
3608  auxnMvdStrip++;
3609  if(istampa>=2){ cout<<", chosen. "<<endl;}
3610  } else {
3611  if(istampa>=2){ cout<<", not chosen. "<<endl;}
3612  }
3613  } // end of for(j=0;j<*nStripHitsinTrack;j++)
3614 
3615 
3616  for(j=0;j<fnSttSkewHitsinTrack[ncand];j++){
3617 
3618  i=j+ fnMvdPixelHitsinTrack[ncand]+
3619  fnMvdStripHitsinTrack[ncand];
3621  Z = fCandidateSkewZ[k];
3622  Fi = fCandidateSkewS[k];
3623  Drift = fCandidateSkewZDrift[k];
3624 
3625  dista =GeomC.Dist_SZ_bis(Rr,KAPPA,FI0,Z+Drift,Fi,MaxTurnofTracks,signPz,chosenS);
3626  ddd = GeomC.Dist_SZ_bis(Rr,KAPPA,FI0,Z-Drift,Fi,MaxTurnofTracks,signPz,chosenS2);
3627  if(istampa>=2){
3628  cout<<"from EliminateSpuriousSZ_ter, Skew Stt n. "<<fListSttSkewHitsinTrack[ncand][j]<<", suo Zed "<<
3629  Z<<", suo Drift "<<Drift<<", dista+ "<<dista<<", dista- "<<ddd<<endl;
3630  }
3631 
3632  if( dista>ddd ) {
3633  dista = ddd;
3634  ZchosenSkew[ fListSttSkewHitsinTrack[ncand][j] ]= Z-Drift;
3635  SchosenSkew[ fListSttSkewHitsinTrack[ncand][j] ]= chosenS2;
3636  } else {
3637  ZchosenSkew[ fListSttSkewHitsinTrack[ncand][j] ] = Z+Drift;
3638  SchosenSkew[ fListSttSkewHitsinTrack[ncand][j] ]= chosenS;
3639  }
3640 
3641 
3642 // error = Drift;
3643  // the following error is 0.5 cm/sin(3 degrees) = 9.55 cm;
3644  error = 9.55;
3645 
3646 
3647  if(
3648  dista < error
3649 // dista < 4.*error
3650 // ||
3651 // dista < 2.*minimumSttDriftError
3652  )
3653  {
3654 
3655  // check now if the other solution of the same hit
3656  // has already been selected before;
3657 
3658  if( already[ fListSttSkewHitsinTrack[ncand][j] ]){
3659  // in this case the other solution has already been
3660  // selected; therefore in dista_storage[ ListSkewHitsinTrack[j] ]
3661  // there must be the distance previously calculated;
3662  if( dista_storage[ fListSttSkewHitsinTrack[ncand][j] ]>dista ){
3663  auxListSttSkew[auxnSttSkew]= fListSttSkewHitsinTrack[ncand][j] ;
3664  auxListSttSkewSolution[auxnSttSkew]= fListSttSkewHitsinTrackSolution[ncand][j];
3665  ErrorchosenSkew[ fListSttSkewHitsinTrack[ncand][j] ]=error;
3666  auxnSttSkew++;
3667  }
3668  } else { // continuation of if( already[ ListSkewHitsinTrack[j] ]
3669 
3670 
3671  already[ fListSttSkewHitsinTrack[ncand][j] ] = true;
3672  // store the distance calculated;
3673  dista_storage[ fListSttSkewHitsinTrack[ncand][j] ]=dista;
3674  auxListSttSkew[auxnSttSkew]= fListSttSkewHitsinTrack[ncand][j] ;
3675  auxListSttSkewSolution[auxnSttSkew]=fListSttSkewHitsinTrackSolution[ncand][j];
3676  ErrorchosenSkew[ fListSttSkewHitsinTrack[ncand][j] ]=error;
3677  auxnSttSkew++;
3678 
3679  } // end of if( already[ ListSkewHitsinTrack[j] ] )
3680 
3681  } // end of if( dista < 4.*error ....)
3682  } // end of for(j=0;j<*nSkewHitsinTrack;j++)
3683 
3684 
3685 
3686 
3687 // reload the list of good hits
3688 
3689  fnMvdPixelHitsinTrack[ncand] = auxnMvdPixel;
3690  fnMvdStripHitsinTrack[ncand] = auxnMvdStrip;
3691  fnSttSkewHitsinTrack[ncand] = auxnSttSkew;
3692  for(j=0;j<fnMvdPixelHitsinTrack[ncand];j++){
3693  fListMvdPixelHitsinTrack[ncand][j]=auxListMvdPixel[j];
3694  }
3695  for(j=0;j<fnMvdStripHitsinTrack[ncand];j++){
3696  fListMvdStripHitsinTrack[ncand][j]=auxListMvdStrip[j];
3697  }
3698  for(j=0;j<fnSttSkewHitsinTrack[ncand];j++){
3699  fListSttSkewHitsinTrack[ncand][j]=auxListSttSkew[j];
3700  fListSttSkewHitsinTrackSolution[ncand][j]=auxListSttSkewSolution[j];
3701  }
3702 
3703 
3704 
3705  return;
3706 
3707 }
Double_t fYMvdStrip[MAXMVDSTRIPHITS]
Double_t fXMvdStrip[MAXMVDSTRIPHITS]
Short_t fListSttSkewHitsinTrack[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK]
Int_t i
Definition: run_full.C:25
Short_t fListMvdStripHitsinTrack[MAXTRACKSPEREVENT][MAXMVDSTRIPHITSINTRACK]
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
Double_t fCandidateStripZ[MAXMVDSTRIPHITS]
Short_t fnSttSkewHitsinTrack[MAXTRACKSPEREVENT]
static void error(int no)
Definition: ranlxd.cxx:419
Double_t Dist_SZ_bis(Double_t Rr, Double_t KAPPA, Double_t FI0, Double_t ZED, Double_t S, Short_t n_allowed_rounds, Double_t signPz, Double_t &chosenS)
Double_t
const Double_t ERRORSTRIP
Double_t fCandidatePixelS[MAXMVDPIXELHITS]
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
static const Short_t MAXMVDPIXELHITS
Double_t fYMvdPixel[MAXMVDPIXELHITS]
Short_t fnMvdPixelHitsinTrack[MAXTRACKSPEREVENT]
Double_t fCandidateSkewS[2 *MAXSTTHITS]
Short_t fListSttSkewHitsinTrackSolution[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK]
Short_t fListMvdPixelHitsinTrack[MAXTRACKSPEREVENT][MAXMVDPIXELHITSINTRACK]
Double_t fCandidateSkewZDrift[2 *MAXSTTHITS]
Double_t fCandidateSkewZ[2 *MAXSTTHITS]
double Z
Definition: anaLmdDigi.C:68
const Double_t ERRORPIXEL
Short_t fnMvdStripHitsinTrack[MAXTRACKSPEREVENT]
static const Short_t MAXMVDSTRIPHITS
Double_t fCandidatePixelZ[MAXMVDPIXELHITS]
static const Short_t MAXSTTHITS
Double_t fCandidateStripS[MAXMVDSTRIPHITS]
void PndTrkTracking2::Exec ( Option_t *  opt)
virtual

Virtual method Exec

Definition at line 827 of file PndTrkTracking2.cxx.

References FindTrackInXYProjection2_InputOutputData::ALFA, PndTrkPlotMacros2_InputData::apotemamaxinnerparstraw, APOTEMAMAXINNERPARSTRAW, PndTrkPlotMacros2_InputData::apotemamaxskewstraw, FindTrackInXYProjection2_InputOutputData::apotemamaxskewstraw, APOTEMAMAXSKEWSTRAW, PndTrkPlotMacros2_InputData::apotemaminouterparstraw, APOTEMAMINOUTERPARSTRAW, PndTrkPlotMacros2_InputData::apotemaminskewstraw, APOTEMAMINSKEWSTRAW, FindTrackInXYProjection2_InputOutputData::apotemastrawdetectormin, PndTrkPlotMacros2_InputData::apotemastrawdetectormin, APOTEMASTRAWDETECTORMIN, AssociateSkewHitsToXYTrack(), FindTrackInXYProjection2_InputOutputData::BETA, PndTrkComparisonMCtruth_io_Data::Bfield, PndTrkPlotMacros2_InputData::bfield, PndTrkComparisonMCtruth_io_Data::Charge, PndTrkPlotMacros2_InputData::Charge, FindTrackInXYProjection2_InputOutputData::Charge, PndTrkComparisonMCtruth::ComparisonwithMC(), FindTrackInXYProjection2_InputOutputData::Cosine, PndTrkComparisonMCtruth_io_Data::Cvel, PndTrkPlotMacros2_InputData::cvel, CVEL, PndTrkComparisonMCtruth_io_Data::daTrackFoundaTrackMC, PndTrkPlotMacros2_InputData::daTrackFoundaTrackMC, DELTAnR, FindTrackInXYProjection2_InputOutputData::deltanr, PndTrkComparisonMCtruth_io_Data::DIMENSIONSciTil, PndTrkPlotMacros2_InputData::dimensionscitil, FindTrackInXYProjection2_InputOutputData::dimensionscitil, DIMENSIONSCITIL, PndTrkPlotMacros2_InputData::doMcComparison, doMcComparison, Double_t, EliminateClones(), EliminateSpuriousSZ_bis(), PndTrkComparisonMCtruth_io_Data::Errorsqpixel, ERRORSQPIXEL, PndTrkComparisonMCtruth_io_Data::Errorsqstrip, ERRORSQSTRIP, fabs(), fALFA, fBETA, fBFIELD, fCandidateSkewS, fCandidateSkewZ, fCandidateSkewZDrift, fCandidateSkewZError, fCosine, fctime, fctime2, fGAMMA, PndTrkComparisonMCtruth_io_Data::FI0, PndTrkPlotMacros2_InputData::FI0, FindTrackInXYProjection2_InputOutputData::Fi_final_helix_referenceframe, FindTrackInXYProjection2_InputOutputData::Fi_initial_helix_referenceframe, FindTrackInXYProjection2_InputOutputData::Fi_low_limit, FindTrackInXYProjection2_InputOutputData::Fi_up_limit, FindTrackInXYProjection2_InputOutputData::FiConformalIndex, fInclusionListSciTil, fInclusionListStt, PndTrkCTFindTrackInXY2::FindTrackInXYProjection(), PndTrkChi2Fits::FitSZspace_Chi2_AnnealingtheMvdOnly(), FixDiscontinuitiesFiangleinSZplane(), fListMvdPixelHitsinTrack, fListMvdStripHitsinTrack, fListParContiguous, fListSciTilHitsinTrack, fListSttParHits, fListSttParHitsinTrack, fListSttSkewHits, fListSttSkewHitsinTrack, fListSttSkewHitsinTrackSolution, fListTrackCandHit, fListTrackCandHitType, fMCSkewAloneX, fMCSkewAloneY, fMCtrack_of_Pixel, fMCtrack_of_Strip, PndTrkComparisonMCtruth_io_Data::fMCTrackArray, PndTrkPlotMacros2_InputData::fMCTrackArray, fMCTrackArray, PndTrkComparisonMCtruth_io_Data::fMvdMCPointArray, fMvdMCPointArray, fMvdPixelBranch, fMvdPixelHitArray, fMvdStripBranch, fMvdStripHitArray, fNevents_to_plot, fnMCTracks, fnMvdPixelHit, fnMvdPixelHitsinTrack, fnMvdStripHit, fnMvdStripHitsinTrack, fnParContiguous, fnSciTilHits, fnSciTilHitsinTrack, fnSttParHitsinTrack, fnSttSkewHitsinTrack, fnTrackCandHit, fOx, fOy, fposizSciTil, fpSciTilx, fpSciTily, fpSciTilz, fR, fradiaConf, frefindexMvdPixel, frefindexMvdStrip, PndTrkSttConformalFilling::FromXYtoConformal(), frtime, frtime2, fS_SciTilHitsinTrack, PndTrkComparisonMCtruth_io_Data::fSciTHitArray, fSciTHitArray, PndTrkComparisonMCtruth_io_Data::fSciTilMaxNumber, PndTrkComparisonMCtruth_io_Data::fSciTPointArray, fSciTPointArray, fsigmaXMvdPixel, fsigmaXMvdStrip, fsigmaYMvdPixel, fsigmaYMvdStrip, fsigmaZMvdPixel, fsigmaZMvdStrip, fSingleHitListStt, fSinus, fStrawCode, fStrawCode2, fSttHitArray, fSttMvdPndTrackArray, fSttMvdPndTrackCandArray, PndTrkPlotMacros2_InputData::fSttPointArray, PndTrkComparisonMCtruth_io_Data::fSttPointArray, fSttPointArray, fSttTubeArray, ftimer, ftimer2, fTubeID, fTypeConf, fXMvdPixel, fXMvdStrip, fxTube, fxxyyTube, fYesCleanMvd, fYesCleanStt, fYesSciTil, fYMvdPixel, fYMvdStrip, fyTube, fZMvdPixel, fZMvdStrip, fzTube, FindTrackInXYProjection2_InputOutputData::GAMMA, PndTrkSttClusterFinder::GetClusters(), PndSttTube::GetHalfLength(), PndSttHit::GetIsochrone(), PndSttTube::GetPosition(), PndSciTHit::GetPosition(), PndSdsHit::GetPosition(), PndSttHit::GetTubeID(), PndSttTube::GetWireDirection(), PndTrkComparisonMCtruth_io_Data::HANDLE, HANDLE, PndTrkComparisonMCtruth_io_Data::HANDLE2, HANDLE2, FindTrackInXYProjection2_InputOutputData::HitsinBoxConf, i, FindTrackInXYProjection2_InputOutputData::icounter, PndTrkPlotMacros2_InputData::InclusionListSciTil, FindTrackInXYProjection2_InputOutputData::InclusionListSciTil, FindTrackInXYProjection2_InputOutputData::InclusionListStt, PndTrkPlotMacros2_InputData::InclusionListStt, PndTrkComparisonMCtruth_io_Data::InclusionListStt, FindTrackInXYProjection2_InputOutputData::info, PndTrkPlotMacros2_InputData::info, PndTrkComparisonMCtruth_io_Data::info, FindTrackInXYProjection2_InputOutputData::infoparalConformal, Initial_SttParHits_DecreasingR_Ordering(), iplotta, PndTrkComparisonMCtruth_io_Data::istampa, PndTrkPlotMacros2_InputData::istampa, istampa, PndTrkPlotMacros2_InputData::IVOLTE, PndTrkComparisonMCtruth_io_Data::IVOLTE, IVOLTE, PndTrkPlotMacros2_InputData::KAPPA, PndTrkComparisonMCtruth_io_Data::KAPPA, PndTrkPlotMacros2_InputData::keepit, PndTrkComparisonMCtruth_io_Data::keepit, FindTrackInXYProjection2_InputOutputData::legiandre_nradiusdiv, LEGIANDRE_NRADIUSDIV, FindTrackInXYProjection2_InputOutputData::legiandre_nthetadiv, LEGIANDRE_NTHETADIV, FindTrackInXYProjection2_InputOutputData::ListHitsinTrack, PndTrkPlotMacros2_InputData::ListMvdPixelHitsinTrack, PndTrkComparisonMCtruth_io_Data::ListMvdPixelHitsinTrack, FindTrackInXYProjection2_InputOutputData::ListMvdPixelHitsinTrack, PndTrkPlotMacros2_InputData::ListMvdStripHitsinTrack, PndTrkComparisonMCtruth_io_Data::ListMvdStripHitsinTrack, FindTrackInXYProjection2_InputOutputData::ListMvdStripHitsinTrack, FindTrackInXYProjection2_InputOutputData::ListParContiguous, PndTrkPlotMacros2_InputData::ListSciTilHitsinTrack, PndTrkComparisonMCtruth_io_Data::ListSciTilHitsinTrack, FindTrackInXYProjection2_InputOutputData::ListSciTilHitsinTrack, FindTrackInXYProjection2_InputOutputData::ListSttParHits, PndTrkPlotMacros2_InputData::ListSttParHitsinTrack, PndTrkComparisonMCtruth_io_Data::ListSttParHitsinTrack, PndTrkPlotMacros2_InputData::ListSttSkewHitsinTrack, PndTrkComparisonMCtruth_io_Data::ListSttSkewHitsinTrack, PndTrkPlotMacros2_InputData::ListTrackCandHit, PndTrkComparisonMCtruth_io_Data::ListTrackCandHit, PndTrkPlotMacros2_InputData::ListTrackCandHitType, PndTrkComparisonMCtruth_io_Data::ListTrackCandHitType, LoadPndTrack_TrackCand(), LoadSZetc_forSZfit(), MakeInclusionListStt(), MAXFOUNDCLUSTERS, MAXHITSINCELL, MAXHITSINCLUSTER, FindTrackInXYProjection2_InputOutputData::maxhitsinfit, MAXHITSINFIT, PndTrkPlotMacros2_InputData::MAXMCTRACKS, PndTrkComparisonMCtruth_io_Data::MAXMCTRACKS, MAXMCTRACKS, MAXMVDMCPOINTS, PndTrkComparisonMCtruth_io_Data::Maxmvdmcpoints, PndTrkPlotMacros2_InputData::MAXMVDPIXELHITS, PndTrkComparisonMCtruth_io_Data::MAXMVDPIXELHITS, MAXMVDPIXELHITS, FindTrackInXYProjection2_InputOutputData::maxmvdpixelhitsintrack, PndTrkPlotMacros2_InputData::MAXMVDPIXELHITSINTRACK, PndTrkComparisonMCtruth_io_Data::MAXMVDPIXELHITSINTRACK, MAXMVDPIXELHITSINTRACK, PndTrkPlotMacros2_InputData::MAXMVDSTRIPHITS, PndTrkComparisonMCtruth_io_Data::MAXMVDSTRIPHITS, MAXMVDSTRIPHITS, FindTrackInXYProjection2_InputOutputData::maxmvdstriphitsintrack, PndTrkPlotMacros2_InputData::MAXMVDSTRIPHITSINTRACK, PndTrkComparisonMCtruth_io_Data::MAXMVDSTRIPHITSINTRACK, MAXMVDSTRIPHITSINTRACK, PndTrkPlotMacros2_InputData::MAXSCITILHITS, PndTrkComparisonMCtruth_io_Data::MAXSCITILHITS, MAXSCITILHITS, PndTrkPlotMacros2_InputData::MAXSCITILHITSINTRACK, PndTrkComparisonMCtruth_io_Data::MAXSCITILHITSINTRACK, FindTrackInXYProjection2_InputOutputData::maxscitilhitsintrack, MAXSCITILHITSINTRACK, MAXSKEWHITSINFIT, PndTrkPlotMacros2_InputData::MAXSTTHITS, PndTrkComparisonMCtruth_io_Data::MAXSTTHITS, FindTrackInXYProjection2_InputOutputData::maxstthits, MAXSTTHITS, PndTrkPlotMacros2_InputData::maxstthitsintrack, PndTrkComparisonMCtruth_io_Data::maxstthitsintrack, FindTrackInXYProjection2_InputOutputData::maxstthitsintrack, MAXSTTHITSINTRACK, PndTrkPlotMacros2_InputData::MAXTRACKSPEREVENT, PndTrkComparisonMCtruth_io_Data::MAXTRACKSPEREVENT, MAXTRACKSPEREVENT, PndTrkPlotMacros2_InputData::MCMvdPixelAloneList, PndTrkComparisonMCtruth_io_Data::MCMvdPixelAloneList, PndTrkPlotMacros2_InputData::MCMvdStripAloneList, PndTrkComparisonMCtruth_io_Data::MCMvdStripAloneList, PndTrkPlotMacros2_InputData::MCParalAloneList, PndTrkComparisonMCtruth_io_Data::MCParalAloneList, MCposition, PndTrkPlotMacros2_InputData::MCSciTilAloneList, PndTrkComparisonMCtruth_io_Data::MCSciTilAloneList, PndTrkComparisonMCtruth_io_Data::MCSkewAloneList, PndTrkPlotMacros2_InputData::MCSkewAloneList, PndTrkComparisonMCtruth_io_Data::MCSkewAloneX, PndTrkPlotMacros2_InputData::MCSkewAloneX, PndTrkComparisonMCtruth_io_Data::MCSkewAloneY, PndTrkPlotMacros2_InputData::MCSkewAloneY, FindTrackInXYProjection2_InputOutputData::minimumhitspertrack, MINIMUMMVDHITSPERTRACK, MINIMUMSTTMHITSPERTRACK, FindTrackInXYProjection2_InputOutputData::minouterhitspertrack, MINOUTERHITSPERTRACK, PndTrkCleanup::MvdCleanup(), FindTrackInXYProjection2_InputOutputData::Mvdhits, PndTrkComparisonMCtruth_io_Data::MvdPixelCommonList, PndTrkPlotMacros2_InputData::MvdPixelCommonList, PndTrkComparisonMCtruth_io_Data::MvdPixelSpuriList, PndTrkPlotMacros2_InputData::MvdPixelSpuriList, PndTrkPlotMacros2_InputData::MvdStripCommonList, PndTrkComparisonMCtruth_io_Data::MvdStripCommonList, PndTrkPlotMacros2_InputData::MvdStripSpuriList, PndTrkComparisonMCtruth_io_Data::MvdStripSpuriList, FindTrackInXYProjection2_InputOutputData::nBoxConf, PndTrkPlotMacros2_InputData::NFIDIVCONFORMAL, FindTrackInXYProjection2_InputOutputData::nfidivconformal, NFIDIVCONFORMAL, PndTrkComparisonMCtruth_io_Data::nHitsInMCTrack, PndTrkComparisonMCtruth_io_Data::nHitsInSciTile, FindTrackInXYProjection2_InputOutputData::nHitsinTrack, PndTrkPlotMacros2_InputData::nMCMvdPixelAlone, PndTrkComparisonMCtruth_io_Data::nMCMvdPixelAlone, PndTrkPlotMacros2_InputData::nMCMvdStripAlone, PndTrkComparisonMCtruth_io_Data::nMCMvdStripAlone, PndTrkPlotMacros2_InputData::nMCParalAlone, PndTrkComparisonMCtruth_io_Data::nMCParalAlone, PndTrkPlotMacros2_InputData::nMCSciTilAlone, PndTrkComparisonMCtruth_io_Data::nMCSciTilAlone, PndTrkPlotMacros2_InputData::nMCSkewAlone, PndTrkComparisonMCtruth_io_Data::nMCSkewAlone, PndTrkPlotMacros2_InputData::nMCTracks, PndTrkComparisonMCtruth_io_Data::nMvdPixelCommon, PndTrkPlotMacros2_InputData::nMvdPixelCommon, FindTrackInXYProjection2_InputOutputData::nMvdPixelHit, PndTrkPlotMacros2_InputData::nMvdPixelHit, PndTrkComparisonMCtruth_io_Data::nMvdPixelHit, FindTrackInXYProjection2_InputOutputData::nMvdPixelHitsinTrack, PndTrkComparisonMCtruth_io_Data::nMvdPixelHitsinTrack, PndTrkPlotMacros2_InputData::nMvdPixelHitsinTrack, PndTrkComparisonMCtruth_io_Data::nMvdPixelSpuriinTrack, PndTrkPlotMacros2_InputData::nMvdPixelSpuriinTrack, PndTrkComparisonMCtruth_io_Data::nMvdStripCommon, PndTrkPlotMacros2_InputData::nMvdStripCommon, FindTrackInXYProjection2_InputOutputData::nMvdStripHit, PndTrkComparisonMCtruth_io_Data::nMvdStripHit, PndTrkPlotMacros2_InputData::nMvdStripHit, FindTrackInXYProjection2_InputOutputData::nMvdStripHitsinTrack, PndTrkComparisonMCtruth_io_Data::nMvdStripHitsinTrack, PndTrkPlotMacros2_InputData::nMvdStripHitsinTrack, PndTrkComparisonMCtruth_io_Data::nMvdStripSpuriinTrack, PndTrkPlotMacros2_InputData::nMvdStripSpuriinTrack, PndTrkComparisonMCtruth_io_Data::nParalCommon, PndTrkPlotMacros2_InputData::nParalCommon, FindTrackInXYProjection2_InputOutputData::nParContiguous, PndTrkPlotMacros2_InputData::NRDIVCONFORMAL, FindTrackInXYProjection2_InputOutputData::nrdivconformal, NRDIVCONFORMAL, PndTrkComparisonMCtruth_io_Data::nSciTilCommon, PndTrkPlotMacros2_InputData::nSciTilCommon, PndTrkComparisonMCtruth_io_Data::nSciTilHits, PndTrkPlotMacros2_InputData::nSciTilHits, FindTrackInXYProjection2_InputOutputData::nSciTilHits, PndTrkComparisonMCtruth_io_Data::nSciTilHitsinTrack, PndTrkPlotMacros2_InputData::nSciTilHitsinTrack, FindTrackInXYProjection2_InputOutputData::nSciTilHitsinTrack, PndTrkComparisonMCtruth_io_Data::nSciTilSpuriinTrack, PndTrkPlotMacros2_InputData::nSciTilSpuriinTrack, PndTrkComparisonMCtruth_io_Data::nSkewCommon, PndTrkPlotMacros2_InputData::nSkewCommon, PndTrkComparisonMCtruth_io_Data::nSkewHitsInMCTrack, PndTrkComparisonMCtruth_io_Data::nSpuriParinTrack, PndTrkPlotMacros2_InputData::nSpuriParinTrack, PndTrkComparisonMCtruth_io_Data::nSpuriSkewinTrack, PndTrkComparisonMCtruth_io_Data::nSttHit, PndTrkPlotMacros2_InputData::nSttHit, FindTrackInXYProjection2_InputOutputData::nsttparhit, PndTrkPlotMacros2_InputData::nSttParHit, PndTrkComparisonMCtruth_io_Data::nSttParHitsinTrack, PndTrkPlotMacros2_InputData::nSttParHitsinTrack, PndTrkPlotMacros2_InputData::nSttSkewHit, PndTrkComparisonMCtruth_io_Data::nSttSkewHitsinTrack, PndTrkPlotMacros2_InputData::nSttSkewHitsinTrack, PndTrkComparisonMCtruth_io_Data::nTotalCandidates, PndTrkPlotMacros2_InputData::nTotalCandidates, PndTrkPlotMacros2_InputData::nTrackCandHit, FindTrackInXYProjection2_InputOutputData::number_straws, PndTrkPlotMacros2_InputData::number_straws, NUMBER_STRAWS, Ordering_Loading_ListTrackCandHit(), PndTrkComparisonMCtruth_io_Data::OriginalSciTilList, PndTrkComparisonMCtruth_io_Data::Ox, PndTrkPlotMacros2_InputData::Ox, FindTrackInXYProjection2_InputOutputData::Oxx, PndTrkComparisonMCtruth_io_Data::Oy, PndTrkPlotMacros2_InputData::Oy, FindTrackInXYProjection2_InputOutputData::Oyy, PndTrkComparisonMCtruth_io_Data::ParalCommonList, PndTrkPlotMacros2_InputData::ParalCommonList, PndTrkComparisonMCtruth_io_Data::ParSpuriList, PndTrkPlotMacros2_InputData::ParSpuriList, PI, Position(), FindTrackInXYProjection2_InputOutputData::posizSciT, PndTrkPlotMacros2_InputData::posizSciTil, PndTrkComparisonMCtruth_io_Data::R, PndTrkPlotMacros2_InputData::R, FindTrackInXYProjection2_InputOutputData::r_stt_inner_par_max, FindTrackInXYProjection2_InputOutputData::radiaConf, PndTrkPlotMacros2_InputData::radiaConf, FindTrackInXYProjection2_InputOutputData::RConformalIndex, PndTrkComparisonMCtruth_io_Data::refindexMvdPixel, PndTrkComparisonMCtruth_io_Data::refindexMvdStrip, PndTrkComparisonMCtruth_io_Data::resultFitSZagain, FindTrackInXYProjection2_InputOutputData::Rr, FindTrackInXYProjection2_InputOutputData::rstrawdetectormax, PndTrkPlotMacros2_InputData::rstrawdetectormax, RSTRAWDETECTORMAX, FindTrackInXYProjection2_InputOutputData::S_SciTilHitsinTrack, PndTrkPlotMacros2_InputData::SchosenSkew, PndTrkComparisonMCtruth_io_Data::SciTilCommonList, PndTrkPlotMacros2_InputData::SciTilCommonList, PndTrkComparisonMCtruth_io_Data::SciTilSpuriList, PndTrkPlotMacros2_InputData::SciTilSpuriList, SEMILENGTH_STRAIGHT, PndTrkPlotMacros2_InputData::sigmaXMvdPixel, PndTrkPlotMacros2_InputData::sigmaXMvdStrip, PndTrkPlotMacros2_InputData::sigmaYMvdPixel, PndTrkPlotMacros2_InputData::sigmaYMvdStrip, FindTrackInXYProjection2_InputOutputData::Sinus, PndTrkComparisonMCtruth_io_Data::SkewCommonList, PndTrkPlotMacros2_InputData::SkewCommonList, PndTrkComparisonMCtruth_io_Data::SkewSpuriList, sqrt(), PndTrkPrintouts::stampaMvdHits2(), PndTrkPrintouts::stampaSttHits2(), PndTrkPrintouts::stampetta(), Start(), StoreSZ_MvdScitil(), FindTrackInXYProjection2_InputOutputData::StrawCode, PndTrkPlotMacros2_InputData::StrawCode, FindTrackInXYProjection2_InputOutputData::StrawCode2, PndTrkPlotMacros2_InputData::StrawCode2, FindTrackInXYProjection2_InputOutputData::strawradius, STRAWRADIUS, FindTrackInXYProjection2_InputOutputData::SttStrawOn, PndTrkComparisonMCtruth_io_Data::SttSZfit, PndTrkPlotMacros2_InputData::SttTubeArray, FindTrackInXYProjection2_InputOutputData::thetamax, THETAMAX, FindTrackInXYProjection2_InputOutputData::thetamin, THETAMIN, PndTrkCleanup::TrackCleanup(), FindTrackInXYProjection2_InputOutputData::trajectory_vertex, FindTrackInXYProjection2_InputOutputData::TubeID, FindTrackInXYProjection2_InputOutputData::TypeConf, FindTrackInXYProjection2_InputOutputData::U, FindTrackInXYProjection2_InputOutputData::V, VERTICALGAP, PndTrkPlotMacros2_InputData::verticalgap, PndTrkPlotMacros2_InputData::WDX, PndTrkPlotMacros2_InputData::WDY, PndTrkPlotMacros2_InputData::WDZ, PndTrkPlotMacros2::WriteAllMacros(), FindTrackInXYProjection2_InputOutputData::XMvdPixel, PndTrkComparisonMCtruth_io_Data::XMvdPixel, PndTrkPlotMacros2_InputData::XMvdPixel, FindTrackInXYProjection2_InputOutputData::XMvdStrip, PndTrkComparisonMCtruth_io_Data::XMvdStrip, PndTrkPlotMacros2_InputData::XMvdStrip, PndTrkComparisonMCtruth_io_Data::XSciTilCenter, FindTrackInXYProjection2_InputOutputData::xTube, FindTrackInXYProjection2_InputOutputData::xxyyTube, FindTrackInXYProjection2_InputOutputData::YesSciTil, FindTrackInXYProjection2_InputOutputData::YMvdPixel, PndTrkComparisonMCtruth_io_Data::YMvdPixel, PndTrkPlotMacros2_InputData::YMvdPixel, FindTrackInXYProjection2_InputOutputData::YMvdStrip, PndTrkComparisonMCtruth_io_Data::YMvdStrip, PndTrkPlotMacros2_InputData::YMvdStrip, PndTrkComparisonMCtruth_io_Data::YSciTilCenter, FindTrackInXYProjection2_InputOutputData::yTube, Z, ZCENTER_STRAIGHT, PndTrkComparisonMCtruth_io_Data::ZMvdPixel, PndTrkPlotMacros2_InputData::ZMvdPixel, PndTrkComparisonMCtruth_io_Data::ZMvdStrip, PndTrkPlotMacros2_InputData::ZMvdStrip, PndTrkComparisonMCtruth_io_Data::ZSciTilCenter, and FindTrackInXYProjection2_InputOutputData::zTube.

827  {
828 
829 
830  bool
831  accepted,
832  flag,
833  outcome,
834  GoodSkewFit[MAXTRACKSPEREVENT],
835  keepit[MAXTRACKSPEREVENT],
836  Mvdhits[MAXTRACKSPEREVENT],
837  SttSZfit[MAXTRACKSPEREVENT];
838 
839 
840 
841 
842  Short_t
843  tnHitsInMCTrack[MAXTRACKSPEREVENT],
844  tnMCParalAlone[MAXTRACKSPEREVENT],
845  tnMCSkewAlone[MAXTRACKSPEREVENT],
846  tnParalCommon[MAXTRACKSPEREVENT],
847  tnSkewCommon[MAXTRACKSPEREVENT],
848  tnSkewHitsInMCTrack[MAXTRACKSPEREVENT],
849  tnSpuriParinTrack[MAXTRACKSPEREVENT],
850  tnSpuriSkewinTrack[MAXTRACKSPEREVENT],
851  // given a Hit number it gives its radial box number
852  RConformalIndex[MAXSTTHITS],
853  // given a Hit number it gives its azimuthal box number
854  FiConformalIndex[MAXSTTHITS],
855  CandidateSkewList[2*MAXSTTHITS][2],
856  // nBoxConformal, first index -> radial divisions,
857  // 2nd index -> azimuthal divisions; n. of hits falling in this cell.
858  nBoxConformal[NRDIVCONFORMAL*NFIDIVCONFORMAL],
859  tParalCommonList[MAXTRACKSPEREVENT*MAXSTTHITSINTRACK],
860  tParSpuriList[MAXTRACKSPEREVENT*MAXSTTHITSINTRACK],
861  tSkewCommonList[MAXTRACKSPEREVENT*MAXSTTHITSINTRACK],
862  tSkewSpuriList[MAXTRACKSPEREVENT*MAXSTTHITSINTRACK],
863  HitsinBoxConformal[MAXHITSINCELL*NRDIVCONFORMAL*NFIDIVCONFORMAL],
864  Charge[MAXTRACKSPEREVENT],
865  tdaTrackFoundaTrackMC[MAXTRACKSPEREVENT],
866  resultFitSZagain[MAXTRACKSPEREVENT],
867  SttStrawOn[NUMBER_STRAWS];
868 
869 
871  nHitsInMCTrack(tnHitsInMCTrack, MAXTRACKSPEREVENT,"nHitsInMCTrack"),
872  nMCParalAlone(tnMCParalAlone, MAXTRACKSPEREVENT,"nMCParalAlone"),
873  nMCSkewAlone(tnMCSkewAlone, MAXTRACKSPEREVENT,"nMCSkewAlone"),
874  nParalCommon(tnParalCommon,MAXTRACKSPEREVENT,"nParalCommon"),
875  nSkewCommon(tnSkewCommon,MAXTRACKSPEREVENT,"nSkewCommon"),
876  nSkewHitsInMCTrack(tnSkewHitsInMCTrack, MAXTRACKSPEREVENT,"nSkewHitsInMCTrack"),
877  nSpuriParinTrack(tnSpuriParinTrack, MAXTRACKSPEREVENT,"nSpuriParinTrack"),
878  nSpuriSkewinTrack(tnSpuriSkewinTrack, MAXTRACKSPEREVENT,"nSpuriSkewinTrack"),
879  ParalCommonList(tParalCommonList, MAXTRACKSPEREVENT*MAXSTTHITSINTRACK,"ParalCommonList"),
880  ParSpuriList(tParSpuriList, MAXTRACKSPEREVENT*MAXSTTHITSINTRACK,"ParSpuriList"),
881  SkewCommonList(tSkewCommonList, MAXTRACKSPEREVENT*MAXSTTHITSINTRACK,"SkewCommonList"),
882  SkewSpuriList(tSkewSpuriList, MAXTRACKSPEREVENT*MAXSTTHITSINTRACK,"SkewSpuriList"),
883 
884  daTrackFoundaTrackMC(tdaTrackFoundaTrackMC,MAXTRACKSPEREVENT,"daTrackFoundaTrackMC");
885 
886  memset(SttStrawOn,-1,sizeof(SttStrawOn));
887 
888 //-----------------------------------
889 
890 
891 
892 
893  Short_t
894  ncand,
895  nhitsinfit,
896  nMvdMCPoint,
897  nRemainingCandidates,
898  nTotalCandidates,
899  nXYZhits,
900  i,
901  iCluster,
902  ipunto,
903  j,
904  k,
905  oldPixel=0,
906  oldSkew=0,
907  oldStrip=0,
908  save_ListMvdPixelHitsinTrack[MAXMVDPIXELHITSINTRACK],
909  save_ListSttSkewHitsinTrack[MAXSTTHITSINTRACK],
910  save_ListSttSkewHitsinTrackSolution[MAXSTTHITSINTRACK],
911  save_ListMvdStripHitsinTrack[MAXMVDSTRIPHITSINTRACK],
912  save_nMvdPixelHitsinTrack,
913  save_nSttSkewHitsinTrack,
914  save_nMvdStripHitsinTrack
915  ;
916 
917 
918 
919 
920 
921  Int_t
922  iaccept,
923  len,
924  nSttHit,
925  nSttMCPoint,
926  nSttParHit,
927  nSttSkewHit,
928  nSttTrackCand
929  ;
930 
931  PndSdsMCPoint * pMvdMCPoint;
932 
934 
935 
936 
937 
938  Vec <Int_t> ListHits(tListHits,MAXMVDPIXELHITSINTRACK+MAXMVDSTRIPHITSINTRACK,"ListHits");
939 
940  Double_t
941  tS[2*MAXSTTHITS],
942  tZ[2*MAXSTTHITS];
944  S(tS,2*MAXSTTHITS,"S"),
945  Z(tZ,2*MAXSTTHITS,"Z");
946 
947  Double_t
948  Distance,
949  dis,
950  emme,
951  gap,
952  signPz,
953  DriftRadiusbis[2*MAXSTTHITSINTRACK+MAXMVDPIXELHITSINTRACK+
954  MAXMVDSTRIPHITSINTRACK+MAXSCITILHITSINTRACK],// all skew hits have double
955  ErrorchosenPixel[MAXMVDPIXELHITS],
956  ErrorchosenStrip[MAXMVDSTRIPHITS],
957  ErrorchosenSkew[MAXSTTHITS],
958  ErrorDriftRadiusbis[2*MAXSTTHITSINTRACK+MAXMVDPIXELHITSINTRACK+
959  MAXMVDSTRIPHITSINTRACK+2],// solutions
960  FI0[MAXTRACKSPEREVENT],
961  Fi_final_helix_referenceframe[MAXTRACKSPEREVENT],
962  Fi_initial_helix_referenceframe[MAXTRACKSPEREVENT],
963  Fi_low_limit[MAXTRACKSPEREVENT],
964  Fi_up_limit[MAXTRACKSPEREVENT],
965  KAPPA[MAXTRACKSPEREVENT],
967  +MAXMVDSTRIPHITSINTRACK+MAXSCITILHITSINTRACK], // multiplication by 2 in the
968  SchosenPixel[MAXTRACKSPEREVENT][MAXMVDPIXELHITS],
969  SchosenStrip[MAXTRACKSPEREVENT][MAXMVDSTRIPHITS],
970  SchosenSkew[MAXTRACKSPEREVENT][MAXSTTHITS], // NO multiplication by 2 here because for the
971  // skew hits only one
972  // solution is selected.
973  Start[3],
974 
975  trajectory_vertex[2],
976  Trajectory_Start[MAXTRACKSPEREVENT][2],
977  WDX[MAXSTTHITS],
978  WDY[MAXSTTHITS],
979  WDZ[MAXSTTHITS],
981  +MAXMVDSTRIPHITSINTRACK+MAXSCITILHITSINTRACK], // rather improbable chance that
982 //
983  info[MAXSTTHITS][7],
984  infoparalConformal[MAXSTTHITS][5],
985  ZchosenPixel[MAXTRACKSPEREVENT][MAXMVDPIXELHITS],
986  ZchosenStrip[MAXTRACKSPEREVENT][MAXMVDSTRIPHITS],
987  ZchosenSkew[MAXTRACKSPEREVENT][MAXSTTHITS];
988 
989 
990 //--------------------
991  Double_t
994  tErrorDriftRadius[MAXSTTHITSINTRACK+MAXMVDPIXELHITSINTRACK
998 
1000  DriftRadius(tDriftRadius,MAXSTTHITSINTRACK+MAXMVDPIXELHITSINTRACK
1002  ErrorDriftRadius(tErrorDriftRadius,MAXSTTHITSINTRACK+MAXMVDPIXELHITSINTRACK
1003  +MAXMVDSTRIPHITSINTRACK+MAXSCITILHITSINTRACK,"ErrorDriftRadius"),
1006 //--------------------------------------
1007 
1008 
1009 
1010 
1011 
1012  TVector3
1013  ErrMomentum,
1014  ErrPosition,
1015  Momentum,
1016  Position;
1017 
1018  FairMCPoint *puntator;
1019 
1020 
1021  PndSttHit *pSttHit;
1022 
1023  PndSttTube *pSttTube;
1024 
1025  PndSdsHit
1026  *pMvdPixelHit,
1027  *pMvdStripHit;
1028 
1029  PndTrkCleanup Cleaner;
1030 
1031  PndTrkCTGeometryCalculations GeomCalculator;
1032 
1033  PndTrkPrintouts fPrint;
1034 
1035 
1036  // the class with all the fits. This is used for the SZ fit.
1037 // PndTrkGlpkFits fit; YesGLPKfitSZ=true;
1038 // PndTrkLegendreFits fit;
1039  PndTrkChi2Fits fit;
1040 
1041 // reset the TClones Arrays of the PndTrackCand and PndTrack; it is necessary
1042 // to do this for every event at the very beginning of the Exec (those TClones Arrays
1043 // have been registered in the Init and they are automatically writted each event).
1044 
1045  fSttMvdPndTrackCandArray->Delete();
1046  fSttMvdPndTrackArray->Delete();
1047 
1048 //------------------------------------
1049 
1050  IVOLTE++;
1051 
1052 
1053  if(istampa>=1)
1054  cout<<endl<<"Entering in PndTrkTracking2 : evt (starting from 0) n. "<<IVOLTE<<endl;
1055 
1056 
1057 // ------------------------------------- fetch info from MVD
1058 
1059  if( fMvdPixelHitArray ){
1060  fnMvdPixelHit = fMvdPixelHitArray->GetEntriesFast();
1061  } else {
1062  fnMvdPixelHit = 0;
1063  }
1064 
1065  if( fMvdStripHitArray ){
1066  fnMvdStripHit = fMvdStripHitArray->GetEntriesFast();
1067  } else {
1068  fnMvdStripHit = 0;
1069  }
1070 
1072  cout<<"from PndTrkTracking2, fnMvdPixelHit is > maximum allowed ("
1073  <<MAXMVDPIXELHITS<<") and therefore is set to "
1074  <<MAXMVDPIXELHITS<<endl;
1076  }
1078  cout<<"from PndTrkTracking2, fnMvdStripHit is > maximum allowed ("
1079  <<MAXMVDSTRIPHITS<<") and therefore is set to "
1080  <<MAXMVDSTRIPHITS<<endl;
1082  }
1083 // --------------------------------------------- extract info from MVD Points
1084 
1085  if( fMvdMCPointArray){
1086  nMvdMCPoint = fMvdMCPointArray->GetEntriesFast();
1087  } else {
1088  nMvdMCPoint = 0;
1089  }
1090 
1091  if(nMvdMCPoint>MAXMVDMCPOINTS) {
1092  cout<<"from PndTracking, nMvdMCPoint = "<<nMvdMCPoint
1093  <<" and it is > the maximum number allowed ("<<MAXMVDMCPOINTS<<
1094  ")"<<
1095  ", setting nMvdMCPoint to "<<MAXMVDMCPOINTS<<endl;
1096  nMvdMCPoint=MAXMVDMCPOINTS;
1097  }
1098  if(istampa>=1) cout<<"N. MC Points delle Mvd = "<<nMvdMCPoint<<endl;
1099 
1100 
1101 
1102 // --------------------------------------------- extract info from HITS Pixel MVD
1103 
1104  TVector3 MCposition;
1105 
1106 
1107 
1108 
1109  for( i= 0; i< fnMvdPixelHit; i++){
1110  pMvdPixelHit = (PndSdsHit *) fMvdPixelHitArray->At(i);
1111  TVector3 temp = pMvdPixelHit->GetPosition();
1112  fXMvdPixel[i] = temp.X();
1113  fYMvdPixel[i] = temp.Y();
1114  fZMvdPixel[i] = temp.Z();
1115  fsigmaXMvdPixel[i] = pMvdPixelHit->GetDx();
1116  fsigmaYMvdPixel[i] = pMvdPixelHit->GetDy();
1117  fsigmaZMvdPixel[i] = pMvdPixelHit->GetDz();
1118  frefindexMvdPixel[i] = pMvdPixelHit->GetRefIndex();
1119 
1120  // it seems incredible, but it is easier to use the following algorithm to associate
1121  // a MVD Hit to the MC truth Track!
1122  dis=999999.;
1123  fMCtrack_of_Pixel[i] = -1;
1124  if( frefindexMvdPixel[i]<0) continue; // noise hit, it CANNOT be associated with the MC points;
1125  for(j=0;j<nMvdMCPoint;j++){
1126  // get the MC info.
1127  pMvdMCPoint = (PndSdsMCPoint*) fMvdMCPointArray->At(j);
1128  pMvdMCPoint->Position(MCposition);
1129 
1130  Distance = (MCposition.X()-fXMvdPixel[i])*(MCposition.X()-fXMvdPixel[i])+
1131  (MCposition.Y()-fYMvdPixel[i])*(MCposition.Y()-fYMvdPixel[i])+
1132  (MCposition.Z()- fZMvdPixel[i])*(MCposition.Z() - fZMvdPixel[i]);
1133  if( Distance<dis){
1134  fMCtrack_of_Pixel[i] =pMvdMCPoint->GetTrackID();
1135  dis=Distance;
1136  }
1137  } // end of for(j=0;j<nMvdMCPoint;j++)
1138 
1139 
1140  }
1141 
1142 // ------------------------------------------- extract info from HITS Strip MVD
1143 
1144  for( i= 0; i< fnMvdStripHit; i++){
1145  pMvdStripHit = (PndSdsHit *) fMvdStripHitArray->At(i);
1146  TVector3 temp = pMvdStripHit->GetPosition();
1147  fXMvdStrip[i] = temp.X();
1148  fYMvdStrip[i] = temp.Y();
1149  fZMvdStrip[i] = temp.Z();
1150  fsigmaXMvdStrip[i] = pMvdStripHit->GetDx();
1151  fsigmaYMvdStrip[i] = pMvdStripHit->GetDy();
1152  fsigmaZMvdStrip[i] = pMvdStripHit->GetDz();
1153  frefindexMvdStrip[i] = pMvdStripHit->GetRefIndex();
1154 
1155  // it seems incredible, but it is easier to use the following algorithm to associate
1156  // a MVD Hit to the MC truth Track!
1157  dis=999999.;
1158  fMCtrack_of_Strip[i] = -1;
1159  if( frefindexMvdStrip[i]<0) continue; // noise hit, it CANNOT be associated with the MC points;
1160  for(j=0;j<nMvdMCPoint;j++){
1161  // get the MC info.
1162  pMvdMCPoint = (PndSdsMCPoint*) fMvdMCPointArray->At(j);
1163  pMvdMCPoint->Position(MCposition);
1164 
1165  Distance = (MCposition.X()-fXMvdStrip[i])*(MCposition.X()-fXMvdStrip[i])+
1166  (MCposition.Y()-fYMvdStrip[i])*(MCposition.Y()-fYMvdStrip[i])+
1167  (MCposition.Z()- fZMvdStrip[i])*(MCposition.Z() - fZMvdStrip[i]);
1168  if( Distance<dis){
1169  fMCtrack_of_Strip[i] =pMvdMCPoint->GetTrackID();
1170  dis=Distance;
1171  }
1172  } // end of for(j=0;j<nMvdMCPoint;j++)
1173 
1174 
1175  }
1176 
1177 
1178 // --------------- printout of Mvd Hits;
1179  if(istampa>=1)
1180  fPrint.stampaMvdHits2(
1183  fnMvdPixelHit,
1184  fnMvdStripHit,
1195  fXMvdPixel,
1196  fXMvdStrip,
1197  fYMvdPixel,
1198  fYMvdStrip,
1199  fZMvdPixel,
1200  fZMvdStrip
1201  );
1202 
1203 
1204 
1205 
1206 //--------------------------------------------- fetching the STT MC points
1207  nSttMCPoint = fSttPointArray->GetEntriesFast();
1208  if (nSttMCPoint ==0){
1209  if(istampa>1) cout<<"from PndTrkTracking2 : N. di Stt MC points = 0"<<endl<<endl;
1210  } else if( nSttMCPoint>MAXSTTHITS){
1211  cout<<"from PndTrkTracking2 : N. di Stt MC points = "<<nSttMCPoint
1212  <<" and it is > MAXSTTHITS ("<<MAXSTTHITS
1213  <<"), therefore consider only the first "<<MAXSTTHITS<<" hits"<<endl<<endl;
1214  nSttMCPoint= MAXSTTHITS;
1215  }
1216 
1217 
1218 //-------------------------------------------------------- fetching the STT hits
1219 
1220  nSttHit = fSttHitArray->GetEntriesFast();
1221  if (nSttHit ==0){
1222  if (istampa >= 1) cout<<"from PndTrkTracking2 : N. di Stt Hits = 0, return!"<<endl<<endl;
1223  return;
1224  } else if (nSttHit> MAXSTTHITS) {
1225  cout<<"from PndTrkTracking2 : N. di Stt Hits = "<<nSttHit
1226  <<" and it is > MAXSTTHITS (="<<MAXSTTHITS
1227  <<"), therefore consider only the first "<<MAXSTTHITS<<" hits"<<endl<<endl;
1228  nSttHit= MAXSTTHITS;
1229  }
1230 
1231  if (istampa >= 1) {
1232  cout<<"from PndTrkTracking2 : total # Hits in STT : "<<nSttHit<<endl;
1233  }
1234 
1235  nSttParHit=0;
1236  nSttSkewHit=0;
1237 
1238  for( i= 0; i< nSttHit; i++){
1239  pSttHit = (PndSttHit *) fSttHitArray->At(i);
1240  // right way to extract the corrisponding MC point.
1241  ipunto= pSttHit->GetRefIndex();
1242  // fTubeID[i] = STT tubeID correspondint to the hit number i ;
1243  // the STT tubeID goes from 1 to 4542 inclusive;
1244  fTubeID[i] = pSttHit->GetTubeID();
1245  pSttTube = (PndSttTube *) fSttTubeArray->At(fTubeID[i]);
1246  // drift radius
1247  Double_t dradius = pSttHit->GetIsochrone();
1248  // wire direction
1249  TVector3 wiredirection = pSttTube->GetWireDirection();
1250 
1251  if(wiredirection.Z() >=0.) {
1252  WDX[i] = wiredirection.X();
1253  WDY[i] = wiredirection.Y();
1254  WDZ[i] = wiredirection.Z();
1255  } else {
1256  WDX[i] = -wiredirection.X();
1257  WDY[i] = -wiredirection.Y();
1258  WDZ[i] = -wiredirection.Z();
1259  }
1260  info[i][0]= pSttTube->GetPosition().X();
1261  info[i][1]= pSttTube->GetPosition().Y();
1262  info[i][2]= pSttTube->GetPosition().Z();
1263  info[i][3]= dradius;
1264  info[i][4]= pSttTube->GetHalfLength();
1265 
1266 //-----------------------------------------
1267 
1268 
1269  if(ipunto>=0) {
1270  puntator = (FairMCPoint*) fSttPointArray->At(ipunto);
1271  info[i][6]= puntator->GetTrackID();
1272  } else {
1273  info[i][6]= -10.;
1274  }
1275 
1276  if( fabs( WDX[i] )< 0.00001 && fabs( WDY[i] )< 0.00001 ){
1277  info[i][5]= 1.;
1278  fListSttParHits[nSttParHit]=i;
1279  nSttParHit++;
1280  } else {
1281  info[i][5]= 99.;// to signal that it is a skew straw.
1282  fListSttSkewHits[nSttSkewHit]=i;
1283  nSttSkewHit++;
1284  }
1285 
1286  // printout of the Stt hits;
1287  if (istampa >= 1 ) fPrint.stampaSttHits2(i,ipunto,dradius,WDX,WDY,WDZ,puntator,pSttTube,fTubeID[i]);
1288 
1289  } // end of for( i= 0; i< nSttHit; i++)
1290 
1291 // reordering the list of parallel hits ( fListSttParHits) by decreasing spatial radius;
1292 // first the outermost then the innermost. This is necessary because later the search
1293 // must starts from the outer hits.
1294 
1296 
1297 
1298 // fill the inclusion list for Stt, include only first hit for those straws with
1299 // multiple hits; fInclusionListStt is BY STT HIT NUMBER;
1300 
1301  MakeInclusionListStt(nSttHit, fTubeID, info);
1302 
1303 
1304 //----------------------------------- end of exclusion of straws with multiple hits
1305 
1306 // this MUST go after the MakeInclusionListStt
1307 
1308 
1309  for( i= 0; i< nSttHit; i++){
1310 
1311  if(!fInclusionListStt[i]) continue;
1312 // SttStrawOn is a Short_t used in the XY track pattern finding later; it was initialized at -1;
1313  SttStrawOn[ fTubeID[i] - 1 ] = i;
1314  } // end of for( i= 0; i< nSttHit; i++)
1315 
1316 
1317 
1318 
1319 //-------------------------------------------- fetch the SciTil hits
1320  fnSciTilHits = 0;
1321  if( fSciTHitArray != NULL){
1322  // number SciTil hits/event
1323  fnSciTilHits = fSciTHitArray->GetEntriesFast();
1325  cout<<"from PndTrkTracking2 : N. of SciTil Hits = "<<fnSciTilHits
1326  <<" and it is > MAXSCITILHITS (="<<MAXSCITILHITS
1327  <<"), therefore consider only the first "<<MAXSCITILHITS <<" hits"<<endl<<endl;
1329  }
1330  } // end of if( fSciTHitArray != NULL)
1331 
1332  // it is important that fSciTilMaxNumber and OriginalSciTilList have a scope
1333  // extending in all exec method; that's why they are stated here, out
1334  // of the if( fSciTHitArray != NULL).
1335  Short_t fSciTilMaxNumber;
1336  if( fnSciTilHits > 0) fSciTilMaxNumber = fnSciTilHits ; else fSciTilMaxNumber = 1;
1337 
1338  Short_t
1339  nHitsInSciTile[fSciTilMaxNumber],
1340  OriginalSciTilList[fSciTilMaxNumber][fSciTilMaxNumber];
1341 
1342 //-------- initialization (to 0) of nHitsInSciTile array;
1343  memset (nHitsInSciTile,0,sizeof(nHitsInSciTile));
1344 //---
1345 
1346  if(istampa>=1) cout<<"from PndTrkTracking2, event "<<IVOLTE<<", "<<fnSciTilHits
1347  <<" SciTil hits present initially."<<endl;
1348 
1349  if( fnSciTilHits >0 ){
1350  // OriginalSciTilList is the list of original SciTil hits (not purged yet)
1351  // present in a given SciTil tile :
1352  // OriginalSciTilList[nacceptedhit][*];
1353 
1354 
1355  PndSciTHit *pPndSciTHit;
1356  TVector3 posiz;
1357  // the first SciTil hit; this cannot be duplicate hit by definition.
1358  // The Sci Tiles are numbered here according to the numbering
1359  // of the (first) SciTil Hit inside the Sci Tile.
1360  pPndSciTHit = (PndSciTHit*) fSciTHitArray->At(0);
1361  posiz = pPndSciTHit->GetPosition();
1362  if(istampa>1)cout<<"from PndTrkTracking2 SciTil n. "<<0<<
1363  " not purged, Xpos "<<
1364  posiz.X()<<", Ypos "<<
1365  posiz.Y()<<", Zpos "<<posiz.Z()<<endl;
1366 
1367  fposizSciTil[0][0]=posiz.X();
1368  fposizSciTil[0][1]=posiz.Y();
1369  fposizSciTil[0][2]=posiz.Z();
1370  fpSciTilx[0]=posiz.X();
1371  fpSciTily[0]=posiz.Y();
1372  fpSciTilz[0]=posiz.Z();
1373  OriginalSciTilList[0][0]=0;
1374  nHitsInSciTile[0]=1;
1375  iaccept=1;
1376  // the other SciTil hits; purge them if they are duplicate.
1377  for(j=1; j<fnSciTilHits; j++){
1378  pPndSciTHit = (PndSciTHit*) fSciTHitArray->At(j);
1379  posiz = pPndSciTHit->GetPosition();
1380  if(istampa>1)cout<<"from PndTrkTracking2 SciTil n. "<<j<<" not purged, Xpos "
1381  <<posiz.X()<<", Ypos "<<posiz.Y()<<", Zpos "<<posiz.Z()<<endl;
1382 
1383  // purging the duplicate SciTil hits.
1384  flag = true;
1385  for(k=0; k<iaccept; k++){
1386  if(
1387  (fabs(posiz.X() - fposizSciTil[k][0])< 1.e-20) &&
1388  (fabs(posiz.Y() - fposizSciTil[k][1])< 1.e-20) &&
1389  (fabs(posiz.Z() - fposizSciTil[k][2])< 1.e-20)
1390  ){
1391  flag=false;
1392  OriginalSciTilList[k][nHitsInSciTile[k]]= j;
1393  nHitsInSciTile[k]++;
1394  break;
1395  } // end of if((fabs(posiz.X() - old...
1396  } // end of for(k=0; k<iaccept; k++)
1397  if(flag){
1398  fposizSciTil[iaccept][0]=posiz.X();
1399  fposizSciTil[iaccept][1]=posiz.Y();
1400  fposizSciTil[iaccept][2]=posiz.Z();
1401  fpSciTilx[iaccept]=posiz.X();
1402  fpSciTily[iaccept]=posiz.Y();
1403  fpSciTilz[iaccept]=posiz.Z();
1404  OriginalSciTilList[iaccept][0]= j;
1405  nHitsInSciTile[iaccept]=1;
1406  iaccept++;
1407  }
1408  } // end of for(j=0; j<fnSciTilHits; j++)
1409  fnSciTilHits=iaccept;
1410 
1411  // set the inclusion list of the SciTils to true.
1412 
1413  for(i=0;i<fnSciTilHits;i++){
1414  fInclusionListSciTil[i]=true;
1415  }
1416 
1417 //-----------stampe.
1418 if(istampa>1){
1419  cout<<"from PndTrkTracking2, after purging SciTil; # hits = "<<fnSciTilHits<<endl;
1420  for(j=0; j<fnSciTilHits; j++){
1421  cout<<"from PndTrkTracking2 SciTil n. "<<j<<"Xpos "<<fposizSciTil[j][0]<<", Ypos "<<
1422  fposizSciTil[j][1]<<", Zpos "<<fposizSciTil[j][2]<<" and # hits n this SciTil "<<
1423  nHitsInSciTile[j]<<endl;
1424  }
1425 }
1426 //---------- fine stampe.
1427 
1428 
1429 
1430  } // end of if( fnSciTilHits >0 )
1431 
1432 
1433 //-----------------------------------end fetching SciTil hits.
1434 
1435 
1436 
1437 //-------------------
1438 //-------------------
1439 //-------------------
1440 //-------------------
1441 //-------------------
1442 //-------------------
1443 //------------------- start the combined Mvd-Stt PR
1444 //-------------------
1445 //-------------------
1446 //-------------------
1447 //-------------------
1448 //-------------------
1449 
1450 
1451 //------------------------------------ start the timer;
1452  ftimer.Start(kTRUE);
1453  if(IVOLTE==0){
1454  ftimer2.Start(kTRUE);
1455  } else {
1456  ftimer2.Start(kFALSE);
1457  }
1458 //----------------------------------------------------
1459 
1460 
1461  // initialization of the (assumed) starting point of the tracks, at the origin;
1462  // needs to be modified later;
1463 
1464  trajectory_vertex[0]=trajectory_vertex[1]=0.;
1465  len = sizeof(Trajectory_Start);
1466  memset (Trajectory_Start,0,len);
1467 //--------------
1468 
1469 
1471 
1472  fill.FromXYtoConformal(
1473  trajectory_vertex,
1474  info,
1476  nSttParHit,
1477  infoparalConformal,
1478  STRAWRADIUS
1479  );
1480 
1481 
1482 // find the relevant Stt clusters in XY projection, necessary for the Pattern recognition
1483 
1484  PndTrkSttClusterFinder cluster;
1485  Short_t ListHitsinCluster[MAXFOUNDCLUSTERS*MAXHITSINCLUSTER],
1486  nFoundClusters,
1487  nHitsinCluster[MAXFOUNDCLUSTERS];
1488 
1489 
1490  cluster.GetClusters(
1491  fInclusionListStt, // input; this is the exclusion of Stt hits for Stt multiple hits;
1492  fListParContiguous, // input list (axial Stt); first dimension is NUMBER_STRAWS;
1493  fListSttParHits, // input
1494  fnParContiguous, // input; number of contiguous straws (axial Stt);
1495  // NUMBER_STRAWS even if the numbering scheme for the Stt
1496  // straws goes from 1 to NUMBER_STRAWS included;
1497  nSttParHit, // input;
1498  MAXFOUNDCLUSTERS, // input;
1499  MAXHITSINCLUSTER, // input;
1500  MAXSTTHITS, // input; number of maximux allowed total Stt hits;
1501  NUMBER_STRAWS, // input; number of Stt Straws in total;
1502  fStrawCode, // input;
1503  fStrawCode2, // input;
1504  SttStrawOn, // input;
1505  fSttTubeArray, // input; array of the Stt tubes;
1506  fTubeID, // input;
1507 
1508  ListHitsinCluster, // output;
1509  nFoundClusters, // output;
1510  nHitsinCluster // output;
1511 
1512  );
1513 
1514 //------------------------------------- stampe;
1515 if(istampa>=2){
1516  cout<<"from PndTrkTracking2, evt "<<IVOLTE<<"; number of clusters found : "<<nFoundClusters<<" and their list :\n";
1517  for(int ic=0;ic<nFoundClusters;ic++){
1518  cout<<"cluster n. "<<ic<<" is composed by "<<nHitsinCluster[ic]<<" hits;"<<endl;
1519  for(int icz=0;icz<nHitsinCluster[ic];icz++){
1520  cout<<"\tStt || hit n. "<<ListHitsinCluster[ic*MAXHITSINCLUSTER+icz]<<endl;
1521  }
1522  }
1523 }
1524 //-------------------------fine stampe;
1525 
1526 //-------------------------------------------------------------------
1527  // class that finds the track (Stt hits only) in XY projection
1528  PndTrkCTFindTrackInXY2 SttTrackXYFinder;
1529 
1530  // struct necessary to pass all the parametrs to the PndTrkCTFindTrackInXY::FindTrackInXYProjection
1531  // method. Since these parameters are > 60, cint does NOT accept to pass them in the usual
1532  // way (parameters in the calling sequence) to PndTrkCTFindTrackInXY::FindTrackInXYProjection.
1534 
1535  // loading those elements of the struct common to all the candidate tracks.
1537  InOut.info = info;
1538  InOut.infoparalConformal = infoparalConformal;
1539  InOut.ListParContiguous = fListParContiguous; // array [NUMBER_STRAWS][6] large; list of Stt
1540  InOut.maxhitsinfit = MAXHITSINFIT;
1545  InOut.nMvdPixelHit = fnMvdPixelHit;
1546  InOut.nMvdStripHit = fnMvdStripHit;
1547  InOut.nParContiguous = fnParContiguous; // array NUMBER_STRAWS large; nParContiguous[i] --> number of
1548  // contiguous Stt Straws (max = 6);
1549  InOut.number_straws = NUMBER_STRAWS;
1550 // r_stt_inner_par_max ==> radius of the circumscribed circumference to the
1551  //; outer hexagon defining THE INNER axial Stt straw region;
1553  InOut.StrawCode = fStrawCode; // Short_t array NUMBER_STRAWS large;
1554  InOut.StrawCode2 = fStrawCode2; // Short_t array NUMBER_STRAWS large;
1555  InOut.SttStrawOn = SttStrawOn; // tSttStrawOn[i] >= 0 --> it is the Stt hit number corresponding to Stt
1556  // i-th Tube ID; tSttStrawOn[i] == -1 --> i-th Stt straw NOT hit;
1557  InOut.TubeID = fTubeID; // list of Tube ID; fTubeID[i] is Tube Id of i-th Stt hit;
1558  InOut.thetamax = THETAMAX;
1559  InOut.thetamin = THETAMIN;
1560  InOut.XMvdPixel = fXMvdPixel;
1561  InOut.XMvdStrip = fXMvdStrip;
1562  InOut.YMvdPixel = fYMvdPixel;
1563  InOut.YMvdStrip = fYMvdStrip;
1564  InOut.xTube = fxTube;
1565  InOut.yTube = fyTube;
1566  InOut.zTube = fzTube;
1567  InOut.xxyyTube = fxxyyTube;
1568 
1569 
1570 
1571 
1572 //-------------------
1574  InOut.Cosine = fCosine;
1575  InOut.deltanr = DELTAnR;
1577  InOut.FiConformalIndex = FiConformalIndex;
1578  InOut.HitsinBoxConf = HitsinBoxConformal;
1584  InOut.maxhitsinfit = MAXHITSINFIT;
1586  InOut.maxstthits = MAXSTTHITS;
1588  InOut.nBoxConf = nBoxConformal;
1591  InOut.nSciTilHits = fnSciTilHits;
1592  InOut.nsttparhit = nSttParHit;
1593  InOut.posizSciT = fposizSciTil;
1594  InOut.radiaConf = fradiaConf;
1595  InOut.RConformalIndex = RConformalIndex;
1597  InOut.Sinus = fSinus;
1598  InOut.StrawCode = fStrawCode;
1599  InOut.StrawCode2 = fStrawCode2;
1600  InOut.strawradius = STRAWRADIUS;
1601  InOut.trajectory_vertex = trajectory_vertex;
1602  InOut.YesSciTil = fYesSciTil;
1603 
1604 //---------------------------------------------------------------------------------
1605 
1606 
1607 
1608  // U and V only for the parallel Stt hits.
1609 
1610  Double_t
1613  // variable usedd in the plotting in the Legiandre plot;
1614  InOut.icounter=0;
1615 
1616 
1617 //----- loop over the parallel hits
1618 
1619 // begins the first iteration with more severe cuts on the # hits in track candidate
1620 
1621 int iconta=0;
1622 
1623  nSttTrackCand=0; // # tracks found
1624  if(istampa>=2){ cout<<"event "<<IVOLTE<<endl;}
1625 
1626  for(iCluster=0; iCluster<nFoundClusters ; iCluster++) {
1627 
1628  if(istampa>=2){ cout<<"event "<<IVOLTE<<"; processing cluster n. "<<iCluster<<endl;}
1629 
1630  // output of the found track candidate; assignment of InOut.Fi_low_limit to a already assigned memory
1631  // is necessary ! So it is for InOut.Fi_up_limit;
1632  InOut.Fi_low_limit = &Fi_low_limit[nSttTrackCand];
1633  InOut.Fi_up_limit = &Fi_up_limit[nSttTrackCand];
1634  InOut.ListMvdPixelHitsinTrack = &fListMvdPixelHitsinTrack[nSttTrackCand][0];
1635  InOut.ListMvdStripHitsinTrack = &fListMvdStripHitsinTrack[nSttTrackCand][0];
1636  InOut.Mvdhits = &Mvdhits[nSttTrackCand];
1637  InOut.nMvdPixelHitsinTrack = &fnMvdPixelHitsinTrack[nSttTrackCand];
1638  InOut.nMvdStripHitsinTrack = &fnMvdStripHitsinTrack[nSttTrackCand];
1639  InOut.Oxx = &fOx[nSttTrackCand];
1640  InOut.Oyy = &fOy[nSttTrackCand];
1641  InOut.Rr = &fR[nSttTrackCand];
1642 
1643  // StrawCode convention (in the following left or right is looking at the beam from downstream) :
1644  // -1 = not a boundary straw;
1645  // 10= inner axial boundary left;
1646  // 20= inner axial boundary right;
1647  // 12= outer VERTICAL (BUT NOT OUTERMOST) axial boundary left;
1648  // 22= outer VERTICAL (BUT NOT OUTERMOST) axial boundary right;
1649  // 13= outermost axial boundary left;
1650  // 23= outermost axial boundary; right;
1651  // 14= outer axial boundary, (innermost), left;
1652  // 24= outer axial boundary (innermost), right;
1653  // 15= outer axial boundary, special zone, left;
1654  // 25= outer axial boundary, special zone, right;
1655  // a straw can belong to 2 boundary at most, that's why there are two flags, StrawCode andStrawCode2;
1656 
1657 
1658 
1659  // check that from the start there are at least 2 (usually MINIMUMSTTMHITSPERTRACK=2) axial
1660  // Stt hits;
1661  if( nHitsinCluster[ iCluster ] < MINIMUMSTTMHITSPERTRACK )
1662  {
1663  if(istampa>=2){ cout<<" Loop of Clusters; this cluster (n. "<<iCluster<<
1664  ") has nHitsinCluster = "<<nHitsinCluster[ iCluster ]
1665  <<" which is < MINIMUMSTTMHITSPERTRACK (= "<<
1666  MINIMUMSTTMHITSPERTRACK<<"), no further processing.\n";}
1667  continue;
1668  }
1669  if( nSttTrackCand >= MAXTRACKSPEREVENT) {
1670  cout<<"from PndTrkTracking2 : # n. Tracks found so far = "
1671  <<nSttTrackCand<<" and it is >= MAXTRACKSPEREVENT ( = "
1672  <<MAXTRACKSPEREVENT<<"); exiting from || hit loop.\n";
1673  break;
1674  }
1675 
1676  iconta++;
1677 
1678  // the following is only the initial hits in the current track cand;
1679  fnSttParHitsinTrack[nSttTrackCand] = nHitsinCluster[iCluster];
1680  for(i=0;i<nHitsinCluster[iCluster];i++){
1681  fListSttParHitsinTrack[nSttTrackCand][i]=ListHitsinCluster[iCluster*MAXHITSINCLUSTER+i];
1682  }
1683 
1684  // outputs from the FindTrackInXYProjection class are stored here;
1685  InOut.ALFA = &fALFA[nSttTrackCand];
1686  InOut.BETA = &fBETA[nSttTrackCand];
1687  InOut.Charge = &Charge[nSttTrackCand];
1688  InOut.GAMMA = &fGAMMA[nSttTrackCand];
1689  InOut.ListHitsinTrack = &fListSttParHitsinTrack[nSttTrackCand][0];
1690  InOut.nHitsinTrack = &fnSttParHitsinTrack[nSttTrackCand];
1691 
1692 
1693 //---------------------------------------------
1694 // part to be eliminated;
1695  // outputs from the FindTrackInXYProjection class are stored here;
1696  InOut.Fi_final_helix_referenceframe = &Fi_final_helix_referenceframe[nSttTrackCand];
1697  InOut.Fi_initial_helix_referenceframe = &Fi_initial_helix_referenceframe[nSttTrackCand];
1698  InOut.ListSciTilHitsinTrack = &fListSciTilHitsinTrack[nSttTrackCand][0];
1699  InOut.nSciTilHitsinTrack = &fnSciTilHitsinTrack[nSttTrackCand];
1700  InOut.S_SciTilHitsinTrack = &fS_SciTilHitsinTrack[nSttTrackCand][0];
1701  InOut.TypeConf = &fTypeConf[nSttTrackCand];
1702  InOut.U = &U[nSttTrackCand][0];
1703  InOut.V = &V[nSttTrackCand][0];
1704 
1705  InOut.icounter++; // this is the plot number;
1706 //--------------------------------------------------------
1707 
1708 
1709 
1710 
1711 
1712  outcome = SttTrackXYFinder.FindTrackInXYProjection(&InOut,istampa,IVOLTE);
1713 
1714  if(!outcome){
1715  if(istampa>=2){ cout<<" Loop of Clusters; this cluster (n. "<<iCluster<<
1716  ") has a bad outcome, no further processing.\n";}
1717  }
1718 
1719  if(!outcome) continue;
1720 
1721  // at this point the track candidate has the number of STT hits >= MINIMUMSTTHITSINTRACK,
1722  // it is checked in FindTrackInXYProjection; usually MINIMUMSTTHITSINTRACK=2,
1723  // see MINIMUMSTTHITSINTRACK defined in PndTrkConstants.h
1724 
1725  // at this point the track candidate has the number of STT hits <= MAXSTTHITSINTRACK
1726  // it is checked in FindTrackInXYProjection; MAXSTTHITSINTRACK is defined in
1727  // PndTrkConstants.h
1728 
1729  // check that there is AT LEAST 1 Mvd hit (usually MINIMUMMVDHITSPERTRACK=1);
1730  // this is requested in order to have an initial good fit in SZ space;
1731  // MINIMUMMVDHITSPERTRACK is defined in PndTrkConstants.h;
1732 
1733  if( fnMvdPixelHitsinTrack[nSttTrackCand]+
1735  {
1736  continue;
1737  }
1738 
1739 
1740  InOut.Oyy = &fOy[nSttTrackCand];
1741  InOut.Rr = &fR[nSttTrackCand];
1742 
1743 // -------- here the track and its hits were found, filling the Inclusion list
1744 
1745 
1746 
1747 
1748 
1749  keepit[nSttTrackCand]=true;
1750  nSttTrackCand++;
1751 
1752  if(istampa>=3){ cout<<"At the bottom of Loop of Clusters; end processing cluster n."
1753  <<iCluster<<endl;
1754  }
1755 
1756 
1757 
1758  } // end of for(iCluster=0; iCluster<nFoundClusters ; iCluster++)
1759 
1760 
1761 
1762  for(i=0; i<nSttTrackCand;i++){
1763 
1764  // set FI0 now; FI0 may be changed later in case there is a SZ fitting
1765  FI0[i]=Fi_initial_helix_referenceframe[i];
1766 
1767  // flag of a good fit in SZ space; later they will be set at true if fit in SZ is successful;
1768  GoodSkewFit[i]=false;
1770  keepit[i]=true;
1771 
1772  } // end for(i=0; i<nSttTrackCand;i++)
1773 
1774 
1775 
1776  nTotalCandidates = nSttTrackCand; // nSttTrackCand is already <= MAXTRACKSPEREVENT.
1777 
1778 //-----------------------------------------------------------------------------------------
1779 //-----------------------------------------------------------------------------------------
1780 //----------- from here on, the XY parameters of the Helix don't change. ------------------
1781 //-----------------------------------------------------------------------------------------
1782 //-----------------------------------------------------------------------------------------
1783 
1784 // use the risult just obtained from the fit in XY to do the association of the Skew Straw hits
1785 
1786 
1787  for(ncand=0; ncand< nTotalCandidates; ncand++)
1788  {
1789 
1790  if(!keepit[ncand]) continue;
1791 
1792  if( fR[ncand] < APOTEMAMAXINNERPARSTRAW/2. ) continue; // this is when the XY circle is contained in the
1793  // the Mvd region completely; skip the association of
1794  // the Skews.
1795 
1796  // the arrays fCandidateSkew.... are related to the current candidate; they loose meaning
1797  // as soon as the loop over the candidate tracks finishes;
1798 
1800  fInclusionListStt, // hit is excluded only if it multiple hit.
1801  nSttSkewHit,
1803  fOx[ncand], // input : X of center of XY plane circle
1804  fOy[ncand], // input : Y of center of XY plane circle
1805  fR[ncand], // input : Radius of XY plane circle
1806  info,
1807  WDX,
1808  WDY,
1809  WDZ,
1810  Fi_low_limit[ncand], // Fi (in Helix XY frame) lower limit using the Stt detector minimum/maximum radius
1811  Fi_up_limit[ncand], // Fi (in Helix XY frame) upper limit using the Stt detector maximum/minimum radius
1812  Charge[ncand],
1813 
1814  CandidateSkewList, // output : CandidateSkewList[*][0] = list of selected skew hits
1815  // numbers(in skew numbering);
1816  // CandidateSkewList[*][1] = solution number (0 or 1) as per
1817  // the calculateintersections method;
1818  // the info on fCandidateSkewS, fCandidateSkewZ, fCandidateSkewZDrift, fCandidateSkewZError as follows :
1819  // if i is the (original) Skew Hit number, and ii (0 or 1) is
1820  // the solution, then the infos are stored in the i + ii*MAXSTTHITS location;
1821  fCandidateSkewS, // output, S coordinate of selected Skew hit
1822  fCandidateSkewZ, // output, Z coordinate of selected Skew hit (center wire)
1823  fCandidateSkewZDrift, // output, drift distance IN Z DIRECTION only, of selected Skew hit
1824  fCandidateSkewZError // output, Radius taking into account the tilt, IN Z DIRECTION only, of selected Skew hit
1825  );
1826 
1827 
1828 
1829  // limit the total # Stt hits to MAXSTTHITSINTRACK
1831 
1833  // in case the # of axial Stt hits is NOT grater than MAXSTTHITSINTRACK eliminate
1834  // some SKEW Stt hits in order to have again a total # of axial+skew Stt hits
1835  // equal to MAXSTTHITSINTRACK;
1837 
1838  // otherwise simply ELIMINATE the SKEW Stt hits;
1839  else fnSttSkewHitsinTrack[ncand]=0;
1840  }
1841  for(j=0;j<fnSttSkewHitsinTrack[ncand];j++)
1842  {
1843  fListSttSkewHitsinTrack[ncand][j]=CandidateSkewList[j][0];
1844  fListSttSkewHitsinTrackSolution[ncand][j]=CandidateSkewList[j][1];
1845  }
1846 
1847 
1848  // store S and Z of all Mvd hits and of the SciTil; ------------------------
1849  StoreSZ_MvdScitil(ncand);
1850  //--------------------------------------------------------------------------
1851 
1852  // save the list of the Skew, Pixel, Strip hits for the last passage of this loop when the
1853  // EliminateSpuriousSZ_bis action will be reapplied with better track SZ parameters;
1854  save_nMvdPixelHitsinTrack=fnMvdPixelHitsinTrack[ncand];
1855  save_nMvdStripHitsinTrack=fnMvdStripHitsinTrack[ncand];
1856  save_nSttSkewHitsinTrack=fnSttSkewHitsinTrack[ncand];
1857 
1858 
1859 
1860  for(i=0;i<fnMvdPixelHitsinTrack[ncand];i++){
1861  save_ListMvdPixelHitsinTrack[i] = fListMvdPixelHitsinTrack[ncand][i];
1862  }
1863  for(i=0;i<fnMvdStripHitsinTrack[ncand];i++){
1864  save_ListMvdStripHitsinTrack[i] = fListMvdStripHitsinTrack[ncand][i];
1865  }
1866  for(i=0;i<fnSttSkewHitsinTrack[ncand];i++){
1867  save_ListSttSkewHitsinTrack[i] = fListSttSkewHitsinTrack[ncand][i];
1868  save_ListSttSkewHitsinTrackSolution[i]=fListSttSkewHitsinTrackSolution[ncand][i];
1869  }
1870 
1871 
1872 
1873 //------------------------------------------- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1874 
1875 
1876 // calculate the number of hits to use in the SZ fit later;
1877  // nXYZhits = n. of Mvd hits + SciTil hits. However, if there are 2 SciTil
1878  // hits in this track (namely two adjacent SciTil tiles have a hit
1879  // caused PRESUMABLY by the same track) then count them AS ONE because below
1880  // the average of their postions is considered !
1881 
1882  if( fnSciTilHitsinTrack[ncand] == 2) {
1883  nXYZhits = fnMvdPixelHitsinTrack[ncand]+fnMvdStripHitsinTrack[ncand]+ 1;
1884  }else{ // in this case fnSciTilHitsinTrack[ncand] is 0 or 1;
1885  nXYZhits = fnMvdPixelHitsinTrack[ncand]+fnMvdStripHitsinTrack[ncand]+
1886  fnSciTilHitsinTrack[ncand];
1887  }
1888 
1889  // calculate if there is the need of using some skew hits in the subsequent SZ fit;
1890  // put in nhitsinfit the number of hits used in the subsequent SZ fit.
1891 
1892  nhitsinfit = nXYZhits + fnSttSkewHitsinTrack[ncand];
1893 
1894  // the following is a protection against declaration of 0 dimension array;
1895  //int dime ; //[R.K. 9/2018] unused
1896  //if(nhitsinfit>0) dime = nhitsinfit ; else dime=1; //[R.K. 9/2018] unused
1897 
1898 if(istampa>=2) cout<<"\tevt. "<<IVOLTE<<",nhitsinfit "<< nhitsinfit<<endl;
1899 //--------------------- here calculate the S and Z values of Mvd Pixels, Mvd Strips,
1900 // Stt Skew hits and SciTil hits (if present).
1901 
1902 // the difference between S and Sbis, ZED and ZEDbis, DriftRadius and DriftRadiusbis,
1903 // ErrorDriftRadius and ErrorDriftRadiusbis, is that S, ZED etc. contain the list of
1904 // Pixel+Strips+SciTil + other Skew Stt hits in case Pixel+Strips+SciTil are <= 2; instead
1905 // Sbis, ZEDbis etc. contain Pixel+Strips+all Skew Stt hits.
1906 
1907 
1908  // load the quantities needed for the SZ fit;
1909 
1911  ncand, // input
1912  nhitsinfit,
1913  ErrorDriftRadius, // output
1914  ErrorDriftRadiusbis, // output
1915  DriftRadius, // output
1916  DriftRadiusbis, // output
1917  S, // output
1918  Sbis, // output
1919  ZED, // output
1920  ZEDbis // output
1921  );
1922 
1923 
1924 // --------------- fit in SZ with Mvd + SciTil only
1925 
1926 // finding if there are discontinuity at 0 for fi value of the Mvd Hit.
1927 // In case of discontinuity at 0, add 2*PI to fi of those hits with fi in the 1st quadrant.
1928 // This is necessary because the discontinuities would make the fit
1929 // in the SZ plane fail.
1930 // In this discontinuity fixing, the value FI0 of the vertex (0,0) is also included.
1931 // If there is discontinuity fixing, the values of S[i] might be modified (+2.*PI).
1933  nhitsinfit,
1934  S, // S can be modified by +-2*PI if necessary.
1935  &FI0[ncand], // this remains unchanged.
1936  Charge[ncand] // this remains unchanged.
1937  );
1938 
1939 
1940 
1941 //--------------------- here do the fit again in the SZ space if there are Mvd hits.
1942 // For this, reordering of the Mvd hits is not necessary.
1943 
1944  resultFitSZagain[ncand] = 0; // default value, corresponding to a bad SZ fit result;
1945 
1946 
1947 //-------------------------------------------------------- first SZ fit -------------------------------------------------------
1948 //-------------------------------------------------------- first SZ fit -------------------------------------------------------
1949 //-------------------------------------------------------- first SZ fit -------------------------------------------------------
1950 
1951 
1952  if(nhitsinfit>0){
1953  resultFitSZagain[ncand] = fit.FitSZspace_Chi2_AnnealingtheMvdOnly(
1954  nhitsinfit, // n. hits to be fitted
1955  tS,
1956  tZED,
1957  tDriftRadius,
1958  tErrorDriftRadius,
1959  FI0[ncand],
1960  MAXSKEWHITSINFIT,// maximum number of STT Skew hits in fit;
1961  &emme,
1962  IVOLTE*100+ncand // trick to indicate both the evt number and the candidate;
1963  );
1964 //-----------------------------------------------------------------------------------------------------------------------------
1965 //-----------------------------------------------------------------------------------------------------------------------------
1966 //-----------------------------------------------------------------------------------------------------------------------------
1967 
1968 
1969 
1970 
1971  if( resultFitSZagain[ncand]==1 && fabs(emme) > 1.e-10 ){
1972  KAPPA[ncand] = emme;
1973  GoodSkewFit[ncand] = true;
1974  if( ncand<= nSttTrackCand ) SttSZfit[ncand]=true;
1975  } else {
1976  keepit[ncand]=false;
1977  GoodSkewFit[ncand] = false;
1978  continue;
1979  }
1980 
1981 
1982  } else { // continuation of if(nhitsinfit>0)
1983  keepit[ncand]=false;
1984  GoodSkewFit[ncand] = false;
1985  continue;
1986  } // end of if(nhitsinfit>0)
1987 
1988 
1989 //-------------------------------------------
1990 
1991 // use the result just obtained from the fit in SZ to reject the spurious
1992 // Mvd hits; the Skew Stt are NOT purged here! Also in this function there is
1993 // the calculation of the Z position
1994 // of the SKEW hits and the MVD hits, for a given track candidate (ie for a given Helix
1995 // circle in the XY plane)
1996 
1997  Short_t MaxTurns;
1998  Double_t Turns;
1999 
2000 
2001  // the following calculation is not precise (i.e. is much wider) for the little Skew Straws;
2002  signPz = -Charge[ncand]*KAPPA[ncand];
2003  if(fR[ncand] < RSTRAWDETECTORMAX/2.){
2004  if(signPz>0.){ // this means Pz>0.
2005  Turns= fabs( 0.5*(ZCENTER_STRAIGHT+SEMILENGTH_STRAIGHT)*KAPPA[ncand]/PI ) ; // Turns must be always>=0;
2006  if( Turns<10.) { MaxTurns=(Short_t) Turns ;} else { MaxTurns=10; }
2007  } else {
2008  Turns= fabs( 0.5*(ZCENTER_STRAIGHT-SEMILENGTH_STRAIGHT)*KAPPA[ncand]/PI );
2009  if( Turns<10.) { MaxTurns=(Short_t) Turns ;} else { MaxTurns=10;}
2010  }
2011  } else {
2012  MaxTurns=0;
2013  }
2014 
2015 
2016 
2017  oldPixel = fnMvdPixelHitsinTrack[ncand] ;
2018  oldStrip = fnMvdStripHitsinTrack[ncand] ;
2019  oldSkew = fnSttSkewHitsinTrack[ncand] ;
2020 
2021 
2023  ncand,
2024  MaxTurns, // input;
2025  signPz, // input
2026  &SchosenPixel[ncand][0], // output; this value from now on can also be > 2PI or < 2PI when the particle makes more than 1 turn;
2027  // for now this value is NOT used; the inital value given by AssociateSkewHitsToXYTrack is used instead
2028  // by LoadSZetc_forSZfit; this is done by design since when KAPPA is wrong due to spurious hits, especially
2029  // after the first fit, Schosen.. can be very wrong;
2030  &SchosenStrip[ncand][0], // output; this value from now on can also be > 2PI or < 2PI when the particle makes more than 1 turn;
2031  // for now this value is NOT used; the inital value given by AssociateSkewHitsToXYTrack is used instead
2032  // by LoadSZetc_forSZfit; this is done by design since when KAPPA is wrong due to spurious hits, especially
2033  // after the first fit, Schosen.. can be very wrong;
2034  &SchosenSkew[ncand][0], // output; this value from now on can also be > 2PI or < 2PI when the particle makes more than 1 turn;
2035  // for now this value is NOT used; the inital value given by AssociateSkewHitsToXYTrack is used instead
2036  // by LoadSZetc_forSZfit; this is done by design since when KAPPA is wrong due to spurious hits, especially
2037  // after the first fit, Schosen.. can be very wrong;
2038  &ZchosenPixel[ncand][0],
2039  // for now this value is NOT used; the inital value given by AssociateSkewHitsToXYTrack is used instead
2040  // by LoadSZetc_forSZfit;
2041  &ZchosenStrip[ncand][0],
2042  // for now this value is NOT used; the inital value given by AssociateSkewHitsToXYTrack is used instead
2043  // by LoadSZetc_forSZfit;
2044  &ZchosenSkew[ncand][0],
2045  // for now this value is NOT used; the inital value given by AssociateSkewHitsToXYTrack is used instead
2046  // by LoadSZetc_forSZfit;;
2047  ErrorchosenPixel,
2048  ErrorchosenStrip,
2049  ErrorchosenSkew,
2050  KAPPA[ncand],
2051  FI0[ncand],
2052  fR[ncand]
2053  );
2054 
2055  // Since after EliminateSpuriousSZ_bis the number of Mvd hits may be changed
2056  // check again that there is AT LEAST 1 Mvd hit (usually MINIMUMMVDHITSPERTRACK=1);
2057  // this is requested in order to have an initial good fit in SZ space;
2058  // MINIMUMMVDHITSPERTRACK is defined in PndTrkConstants.h;
2059 
2060  if( fnMvdPixelHitsinTrack[ncand]+fnMvdStripHitsinTrack[ncand]<MINIMUMMVDHITSPERTRACK)
2061  { keepit[ncand]=false; continue; }
2062 
2063 
2064  // in case some hits were eliminated by EliminateSpuriousSZ redo the SZ fit;
2065 
2066  if( fnMvdPixelHitsinTrack[ncand] != oldPixel ||
2067  fnMvdStripHitsinTrack[ncand] != oldStrip ||
2068  fnSttSkewHitsinTrack[ncand] != oldSkew ) {
2069  nhitsinfit = fnMvdPixelHitsinTrack[ncand]+fnMvdStripHitsinTrack[ncand]+
2070  fnSttSkewHitsinTrack[ncand];
2071  if( fnSciTilHitsinTrack[ncand] == 2) { // if there are 2 SciTil hits, count them as one;
2072  nhitsinfit ++;
2073  }else{ // in this case fnSciTilHitsinTrack[ncand] is 0 or 1;
2074  nhitsinfit += fnSciTilHitsinTrack[ncand];
2075  }
2076  // load the quantities needed for the SZ fit;
2078  ncand, // input
2079  nhitsinfit,
2080 
2081  ErrorDriftRadius, // output
2082  ErrorDriftRadiusbis, // output
2083  DriftRadius, // output
2084  DriftRadiusbis, // output
2085  S, // output
2086  Sbis, // output
2087  ZED, // output
2088  ZEDbis // output
2089  );
2090 
2091 // finding if there are discontinuity at 0 for fi value of the Mvd Hit.
2092 // In case of discontinuity at 0, add 2*PI to fi of those hits with fi in the 1st quadrant.
2093 // This is necessary because the discontinuities would make the fit
2094 // in the SZ plane fail.
2095 // In this discontinuity fixing, the value FI0 of the vertex (0,0) is also included.
2096 // If there is discontinuity fixing, the values of S[i] might be modified (+2.*PI).
2098  nhitsinfit,
2099  S, // S can be modified by +-2*PI if necessary.
2100  &FI0[ncand], // this remains unchanged.
2101  Charge[ncand] // this remains unchanged.
2102  );
2103 
2104 //-------------------------------------------------------- second SZ fit -------------------------------------------------------
2105 //-------------------------------------------------------- second SZ fit -------------------------------------------------------
2106 //-------------------------------------------------------- second SZ fit -------------------------------------------------------
2107 
2108 
2109  resultFitSZagain[ncand] = fit.FitSZspace_Chi2_AnnealingtheMvdOnly(
2110  nhitsinfit, // n. hits to be fitted
2111  tS,
2112  tZED,
2113  tDriftRadius,
2114  tErrorDriftRadius,
2115  FI0[ncand],
2116  MAXSKEWHITSINFIT,// maximum number of STT Skew hits in fit;
2117  &emme,
2118  IVOLTE*100+ncand // number of the accumulation plot.
2119  );
2120 
2121 //----------------------------------------------------------------------------------------------------------------------------
2122 //----------------------------------------------------------------------------------------------------------------------------
2123 //----------------------------------------------------------------------------------------------------------------------------
2124 
2125  if( resultFitSZagain[ncand]==1 && fabs(emme) > 1.e-10 ){
2126  KAPPA[ncand] = emme;
2127  GoodSkewFit[ncand] = true;
2128  if( ncand<= nSttTrackCand ) SttSZfit[ncand]=true;
2129  } else {
2130  keepit[ncand]=false;
2131  GoodSkewFit[ncand] = false;
2132  continue;
2133  }
2134 
2135  // ricalculate the sign of Pz (since KAPPA may have changed);
2136  signPz = -Charge[ncand]*KAPPA[ncand];
2137 
2138 
2139  //------------------------------------------- end of the refit;
2140 
2141 
2142 
2143 // LAST ITERATION
2144 
2145  // here redo the last iteration exploiting the better known SZ parameters of the track;
2146  // start again with the initial Skew, Strip, Pixel lists and redo EliminateSpuriousSZ_bis
2147  // on those (therefore using better track parameters);
2148 
2149  fnMvdPixelHitsinTrack[ncand]=save_nMvdPixelHitsinTrack;
2150  fnMvdStripHitsinTrack[ncand]=save_nMvdStripHitsinTrack;
2151  fnSttSkewHitsinTrack[ncand]=save_nSttSkewHitsinTrack;
2152 
2153 
2154  for(i=0;i<fnMvdPixelHitsinTrack[ncand];i++){
2155  fListMvdPixelHitsinTrack[ncand][i]= save_ListMvdPixelHitsinTrack[i];
2156  }
2157  for(i=0;i<fnMvdStripHitsinTrack[ncand];i++){
2158  fListMvdStripHitsinTrack[ncand][i]=save_ListMvdStripHitsinTrack[i];
2159  }
2160  for(i=0;i<fnSttSkewHitsinTrack[ncand];i++){
2161  fListSttSkewHitsinTrack[ncand][i]=save_ListSttSkewHitsinTrack[i] ;
2162  fListSttSkewHitsinTrackSolution[ncand][i]=save_ListSttSkewHitsinTrackSolution[i];
2163  }
2164 
2165 
2167  ncand,
2168  MaxTurns, // input;
2169  signPz, // input
2170  &SchosenPixel[ncand][0], // output; this value from now on can also be > 2PI or < 2PI when the particle makes more than 1 turn;
2171  // this time Schosen.... will be used from now (it is supposed to be the best result);
2172  &SchosenStrip[ncand][0], // output; this value from now on can also be > 2PI or < 2PI when the particle makes more than 1 turn;
2173  &SchosenSkew[ncand][0], // output; this value from now on can also be > 2PI or < 2PI when the particle makes more than 1 turn;
2174  &ZchosenPixel[ncand][0],
2175  &ZchosenStrip[ncand][0],
2176  &ZchosenSkew[ncand][0],
2177  ErrorchosenPixel,
2178  ErrorchosenStrip,
2179  ErrorchosenSkew,
2180  KAPPA[ncand],
2181  FI0[ncand],
2182  fR[ncand]
2183  );
2184 
2185 
2186 
2187  // Since after EliminateSpuriousSZ_bis the number of Mvd hits may be changed
2188  // check again that there is AT LEAST 1 Mvd hit (usually MINIMUMMVDHITSPERTRACK=1);
2189  // this is requested in order to have an initial good fit in SZ space;
2190  // MINIMUMMVDHITSPERTRACK is defined in PndTrkConstants.h;
2191  if( fnMvdPixelHitsinTrack[ncand]+fnMvdStripHitsinTrack[ncand]<MINIMUMMVDHITSPERTRACK)
2192  { keepit[ncand]=false; continue; }
2193 
2194 
2195 // END OF LAST ITERATION
2196 //---------------------------------------------------------------------------
2197 
2198 
2199  } // end of if( fnMvdPixelHitsinTrack[ncand] != oldPixel || .....
2200 
2201 
2202 
2203 //--------------------------------------------------------------------------
2204 
2205 //-------------- debug printout
2206  if(istampa>=1){
2207  cout<<"printout after SZ section "<<nTotalCandidates<<" found tracks:"<<endl;
2208  fPrint.stampetta(
2211 fnMvdPixelHitsinTrack,fnMvdStripHitsinTrack,fnSttParHitsinTrack,fnSttSkewHitsinTrack,
2212 fnSciTilHitsinTrack,nSttTrackCand,
2213 ncand,
2216  }
2217 //------end debug printout
2218 
2219 
2220 
2221 
2222 //----------------------------------------------- start the cleanup section;
2223 
2224 
2225 // First cleanup based on the absence of Mvd hits
2226  if(fYesCleanMvd ){
2227 
2228  // reject the candidate if it is NOT contained in the pipe and
2229  // therefore it should have at least 1 Mvd hit but it has none.
2230 
2231 
2232  accepted = Cleaner.MvdCleanup(
2233  fOx[ncand],
2234  fOy[ncand],
2235  fR[ncand],
2236  FI0[ncand],
2237  KAPPA[ncand],
2238  Charge[ncand],
2239  fXMvdPixel,
2240  fXMvdStrip,
2241  fYMvdPixel,
2242  fYMvdStrip,
2243  fZMvdPixel,
2244  fZMvdStrip,
2245  fnMvdPixelHitsinTrack[ncand],
2246  &fListMvdPixelHitsinTrack[ncand][0],
2247  fnMvdStripHitsinTrack[ncand],
2248  &fListMvdStripHitsinTrack[ncand][0],
2249  0.1, // uncertainty allowed in the X and Y position of the crossing point of the found
2250  // trajectory on a disk sensor (cm) allowed because of the uncertainty on the found
2251  // trajectory parameters;
2252  0.5, // uncertainty in the Z of the crossing point of the found trajectory; (cm) allowed because
2253  // of the uncertainty on the found trajectory parameters;
2254  &GeomCalculator
2255  );
2256 
2257  if( !accepted ) {keepit[ncand]=false; continue;}
2258 
2259  } // end of (fYesCleanMvd)
2260 
2261  } // end of for(ncand=0; ncand< nTotalCandidates; ncand++)
2262 
2263 
2264  // In case some candidate track were not processed in the previous loop, there might
2265  // be still GoodSkewFit[ncand] = false; in that case the candidate track is rejected
2266  // because it has no information on KAPPA;
2267  for(ncand=0; ncand< nTotalCandidates; ncand++){
2268  if(!GoodSkewFit[ncand]) keepit[ncand]=false;
2269  }
2270 
2271 //--------
2272 
2273 //-------------- debug printout
2274  if(istampa>=1){
2275  cout<<"printout after Mvd cleanup e before EliminateClones of all the "<<nTotalCandidates<<" found tracks:"<<endl;
2276  fPrint.stampetta(
2279 fnMvdPixelHitsinTrack,fnMvdStripHitsinTrack,fnSttParHitsinTrack,fnSttSkewHitsinTrack,
2280 fnSciTilHitsinTrack,nSttTrackCand,
2281 -1,
2284  }
2285 //------end debug printout
2286 
2287 //------------------------
2288 
2289 // here eliminate the clones tracks (most likely produced by initial clusters belonging
2290 // to the same physical track);
2291 
2292  if(nTotalCandidates>1) EliminateClones(nTotalCandidates,0.6,keepit);
2293 
2294 
2295 //--------------------------------------------------------------------------
2296 
2297 
2298 
2299 //-------------------------------
2300 // reject tracks with too few or too many hits;
2301 
2302 
2303 
2304 
2305 //-------------------------------------------------------------
2306 
2307  Start[0]=0.;
2308  Start[1]=0.;
2309  Start[2]=0.;
2310  gap = (Double_t) (VERTICALGAP);
2311 
2312 
2313  for(ncand=0, nRemainingCandidates=0; ncand< nTotalCandidates; ncand++){
2314 //------------------------------------------------------------------------------
2315 if(istampa>=1){
2316 cout<<"--------------------------in the STT cleanup loop,before cleaning, this is ncand = "<<ncand ;
2317 if(!keepit[ncand]){ cout<<" , its keepit is false therefore no printout;\n";}
2318 else{ cout<<"\n\tits keepit is true, its charge is "<<Charge[ncand]<<"; print it out :\n";
2319  fPrint.stampetta(
2322 fnMvdPixelHitsinTrack,fnMvdStripHitsinTrack,fnSttParHitsinTrack,fnSttSkewHitsinTrack,
2323 fnSciTilHitsinTrack,nSttTrackCand,
2324 ncand,
2327  }
2328 } // end of if(istampa>1)
2329 //------------------------------------------
2330  if(!keepit[ncand]) continue;
2331  Short_t &nHitsPar = fnSttParHitsinTrack[ncand];
2332  Short_t &nHitsSkew = fnSttSkewHitsinTrack[ncand];
2333  int dime;
2334  if(nHitsSkew>0) { dime = nHitsSkew; } else { dime =1; }
2335  Double_t auxS[dime];
2336 
2337  for(i=0;i<nHitsSkew;i++){
2338  auxS[i] = SchosenSkew[ncand][fListSttSkewHitsinTrack[ncand][i]];
2339  }
2340 
2341 
2342  if(fYesCleanStt ){
2343  if ( !Cleaner.TrackCleanup(
2348  auxS,
2349  Charge[ncand],
2350  FI0[ncand],
2351  gap,
2352  info,
2353  istampa,
2354  IVOLTE,
2355  KAPPA[ncand],
2356  &fListSttParHitsinTrack[ncand][0],
2357  &fListSttSkewHitsinTrack[ncand][0],
2358  MAXSTTHITS,
2359  nHitsPar,
2360  nHitsSkew,
2361  fOx[ncand],
2362  fOy[ncand],
2363  fR[ncand],
2366  Start,
2367  STRAWRADIUS
2368  ) ) {
2369  keepit[ncand]=false;
2370  continue;
2371  } // end if
2372 
2373  } // end of if(fYesCleanStt)
2374 
2375  nRemainingCandidates++;
2376 
2377  } // end of for(ncand=0; ncand< nTotalCandidates; ncand++)
2378 
2379 //---------------------------------------------------------- end of the cleanup section;
2380 
2381 //---------------
2382 
2383 // ordering all the hits belonging to the candidate track, by increasing fR (large
2384 // trajectories) or Conformal variables (better for small trajectories);
2385 // from candidate n. 0 to candidate n. nTotalCandidates-1; loading fListTrackCandHit.
2386 // the array ordered are :
2387 // fListTrackCandHit, fListTrackCandHitType, fListSttParHitsinTrack, fListSttSkewHitsinTrack
2388 // and also at the end the SciTil hit (if present) is added.
2389 
2390 
2392  keepit,
2393  0, // starting from candidate # 0
2394  nTotalCandidates, // .... up to candidate # nTotalCandidates -1;
2395  info,
2396  Trajectory_Start,
2397  Charge,
2398  SchosenSkew
2399  );
2400 
2401  // adding at the end the SciTil hits (if present).
2402  for(ncand=0; ncand< nTotalCandidates; ncand++){
2403  if(!keepit[ncand]) continue;
2404  i=fnMvdPixelHitsinTrack[ncand]+fnMvdStripHitsinTrack[ncand]+
2405  fnSttParHitsinTrack[ncand]+fnSttSkewHitsinTrack[ncand];
2406  for(j=0;j<fnSciTilHitsinTrack[ncand];j++) {
2407  fListTrackCandHit[ncand][i+j]=fListSciTilHitsinTrack[ncand][j];
2408  fListTrackCandHitType[ncand][i+j] = 1001;
2409  }
2410  } // end of for(ncand=0; ncand< nTotalCandidates; ncand++)
2411 
2412 
2413 
2414 
2415 //---------------- begin timer stuff;
2416 
2417  frtime = ftimer.RealTime();
2418  fctime = ftimer.CpuTime();
2419 
2420  frtime2 = ftimer2.RealTime();
2421  fctime2 = ftimer2.CpuTime();
2422 
2423 /*
2424  cout <<"\nEvento n." <<IVOLTE<< endl;
2425  cout << "My Real time " << frtime << " sec, my CPU time " << fctime << " sec" << endl;
2426 
2427  cout << "My cumulative Real time " << frtime2 << " sec, my cumulative CPU time " << fctime2 << " sec" << endl;
2428 */
2429 //----------------------------- end timer stuff;
2430 
2431 
2432 
2433 //------------ section with comparison MC Mvd hits - associated hits to a certain track
2434 
2435 
2436 
2437 
2438  int dim1, dim2 , dim3 , dim4, dim5, dim6, dim7;
2439 
2440  if(nSttHit == 0 ) { dim1=1; } else { dim1 = MAXTRACKSPEREVENT*nSttHit; };
2441 
2442  Short_t
2443  MCParalAloneList[dim1],
2444  MCSkewAloneList[dim1];
2445 
2446  if(nTotalCandidates == 0 ) {
2447  dim1 = 1;
2448  dim2 = 1;
2449  dim3 = 1;
2450  dim4 = 1;
2451  dim5 = 1;
2452  dim6 = 1;
2453  dim7 = 1;
2454  } else {
2455  dim1 = nTotalCandidates;
2456  dim2 = nTotalCandidates*MAXMVDPIXELHITSINTRACK;
2457  dim3 = nTotalCandidates*MAXMVDSTRIPHITSINTRACK;
2458  dim4 = nTotalCandidates*fnMvdPixelHit;
2459  dim5 = nTotalCandidates*fnMvdStripHit;
2460  dim6 = nTotalCandidates*MAXSCITILHITSINTRACK;
2461  dim7 = nTotalCandidates*fnSciTilHits;
2462  }
2463 
2464  Short_t
2465  nMvdPixelCommon[dim1],
2466  MvdPixelCommonList[dim2],
2467  nMvdPixelSpuriinTrack[dim1],
2468  MvdPixelSpuriList[dim2],
2469  nMCMvdPixelAlone[dim1],
2470  MCMvdPixelAloneList[dim4],
2471 
2472  nMvdStripCommon[dim1],
2473  MvdStripCommonList[dim3],
2474  nMvdStripSpuriinTrack[dim1],
2475  MvdStripSpuriList[dim3],
2476  nMCMvdStripAlone[dim1],
2477  MCMvdStripAloneList[dim5],
2478 
2479  nSciTilCommon[dim1],
2480  SciTilCommonList[dim6],
2481  nSciTilSpuriinTrack[dim1],
2482  SciTilSpuriList[dim6],
2483  nMCSciTilAlone[dim1],
2484  MCSciTilAloneList[dim7];
2485 
2486  // since in the TrackCand the associated MC track is written in all cases, initialization to -1
2487  // of daTrackFoundaTrackMC is here performed whether or not doMcComparison is true;
2488  for(i=0;i<nTotalCandidates;i++){
2489  daTrackFoundaTrackMC[i] = -1;
2490  }
2491  //------------------
2492 
2493  if( doMcComparison ){
2494 
2495 
2496  // make the struct for the data to pass to the
2497  // method PndTrkComparisonMCtruth::ComparisonwithMC ;
2499  // load the structure;
2500 
2501  ioData.Bfield = fBFIELD;
2502  ioData.Charge = Charge;
2503  ioData.Cvel = CVEL;
2504  ioData.daTrackFoundaTrackMC = tdaTrackFoundaTrackMC;
2506  ioData.Errorsqpixel = ERRORSQPIXEL;
2507  ioData.Errorsqstrip = ERRORSQSTRIP;
2508  ioData.FI0 = FI0;
2509  ioData.fMCTrackArray = fMCTrackArray;
2511  ioData.fSciTilMaxNumber = fSciTilMaxNumber;
2512  ioData.fSciTHitArray = fSciTHitArray;
2514  ioData.fSttPointArray = fSttPointArray;
2515  ioData.HANDLE = HANDLE,
2516  ioData.HANDLE2 = HANDLE2,
2517  ioData.info = &info[0][0];
2518  ioData.istampa = istampa;
2519  ioData.IVOLTE = IVOLTE;
2520  ioData.KAPPA = KAPPA;
2521  ioData.keepit = keepit;
2522  ioData.InclusionListStt = fSingleHitListStt; // these are straws with only a single hit;
2528  ioData.ListTrackCandHit = &fListTrackCandHit[0][0];
2530  ioData.MAXMCTRACKS = MAXMCTRACKS;
2533  ioData.Maxmvdmcpoints = MAXMVDMCPOINTS;
2536  ioData.MAXSCITILHITS = MAXSCITILHITS ;
2538  ioData.MAXSTTHITS = MAXSTTHITS;
2541  ioData.MCMvdPixelAloneList = MCMvdPixelAloneList;
2542  ioData.MCMvdStripAloneList = MCMvdStripAloneList;
2543  ioData.MCParalAloneList = MCParalAloneList;
2544  ioData.MCSciTilAloneList = MCSciTilAloneList;
2545  ioData.MCSkewAloneList = MCSkewAloneList;
2546  ioData.MCSkewAloneX = fMCSkewAloneX ;
2547  ioData.MCSkewAloneY = fMCSkewAloneY ;
2548  ioData.MvdPixelCommonList = MvdPixelCommonList;
2549  ioData.MvdPixelSpuriList = MvdPixelSpuriList;
2550  ioData.MvdStripCommonList = MvdStripCommonList;
2551  ioData.MvdStripSpuriList = MvdStripSpuriList;
2552  ioData.nHitsInMCTrack = tnHitsInMCTrack;
2553  ioData.nHitsInSciTile = nHitsInSciTile;
2554  ioData.nMCMvdPixelAlone = nMCMvdPixelAlone;
2555  ioData.nMCMvdStripAlone = nMCMvdStripAlone;
2556  ioData.nMCParalAlone = tnMCParalAlone;
2557  ioData.nMCSciTilAlone = nMCSciTilAlone;
2558  ioData.nMCSkewAlone = tnMCSkewAlone;
2559  ioData.nMvdPixelCommon = nMvdPixelCommon;
2562  ioData.nMvdPixelHit = fnMvdPixelHit;
2563  ioData.nMvdPixelSpuriinTrack = nMvdPixelSpuriinTrack;
2564  ioData.nMvdStripCommon = nMvdStripCommon;
2565  ioData.nMvdStripHit = fnMvdStripHit;
2566  ioData.nMvdStripSpuriinTrack = nMvdStripSpuriinTrack;
2567  ioData.nParalCommon = tnParalCommon;
2568  ioData.nSciTilCommon = nSciTilCommon;
2569  ioData.nSciTilHits = fnSciTilHits;
2571  ioData.nSciTilSpuriinTrack = nSciTilSpuriinTrack ;
2572  ioData.nSkewCommon = tnSkewCommon;
2573  ioData.nSkewHitsInMCTrack = tnSkewHitsInMCTrack;
2574  ioData.nSpuriParinTrack = tnSpuriParinTrack;
2575  ioData.nSpuriSkewinTrack = tnSpuriSkewinTrack;
2576  ioData.nSttHit = nSttHit;
2579  ioData.nTotalCandidates = nTotalCandidates;
2580  ioData.OriginalSciTilList = &OriginalSciTilList[0][0];
2581  ioData.Ox = fOx;
2582  ioData.Oy = fOy;
2583  ioData.ParalCommonList = tParalCommonList;
2584  ioData.ParSpuriList = tParSpuriList;
2585  ioData.R = fR;
2588  ioData.resultFitSZagain = resultFitSZagain;
2589  ioData.SciTilCommonList = SciTilCommonList;
2590  ioData.SciTilSpuriList = SciTilSpuriList;
2591  ioData.SkewCommonList = tSkewCommonList;
2592  ioData.SkewSpuriList = tSkewSpuriList;
2593  ioData.SttSZfit = SttSZfit;
2594  ioData.XMvdPixel = fXMvdPixel;
2595  ioData.XMvdStrip = fXMvdStrip;
2596  ioData.XSciTilCenter = fpSciTilx;
2597  ioData.YMvdPixel = fYMvdPixel;
2598  ioData.YMvdStrip = fYMvdStrip;
2599  ioData.YSciTilCenter = fpSciTily;
2600  ioData.ZMvdPixel = fZMvdPixel;
2601  ioData.ZMvdStrip = fZMvdStrip;
2602  ioData.ZSciTilCenter = fpSciTilz;
2603 
2604  // class for the MC comparison;
2606  fnMCTracks = cmp.ComparisonwithMC( ioData);
2607 
2608  }
2609 
2610 //----------
2611 
2612  // write the Macro for visualization of tracks and hits;
2614 
2615  // the following initialization is necessary when the MC comparison
2616  // is not done just above (when doMcComparison=false). In this case
2617  // in fact it is necessary to have the arrays nParalCommon, nSpuriParinTrack etc.etc.
2618  // set at 0 otherwise some WriteMacro methods crash;
2619  if(!doMcComparison){
2620  for(i=0; i<nTotalCandidates;i++){
2621  nParalCommon[i]=0; nSpuriParinTrack[i]=0; nMCParalAlone[i]=0;
2622  nSkewCommon[i]=0; nSpuriSkewinTrack[i]=0; nMCSkewAlone[i]=0;
2623  nMvdPixelCommon[i]=0; nMvdPixelSpuriinTrack[i]=0; nMCMvdPixelAlone[i]=0;
2624  nMvdStripCommon[i]=0; nMvdStripSpuriinTrack[i]=0; nMCMvdStripAlone[i]=0;
2625  nSciTilCommon[i]=0; nSciTilSpuriinTrack[i]=0; nMCSciTilAlone[i]=0;
2626 
2627  } // end for(i=0; i<nTotalCandidates;i++)
2628 
2629  }
2630 
2631 
2632  PndTrkPlotMacros2 mymacro;
2638  In_Put.bfield = fBFIELD ;
2639  In_Put.Charge = Charge ;
2640  In_Put.cvel = CVEL ;
2641  In_Put.daTrackFoundaTrackMC = tdaTrackFoundaTrackMC ;
2642  In_Put.dimensionscitil = DIMENSIONSCITIL ;
2643  In_Put.doMcComparison = doMcComparison ;
2644  In_Put.FI0 = FI0 ;
2645  In_Put.fMCTrackArray = fMCTrackArray ;
2646  In_Put.fSttPointArray = fSttPointArray ;
2647  In_Put.info = &info[0][0] ;
2648  In_Put.IVOLTE = IVOLTE ;
2649  In_Put.KAPPA = KAPPA ;
2650  In_Put.keepit = keepit ;
2653 
2654  In_Put.istampa = istampa ;
2660  In_Put.ListTrackCandHit = &fListTrackCandHit[0][0] ;
2662  In_Put.MAXMCTRACKS = MAXMCTRACKS ;
2663  In_Put.MAXMVDPIXELHITS = MAXMVDPIXELHITS ;
2665  In_Put.MAXMVDSTRIPHITS = MAXMVDSTRIPHITS ;
2668  In_Put.MAXSCITILHITS = MAXSCITILHITS ;
2669  In_Put.MAXSTTHITS = MAXSTTHITS ;
2672  In_Put.MCMvdPixelAloneList = MCMvdPixelAloneList ;
2673  In_Put.MCMvdStripAloneList = MCMvdStripAloneList ;
2674  In_Put.MCParalAloneList = MCParalAloneList ;
2675  In_Put.MCSciTilAloneList = MCSciTilAloneList;
2676  In_Put.MCSkewAloneList = MCSkewAloneList ;
2677  In_Put.MCSkewAloneX = fMCSkewAloneX ;
2678  In_Put.MCSkewAloneY = fMCSkewAloneY ;
2679  In_Put.MvdPixelCommonList = MvdPixelCommonList ;
2680  In_Put.MvdPixelSpuriList = MvdPixelSpuriList ;
2681  In_Put.MvdStripCommonList = MvdStripCommonList ;
2682  In_Put.MvdStripSpuriList = MvdStripSpuriList ;
2684  In_Put.nMCMvdPixelAlone = nMCMvdPixelAlone ;
2685  In_Put.nMCMvdStripAlone = nMCMvdStripAlone ;
2686  In_Put.nMCParalAlone = tnMCParalAlone ;
2687  In_Put.nMCSciTilAlone = nMCSciTilAlone;
2688  In_Put.nMCSkewAlone = tnMCSkewAlone ;
2689  In_Put.nMCTracks = fnMCTracks ;
2690  In_Put.nMvdPixelCommon = nMvdPixelCommon ;
2691  In_Put.nMvdPixelHit = fnMvdPixelHit ;
2693  In_Put.nMvdPixelSpuriinTrack = nMvdPixelSpuriinTrack ;
2694  In_Put.nMvdStripCommon = nMvdStripCommon ;
2695  In_Put.nMvdStripHit = fnMvdStripHit ;
2697  In_Put.nMvdStripSpuriinTrack = nMvdStripSpuriinTrack ;
2698  In_Put.NRDIVCONFORMAL = NRDIVCONFORMAL;
2699  In_Put.nParalCommon = tnParalCommon ;
2700  In_Put.nSciTilCommon = nSciTilCommon ;
2701  In_Put.nSciTilHits = fnSciTilHits ;
2703  In_Put.nSciTilSpuriinTrack = nSciTilSpuriinTrack;
2704  In_Put.nSkewCommon = tnSkewCommon ;
2705  In_Put.nSpuriParinTrack = tnSpuriParinTrack ;
2706  In_Put.nSttHit = nSttHit ;
2707  In_Put.nSttParHit = nSttParHit ;
2709  In_Put.nSttSkewHit = nSttSkewHit ;
2711  In_Put.nTotalCandidates = nTotalCandidates ;
2712  In_Put.nTrackCandHit = fnTrackCandHit ;
2713  In_Put.number_straws = NUMBER_STRAWS;
2714  In_Put.Ox = fOx ;
2715  In_Put.Oy = fOy ;
2716  In_Put.ParalCommonList = tParalCommonList ;
2717  In_Put.ParSpuriList = tParSpuriList ;
2718  In_Put.posizSciTil = &fposizSciTil[0][0] ;
2719  In_Put.R = fR ;
2720  In_Put.radiaConf = fradiaConf;
2723  In_Put.SchosenSkew = &SchosenSkew[0][0] ;
2724  In_Put.SciTilCommonList = SciTilCommonList ;
2725  In_Put.SciTilSpuriList = SciTilSpuriList ;
2726  In_Put.sigmaXMvdPixel = fsigmaXMvdPixel ;
2727  In_Put.sigmaXMvdStrip = fsigmaXMvdStrip ;
2728  In_Put.sigmaYMvdPixel = fsigmaYMvdPixel ;
2729  In_Put.sigmaYMvdStrip = fsigmaYMvdStrip ;
2730  In_Put.SkewCommonList = tSkewCommonList ;
2731  In_Put.SttTubeArray = fSttTubeArray;
2732  In_Put.StrawCode = fStrawCode;
2733  In_Put.StrawCode2 = fStrawCode2;
2734  In_Put.verticalgap = VERTICALGAP ;
2735  In_Put.XMvdPixel = fXMvdPixel ;
2736  In_Put.XMvdStrip = fXMvdStrip ;
2737  In_Put.YMvdPixel = fYMvdPixel ;
2738  In_Put.YMvdStrip = fYMvdStrip ;
2739  In_Put.WDX = WDX ;
2740  In_Put.WDY = WDY ;
2741  In_Put.WDZ = WDZ ;
2742  In_Put.ZMvdPixel = fZMvdPixel ;
2743  In_Put.ZMvdStrip = fZMvdStrip ;
2744 
2745  mymacro.WriteAllMacros(
2746  In_Put
2747  );
2748  }
2749 
2750 //----------------
2751 
2752 //------- load the new PndTrackCand ; each track has the STT and the Mvd hits associated
2753 //------- also load the new PndTrack ; each track has the STT and the Mvd hits associated
2754 
2755 
2757  keepit,
2758  SttSZfit,
2759  nTotalCandidates,
2760  Charge,
2761  nSttTrackCand,
2762  FI0,
2763  KAPPA,
2764  info,
2765  SchosenSkew,
2766  ZchosenSkew,
2767  tdaTrackFoundaTrackMC // MC track to which reconstructed tracks are associated;
2768  );
2769 
2770 
2771 
2772 
2773 
2774  return;
2775 
2776 }
const Double_t RSTRAWDETECTORMAX
bool fInclusionListSciTil[MAXSCITILHITS]
TClonesArray * fSciTHitArray
Double_t fS_SciTilHitsinTrack[MAXTRACKSPEREVENT][MAXSCITILHITS]
Double_t fYMvdStrip[MAXMVDSTRIPHITS]
Double_t fXMvdStrip[MAXMVDSTRIPHITS]
Double_t fxxyyTube[NUMBER_STRAWS]
bool fTypeConf[MAXTRACKSPEREVENT]
Short_t fListSttParHits[MAXSTTHITS]
Short_t fTubeID[MAXSTTHITS]
TVector3 MCposition
Definition: anaLmdReco.C:77
void stampetta(int IVOLTE, bool *keepit, Short_t *ListMvdPixelHitsinTrack, Short_t *ListMvdStripHitsinTrack, Short_t *ListSttParHitsinTrack, Short_t *ListSttSkewHitsinTrack, Short_t *ListSciTilHitsinTrack, Short_t *nMvdPixelHitsinTrack, Short_t *nMvdStripHitsinTrack, Short_t *nSttParHitsinTrack, Short_t *nSttSkewHitsinTrack, Short_t *nSciTilHitsinTrack, Short_t nTotalCand, Short_t Cand, int maxmvdpixelhitsintrack, int maxmvdstriphitsintrack, int maxscitilhitsintrack, int maxstthitsintrack, Double_t *R, Double_t *Ox, Double_t *Oy, Double_t *FI0, Double_t *KAPPA)
Short_t fListSttSkewHitsinTrack[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK]
Double_t fsigmaYMvdStrip[MAXMVDSTRIPHITS]
Double_t fOy[MAXTRACKSPEREVENT]
Int_t i
Definition: run_full.C:25
TVector3 GetPosition() const
Definition: PndSdsHit.h:93
TClonesArray * fSttMvdPndTrackCandArray
Double_t fZMvdStrip[MAXMVDSTRIPHITS]
Double_t GetHalfLength()
Definition: PndSttTube.cxx:99
Short_t fListMvdStripHitsinTrack[MAXTRACKSPEREVENT][MAXMVDSTRIPHITSINTRACK]
Double_t fsigmaZMvdStrip[MAXMVDSTRIPHITS]
void GetClusters(bool *InclusionListStt, Short_t ListParContiguous[][6], Short_t *ListSttParHits, Short_t *nParContiguous, Short_t nSttParHit, const Short_t MAXFOUNDCLUSTERS, const Short_t MAXHITSINCLUSTER, const Short_t MAXSTTHITS, const Short_t NUMBER_STRAWS, Short_t *StrawCode, Short_t *StrawCode2, Short_t *SttStrawOn, TClonesArray *SttTubeArray, Short_t *TubeID, Short_t *ListHitsinCluster, Short_t &nFoundClusters, Short_t *nHitsinCluster)
Double_t fMCSkewAloneY[MAXSTTHITS]
mdtHit Position(pos)
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
Short_t fnSciTilHitsinTrack[MAXTRACKSPEREVENT]
static const Short_t LEGIANDRE_NRADIUSDIV
void Initial_SttParHits_DecreasingR_Ordering(Double_t info[][7], Short_t *ListSttParHi, Int_t nSttParHit)
Double_t fsigmaXMvdStrip[MAXMVDSTRIPHITS]
Short_t fMCtrack_of_Strip[MAXMVDSTRIPHITS]
Double_t fposizSciTil[MAXSCITILHITS][3]
TClonesArray * fSttMvdPndTrackArray
const int MINOUTERHITSPERTRACK
const int MAXMVDMCPOINTS
Double_t fsigmaZMvdPixel[MAXMVDPIXELHITS]
const int MINIMUMMVDHITSPERTRACK
Double_t fpSciTilx[MAXSCITILHITS]
Double_t fALFA[MAXTRACKSPEREVENT]
void WriteAllMacros(PndTrkPlotMacros2_InputData In_Put)
Double_t fpSciTily[MAXSCITILHITS]
const Double_t APOTEMAMINSKEWSTRAW
timer Start()
static const Short_t MAXMCTRACKS
Short_t fnSttSkewHitsinTrack[MAXTRACKSPEREVENT]
TVector3 GetPosition() const
Definition: PndSciTHit.h:64
Double_t fOx[MAXTRACKSPEREVENT]
Short_t fListTrackCandHit[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK+MAXMVDPIXELHITSINTRACK+MAXMVDSTRIPHITSINTRACK+MAXSCITILHITSINTRACK]
Short_t fnSttParHitsinTrack[MAXTRACKSPEREVENT]
Short_t fStrawCode2[NUMBER_STRAWS]
Double_t fCosine[LEGIANDRE_NTHETADIV]
bool EliminateClones(Short_t nTotalCandidates, Double_t fraction, bool *keepit)
void stampaSttHits2(Short_t iHit, Short_t ipunto, Double_t dradius, Double_t *WDX, Double_t *WDY, Double_t *WDZ, FairMCPoint *puntator, PndSttTube *pSttTube, Short_t tubeID)
static const Short_t MAXSCITILHITSINTRACK
Short_t fListTrackCandHitType[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK+MAXMVDPIXELHITSINTRACK+MAXMVDSTRIPHITSINTRACK+MAXSCITILHITSINTRACK]
static const Short_t MAXMVDPIXELHITSINTRACK
Double_t fMCSkewAloneX[MAXSTTHITS]
Double_t fsigmaYMvdPixel[MAXMVDPIXELHITS]
TClonesArray * fSttTubeArray
Short_t fnParContiguous[NUMBER_STRAWS]
Short_t FitSZspace_Chi2_AnnealingtheMvdOnly(Short_t nHitsinTrack, Double_t *S, Double_t *Z, Double_t *DriftRadius, Double_t *ErrorDriftRadius, Double_t FInot, Short_t NMAX, Double_t *emme, int IVOLTE)
int ComparisonwithMC(PndTrkComparisonMCtruth_io_Data ioData)
char fMvdPixelBranch[200]
const int MAXHITSINCELL
Double_t fXMvdPixel[MAXMVDPIXELHITS]
static const Short_t LEGIANDRE_NTHETADIV
const Double_t SEMILENGTH_STRAIGHT
const Double_t PI
TClonesArray * fMvdPixelHitArray
Double_t GetIsochrone() const
Definition: PndSttHit.h:62
Double_t
bool FindTrackInXYProjection(struct FindTrackInXYProjection2_InputOutputData *InOut, int istampa, int IVOLTE)
const Double_t STRAWRADIUS
Double_t frefindexMvdPixel[MAXMVDPIXELHITS]
Double_t fsigmaXMvdPixel[MAXMVDPIXELHITS]
TVector3 GetPosition()
Definition: PndSttTube.cxx:87
const Double_t APOTEMAMINOUTERPARSTRAW
const Double_t DELTAnR
Double_t fxTube[NUMBER_STRAWS]
const int MAXFOUNDCLUSTERS
TClonesArray * fSttPointArray
Short_t fListParContiguous[NUMBER_STRAWS][6]
static const Short_t MAXSCITILHITS
bool fInclusionListStt[MAXSTTHITS]
Int_t GetTubeID() const
Definition: PndSttHit.h:75
TClonesArray * fSttHitArray
static const Short_t MAXSTTHITSINTRACK
Double_t fBETA[MAXTRACKSPEREVENT]
static const Short_t NUMBER_STRAWS
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
static const Short_t MAXMVDPIXELHITS
Short_t fMCtrack_of_Pixel[MAXMVDPIXELHITS]
TClonesArray * fMvdMCPointArray
void FixDiscontinuitiesFiangleinSZplane(Short_t TemporarynSkewHitsinTrack, Vec< Double_t > &S, Double_t *Fi_initial_helix_referenceframe, Short_t Charge)
TClonesArray * fMCTrackArray
bool fSingleHitListStt[MAXSTTHITS]
static const Short_t MAXMVDSTRIPHITSINTRACK
void StoreSZ_MvdScitil(Short_t ncand)
const Double_t VERTICALGAP
void Ordering_Loading_ListTrackCandHit(bool *keepit, Short_t FirstCandidate, Short_t LastCandidate, Double_t info[][7], Double_t Trajectory_Start[][2], Short_t *CHARGE, Double_t SchosenSkew[][MAXSTTHITS])
const int MAXSKEWHITSINFIT
void MakeInclusionListStt(Int_t nSttHit, Short_t *TubeID, Double_t info[][7])
static const Double_t THETAMAX
Double_t fYMvdPixel[MAXMVDPIXELHITS]
const Double_t ERRORSQSTRIP
Double_t fSinus[LEGIANDRE_NTHETADIV]
const int MAXHITSINCLUSTER
Short_t fStrawCode[NUMBER_STRAWS]
Short_t fListSciTilHitsinTrack[MAXTRACKSPEREVENT][MAXSCITILHITSINTRACK]
Short_t fnMvdPixelHitsinTrack[MAXTRACKSPEREVENT]
const Double_t APOTEMAMAXINNERPARSTRAW
Double_t fCandidateSkewS[2 *MAXSTTHITS]
Short_t fListSttSkewHitsinTrackSolution[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK]
Short_t fListMvdPixelHitsinTrack[MAXTRACKSPEREVENT][MAXMVDPIXELHITSINTRACK]
const Double_t CVEL
Double_t fCandidateSkewZDrift[2 *MAXSTTHITS]
const Double_t ERRORSQPIXEL
void LoadPndTrack_TrackCand(bool *keepit, bool *SttSZfit, Short_t nTotalCandidates, Short_t *Charge, Int_t nSttTrackCand, Double_t *FI0, Double_t *KAPPA, Double_t info[][7], Double_t SchosenSkew[][MAXSTTHITS], Double_t ZchosenSkew[][MAXSTTHITS], Short_t *daTrackFoundaTrackMC)
Double_t fCandidateSkewZ[2 *MAXSTTHITS]
Double_t fyTube[NUMBER_STRAWS]
double Z
Definition: anaLmdDigi.C:68
void LoadSZetc_forSZfit(Short_t ncand, Short_t nhitsinfit, Vec< Double_t > &ErrorDriftRadius, Double_t *ErrorDriftRadiusbis, Vec< Double_t > &DriftRadius, Double_t *DriftRadiusbis, Vec< Double_t > &S, Double_t *Sbis, Vec< Double_t > &ZED, Double_t *ZEDbis)
Double_t fZMvdPixel[MAXMVDPIXELHITS]
static const Short_t MAXTRACKSPEREVENT
const int MAXHITSINFIT
Double_t fGAMMA[MAXTRACKSPEREVENT]
const int MINIMUMSTTMHITSPERTRACK
Short_t fListSttParHitsinTrack[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK]
Short_t AssociateSkewHitsToXYTrack(bool *InclusionListSkew, Short_t NSkewhits, Short_t *infoskew, Double_t Oxx, Double_t Oyy, Double_t Rr, Double_t info[][7], Double_t *WDX, Double_t *WDY, Double_t *WDZ, Double_t Fi_low_limit, Double_t Fi_up_limit, Short_t Charge, Short_t SkewList[][2], Double_t *S, Double_t *Z, Double_t *ZDrift, Double_t *ZError)
Double_t fpSciTilz[MAXSCITILHITS]
void FromXYtoConformal(Double_t trajectory_vertex[2], Double_t info[][7], Short_t *ListSttParHits, Int_t Nparal, Double_t infoparalConformal[][5], Double_t STRAWRADIUS)
const Double_t APOTEMAMAXSKEWSTRAW
TClonesArray * fSciTPointArray
Double_t fCandidateSkewZError[2 *MAXSTTHITS]
Short_t fnMvdStripHitsinTrack[MAXTRACKSPEREVENT]
Short_t fnTrackCandHit[MAXTRACKSPEREVENT]
static const Short_t NFIDIVCONFORMAL
const Double_t APOTEMASTRAWDETECTORMIN
static const Short_t MAXMVDSTRIPHITS
Short_t fListSttSkewHits[MAXSTTHITS]
Double_t fR[MAXTRACKSPEREVENT]
bool TrackCleanup(Double_t ApotemaMaxInnerPar, Double_t ApotemaMaxSkew, Double_t ApotemaMinOuterPar, Double_t ApotemaMinSkew, Double_t *auxS, Short_t Charge, Double_t FI0, Double_t GAP, Double_t info[][7], int istampa, int IVOLTE, Double_t KAPPA, Short_t *ListHitsPar, Short_t *ListHitsSkew, int MAXSTTHITS, Short_t nHitsPar, Short_t nHitsSkew, Double_t Oxx, Double_t Oyy, Double_t Rr, Double_t RStrawDetMax, Double_t RStrawDetMin, Double_t Start[3], Double_t Strawradius)
Double_t fradiaConf[NRDIVCONFORMAL]
static const Double_t THETAMIN
TVector3 GetWireDirection()
Definition: PndSttTube.cxx:107
static const Short_t NRDIVCONFORMAL
TStopwatch ftimer2
void stampaMvdHits2(char *fMvdPixelBranch, char *fMvdStripBranch, Short_t nMvdPixelHit, Short_t nMvdStripHit, Double_t *refindexMvdPixel, Double_t *refindexMvdStrip, Short_t *fMCtrack_of_Pixel, Short_t *fMCtrack_of_Strip, Double_t *sigmaXMvdPixel, Double_t *sigmaXMvdStrip, Double_t *sigmaYMvdPixel, Double_t *sigmaYMvdStrip, Double_t *sigmaZMvdPixel, Double_t *sigmaZMvdStrip, Double_t *XMvdPixel, Double_t *XMvdStrip, Double_t *YMvdPixel, Double_t *YMvdStrip, Double_t *ZMvdPixel, Double_t *ZMvdStrip)
char fMvdStripBranch[200]
bool MvdCleanup(Double_t Ox, Double_t Oy, Double_t R, Double_t fi0, Double_t kappa, Double_t charge, Double_t *XMvdPixel, Double_t *XMvdStrip, Double_t *YMvdPixel, Double_t *YMvdStrip, Double_t *ZMvdPixel, Double_t *ZMvdStrip, Short_t nPixelHitsinTrack, Short_t *ListMvdPixelHitsinTrack, Short_t nStripHitsinTrack, Short_t *ListMvdStripHitsinTrack, Double_t extra_distance, Double_t extra_distance_Z, PndTrkCTGeometryCalculations *GeomCalculator)
const Double_t ZCENTER_STRAIGHT
TClonesArray * fMvdStripHitArray
static const Short_t MAXSTTHITS
void EliminateSpuriousSZ_bis(Short_t ncand, Short_t MaxTurnofTracks, Double_t signPz, Double_t *SchosenPixel, Double_t *SchosenStrip, Double_t *SchosenSkew, Double_t *ZchosenPixel, Double_t *ZchosenStrip, Double_t *ZchosenSkew, Double_t *ErrorchosenPixel, Double_t *ErrorchosenStrip, Double_t *ErrorchosenSkew, Double_t KAPPA, Double_t FI0, Double_t Rr)
const Double_t DIMENSIONSCITIL
Double_t frefindexMvdStrip[MAXMVDSTRIPHITS]
Double_t fzTube[NUMBER_STRAWS]
void PndTrkTracking2::FindCharge ( Double_t  oX,
Double_t  oY,
Short_t  nHits,
Double_t X,
Double_t Y,
Short_t *  Charge 
)
private

Definition at line 3715 of file PndTrkTracking2.cxx.

References Double_t.

3723 {
3724 
3725  Short_t ihit,
3726  nleft,
3727  nright;
3728 
3729  Double_t cross,
3730  //disq, //[R.K. 9/2018] unused
3731  minl,
3732  minr;
3733 
3734 
3735  // this methods works with the hypothesis that this track comes
3736  // from (0,0)
3737 
3738  for(ihit=0, nleft=0, nright=0, minr = 9999999., minl = 9999999.; ihit<nParallelHits; ihit++){
3739  // find the Z component of the cross product between the vector from (0,0) to center of
3740  // circular trajectory [namely, (oX,oY) ] and the Position vector of the center of the
3741  // parallel Hits [namely, (x,y)].
3742 
3743  cross = oX*Y[ihit] -
3744  oY*X[ihit];
3745 
3746  // if cross >0 hits stays 'on the left' (which means clockwise to go from the origin
3747  // to the hit following the smaller path) otherwise it stays 'on the right'.
3748 
3749  if (cross>0.) {
3750  //disq = X[ihit]*X[ihit]+Y[ihit]*Y[ihit]; //[R.K. 9/2018] unused
3751  nleft++;
3752  } else {
3753  nright++;
3754  }
3755  } // end of for(ihit=0, nleft=0, nright=0;....
3756 
3757  if( nright> nleft) {
3758  *Charge = -1;
3759  } else if ( nleft > nright) {
3760  *Charge = 1;
3761  } else { // then choose according the closest hit ti the center
3762  if( minr < minl ) *Charge = -1;
3763  else *Charge = 1;
3764  }
3765 
3766 
3767 
3768 }
double Y
Definition: anaLmdDigi.C:68
Double_t
double X
Definition: anaLmdDigi.C:68
Short_t PndTrkTracking2::FindTrackStrictCollection ( Short_t  NFiCELLDISTANCE,
Short_t  iSeed,
Short_t  NParallelToSearch,
Short_t *  ListHitsinTrackinWhichToSearch,
bool *  InclusionList,
Short_t *  FiConformalIndex,
Short_t *  OutputListHitsinTrack 
)
private
void PndTrkTracking2::FixDiscontinuitiesFiangleinSZplane ( Short_t  TemporarynSkewHitsinTrack,
Vec< Double_t > &  S,
Double_t Fi_initial_helix_referenceframe,
Short_t  Charge 
)
private

Definition at line 3777 of file PndTrkTracking2.cxx.

References i, and PI.

Referenced by Exec().

3783 {
3784 
3785  Short_t i;
3786 
3787  if( Charge >0 )
3788  {
3789  for(i=0 ; i<CandidateSkewnSkewHitsinTrack; i++){
3790  if( S[i] > *Fi_initial_helix_referenceframe ) S[i]-= 2.*PI;
3791  }
3792  } else {
3793  for(i=0 ; i<CandidateSkewnSkewHitsinTrack; i++){
3794  if( S[i] < *Fi_initial_helix_referenceframe ) S[i]+= 2.*PI;
3795  }
3796  }
3797 
3798  return;
3799 
3800 }
Int_t i
Definition: run_full.C:25
const Double_t PI
Bool_t PndPersistencyTask::GetPersistency ( )
inlineinherited

Definition at line 32 of file PndPersistencyTask.h.

References PndPersistencyTask::fPersistency.

Referenced by PndLmdPixelHitProducerFast::GetPersistance(), PndMdtDigitization::Init(), PndMdtHitProducerIdeal::Init(), PndMdtClusterTask::Init(), PndFtsHitProducerRealFast::Init(), PndDiscTaskReconstruction::Init(), PndRichHitProducer::Init(), PndSttHitProducerRealFast::Init(), PndSttHelixHitProducer::Init(), PndDiscTaskPID::Init(), PndIdealTrackFinder::Init(), PndSttMvdGemTracking::Init(), PndMdtTrkProducer::Init(), PndFtsHitProducerRealFull::Init(), PndLmdPixelClusterTask::Init(), PndSttHitProducerRealFull::Init(), PndLmdStripClusterTask::Init(), PndEmcApdHitProducer::Init(), PndMissingPzCleanerTask::Init(), PndEmcMakeRecoHit::Init(), PndEmcMakeClusterOnline::Init(), PndTrackSmearTask::Init(), PndEmcFWEndcapTimebasedWaveforms::Init(), PndSttHitProducerIdeal::Init(), PndEmcFWEndcapDigi::Init(), PndFtsHitProducerIdeal::Init(), PndEmcMakeCluster::Init(), PndMdtPointsToWaveform::Init(), PndDiscTaskDigitization::Init(), PndEmcMakeDigi::Init(), PndSdsTimeWalkCorrTask::Init(), PndLmdPixelHitProducerFast::Init(), PndDrcHitFinder::Init(), PndRichHitFinder::Init(), PndEmcMakeCorr::Init(), PndFtofHitProducerIdeal::Init(), PndEmcHitsToWaveform::Init(), PndSciTDigiTask::Init(), PndDrcHitProducerIdeal::Init(), PndSdsHitProducerIdeal::Init(), PndSciTHitProducerIdeal::Init(), PndEmcHitProducer::Init(), PndRecoMultiKalmanTask2::Init(), PndDrcHitProducerReal::Init(), PndDskFLGHitProducerIdeal::Init(), PndEmcTmpWaveformToDigi::Init(), PndDrcDigiTask::Init(), PndEmcWaveformToDigi::Init(), PndSttMatchTracks::Init(), PndEmcWaveformToCalibratedDigi::Init(), Init(), PndSttFindTracks::Init(), PndEmcMultiWaveformToCalibratedDigi::Init(), PndDrcTimeDigiTask::Init(), PndRecoKalmanTask2::Init(), PndEmcExpClusterSplitter::Init(), PndSdsNoiseProducer::Init(), PndFtsHoughTrackerTask::Init(), PndEmcPhiBumpSplitter::Init(), PndSdsHybridHitProducer::Init(), PndSdsIdealRecoTask::Init(), PndRecoMultiKalmanTask::Init(), PndSdsIdealClusterTask::Init(), PndRecoKalmanTask::Init(), PndSdsStripHitProducerDif::Init(), PndSdsStripHitProducer::Init(), PndGemDigitize::Init(), PndGemFindHits::Init(), PndSdsPixelClusterTask::Init(), PndSdsStripClusterTask::Init(), PndMvdGemTrackFinderOnHits::Init(), PndBarrelTrackFinder::Init(), PndEmcFullDigiTask::PndEmcFullDigiTask(), PndEmcMakeBump::PndEmcMakeBump(), PndUnassignedHitsTask::RegisterBranches(), PndMvdClusterTask::SetPersistance(), PndMvdDigiTask::SetPersistance(), PndEmcMakeBump::SetStorageOfData(), and PndEmcFullDigiTask::StoreDigi().

32 { return fPersistency; }
void PndTrkTracking2::GetVolumeCharacteristics ( TGeoVolume *  tgeovol,
TGeoHMatrix *  mat,
Double_t  GlobalScal[3],
Double_t  GlobalTrans[3],
Double_t  GlobalRot[9] 
)
private

Definition at line 3804 of file PndTrkTracking2.cxx.

References Double_t, gGeoManager, i, p, and shape.

3806 {
3807 
3808  // tgeovol == input TGeoVolume class;
3809  // gmat == its GLOBAL (from MARS) matrix transformation;
3810 
3811 
3812  // iterative function;
3813 
3814  Int_t
3815  i,
3816  ino,
3817  j,
3818  k,
3819  nodes;
3820 
3821  // get the TObjArray of the nodes contained in this volume;
3822  TObjArray * tobjnodes = tgeovol->GetNodes();
3823 
3824  if(tobjnodes==0){// null pointer, volume without contained nodes--> therefore without contained volumes;
3825  // check if in the name of this volume there are the keyword 'Active' and 'Strip'
3826  // or 'Active' and 'Pixel';
3827 
3828  if( strstr(tgeovol->GetName(),"Active") == NULL
3829  ||
3830  (strstr(tgeovol->GetName(),"Pixel") == NULL && strstr(tgeovol->GetName(),"Strip") == NULL )
3831  ) return; // condition failed;
3832 
3833 
3834  cout<<"-----------------------------------------------\n";
3835  cout<<" the volume "<<tgeovol->GetName()<<" is at the end of the chain!";
3836  if (tgeovol->IsActive()) cout<<"volume attivo;\n"; else cout<<"volume non attivo;\n";
3837 
3838 // cout<<"\tora il print della matrice da MARS to local 4x4 con la funzione print :\n";
3839 // gmat->Print();
3840  TGeoShape * shape = tgeovol->GetShape();
3841  if(shape->GetByteCount()== 36){ // this is a TGeoBBox;
3842  TGeoBBox *p;
3843  p = (TGeoBBox *) shape;
3844  const Double_t *Or;
3845  Or = p->GetOrigin();
3846  cout<<"questo e' una box con OriginX "<<Or[0]<<",OriginY "<<Or[1]
3847  <<",OriginZ "<<Or[2]<<" e Semilato X (= DX) = "<<p->GetDX()
3848  <<", DY "<<p->GetDY()<< ", DZ "<<p->GetDZ()<<endl;
3849  } else if (shape->GetByteCount()== 100) { // this is a TGeoArb8 shape;
3850  cout<<"questo e' una TGeoArb8"<<endl;
3851  shape->InspectShape();
3852  } else {
3853  cout<<"anomalous case, not a box nor a TGeoArb8 !\n";
3854  }
3855 
3856 
3857 
3858 cout<<"---------- inizio stampa global Scale, Translation e Global matrix del volume calcolata col mio metodo "<<endl;
3859  cout<<"\tla sua Scale rispetto a MARS : X "<<GlobalScal[0]<<", Y "<<
3860  GlobalScal[1]<<", Z "<<GlobalScal[2]<<endl;
3861  cout<<"\tla sua traslazione rispetto a MARS : X "<<GlobalTrans[0]<<" Y "<<
3862  GlobalTrans[1]<<" Z "<<GlobalTrans[2]<<endl;
3863  cout<<"\tla sua rotazione rispetto a Mars :\n"<<GlobalRot[0]<<
3864  " "<<GlobalRot[1]<<
3865  " "<<GlobalRot[2]<<
3866  " ,\n"<<GlobalRot[3]<<
3867  " "<<GlobalRot[4]<<
3868  " "<<GlobalRot[5]<<
3869  " ,\n"<<GlobalRot[6]<<
3870  " "<<GlobalRot[7]<<
3871  " "<<GlobalRot[8]<<" ;"<<
3872  endl;
3873 cout<<"-------------------------------\n\n";
3874 
3875 
3876  }else{
3877  nodes = tobjnodes->GetEntriesFast();
3878  for(ino=0;ino<nodes; ino++){
3879  TGeoNode * geonode = (TGeoNode *) tobjnodes->At(ino);
3880  // in the following vol is the TGeoVolume corresponding to the geonode node;
3881  TGeoVolume * vol = geonode->GetVolume();
3882  //TGeoShape * shape = vol->GetShape(); //[R.K. 9/2018] unused
3883 
3884 //cout<<"------------------------------------------- inizio stampa relativa al volume "<<vol->GetName()<<endl;
3885  //if(shape->GetByteCount()== 36){ // this is a TGeoBBox;
3886  //TGeoBBox *p =(TGeoBBox *) shape;
3887  //const Double_t *Or;
3888  //Or = p->GetOrigin();
3889 // cout<<"questo e' una box con OriginX "<<Or[0]<<",OriginY "<<Or[1]
3890 // <<",OriginZ "<<Or[2]<<" e Semilato X (= DX) = "<<p->GetDX()
3891 // <<", DY "<<p->GetDY()<< ", DZ "<<p->GetDZ()<<endl;
3892  //}
3893 
3894 //cout<<"---------- inizio stampa local matrix del volume "<<endl;
3895 TGeoMatrix * lmatrix = geonode->GetMatrix();
3896 //lmatrix->Print();
3897  const Double_t * Scal = lmatrix->GetScale();
3898 // cout<<"\til suo fattore di scala rispetto a mother volume : X "<<Scal[0]<<", Y "<<Scal[1]
3899 // <<", Z "<<Scal[2]<<endl;
3900  const Double_t * Trans = lmatrix->GetTranslation();
3901 // cout<<"\tla sua traslazione rispetto a mother volume : X "<<Trans[0]<<", Y "<<
3902 // Trans[1]<<", Z "<<Trans[2]<<endl;
3903  const Double_t * Rot = lmatrix->GetRotationMatrix();
3904 
3905 /*
3906  cout<<"\tla sua rotazione rispetto a mother volume : M11 "<<Rot[0]<<
3907  ", M12 "<<Rot[1]<<
3908  ", M13 "<<Rot[2]<<
3909  ", M21 "<<Rot[3]<<
3910  ", M22 "<<Rot[4]<<
3911  ", M23 "<<Rot[5]<<
3912  ", M31 "<<Rot[6]<<
3913  ", M32 "<<Rot[7]<<
3914  ", M33 "<<Rot[8]<<
3915  endl;
3916 cout<<"-------------------fine\n";
3917 */
3918 
3919 
3920  Double_t newGlobalScal[3],
3921  newGlobalTrans[3],
3922  newGlobalRot[9];
3923  //--------------------------------------------------
3924  // calculation of the new GlobalScale vector;
3925  for(i=0;i<3;i++){
3926  newGlobalScal[i] = GlobalScal[i]*Scal[i]; // new global scale;
3927  }
3928 
3929  // calculation of the new Global Traslation vector;
3930  // newGlobalTrans = oldGlobalTrans + oldGlobalRot * localTrans;
3931  for(i=0;i<3;i++){
3932  newGlobalTrans[i] = GlobalTrans[i] ; // new Global traslation;
3933  for(k=0;k<3;k++){
3934  newGlobalTrans[i] += GlobalRot[i*3+k]*Trans[k]; // new Global traslation;
3935  }
3936  }
3937  // calculation of the new Rotation matrix;
3938  for(i=0;i<3;i++){
3939  for(j=0;j<3;j++){
3940  newGlobalRot[3*i+j] = 0.;
3941  for(k=0;k<3;k++){
3942  newGlobalRot[3*i+j] += GlobalRot[3*i+k]*Rot[3*k+j];
3943  }
3944  }
3945  }
3946 
3947 
3948  //--------------------------------------------------
3949 
3950  // the following is a way to obtain the transformation matrix from MARS to this node;
3951  // mother volume of the volume vol;
3952  TGeoVolume * mother = geonode->GetMotherVolume();
3953  // the function FindMatrixOfDaughterVolume(vol) fills the TGeoManager::fHMatrix
3954  // with the matrix transforming from MARS to the vol volume;
3955  mother->FindMatrixOfDaughterVolume(vol);
3956  // now get the transformation matrix from MARS to vol;
3957  TGeoHMatrix * gmatrix = gGeoManager->GetHMatrix();
3958 /*
3959 cout<<"---------- inizio stampa global matrix del volume "<<endl;
3960 cout<<"\t\tsuo mother volume e' "<<mother->GetName()<<endl;
3961 gmatrix->Print();
3962 cout<<"---- ora stampa il vettore LOCALE (0,0,0) nel corrispondente GLOBALE usando TGeoMatrix::LocaltoMaster\n";
3963 const Double_t localv[4]={0.,0.,0.,1.};
3964 Double_t masterv[4];
3965 gmatrix->LocalToMaster(localv,masterv);
3966 cout<<"\til vettore nel MRS e' : X = "<<masterv[0]<<", Y = "<<masterv[1]<<", Z = "<<masterv[2]<<endl;
3967 //
3968 
3969 cout<<"---------- inizio stampa global Translation e Global matrix del volume calcolata col mio metodo "<<endl;
3970  cout<<"\tla sua scala rispetto a MARS : X "<<newGlobalScal[0]<<", Y "<<
3971  newGlobalScal[1]<<", Z "<<newGlobalScal[2]<<endl;
3972  cout<<"\tla sua traslazione rispetto a MARS : X "<<newGlobalTrans[0]<<", Y "<<
3973  newGlobalTrans[1]<<", Z "<<newGlobalTrans[2]<<endl;
3974  cout<<"\tla sua rotazione rispetto a Mars :\n\t"<<newGlobalRot[0]<<
3975  ",\t"<<newGlobalRot[1]<<
3976  ",\t"<<newGlobalRot[2]<<
3977  ",\n\t"<<newGlobalRot[3]<<
3978  ",\t"<<newGlobalRot[4]<<
3979  ",\t"<<newGlobalRot[5]<<
3980  ",\n\t"<<newGlobalRot[6]<<
3981  ",\t"<<newGlobalRot[7]<<
3982  ",\t"<<newGlobalRot[8]<<
3983  endl;
3984 
3985 cout<<"---------------------------------------------"<<endl<<endl;
3986 */
3987  GetVolumeCharacteristics(vol,gmatrix,newGlobalScal,newGlobalTrans,newGlobalRot); // here is the iteration that enables to scan
3988  // all the list of volume in order to find the
3989  // interesting ones, namely those at the end
3990  // of the chain;
3991  } // end of for(ino=0;ino<nodes; ino++;)
3992  } // end of if(nodes==0)
3993 
3994 
3995  return;
3996 }
Double_t p
Definition: anasim.C:58
Int_t i
Definition: run_full.C:25
void GetVolumeCharacteristics(TGeoVolume *tgeovol, TGeoHMatrix *mat, Double_t GlobalScal[3], Double_t GlobalTrans[3], Double_t GlobalRot[9])
TGeoManager * gGeoManager
TGeoShape * shape
Double_t
void PndTrkTracking2::InfoXYZParal ( Double_t  info[][7],
Short_t  infopar,
Double_t  Oxx,
Double_t  Oyy,
Double_t  Rr,
Double_t  KAPPA,
Double_t  FI0,
Short_t  Charge,
Double_t Posiz 
)
private

Definition at line 4002 of file PndTrkTracking2.cxx.

References atan2(), Double_t, fabs(), fi, PI, and sqrt().

Referenced by LoadPndTrack_TrackCand().

4013 {
4014 
4015  Double_t fi, norm, vers[2];
4016 
4017  vers[0] = Oxx - info[infopar][0];
4018  vers[1] = Oyy - info[infopar][1];
4019  norm = sqrt( vers[0]*vers[0] + vers[1]*vers[1] );
4020 
4021  if(norm < 1.e-20) {
4022  Posiz[0] = -999999999.;
4023  return;
4024  }
4025 
4026 
4027 
4028 
4029 
4030 
4031  if( fabs( Rr - fabs( norm - info[infopar][3] ) ) // distance trajectory-drift radius
4032  <
4033  fabs( Rr - (norm + info[infopar][3]) ) ) {
4034 
4035  Posiz[0] = info[infopar][0] + info[infopar][3]*vers[0]/norm;
4036  Posiz[1] = info[infopar][1] + info[infopar][3]*vers[1]/norm;
4037 
4038  } else {
4039 
4040  Posiz[0] = info[infopar][0] - info[infopar][3]*vers[0]/norm;
4041  Posiz[1] = info[infopar][1] - info[infopar][3]*vers[1]/norm;
4042 
4043  } // end of if ( fabs( Rr - fabs( Distance - info[infopar][3] ) ).....
4044 
4045 
4046 
4047 
4048 // Posiz[0] = info[infopar][0] + info[infopar][3]*vers[0]/norm;
4049 // Posiz[1] = info[infopar][1] + info[infopar][3]*vers[1]/norm;
4050 
4051  if( fabs(KAPPA)<1.e-20 ){
4052  Posiz[2] = -888888888.;
4053  return;
4054  }
4055 
4056 
4057  fi = atan2(-vers[1],-vers[0]);
4058  if(fi<0.) fi += 2.*PI;
4059 
4060  if ( Charge > 0){
4061  if(fi > FI0 ) FI0 += 2.*PI;
4062 // Posiz[2] = (FI0-fi)/KAPPA;
4063  } else {
4064  if(fi < FI0 ) fi += 2.*PI;
4065  }
4066  Posiz[2] = (fi-FI0)/KAPPA;
4067 
4068  return;
4069 }
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
const Double_t PI
TFile * fi
Double_t
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
friend F32vec4 atan2(const F32vec4 &y, const F32vec4 &x)
Definition: P4_F32vec4.h:117
InitStatus PndTrkTracking2::Init ( )
virtual

Virtual method Init

Definition at line 456 of file PndTrkTracking2.cxx.

References APOTEMAMAXINNERPARSTRAW, APOTEMAMINOUTERPARSTRAW, APOTEMASTRAWDETECTORMIN, PndTrkSttAdjacencies::CalculateAdjacentStt2(), CalculateSinandCosin(), PndTrkCategorizeStt::CategorizeStt(), doMcComparison, Double_t, fBFIELD, PndSttMapCreator::FillTubeArray(), fListAxialInnerLeft, fListAxialInnerRight, fListAxialOuterLeft, fListAxialOuterRight, fListParContiguous, fListSkewLeft, fListSkewRight, fMCTrackArray, fMvdAloneTracking, fMvdMCPointArray, fMvdPixelBranch, fMvdPixelHitArray, fMvdStripBranch, fMvdStripHitArray, fMvdTrackCandArray, fnAxialInnerLeft, fnAxialInnerRight, fnAxialOuterLeft, fnAxialOuterRight, fnParContiguous, fnSkewLeft, fnSkewRight, fradiaConf, fSciTHitArray, fSciTPointArray, fStrawCode, fStrawCode2, fSttBranch, fSttHitArray, fSttMvdPndTrackArray, fSttMvdPndTrackCandArray, fSttParameters, fSttPointArray, fSttTubeArray, fxTube, fxxyyTube, fYesSciTil, fyTube, fzTube, PndPersistencyTask::GetPersistency(), HANDLE, HANDLE2, hdeltaRPixel, hdeltaRPixel2, hdeltaRStrip, hdeltaRStrip2, i, iplotta, IVOLTE, NRDIVCONFORMAL, NUMBER_STRAWS, r1, r2, RSTRAWDETECTORMAX, PndTrkBoundaryParStraws2::Set(), STRAWRADIUS, and VERTICALGAP.

456  {
457 
458 
459  IVOLTE=-1;
460 
461 // SEMILENGTH_STRAIGHT = 75.;
462 // ZCENTER_STRAIGHT = 35.;
463 
464  Double_t po[3], BB[3];
465 
466  FairField* Field = FairRunAna::Instance()->GetField();
467 
468  po[0] =0.;
469  po[1]= 0.;
470  po[2]= 0.;
471 
472 
473  Field->GetFieldValue(po, BB); //return value in KG (G3)
474  fBFIELD = BB[2]/10.; // value in Tesla;
475 
476  if(iplotta){
477  hdeltaRPixel = new TH1F("hdeltaRPixel", "distance MC Pixel point from trajectory in XY plane", 100, -1, 1);
478  hdeltaRStrip = new TH1F("hdeltaRStrip", "distance MC Strip point from trajectory in XY plane", 100, -1, 1);
479  hdeltaRPixel2 = new TH1F(
480  "hdeltaRPixel2", "distance MC point from trajectory in XY plane (Pixels)", 100, -10, 10);
481  hdeltaRStrip2 = new TH1F(
482  "hdeltaRStrip2", "distance MC point from trajectory in XY plane (Strips)", 100, -10,10);
483 }
484 
485 
486 // --------------------------- opening files for special purposes
487 
488 
489 if(doMcComparison >=1 ){
490 //---- apertura file con info su Found tracce su cui si fa Helix fit dopo
491  HANDLE2 = fopen("info_da_PndTrackFinderReal.txt","w");
492 
493 // ---- open filehandle per statistica sugli hits etc.
494  HANDLE = fopen("statistiche.txt","w");
495 // ---------------
496 
497 
498 } // end of if(doMcComparison >=1 )
499 
500 
501 // ---------------------------------------------------------------------------------------
502 //--------------geometry stuff;
503 
504 /*
505 
506 // parto dal volume cave
507  TGeoVolume *vcave= gGeoManager->FindVolumeFast("cave");
508 // i suoi nodi;
509  // get the TObjArray of the nodes contained in this volume;
510  TObjArray * tobjnodes = vcave->GetNodes();
511  int nodes = tobjnodes->GetEntriesFast();
512  for(int i=0;i<nodes; i++){
513  TGeoNode * geonode = (TGeoNode *) tobjnodes->At(i);
514  // in the following vol is the TGeoVolume corresponding to the geonode node;
515  TGeoVolume * vol = geonode->GetVolume();
516  cout<<"sottovolumi del cave : "<<vol->GetName()<<endl;
517  }
518 
519 
520 
521 
522  char nomevolume[100]="Mvd-2.1o(Central-Mvd)";
523 // TGeoVolume *v= gGeoManager->FindVolumeFast(nomevolume);
524  TGeoVolume *v= gGeoManager->FindVolumeFast("Mvd-2.1o(Central-Mvd)");
525 
526 // so gia' che questo e' un sottovolume di cave ; allora estraggo la sua matrice di roto-traslazione;
527  vcave->FindMatrixOfDaughterVolume(v);
528  // now get the transformation matrix from MARS to vol;
529  TGeoHMatrix * gmatrix = gGeoManager->GetHMatrix();
530  cout<<"---------- matrice di Mvd-2.1o(Central-Mvd) rispetto a cave :\n";
531  gmatrix->Print();
532  cout<<"--------------------------- fine printout\n";
533 
534 
535 
536  // v e' il volume Mvd-2.1o(Central-Mvd)
537  Double_t GlobalScal[3]={1.,1.,1.} , GlobalTras[3]={0.,0.,0.},
538  GlobalRot[9]={1.,0.,0.,0.,1.,0.,0.,0.,1.};
539  GetVolumeCharacteristics(v, NULL,GlobalScal,GlobalTras,GlobalRot); // NULL is the pointer to a TGeoHMatrix, the global transformation matrix of the
540  // volume v; it is important only for the volumes at the end of the chain;
541 
542 // cout<<"stampa per la geometria ------------------------------------- "<<nomevolume<<endl;
543 //----- shape del volume PixelActiveo5
544 
545 
546 //--- drawings
547 
548 //--
549  TGeoVolume *vv = gGeoManager->FindVolumeFast("PixelActiveo5");
550 // gGeoManager->SetVisLevel(10);
551  TCanvas * can6 = new TCanvas("c6","PixelActiveo5");
552  can6->cd();
553 //gGeoManager->GetMasterVolume()->Draw();
554 gGeoManager->SetTopVisible();
555  vv->SetLineColor(kRed);
556  vv->Draw();
557 //--
558 
559 
560 
561 // cout<<"ora disegna il Master Volume -----\n";
562 // gGeoManager->SetTopVisible();
563 // gGeoManager->GetMasterVolume()->Draw();
564 // TGeoVolume *topvolume = gGeoManager->GetMasterVolume();
565 // cout<<"pointer del master volume "<<topvolume<<endl;
566 
567 // TObjArray * lista = gGeoManager->GetListOfPhysicalNodes();
568 // cout<<"print ultimo indice "<<lista->GetLast()<<endl;
569 
570 // cout<<"stampa per la geometria , fine------------------------------------- "<<endl;
571 
572 
573 */
574 
575 //--------------end of the geometry stuff;
576 // ---------------------------------------------------------------------------------------
577 
578 
579 
580  // Get RootManager
581  FairRootManager* ioman = FairRootManager::Instance();
582 // ioman = FairRootManager::Instance();
583  if ( ! ioman ) {
584  cout << "-E- PndTrkTracking2::Init: "
585  << "RootManager not instantiated, return!" << endl;
586  return kFATAL;
587  }
588 // ----- maps of STT tubes
589  // CHECK added
591  fSttTubeArray = mapper->FillTubeArray();
592  //---------------------------------------------------- end map
593 
594 
595 // load the array indicating if a straw is external of not;
596 // remember that the numbering of the STT Straws starts at 1 and goes up to 4542 included;
597 
598 // StrawCode convention (in the following left or right is looking to the beam from downstream) :
599 // -1 = not a boundary straw;
600 // 10= inner axial boundary left;
601 // 20= inner axial boundary right;
602 // 12= outer left axial Stt : Vertical (BUT NOT OUTERMOST) + inside boundary ;
603 // 22= outer right axial Stt : Vertical (BUT NOT OUTERMOST) + inside boundary ;
604 // 13= outermost axial boundary left;
605 // 23= outermost axial boundary right;
606 
607  PndTrkBoundaryParStraws2 BoundaryParStraws ;
608  BoundaryParStraws.Set(
609  // inputs :
615  false, // printout flag;
617  STRAWRADIUS,
618  VERTICALGAP,
619  // outputs :
620  fStrawCode, // -1 = not a boundary straw; >0 = boundary straw;
621  fStrawCode2 // second Code; -1 = not a boundary straw; >0 = boundary straw;
622  );
623 
624 
625 
626  //----------------------------------------------------
627 
628  // load the adjacencies table for the Stt tubes;
629  PndTrkSttAdjacencies Adjacent;
630  Adjacent.CalculateAdjacentStt2(
633  fnParContiguous, // output; number of contiguous straws (axial Stt);
634  fListParContiguous, // output list (axial Stt);
635  fxTube, // X position center of tube;
636  fyTube, // Y position center of tube;
637  fzTube, // Z position center of tube;
638  fxxyyTube // X*X+Y*Y position center of tube;
639  );
640 
641 //-----------------------------------------
642 
643  // load the list of Axial/Skew/Left-Right/Inner-Outer arrays for the Stt tubes;
644  PndTrkCategorizeStt categorize;
645  categorize.CategorizeStt(
648  fnAxialOuterRight, // output; number of axial Stt, outer, on the right (looking into the beam);
649  fnAxialInnerRight, // output; number of axial Stt, inner, on the right (looking into the beam);
650  fnAxialOuterLeft, // output; number of axial Stt, outer, on the left (looking into the beam);
651  fnAxialInnerLeft, // output; number of axial Stt, inner, on the left (looking into the beam);
652 
653  fListAxialOuterRight, // output; list of axial Stt, outer, on the right (looking into the beam);
654  fListAxialInnerRight, // output; list of axial Stt, inner, on the lright (looking into the beam);
655  fListAxialOuterLeft, // output; list of axial Stt, outer, on the left (looking into the beam);
656  fListAxialInnerLeft, // output; list of axial Stt, inner, on the left (looking into the beam);
657 
658  fnSkewRight, // output; number of skew Stt, on the right (looking into the beam);
659  fnSkewLeft, // output; number of skew Stt, on the right (looking into the beam);
660  fListSkewRight, // output; list of axial Stt, inner, on the lright (looking into the beam);
661  fListSkewLeft // output; list of axial Stt, outer, on the left (looking into the beam);
662  );
663 
664 
665 
666 
667 //-----------------------------------------
668 // calculate the sines and cosines for the Legiandre fit;
669 
670 // LEGIANDRE_NTHETADIV, input;
671 // fSinus, output;
672 // fCosine output;
673 
675 
676 
677 // get the MCTrack array
678 
679  fMCTrackArray = (TClonesArray*) ioman->GetObject("MCTrack");
680  if ( ! fMCTrackArray)
681  {
682  cout << "-E- PndTrkTracking2::Init: No MCTrack array!"
683  << endl;
684 // return kERROR;
685  }
686 
687 // ------------------------- get the SciTil hits
688  if(fYesSciTil) {
689  fSciTHitArray = (TClonesArray*) ioman->GetObject("SciTHit");
690  } else {
691  fSciTHitArray = NULL;
692  }
693 //---------------------------
694 
695 // ------------------------- get the SciTil MC Points
696  if(fYesSciTil && doMcComparison) {
697  fSciTPointArray = (TClonesArray*) ioman->GetObject("SciTPoint");
698  } else {
699  fSciTPointArray = NULL;
700  }
701 //---------------------------
702  // Get input array these are the MC point of STT
703  fSttPointArray = (TClonesArray*) ioman->GetObject("STTPoint");
704  if ( ! fSttPointArray ) {
705  cout << "-W- PndSttHelixHitProducer::Init: "
706  << "No STTPoint array, return!" << endl;
707  return kERROR;
708  }
709 
710  // Get input array hit of STT after digi
711  fSttHitArray = (TClonesArray*) ioman->GetObject(fSttBranch);
712 // fSttHitArray = (TClonesArray*) ioman->GetObject("STTHit");
713  if ( ! fSttHitArray ) {
714  cout << "-W- PndTrkTracking2::Init: "
715  << "No STTHit array, return!" << endl;
716  return kERROR;
717  }
718 
719 // ------------------------- get the Mvd hits
720  fMvdPixelHitArray = (TClonesArray*) ioman->GetObject(fMvdPixelBranch);
721 // fMvdPixelHitArray = (TClonesArray*) ioman->GetObject("MVDHitsPixel");
722  if ( !fMvdPixelHitArray){
723  cout << "-W- PndTrkTracking2::Init: " << "No MVD Pixel hitArray, return!" <<endl;
724 // return kERROR;
725  }
726  fMvdStripHitArray = (TClonesArray*) ioman->GetObject(fMvdStripBranch);
727 // fMvdStripHitArray = (TClonesArray*) ioman->GetObject("MVDHitsStrip");
728 
729  if ( !fMvdStripHitArray){
730  cout << "-W- PndTrkTracking2::Init: " << "No MVD Strip hitArray, return!" <<endl;
731 // return kERROR;
732  }
733 
734 // ------------------------- get the Mvd track candidates
735 
736  if ( fMvdAloneTracking ){
737  fMvdTrackCandArray = (TClonesArray*) ioman->GetObject("MVDRiemannTrackCand");
738  if ( !fMvdTrackCandArray){
739  cout << "-W- PndTrkTracking2::Init: " << "No MVD TrackCand Array, return!" <<endl;
740 // return kERROR;
741  }
742  }
743  cout << "-I- PndTrkTracking2: Initialization successfull" << endl;
744 
745 // ------------------------- get the Mvd MC points
746 
747  fMvdMCPointArray = (TClonesArray*) ioman->GetObject("MVDPoint");
748  if ( !fMvdMCPointArray){
749  cout << "-W- PndTrkTracking2::Init: " << "No MVD MC Point Array, return!" <<endl;
750  return kERROR;
751  }
752  cout << "-I- PndTrkTracking2: Initialization successfull" << endl;
753 
754 
755 //-------------------------------- output TClonesArrays ------------------------
756 
757  // Create and register output array for PndTrackCand of Stt+Mvd combined
758 
759  fSttMvdPndTrackCandArray = new TClonesArray("PndTrackCand");
760 // ioman->Register("SttMvdTrackCand","SttMvd",fSttMvdPndTrackCandArray, kTRUE);
761  ioman->Register("SttMvdTrackCand","SttMvd",fSttMvdPndTrackCandArray, GetPersistency());
762 
763 
764  // Create and register output array for PndTrack of Stt+Mvd combined
765 
766  fSttMvdPndTrackArray = new TClonesArray("PndTrack");
767  ioman->Register("SttMvdTrack","SttMvd",fSttMvdPndTrackArray, GetPersistency());
768 
769 //-----------------------
770 
771 
772 // calculate the boundaries of the Box in Conformal Space, see Gianluigi logbook on pag. 210-211
773  Short_t i;
774  Double_t
775  A,
776  r1,
777  r2;
778 
782  if ( NRDIVCONFORMAL > 1 ) {
783  for(i = 1; i< NRDIVCONFORMAL ; i++){
784  r2 = r1 + A;
785  fradiaConf[NRDIVCONFORMAL-i] = 1./r2;
786  r1=r2;
787  }
788  }
789 
790 
791  return kSUCCESS;
792 
793 }
const Double_t RSTRAWDETECTORMAX
void CategorizeStt(const Short_t NUMBER_STRAWS, TClonesArray *SttTubeArray, Short_t &nAxialOuterRight, Short_t &nAxialInnerRight, Short_t &nAxialOuterLeft, Short_t &nAxialInnerLeft, Short_t *ListAxialOuterRight, Short_t *ListAxialInnerRight, Short_t *ListAxialOuterLeft, Short_t *ListAxialInnerLeft, Short_t &nSkewRight, Short_t &nSkewLeft, Short_t *ListSkewRight, Short_t *ListSkewLeft)
TClonesArray * fSciTHitArray
Short_t fListAxialInnerLeft[NUMBER_STRAWS]
Double_t fxxyyTube[NUMBER_STRAWS]
Int_t i
Definition: run_full.C:25
TClonesArray * fSttMvdPndTrackCandArray
Short_t fListAxialInnerRight[NUMBER_STRAWS]
TClonesArray * fSttMvdPndTrackArray
Short_t fListSkewLeft[NUMBER_STRAWS]
double r1
Short_t fListSkewRight[NUMBER_STRAWS]
Short_t fStrawCode2[NUMBER_STRAWS]
TClonesArray * fSttTubeArray
Short_t fnParContiguous[NUMBER_STRAWS]
char fMvdPixelBranch[200]
void Set(Double_t APOTEMAMAXINNERPARSTRAW, Double_t APOTEMAMINOUTERPARSTRAW, Short_t NUMBER_STRAWS, Double_t RSTRAWDETECTORMIN, Double_t RSTRAWDETECTORMAX, bool stampa, TClonesArray *SttTubeArray, Double_t STRAWRADIUS, Double_t VERTICALGAP, Short_t *StrawCode, Short_t *StrawCode2)
TClonesArray * fMvdPixelHitArray
Double_t
const Double_t STRAWRADIUS
const Double_t APOTEMAMINOUTERPARSTRAW
Double_t fxTube[NUMBER_STRAWS]
TClonesArray * fSttPointArray
Short_t fListParContiguous[NUMBER_STRAWS][6]
Short_t fListAxialOuterRight[NUMBER_STRAWS]
TClonesArray * fSttHitArray
TClonesArray * FillTubeArray()
char fSttBranch[200]
static const Short_t NUMBER_STRAWS
TClonesArray * fMvdMCPointArray
TClonesArray * fMCTrackArray
const Double_t VERTICALGAP
void CalculateAdjacentStt2(const Short_t NUMBER_STRAWS, TClonesArray *SttTubeArray, Short_t *nParContiguous, Short_t ListParContiguous[][6], Double_t *x, Double_t *y, Double_t *z, Double_t *rxy2)
Short_t fStrawCode[NUMBER_STRAWS]
const Double_t APOTEMAMAXINNERPARSTRAW
Short_t fnAxialInnerLeft
Short_t fnAxialInnerRight
Double_t fyTube[NUMBER_STRAWS]
Short_t fListAxialOuterLeft[NUMBER_STRAWS]
TClonesArray * fMvdTrackCandArray
Short_t fnAxialOuterRight
TClonesArray * fSciTPointArray
const Double_t APOTEMASTRAWDETECTORMIN
Double_t fradiaConf[NRDIVCONFORMAL]
static const Short_t NRDIVCONFORMAL
char fMvdStripBranch[200]
double r2
TClonesArray * fMvdStripHitArray
Short_t fnAxialOuterLeft
PndGeoSttPar * fSttParameters
Double_t fzTube[NUMBER_STRAWS]
void PndTrkTracking2::Initial_SttParHits_DecreasingR_Ordering ( Double_t  info[][7],
Short_t *  ListSttParHi,
Int_t  nSttParHit 
)
private

Definition at line 4077 of file PndTrkTracking2.cxx.

References Double_t, and PndTrkMergeSort::Merge_Sort().

Referenced by Exec().

4082 {
4083 
4084  Short_t
4085  j,
4086  OLDListSttParHits[nSttParHit];
4087 
4088  Int_t
4089  auxIndex[nSttParHit];
4090 
4091  Double_t
4092  auxRvalues[nSttParHit];
4093 
4094 
4095 // ordering the parallel hits by decreasing spatial radius.
4096 
4097  for (j = 0; j< nSttParHit; j++){
4098  auxIndex[j]=j;
4099  auxRvalues[j]=
4100  info[ListSttParHi[ j ] ][0]*info[ListSttParHi[ j ] ][0]+
4101  info[ListSttParHi[ j ] ][1]*info[ListSttParHi[ j ] ][1];
4102  OLDListSttParHits[j]=ListSttParHi[j];
4103  }
4104 
4105  PndTrkMergeSort Sorter;
4106 
4107  Sorter.Merge_Sort( (Short_t) nSttParHit, auxRvalues, auxIndex);
4108 
4109  for (j = 0; j< nSttParHit; j++){
4110  ListSttParHi[ nSttParHit-1-j] = OLDListSttParHits[ auxIndex[ j ] ];
4111  }
4112 
4113  return;
4114 }
Double_t
void Merge_Sort(Short_t n_ele, Double_t *array, Int_t *ind)
void PndTrkTracking2::Initialization_ClassVariables ( )
private

Definition at line 146 of file PndTrkTracking2.cxx.

References fALFA, fBETA, fCandidatePixelDriftRadius, fCandidatePixelErrorDriftRadius, fCandidatePixelS, fCandidatePixelZ, fCandidateSciTilDriftRadius, fCandidateSciTilErrorDriftRadius, fCandidateSciTilS, fCandidateSciTilZ, fCandidateStripDriftRadius, fCandidateStripErrorDriftRadius, fCandidateStripS, fCandidateStripZ, fCxMC, fCyMC, fFimin, fGAMMA, fInclusionListSciTil, fInclusionListStt, finMvdTrackCandPixel, finMvdTrackCandStrip, fListHitMvdTrackCand, fListHitTypeMvdTrackCand, fListMvdDSPixelHitNotTrackCand, fListMvdDSStripHitNotTrackCand, fListMvdPixelHitsinTrack, fListMvdStripHitsinTrack, fListMvdUSPixelHitNotTrackCand, fListMvdUSStripHitNotTrackCand, fListParContiguous, fListSciTilHitsinTrack, fListSttParHits, fListSttParHitsinTrack, fListSttSkewHits, fListSttSkewHitsinTrack, fListSttSkewHitsinTrackSolution, fListTrackCandHit, fListTrackCandHitType, fMCSkewAloneX, fMCSkewAloneY, fMCtrack_of_Pixel, fMCtrack_of_Strip, fMCTrackArray, fMCtruthTrkInfo, fMvdMCPointArray, fMvdPixelBranch, fMvdPixelHitArray, fMvdStripBranch, fMvdStripHitArray, fMvdTrackCandArray, fNevents_to_plot, fnHitMvdTrackCand, fnMCTracks, fnMvdDSPixelHitNotTrackCand, fnMvdDSStripHitNotTrackCand, fnMvdPixelHit, fnMvdPixelHitsinTrack, fnMvdStripHit, fnMvdStripHitsinTrack, fnMvdTrackCand, fnMvdUSPixelHitNotTrackCand, fnMvdUSStripHitNotTrackCand, fnParContiguous, fnSciTilHits, fnSciTilHitsinTrack, fnSttParHitsinTrack, fnSttSkewHitsinTrack, fnTrackCandHit, fOx, fOy, fposizSciTil, fR, fR_MC, fradiaConf, frefindexMvdPixel, frefindexMvdStrip, fSciTHitArray, fsigmaXMvdPixel, fsigmaXMvdStrip, fsigmaYMvdPixel, fsigmaYMvdStrip, fsigmaZMvdPixel, fsigmaZMvdStrip, fSingleHitListStt, fStrawCode, fStrawCode2, fSttBranch, fSttHitArray, fSttMvdPndTrackArray, fSttMvdPndTrackCandArray, fSttParameters, fSttPointArray, fSttTrackArray, fSttTrackCandArray, fSttTubeArray, fTypeConf, fXMvdPixel, fXMvdStrip, fxTube, fxxyyTube, fYMvdPixel, fYMvdStrip, fyTube, fZMvdPixel, fZMvdStrip, fzTube, HANDLE, HANDLE2, hdeltaRPixel, hdeltaRPixel2, hdeltaRStrip, and hdeltaRStrip2.

Referenced by PndTrkTracking2().

147 {
148 // this is only for initializing the Class Variables.
149 
150  size_t len;
151 
152 
153 // booleans :
154  len = sizeof(fSingleHitListStt);
155  memset (fSingleHitListStt,true,len);
156 
157  len = sizeof(fInclusionListSciTil);
158  memset (fInclusionListSciTil,true,len);
159 
160  len = sizeof(fInclusionListStt);
161  memset (fInclusionListStt,true,len);
162 
163  len = sizeof(finMvdTrackCandPixel);
164  memset (finMvdTrackCandPixel,false,len);
165 
166  len = sizeof(finMvdTrackCandStrip);
167  memset (finMvdTrackCandStrip,false,len);
168 
169  len = sizeof(fTypeConf);
170  memset (fTypeConf,false,len);
171 
172 
173 // char :
174 
175 
176  len = sizeof(fSttBranch);
177  memset (fSttBranch,0,len);
178 
179  len = sizeof(fMvdPixelBranch);
180  memset (fMvdPixelBranch,0,len);
181 
182  len = sizeof(fMvdStripBranch);
183  memset (fMvdStripBranch,0,len);
184 
185 // Short_t :
186 
187  fnMCTracks=0;
188  fnSciTilHits=0;
189 
190  len = sizeof(fListMvdPixelHitsinTrack);
191  memset (fListMvdPixelHitsinTrack,0,len);
192 
193  len = sizeof(fListMvdStripHitsinTrack);
194  memset (fListMvdStripHitsinTrack,0,len);
195 
196  len = sizeof(fListSciTilHitsinTrack);
197  memset (fListSciTilHitsinTrack,0,len);
198 
199  len = sizeof(fListSttParHits);
200  memset (fListSttParHits,0,len);
201 
202  len = sizeof(fListSttParHitsinTrack);
203  memset (fListSttParHitsinTrack,0,len);
204 
205  len = sizeof(fListSttSkewHitsinTrack);
206  memset (fListSttSkewHitsinTrack,0,len);
207 
208  len = sizeof(fListSttSkewHits);
209  memset (fListSttSkewHits,0,len);
210 
211  len = sizeof(fListSttSkewHitsinTrackSolution);
212  memset (fListSttSkewHitsinTrackSolution,0,len);
213 
214  len = sizeof(fListTrackCandHit);
215  memset (fListTrackCandHit,0,len);
216 
217  len = sizeof(fnMvdPixelHitsinTrack);
218  memset (fnMvdPixelHitsinTrack,0,len);
219 
220  len = sizeof(fnMvdStripHitsinTrack);
221  memset (fnMvdStripHitsinTrack,0,len);
222 
223  len = sizeof(fnTrackCandHit);
224  memset (fnTrackCandHit,0,len);
225 
226  len = sizeof(fnSciTilHitsinTrack);
227  memset (fnSciTilHitsinTrack,0,len);
228 
229  len = sizeof(fnSttParHitsinTrack);
230  memset (fnSttParHitsinTrack,0,len);
231 
232  len = sizeof(fnSttSkewHitsinTrack);
233  memset (fnSttSkewHitsinTrack,0,len);
234 
237  fnMvdPixelHit=0;
238  fnMvdStripHit=0;
239  fnMvdTrackCand=0;
242 
243  len = sizeof(fnHitMvdTrackCand);
244  memset (fnHitMvdTrackCand,0,len);
245 
246  len = sizeof(fListHitMvdTrackCand);
247  memset (fListHitMvdTrackCand,0,len);
248 
249  len = sizeof(fListHitTypeMvdTrackCand);
250  memset (fListHitTypeMvdTrackCand,0,len);
251 
252  len = sizeof(fListMvdDSPixelHitNotTrackCand);
253  memset (fListMvdDSPixelHitNotTrackCand,0,len);
254 
255  len = sizeof(fListMvdUSPixelHitNotTrackCand);
256  memset (fListMvdUSPixelHitNotTrackCand,0,len);
257 
258  len = sizeof(fListMvdDSStripHitNotTrackCand);
259  memset (fListMvdDSStripHitNotTrackCand,0,len);
260 
261  len = sizeof(fListMvdUSStripHitNotTrackCand);
262  memset (fListMvdUSStripHitNotTrackCand,0,len);
263 
264  len = sizeof(fListTrackCandHitType);
265  memset (fListTrackCandHitType,0,len);
266 
267  len = sizeof(fnParContiguous);
268  memset (fnParContiguous,0,len);
269 
270  len = sizeof(fListParContiguous);
271  memset (fListParContiguous,0,len);
272 
273  memset (fStrawCode,0,sizeof(fStrawCode));
274 
275  memset (fStrawCode,0,sizeof(fStrawCode2));
276 // int :
277  fNevents_to_plot = 10;
278 
279 
280 // Double_t :
281 
282  fFimin=0.;
283 // SEMILENGTH_STRAIGHT=75.;
284 // ZCENTER_STRAIGHT=35.;
285 
286  len = sizeof(fALFA);
287  memset (fALFA,0,len);
288 
289  len = sizeof(fBETA);
290  memset (fBETA,0,len);
291 
292  len = sizeof(fGAMMA);
293  memset (fGAMMA,0,len);
294 
295  len = sizeof(fCxMC);
296  memset (fCxMC,0,len);
297 
298  len = sizeof(fCyMC);
299  memset (fCyMC,0,len);
300 
301  len = sizeof(fR_MC);
302  memset (fR_MC,0,len);
303 
304  len = sizeof(fMCtruthTrkInfo);
305  memset (fMCtruthTrkInfo,0,len);
306 
307  len = sizeof(fMCSkewAloneX);
308  memset (fMCSkewAloneX,0,len);
309 
310  len = sizeof(fMCSkewAloneY);
311  memset (fMCSkewAloneY,0,len);
312 
313  len = sizeof(fradiaConf);
314  memset (fradiaConf,0,len);
315 
316  len = sizeof(fOx);
317  memset (fOx,0,len);
318 
319  len = sizeof(fOy);
320  memset (fOy,0,len);
321 
322  len = sizeof(fR);
323  memset (fR,0,len);
324 
325  len = sizeof(frefindexMvdPixel);
326  memset (frefindexMvdPixel,0,len);
327 
328  len = sizeof(fsigmaXMvdPixel);
329  memset (fsigmaXMvdPixel,0,len);
330 
331  len = sizeof(fsigmaYMvdPixel);
332  memset (fsigmaYMvdPixel,0,len);
333 
334  len = sizeof(fsigmaZMvdPixel);
335  memset (fsigmaZMvdPixel,0,len);
336 
337  len = sizeof(fXMvdPixel);
338  memset (fXMvdPixel,0,len);
339 
340  len = sizeof(fYMvdPixel);
341  memset (fYMvdPixel,0,len);
342 
343  len = sizeof(fZMvdPixel);
344  memset (fZMvdPixel,0,len);
345 
346  len = sizeof(fXMvdStrip);
347  memset (fXMvdStrip,0,len);
348 
349  len = sizeof(fYMvdStrip);
350  memset (fYMvdStrip,0,len);
351 
352  len = sizeof(fZMvdStrip);
353  memset (fZMvdStrip,0,len);
354 
355  len = sizeof(fsigmaXMvdStrip);
356  memset (fsigmaXMvdStrip,0,len);
357 
358  len = sizeof(fsigmaYMvdStrip);
359  memset (fsigmaYMvdStrip,0,len);
360 
361  len = sizeof(fsigmaZMvdStrip);
362  memset (fsigmaZMvdStrip,0,len);
363 
364  len = sizeof(frefindexMvdStrip);
365  memset (frefindexMvdStrip,0,len);
366 
367 
368  len = sizeof(fMCtrack_of_Pixel);
369  memset (fMCtrack_of_Pixel,0,len);
370 
371 
372  len = sizeof(fMCtrack_of_Strip);
373  memset (fMCtrack_of_Strip,0,len);
374 
375 
376  len = sizeof(fposizSciTil);
377  memset (fposizSciTil,0,len);
378 
379  len = sizeof(fxTube);
380  memset (fxTube,0,len);
381 
382  len = sizeof(fyTube);
383  memset (fyTube,0,len);
384 
385  len = sizeof(fzTube);
386  memset (fzTube,0,len);
387 
388  len = sizeof(fxxyyTube);
389  memset (fxxyyTube,0,len);
390 
391  len = sizeof(fCandidatePixelDriftRadius);
392  memset(fCandidatePixelDriftRadius,0,len);
393 
394  len = sizeof(fCandidatePixelErrorDriftRadius);
395  memset(fCandidatePixelErrorDriftRadius,0,len);
396 
397  len = sizeof(fCandidatePixelS);
398  memset(fCandidatePixelS,0,len);
399 
400  len = sizeof(fCandidatePixelZ);
401  memset(fCandidatePixelZ,0,len);
402 
403  len = sizeof(fCandidateStripDriftRadius);
404  memset(fCandidateStripDriftRadius,0,len);
405 
406  len = sizeof(fCandidateStripErrorDriftRadius);
407  memset(fCandidateStripErrorDriftRadius,0,len);
408 
409  len = sizeof(fCandidateStripS);
410  memset(fCandidateStripS,0,len);
411 
412  len = sizeof(fCandidateStripZ);
413  memset(fCandidateStripZ,0,len);
414 
416 
418 
420 
422 
423 
424 
425 // pointers :
426 
427  HANDLE=NULL;
428  HANDLE2=NULL;
429 
430  hdeltaRPixel=NULL;
431  hdeltaRStrip=NULL;
432  hdeltaRPixel2=NULL;
433  hdeltaRStrip2=NULL;
434  fMCTrackArray=NULL;
435  fSttTubeArray=NULL;
436  fSttPointArray=NULL;
437  fSttHitArray=NULL;
438  fSttTrackArray=NULL;
439  fSttTrackCandArray=NULL;
440  fMvdPixelHitArray=NULL;
441  fMvdStripHitArray=NULL;
442  fMvdTrackCandArray=NULL;
443  fSciTHitArray=NULL;
444  fMvdMCPointArray=NULL;
447  fSttParameters=NULL;
448 
449 }
bool fInclusionListSciTil[MAXSCITILHITS]
TClonesArray * fSciTHitArray
Double_t fYMvdStrip[MAXMVDSTRIPHITS]
Double_t fXMvdStrip[MAXMVDSTRIPHITS]
Double_t fxxyyTube[NUMBER_STRAWS]
bool fTypeConf[MAXTRACKSPEREVENT]
TClonesArray * fSttTrackArray
Short_t fListSttParHits[MAXSTTHITS]
Short_t fListMvdDSPixelHitNotTrackCand[MAXMVDPIXELHITS]
Short_t fListSttSkewHitsinTrack[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK]
Double_t fsigmaYMvdStrip[MAXMVDSTRIPHITS]
Double_t fOy[MAXTRACKSPEREVENT]
TClonesArray * fSttMvdPndTrackCandArray
Double_t fZMvdStrip[MAXMVDSTRIPHITS]
Short_t fListMvdStripHitsinTrack[MAXTRACKSPEREVENT][MAXMVDSTRIPHITSINTRACK]
Double_t fsigmaZMvdStrip[MAXMVDSTRIPHITS]
Double_t fMCSkewAloneY[MAXSTTHITS]
Short_t fnMvdUSStripHitNotTrackCand
Double_t fCandidatePixelDriftRadius[MAXMVDPIXELHITS]
Double_t fCandidateStripZ[MAXMVDSTRIPHITS]
Short_t fnSciTilHitsinTrack[MAXTRACKSPEREVENT]
Double_t fsigmaXMvdStrip[MAXMVDSTRIPHITS]
Short_t fMCtrack_of_Strip[MAXMVDSTRIPHITS]
Double_t fposizSciTil[MAXSCITILHITS][3]
Double_t fMCtruthTrkInfo[15][MAXMCTRACKS]
TClonesArray * fSttMvdPndTrackArray
Double_t fsigmaZMvdPixel[MAXMVDPIXELHITS]
Short_t fListHitTypeMvdTrackCand[MAXMVDTRACKSPEREVENT][MAXMVDPIXELHITSINTRACK+MAXMVDSTRIPHITSINTRACK]
Double_t fALFA[MAXTRACKSPEREVENT]
Double_t fCandidateSciTilDriftRadius
Short_t fnSttSkewHitsinTrack[MAXTRACKSPEREVENT]
Double_t fOx[MAXTRACKSPEREVENT]
Short_t fListTrackCandHit[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK+MAXMVDPIXELHITSINTRACK+MAXMVDSTRIPHITSINTRACK+MAXSCITILHITSINTRACK]
Short_t fListMvdUSPixelHitNotTrackCand[MAXMVDPIXELHITS]
Short_t fnSttParHitsinTrack[MAXTRACKSPEREVENT]
Short_t fStrawCode2[NUMBER_STRAWS]
Double_t fCandidateSciTilS
Short_t fListMvdUSStripHitNotTrackCand[MAXMVDSTRIPHITS]
Double_t fCxMC[MAXMCTRACKS]
Double_t fR_MC[MAXMCTRACKS]
bool finMvdTrackCandPixel[MAXMVDPIXELHITS]
Short_t fListTrackCandHitType[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK+MAXMVDPIXELHITSINTRACK+MAXMVDSTRIPHITSINTRACK+MAXSCITILHITSINTRACK]
bool finMvdTrackCandStrip[MAXMVDSTRIPHITS]
Double_t fMCSkewAloneX[MAXSTTHITS]
Double_t fsigmaYMvdPixel[MAXMVDPIXELHITS]
TClonesArray * fSttTubeArray
Short_t fnParContiguous[NUMBER_STRAWS]
Short_t fnMvdDSPixelHitNotTrackCand
char fMvdPixelBranch[200]
Double_t fXMvdPixel[MAXMVDPIXELHITS]
Short_t fListMvdDSStripHitNotTrackCand[MAXMVDSTRIPHITS]
TClonesArray * fMvdPixelHitArray
Double_t fCandidateStripErrorDriftRadius[MAXMVDSTRIPHITS]
TClonesArray * fSttTrackCandArray
Double_t frefindexMvdPixel[MAXMVDPIXELHITS]
Double_t fCyMC[MAXMCTRACKS]
Double_t fsigmaXMvdPixel[MAXMVDPIXELHITS]
Short_t fListHitMvdTrackCand[MAXMVDTRACKSPEREVENT][MAXMVDPIXELHITSINTRACK+MAXMVDSTRIPHITSINTRACK]
Short_t fnMvdDSStripHitNotTrackCand
Double_t fxTube[NUMBER_STRAWS]
TClonesArray * fSttPointArray
Short_t fListParContiguous[NUMBER_STRAWS][6]
bool fInclusionListStt[MAXSTTHITS]
Double_t fCandidateStripDriftRadius[MAXMVDSTRIPHITS]
TClonesArray * fSttHitArray
Double_t fBETA[MAXTRACKSPEREVENT]
Double_t fCandidateSciTilErrorDriftRadius
char fSttBranch[200]
Double_t fCandidatePixelS[MAXMVDPIXELHITS]
Short_t fMCtrack_of_Pixel[MAXMVDPIXELHITS]
TClonesArray * fMvdMCPointArray
TClonesArray * fMCTrackArray
bool fSingleHitListStt[MAXSTTHITS]
Double_t fCandidatePixelErrorDriftRadius[MAXMVDPIXELHITS]
Double_t fYMvdPixel[MAXMVDPIXELHITS]
Short_t fnMvdUSPixelHitNotTrackCand
Short_t fnHitMvdTrackCand[MAXMVDTRACKSPEREVENT]
Short_t fStrawCode[NUMBER_STRAWS]
Short_t fListSciTilHitsinTrack[MAXTRACKSPEREVENT][MAXSCITILHITSINTRACK]
Short_t fnMvdPixelHitsinTrack[MAXTRACKSPEREVENT]
Short_t fListSttSkewHitsinTrackSolution[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK]
Short_t fListMvdPixelHitsinTrack[MAXTRACKSPEREVENT][MAXMVDPIXELHITSINTRACK]
Double_t fyTube[NUMBER_STRAWS]
Double_t fZMvdPixel[MAXMVDPIXELHITS]
TClonesArray * fMvdTrackCandArray
Double_t fGAMMA[MAXTRACKSPEREVENT]
Short_t fListSttParHitsinTrack[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK]
Short_t fnMvdStripHitsinTrack[MAXTRACKSPEREVENT]
Double_t fCandidateSciTilZ
Short_t fnTrackCandHit[MAXTRACKSPEREVENT]
Double_t fCandidatePixelZ[MAXMVDPIXELHITS]
Short_t fListSttSkewHits[MAXSTTHITS]
Double_t fR[MAXTRACKSPEREVENT]
Double_t fradiaConf[NRDIVCONFORMAL]
char fMvdStripBranch[200]
TClonesArray * fMvdStripHitArray
PndGeoSttPar * fSttParameters
Double_t fCandidateStripS[MAXMVDSTRIPHITS]
Double_t frefindexMvdStrip[MAXMVDSTRIPHITS]
Double_t fzTube[NUMBER_STRAWS]
void PndTrkTracking2::LoadPndTrack_TrackCand ( bool *  keepit,
bool *  SttSZfit,
Short_t  nTotalCandidates,
Short_t *  Charge,
Int_t  nSttTrackCand,
Double_t FI0,
Double_t KAPPA,
Double_t  info[][7],
Double_t  SchosenSkew[][MAXSTTHITS],
Double_t  ZchosenSkew[][MAXSTTHITS],
Short_t *  daTrackFoundaTrackMC 
)
private

Definition at line 4123 of file PndTrkTracking2.cxx.

References PndTrackCand::AddHit(), cos(), Double_t, fabs(), fBFIELD, fListTrackCandHit, fListTrackCandHitType, fMvdPixelBranch, fMvdStripBranch, fnTrackCandHit, fOx, fOy, fR, fsigmaXMvdPixel, fsigmaXMvdStrip, fSttBranch, fSttMvdPndTrackCandArray, fXMvdPixel, fXMvdStrip, fYMvdPixel, fYMvdStrip, fZMvdPixel, fZMvdStrip, InfoXYZParal(), PMAX, Position(), PndTrack::SetFlag(), PndTrackCand::setMcTrackId(), PndTrack::SetRefIndex(), sin(), sqrt(), x, and y.

Referenced by Exec().

4136 {
4137 
4138 //------- load the new PndTrackCand ; each track has the STT and the Mvd hits associated
4139 //------- also load the new PndTrack ; each track has the STT and the Mvd hits associated
4140 
4141  Int_t
4142  ipinco,
4143  j,
4144  k,
4145  ncand
4146  ;
4147 
4148  Double_t
4149  ddd,
4150  dis,
4151  Distance,
4152  Oxx,
4153  Oyy,
4154  Ptras,
4155  //Pxini, //[R.K. 9/2018] unused
4156  //Pyini, //[R.K. 9/2018] unused
4157  Pzini,
4158  px,
4159  py,
4160 // qop,
4161  x,
4162  y,
4163  Posiz1[3],
4164  versor[2]
4165  ;
4166 
4167  TVector3
4168  ErrMomentum,
4169  ErrPosition,
4170  Momentum,
4171  Position
4172  ;
4173 
4174 
4175  for(ncand=0, ipinco = 0; ncand< nTotalCandidates; ncand++){
4176  if(!keepit[ncand]) continue;
4177  // case in which there was no Skew hits and no KAPPA info and that
4178  // candidate could not be associated to any Mvd hits --> no KAPPA information!
4179  if(ncand<nSttTrackCand && ! SttSZfit[ncand]) continue;
4180  Oxx = fOx[ncand];
4181  Oyy = fOy[ncand];
4182  dis=sqrt( Oxx*Oxx+Oyy*Oyy );
4183  if( dis < 1.e-20) continue;
4184  Ptras = fR[ncand]*0.003*fBFIELD;
4185  //Pxini = -Charge[ncand]*Ptras*Oyy/dis; //[R.K. 9/2018] unused
4186  //Pyini = Charge[ncand]*Ptras*Oxx/dis; //[R.K. 9/2018] unused
4187 
4188 // starting point not necessarily at x=0., y=0.
4189 
4190  x= fOx[ncand] + fR[ncand]*cos(FI0[ncand]);
4191  y= fOy[ncand] + fR[ncand]*sin(FI0[ncand]);
4192  TVector3 posSeed(x,y,0.); // the starting point
4193 
4194  if(fabs(KAPPA[ncand])>1.e-20 ){
4195  Pzini = -Charge[ncand]*0.003*fBFIELD/KAPPA[ncand];
4196  if(fabs(Pzini) > PMAX) continue;
4197  } else {
4198  continue;
4199  }
4200  // PndTrackCand Array loading
4201  new((*fSttMvdPndTrackCandArray)[ipinco]) PndTrackCand;
4202  PndTrackCand *pTrckCand = (PndTrackCand*) fSttMvdPndTrackCandArray->At(ipinco);
4203 // TVector3 dirSeed(Pxini,Pyini,Pzini); // momentum direction in starting point
4204 // qop = Charge[ncand]/dirSeed.Mag();
4205 // dirSeed.SetMag(1.);
4206 // pTrckCand->setTrackSeed(posSeed, dirSeed, qop);
4207  pTrckCand->setMcTrackId( daTrackFoundaTrackMC[ncand] );
4208 
4209  for(j=0; j< fnTrackCandHit[ncand]; j++){
4210 
4211  switch (fListTrackCandHitType[ncand][j]){
4212  case 0:
4213  pTrckCand->AddHit(FairRootManager::Instance()->
4214  GetBranchId(fMvdPixelBranch),
4215  (Int_t)fListTrackCandHit[ncand][j],j);
4216 
4217  break;
4218  case 1:
4219  pTrckCand->AddHit(FairRootManager::Instance()->
4220  GetBranchId(fMvdStripBranch),
4221  (Int_t)fListTrackCandHit[ncand][j],j);
4222 
4223  break;
4224  case 2:
4225  pTrckCand->AddHit(FairRootManager::Instance()->
4226  GetBranchId(fSttBranch),
4227  (Int_t)fListTrackCandHit[ncand][j],j);
4228 
4229  break;
4230  case 3:
4231  pTrckCand->AddHit(FairRootManager::Instance()->
4232  GetBranchId(fSttBranch),
4233  (Int_t)fListTrackCandHit[ncand][j],j);
4234 
4235  break;
4236  }
4237  }
4238 
4239  // PndTrack Array loading
4240  // last = last hit in found track; first = first hit in found track;
4241  // pTrckCand = pointer to the corresponding PndTrackCand.
4242 
4243  // the first hit
4244 
4245  if (fListTrackCandHitType[ncand][0] == 0){ // Mvd Pixel
4246  Posiz1[0] = fXMvdPixel[ fListTrackCandHit[ncand][0] ];
4247  Posiz1[1] = fYMvdPixel[ fListTrackCandHit[ncand][0] ];
4248  Posiz1[2] = fZMvdPixel[ fListTrackCandHit[ncand][0] ];
4249  ErrPosition.SetX(fsigmaXMvdPixel[ fListTrackCandHit[ncand][0] ]/sqrt(12.));
4250  ErrPosition.SetY(fsigmaXMvdPixel[ fListTrackCandHit[ncand][0] ]/sqrt(12.));
4251  ErrPosition.SetZ(fsigmaXMvdPixel[ fListTrackCandHit[ncand][0] ]/sqrt(12.));
4252  } else if (fListTrackCandHitType[ncand][0] == 1){ // Mvd Strip
4253  Posiz1[0] = fXMvdStrip[ fListTrackCandHit[ncand][0] ];
4254  Posiz1[1] = fYMvdStrip[ fListTrackCandHit[ncand][0] ];
4255  Posiz1[2] = fZMvdStrip[ fListTrackCandHit[ncand][0] ];
4256  ErrPosition.SetX(fsigmaXMvdStrip[ fListTrackCandHit[ncand][0] ]/sqrt(12.));
4257  ErrPosition.SetY(fsigmaXMvdStrip[ fListTrackCandHit[ncand][0] ]/sqrt(12.));
4258  ErrPosition.SetZ(fsigmaXMvdStrip[ fListTrackCandHit[ncand][0] ]/sqrt(12.));
4259  } else if( fListTrackCandHitType[ncand][0] == 2 ){ // it is a parallel straw hit
4260  InfoXYZParal(
4261  info,
4262  fListTrackCandHit[ncand][0],
4263  fOx[ncand],
4264  fOy[ncand],
4265  fR[ncand],
4266  KAPPA[ncand],
4267  FI0[ncand],
4268  Charge[ncand],
4269  Posiz1
4270  );
4271 
4272  // cases in which the calculation of the position failed, see
4273  // InfoXYZParal method.
4274  if(Posiz1[2]<-888888887. || Posiz1[0] < -999999998.)
4275  continue;
4276 
4277  ErrPosition.SetX(0.02); // 200 microns
4278  ErrPosition.SetY(0.02); // 200 microns
4279  ErrPosition.SetZ(1.); // 1 cm
4280 
4281 
4282  } else if ( fListTrackCandHitType[ncand][0] == 3 ){ // it is a skew straw hit
4283 
4284  Posiz1[0] = fOx[ncand]+fR[ncand]*cos(SchosenSkew[ncand][ fListTrackCandHit[ncand][0] ]);
4285  Posiz1[1] = fOy[ncand]+fR[ncand]*sin(SchosenSkew[ncand][ fListTrackCandHit[ncand][0] ]);
4286  Posiz1[2] = ZchosenSkew[ncand][ fListTrackCandHit[ncand][0] ];
4287  ErrPosition.SetX(0.02); // 200 microns
4288  ErrPosition.SetY(0.02); // 200 microns
4289  ErrPosition.SetZ(1.); // 1 cm
4290 
4291  }
4292 
4293  Position.SetX( Posiz1[0] );
4294  Position.SetY( Posiz1[1] );
4295  Position.SetZ( Posiz1[2] );
4296  versor[0] = fOx[ncand]-Posiz1[0];
4297  versor[1] = fOy[ncand]-Posiz1[1];
4298  Distance = sqrt(versor[0]*versor[0]+versor[1]*versor[1]);
4299  versor[0] /= Distance;
4300  versor[1] /= Distance;
4301  px = -Charge[ncand]*Ptras*versor[1];
4302  py = Charge[ncand]*Ptras*versor[0];
4303  Momentum.SetX(px);
4304  Momentum.SetY(py);
4305  Momentum.SetZ(Pzini);
4306  ErrMomentum.SetX(0.05*Ptras); // set at 5% all the times.
4307  ErrMomentum.SetY(0.05*Ptras); // set at 5% all the times.
4308  ErrMomentum.SetZ(0.05*Pzini); // set at 5% all the times.
4309  // the plane of this FairTrackParP better is perpendicular to
4310  // the momentum direction
4311  ddd = Ptras*sqrt(Ptras*Ptras+Pzini*Pzini);
4312 
4313  FairTrackParP first( Position, Momentum,
4314  ErrPosition, ErrMomentum, Charge[ncand],
4315  Position,
4316  TVector3(py/Ptras, -px/Ptras, 0.), // first vector defining the plane
4317  TVector3(Pzini*px/ddd,Pzini*py/ddd,-Ptras*Ptras/ddd) //second vector defining the plane
4318  );
4319  // the last hit
4320 
4321  k = fnTrackCandHit[ncand]-1;
4322  if (fListTrackCandHitType[ncand][k] == 0){ // Mvd Pixel
4323  Posiz1[0] = fXMvdPixel[ fListTrackCandHit[ncand][k] ];
4324  Posiz1[1] = fYMvdPixel[ fListTrackCandHit[ncand][k] ];
4325  Posiz1[2] = fZMvdPixel[ fListTrackCandHit[ncand][k] ];
4326  ErrPosition.SetX(fsigmaXMvdPixel[ fListTrackCandHit[ncand][k] ]/sqrt(12.));
4327  ErrPosition.SetY(fsigmaXMvdPixel[ fListTrackCandHit[ncand][k] ]/sqrt(12.));
4328  ErrPosition.SetZ(fsigmaXMvdPixel[ fListTrackCandHit[ncand][k] ]/sqrt(12.));
4329  } else if (fListTrackCandHitType[ncand][k] == 1){ // Mvd Strip
4330  Posiz1[0] = fXMvdStrip[ fListTrackCandHit[ncand][k] ];
4331  Posiz1[1] = fYMvdStrip[ fListTrackCandHit[ncand][k] ];
4332  Posiz1[2] = fZMvdStrip[ fListTrackCandHit[ncand][k] ];
4333  ErrPosition.SetX(fsigmaXMvdStrip[ fListTrackCandHit[ncand][k] ]/sqrt(12.));
4334  ErrPosition.SetY(fsigmaXMvdStrip[ fListTrackCandHit[ncand][k] ]/sqrt(12.));
4335  ErrPosition.SetZ(fsigmaXMvdStrip[ fListTrackCandHit[ncand][k] ]/sqrt(12.));
4336  } else if( fListTrackCandHitType[ncand][k] == 2 ){ // it is a parallel straw hit
4337  InfoXYZParal (
4338  info,
4339  fListTrackCandHit[ncand][k],
4340  fOx[ncand],
4341  fOy[ncand],
4342  fR[ncand],
4343  KAPPA[ncand],
4344  FI0[ncand],
4345  Charge[ncand],
4346  Posiz1
4347  );
4348  if(Posiz1[2]<-888888887. || Posiz1[0] < -999999998.)
4349  continue;
4350 
4351  ErrPosition.SetX(0.02); // 200 microns
4352  ErrPosition.SetY(0.02); // 200 microns
4353  ErrPosition.SetZ(1.); // 1 cm
4354 
4355  } else if ( fListTrackCandHitType[ncand][k] == 3 ){ // it is a skew straw hit
4356 
4357  Posiz1[0] = fOx[ncand]+fR[ncand]*cos(SchosenSkew[ncand][ fListTrackCandHit[ncand][k] ]);
4358  Posiz1[1] = fOy[ncand]+fR[ncand]*sin(SchosenSkew[ncand][ fListTrackCandHit[ncand][k] ]);
4359  Posiz1[2] = ZchosenSkew[ncand][ fListTrackCandHit[ncand][k] ];
4360  ErrPosition.SetX(0.02); // 200 microns
4361  ErrPosition.SetY(0.02); // 200 microns
4362  ErrPosition.SetZ(1.); // 1 cm
4363 
4364  }
4365 
4366  Position.SetX( Posiz1[0] );
4367  Position.SetY( Posiz1[1] );
4368  Position.SetZ( Posiz1[2] );
4369  versor[0] = fOx[ncand]-Posiz1[0];
4370  versor[1] = fOy[ncand]-Posiz1[1];
4371  Distance = sqrt(versor[0]*versor[0]+versor[1]*versor[1]);
4372  versor[0] /= Distance;
4373  versor[1] /= Distance;
4374  px = -Charge[ncand]*Ptras*versor[1];
4375  py = Charge[ncand]*Ptras*versor[0];
4376  Momentum.SetX(px);
4377  Momentum.SetY(py);
4378  Momentum.SetZ(Pzini);
4379  // the plane of this FairTrackParP better is perpendicular to
4380  // the momentum direction
4381  ddd = Ptras*sqrt(Ptras*Ptras+Pzini*Pzini);
4382 
4383 
4384 
4385  FairTrackParP last( Position, Momentum,
4386  ErrPosition, ErrMomentum, Charge[ncand],
4387  Position,
4388  TVector3(py/Ptras, -px/Ptras, 0.), // first vector defining the plane
4389  TVector3(Pzini*px/ddd,Pzini*py/ddd,-Ptras*Ptras/ddd) //second vector defining the plane
4390  );
4391 
4392 
4393 
4394  // loading actually the PndTrack
4395  PndTrack *pTrck = new((*fSttMvdPndTrackArray)[ipinco]) PndTrack(first,last,*pTrckCand);
4396  pTrck->SetRefIndex(ipinco);
4397  pTrck->SetFlag(0);
4398 
4399  ipinco++;
4400  } // end of for(ncand=0, ipinco = 0; ncand< nTotalCandidates; ncand++)
4401 
4402 
4403 }
friend F32vec4 cos(const F32vec4 &a)
Definition: P4_F32vec4.h:112
Double_t fYMvdStrip[MAXMVDSTRIPHITS]
void SetRefIndex(TString branch, Int_t i)
Definition: PndTrack.h:41
Double_t fXMvdStrip[MAXMVDSTRIPHITS]
const Double_t PMAX
void InfoXYZParal(Double_t info[][7], Short_t infopar, Double_t Oxx, Double_t Oyy, Double_t Rr, Double_t KAPPA, Double_t FI0, Short_t Charge, Double_t *Posiz)
Double_t fOy[MAXTRACKSPEREVENT]
TClonesArray * fSttMvdPndTrackCandArray
Double_t fZMvdStrip[MAXMVDSTRIPHITS]
mdtHit Position(pos)
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
Double_t fsigmaXMvdStrip[MAXMVDSTRIPHITS]
friend F32vec4 sin(const F32vec4 &a)
Definition: P4_F32vec4.h:111
void setMcTrackId(int i)
Definition: PndTrackCand.h:72
Double_t fOx[MAXTRACKSPEREVENT]
Short_t fListTrackCandHit[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK+MAXMVDPIXELHITSINTRACK+MAXMVDSTRIPHITSINTRACK+MAXSCITILHITSINTRACK]
Short_t fListTrackCandHitType[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK+MAXMVDPIXELHITSINTRACK+MAXMVDSTRIPHITSINTRACK+MAXSCITILHITSINTRACK]
char fMvdPixelBranch[200]
void AddHit(UInt_t detId, UInt_t hitId, Double_t rho)
Double_t fXMvdPixel[MAXMVDPIXELHITS]
Double_t
Double_t fsigmaXMvdPixel[MAXMVDPIXELHITS]
char fSttBranch[200]
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
Double_t fYMvdPixel[MAXMVDPIXELHITS]
Double_t x
void SetFlag(Int_t i)
Definition: PndTrack.h:38
Double_t fZMvdPixel[MAXMVDPIXELHITS]
Double_t y
Short_t fnTrackCandHit[MAXTRACKSPEREVENT]
Double_t fR[MAXTRACKSPEREVENT]
char fMvdStripBranch[200]
void PndTrkTracking2::LoadSZetc_forSZfit ( Short_t  ncand,
Short_t  nhitsinfit,
Vec< Double_t > &  ErrorDriftRadius,
Double_t ErrorDriftRadiusbis,
Vec< Double_t > &  DriftRadius,
Double_t DriftRadiusbis,
Vec< Double_t > &  S,
Double_t Sbis,
Vec< Double_t > &  ZED,
Double_t ZEDbis 
)
private

Definition at line 4415 of file PndTrkTracking2.cxx.

References fCandidatePixelErrorDriftRadius, fCandidatePixelS, fCandidatePixelZ, fCandidateSciTilErrorDriftRadius, fCandidateSciTilS, fCandidateSciTilZ, fCandidateSkewS, fCandidateSkewZ, fCandidateSkewZDrift, fCandidateSkewZError, fCandidateStripErrorDriftRadius, fCandidateStripS, fCandidateStripZ, fListMvdPixelHitsinTrack, fListMvdStripHitsinTrack, fListSttSkewHitsinTrack, fListSttSkewHitsinTrackSolution, fnMvdPixelHitsinTrack, fnMvdStripHitsinTrack, fnSciTilHitsinTrack, fnSttSkewHitsinTrack, i, and MAXSTTHITS.

Referenced by Exec().

4428 {
4429  //--------------------- here calculate the S and Z values of Mvd Pixels, Mvd Strips,
4430  // Stt Skew hits and SciTil hits (if present).
4431 
4432  // the difference between S and Sbis, ZED and ZEDbis, DriftRadius and DriftRadiusbis,
4433  // ErrorDriftRadius and ErrorDriftRadiusbis, is that S, ZED etc. contain the list of
4434  // Pixel+Strips+SciTil + other Skew Stt hits in case Pixel+Strips+SciTil are <= 2; instead
4435  // Sbis, ZEDbis etc. contain Pixel+Strips+all Skew Stt hits.
4436 
4437 
4438  int
4439  i,
4440  j,
4441  k,
4442  kall,
4443  location;
4444 
4445 
4446  // the Mvd Pixels hit
4447  for(i=0; i< fnMvdPixelHitsinTrack[ncand]; i++){
4448  k=fListMvdPixelHitsinTrack[ncand][i];
4449  ZEDbis[i] = ZED[i] = fCandidatePixelZ[k];
4450  S[i] = fCandidatePixelS[k];
4451  Sbis[i] = S[i];
4452  // DriftRadius is set conventionally at -1, for later use in the SZ fit;
4453  // the error on the point used in the fit is ErrorDriftRadius and this
4454  // is overestimated to be 1cm.
4455  DriftRadiusbis[i]=DriftRadius[i]=-1.;
4456  // the following error is conventional (it was set at 0.5 previously in StoreSZ_MvdScitil)
4457  // for the chi**2 type of fit;
4458  ErrorDriftRadiusbis[i]=ErrorDriftRadius[i]= fCandidatePixelErrorDriftRadius[k] ;
4459  }
4460  // the Mvd Strips hit
4461  for(j=0, i = fnMvdPixelHitsinTrack[ncand]; j< fnMvdStripHitsinTrack[ncand]; j++){
4462  k=fListMvdStripHitsinTrack[ncand][j];
4463  ZEDbis[i] = ZED[i] = fCandidateStripZ[k];
4464  S[i] = fCandidateStripS[k];
4465  Sbis[i] = S[i] ;
4466  // DriftRadius is set conventionally at -1, for later use in the SZ fit;
4467  // the error on the point used in the fit is ErrorDriftRadius and this
4468  // is overestimated to be 1cm.
4469  DriftRadiusbis[i]=DriftRadius[i]=-1.;
4470  // the following error is conventional (it was set at 0.5 previously in StoreSZ_MvdScitil)
4471  // for the chi**2 type of fit;
4472  ErrorDriftRadiusbis[i]=ErrorDriftRadius[i]= fCandidateStripErrorDriftRadius[k] ;
4473  i ++;
4474  }
4475 
4476  // the SciTil hit ( when they are 2, the fS_SciTilHitsinTrack is already a mean
4477  // of the two [see the method PndTrkTracking2::StoreSZ_MvdScitil(Short_t ncand) ; then consider
4478  // only 1 SciTil hit, the first, and make an average
4479  // of the two Z positions).
4480 
4481  i = fnMvdPixelHitsinTrack[ncand]+fnMvdStripHitsinTrack[ncand];
4482 
4483  ZED[i]=fCandidateSciTilZ;
4484  S[i]=fCandidateSciTilS;
4485  DriftRadius[i]=-2.;
4486  ErrorDriftRadius[i]=fCandidateSciTilErrorDriftRadius; // this has been set earlier to DIMENSIONSCITIL/2.;
4487 
4488  // the Skew Stt hits
4489  // the info on CandidateSkewS, CandidateSkewZ, CandidateSkewZDrift, CandidateSkewZError as follows :
4490  // if i is the (original) Skew Hit number, and ii (0 or 1) is
4491  // the solution according to the calculateintersections method ,
4492  // then the infos are stored in the i + ii*MAXSTTHITS location;
4493 
4494  for(j=0;j<fnSttSkewHitsinTrack[ncand]; j++){
4495 
4496  kall = fnMvdPixelHitsinTrack[ncand]+
4497  fnMvdStripHitsinTrack[ncand]+j;
4498  if( fnSciTilHitsinTrack[ncand] ==2 ){ // in this case only 1 SciTil hit
4499  // has been considered above;
4500  i = fnMvdPixelHitsinTrack[ncand]+fnMvdStripHitsinTrack[ncand]+1+j;
4501  } else { // this is the case of 1 or 0 SciTil hits in track; the
4502  // (impossible?) case of > 2 SciTil hits has already been
4503  // prevented early in PndTrkCTFindTrackInXY.
4504  i = fnMvdPixelHitsinTrack[ncand]+fnMvdStripHitsinTrack[ncand]+
4505  fnSciTilHitsinTrack[ncand] +j ;
4506  }
4507  // here : k = Skew Hit number (original notation),
4508  // fListSttSkewHitsinTrackSolution[ncand][j] = number of the solution
4509  // (0 or 1) according to the calculateintersections method;
4510  k=fListSttSkewHitsinTrack[ncand][j];
4511  location = k + fListSttSkewHitsinTrackSolution[ncand][j]*MAXSTTHITS;
4512 
4513  // calculate the quantities used for the SZ fit only.
4514  if(i<nhitsinfit){
4515  S[i] = fCandidateSkewS[location];
4516  ZED[i]=fCandidateSkewZ[location];
4517  DriftRadius[i]=fCandidateSkewZDrift[location];
4518  // conventionally set the Skew error to 0.5/sin(3 degrees) = 9.55 cm
4519  // (therefore much bigger than the conventional
4520  // Mvd error which is set at 0.5 cm) ;
4521  ErrorDriftRadius[i]= fCandidateSkewZError[location];
4522 // ErrorDriftRadius[i]=2.*fCandidateSkewZDrift[location]; obsolete;
4523  }
4524  //-----------
4525  ZEDbis[kall]=fCandidateSkewZ[location];
4526  Sbis[kall]= fCandidateSkewS[location];
4527  DriftRadiusbis[kall]=fCandidateSkewZError[location];
4528  // overestimate the error on the Drift Radius used in the SZ fit.
4529 
4530  } // end of for(j=0;j<fnSttSkewHitsinTrack[ncand]; j++)
4531 
4532 
4533  return;
4534 }
Short_t fListSttSkewHitsinTrack[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK]
Int_t i
Definition: run_full.C:25
Short_t fListMvdStripHitsinTrack[MAXTRACKSPEREVENT][MAXMVDSTRIPHITSINTRACK]
Double_t fCandidateStripZ[MAXMVDSTRIPHITS]
Short_t fnSciTilHitsinTrack[MAXTRACKSPEREVENT]
Short_t fnSttSkewHitsinTrack[MAXTRACKSPEREVENT]
Double_t fCandidateSciTilS
Double_t fCandidateStripErrorDriftRadius[MAXMVDSTRIPHITS]
Double_t fCandidateSciTilErrorDriftRadius
Double_t fCandidatePixelS[MAXMVDPIXELHITS]
Double_t fCandidatePixelErrorDriftRadius[MAXMVDPIXELHITS]
Short_t fnMvdPixelHitsinTrack[MAXTRACKSPEREVENT]
Double_t fCandidateSkewS[2 *MAXSTTHITS]
Short_t fListSttSkewHitsinTrackSolution[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK]
Short_t fListMvdPixelHitsinTrack[MAXTRACKSPEREVENT][MAXMVDPIXELHITSINTRACK]
Double_t fCandidateSkewZDrift[2 *MAXSTTHITS]
Double_t fCandidateSkewZ[2 *MAXSTTHITS]
Double_t fCandidateSkewZError[2 *MAXSTTHITS]
Short_t fnMvdStripHitsinTrack[MAXTRACKSPEREVENT]
Double_t fCandidateSciTilZ
Double_t fCandidatePixelZ[MAXMVDPIXELHITS]
static const Short_t MAXSTTHITS
Double_t fCandidateStripS[MAXMVDSTRIPHITS]
void PndTrkTracking2::LoadSZetc_forSZfit2 ( Short_t  ncand,
Short_t  nhitsinfit,
Double_t S_Skew,
Double_t TemporaryZ,
Double_t TemporaryZDrift,
Double_t TemporaryZError,
Vec< Double_t > &  ErrorDriftRadius,
Double_t ErrorDriftRadiusbis,
Vec< Double_t > &  DriftRadius,
Double_t DriftRadiusbis,
Vec< Double_t > &  S,
Double_t Sbis,
Vec< Double_t > &  ZED,
Double_t ZEDbis 
)
private
void PndTrkTracking2::MakeInclusionListStt ( Int_t  nSttHit,
Short_t *  TubeID,
Double_t  info[][7] 
)
private

Definition at line 4542 of file PndTrkTracking2.cxx.

References fInclusionListStt, fSingleHitListStt, and i.

Referenced by Exec().

4547 {
4548 
4549  int i,j;
4550 
4551 // it needs to be initialized for each event !
4552  memset (fSingleHitListStt,true,sizeof(fSingleHitListStt));
4553  memset (fInclusionListStt,true,sizeof(fInclusionListStt));
4554 /*
4555  for(i=0;i<nSttHit;i++){
4556  fInclusionListStt[i] = true;
4557  fSingleHitListStt[i] = true;
4558  }
4559 */
4560 
4561 
4562 
4563 // fill the inclusion list for Stt, include only first hit for those straws with
4564 // multiple hits.
4565 
4566 
4567  for(i=0; i< nSttHit-1; i++){
4568  if( !fInclusionListStt[ i ] ) continue;
4569  for(j=i+1; j< nSttHit; j++){
4570 
4571 
4572 // if(fInclusionListStt[ j ] &&
4573 // fabs(info[i][0] - info[j][0])<1.e-20 &&
4574 // fabs(info[i][1] - info[j][1])<1.e-20 )
4575  if(fInclusionListStt[ j ] &&
4576  TubeID[i] == TubeID[j] )
4577  {
4578  fSingleHitListStt[j]=fInclusionListStt[j]= false ;
4579  }
4580  } // end of for(j=i+1; j< Nhits;; j++)
4581 
4582 
4583  } // end of for(i=0; i< Nhits-1; i++)
4584 
4585 
4586 
4587 
4588 }
Int_t i
Definition: run_full.C:25
bool fInclusionListStt[MAXSTTHITS]
bool fSingleHitListStt[MAXSTTHITS]
void PndTrkTracking2::MatchMvdHitsToSttTracks ( Vec< bool > &  keepit,
Double_t  delta,
Double_t  highqualitycut,
Short_t  nSttTrackCand,
Double_t FI0,
Double_t Fifirst,
Vec< Short_t > &  CHARGE,
Short_t *  nPixelHitsinTrack,
Short_t  ListPixelHitsinTrack[][MAXMVDPIXELHITSINTRACK],
Short_t *  nStripHitsinTrack,
Short_t  ListStripHitsinTrack[][MAXMVDSTRIPHITSINTRACK] 
)
private

Definition at line 4597 of file PndTrkTracking2.cxx.

References angle, atan2(), Double_t, fabs(), fnMvdPixelHit, fnMvdStripHit, fOx, fOy, fR, fXMvdPixel, fXMvdStrip, fYMvdPixel, fYMvdStrip, i, PI, and sqrt().

4610 {
4611 
4612  Short_t i,
4613  jmvdhit;
4614 
4615  Double_t angle,
4616  anglemax,
4617  anglemin,
4618  dist;
4619 
4620 
4621 
4622  for(i=0; i<nSttTrackCand; i++){
4623  if( ! keepit[i] ) continue ;
4624 
4625  if( Fifirst[i] < -99998. ){ // case with Fifirst[i]=-99999.; in this
4626  // case there the circle is contained
4627  // in the Mvd region.
4628  anglemax = 2.*PI;
4629  anglemin = 0.;
4630 
4631  } else { // continuation of if( Fifirst[i] < -99998. )
4632 
4633 
4634  if(CHARGE[i]>0){ // track must rotate clockwise looking into the beam.
4635  anglemax = FI0[i];
4636  anglemin = Fifirst[i];
4637  } else {
4638  anglemin = FI0[i];
4639  anglemax = Fifirst[i];
4640  }
4641  if(anglemax < anglemin) anglemax += 2.*PI;
4642  if(anglemax < anglemin) anglemax=anglemin; // this is just to be super-sure.
4643 
4644  } // end of if( Fifirst[i] < -99998. )
4645 
4646 
4647 //--------------------
4648 
4649 
4650  // first try attach the Pixels;
4651 
4652  nPixelHitsinTrack[i] = 0;
4653  for( jmvdhit=0; jmvdhit<fnMvdPixelHit; jmvdhit++){
4654  angle = atan2(fYMvdPixel[jmvdhit]-fOy[i],fXMvdPixel[jmvdhit]-fOx[i]);
4655  if(angle<0.) angle += 2.*PI;
4656  if( angle>anglemax){
4657  angle -= 2.*PI;
4658  if( angle>anglemax) angle = anglemax;
4659 
4660  } else if (angle<anglemin){
4661  angle += 2.*PI;
4662  if (angle<anglemin) angle = anglemin;
4663  }
4664 
4665  if(angle > anglemin && angle < anglemax)
4666  {
4667  dist=fabs( sqrt( (fOx[i]-fXMvdPixel[jmvdhit])* (fOx[i]-fXMvdPixel[jmvdhit])
4668  +(fOy[i]-fYMvdPixel[jmvdhit])*(fOy[i]-fYMvdPixel[jmvdhit]))-fR[i]);
4669  if(dist<delta)
4670  {
4671  ListPixelHitsinTrack[i][nPixelHitsinTrack[i]]=jmvdhit;
4672  nPixelHitsinTrack[i]++;
4673  if( nPixelHitsinTrack[i] == MAXMVDPIXELHITSINTRACK ) break;
4674  }
4675  } // end of if(angle > anglemin)
4676  } // end of for( jmvdhit=0; jmvdhit<fnMvdPixelHits; jmvdhit++)
4677 
4678 
4679  // then try attach the Strips;
4680  nStripHitsinTrack[i] = 0;
4681  for( jmvdhit=0; jmvdhit<fnMvdStripHit; jmvdhit++){
4682  angle = atan2(fYMvdStrip[jmvdhit]-fOy[i],fXMvdStrip[jmvdhit]-fOx[i]);
4683  if(angle<0.) angle += 2.*PI;
4684  if( angle>anglemax){
4685  angle -= 2.*PI;
4686  if( angle>anglemax) angle = anglemax;
4687  } else if (angle<anglemin){
4688  angle += 2.*PI;
4689  if (angle<anglemin) angle = anglemin;
4690  }
4691 
4692  if(angle > anglemin && angle < anglemax)
4693  {
4694  dist=fabs( sqrt( (fOx[i]-fXMvdStrip[jmvdhit])* (fOx[i]-fXMvdStrip[jmvdhit])
4695  +(fOy[i]-fYMvdStrip[jmvdhit])*(fOy[i]-fYMvdStrip[jmvdhit]))-fR[i]);
4696  if(dist<delta)
4697  {
4698  ListStripHitsinTrack[i][nStripHitsinTrack[i]]=jmvdhit;
4699  nStripHitsinTrack[i]++;
4700  if( nStripHitsinTrack[i] == MAXMVDSTRIPHITSINTRACK ) break;
4701  }
4702  } // end of if(angle > anglemin)
4703  } // end of for( jmvdhit=0; jmvdhit<fnMvdStripHits; jmvdhit++)
4704 
4705  } // end of for(i=0; i<nSttTrackCand; i++)
4706 
4707 
4708  return;
4709 }
Double_t fYMvdStrip[MAXMVDSTRIPHITS]
Double_t fXMvdStrip[MAXMVDSTRIPHITS]
Double_t fOy[MAXTRACKSPEREVENT]
Int_t i
Definition: run_full.C:25
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
Double_t fOx[MAXTRACKSPEREVENT]
static const Short_t MAXMVDPIXELHITSINTRACK
Double_t fXMvdPixel[MAXMVDPIXELHITS]
const Double_t PI
Double_t
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
static const Short_t MAXMVDSTRIPHITSINTRACK
Double_t fYMvdPixel[MAXMVDPIXELHITS]
friend F32vec4 atan2(const F32vec4 &y, const F32vec4 &x)
Definition: P4_F32vec4.h:117
Double_t angle
Double_t fR[MAXTRACKSPEREVENT]
void PndTrkTracking2::MatchMvdHitsToSttTracks2 ( bool *  keepit,
Double_t  delta,
Double_t  highqualitycut,
Short_t  nSttTrackCand,
Double_t FI0,
Double_t Fifirst,
Short_t *  CHARGE,
Short_t *  nPixelHitsinTrack,
Short_t  ListPixelHitsinTrack[][MAXMVDPIXELHITSINTRACK],
Short_t *  nStripHitsinTrack,
Short_t  ListStripHitsinTrack[][MAXMVDSTRIPHITSINTRACK] 
)
private

Definition at line 4912 of file PndTrkTracking2.cxx.

References angle, atan2(), Double_t, fabs(), fListHitMvdTrackCand, fListHitTypeMvdTrackCand, fListMvdDSPixelHitNotTrackCand, fListMvdDSStripHitNotTrackCand, fListMvdUSPixelHitNotTrackCand, fListMvdUSStripHitNotTrackCand, fMvdPixelBranch, fMvdStripBranch, fnHitMvdTrackCand, fnMvdDSPixelHitNotTrackCand, fnMvdDSStripHitNotTrackCand, fnMvdTrackCand, fnMvdUSPixelHitNotTrackCand, fnMvdUSStripHitNotTrackCand, fOx, fOy, fR, fXMvdPixel, fXMvdStrip, fYMvdPixel, fYMvdStrip, i, istampa, IVOLTE, MAXMVDSTRIPHITSINTRACK, MAXMVDTRACKSPEREVENT, PI, sqrt(), and total.

4925 {
4926 
4927  Short_t i,j,j1, imvdcand, jmvdhit, ncont,
4928  chosenmix,
4929  chosenmix2,
4930  ngoodmix,
4931  oldN,
4932  nn[MAXMVDTRACKSPEREVENT+2],
4933  nHighQuality[MAXMVDTRACKSPEREVENT+2],
4936 
4937  Double_t angle,
4938  anglemax,
4939  anglemin,
4940  dist,
4941  oldtotal,
4942  oldtotal2,
4943  total,
4944  Dist,
4945  DIST[MAXMVDTRACKSPEREVENT+1];
4946 
4947 
4948 
4949  for(i=0; i<nSttTrackCand; i++){
4950  if( ! keepit[i] ) continue ;
4951 
4952  if( Fifirst[i] < -99998. ){ // case with Fifirst[i]=-99999.; in this
4953  // case there the circle is contained
4954  // in the Mvd region.
4955  anglemax = 2.*PI;
4956  anglemin = 0.;
4957 
4958  } else { // continuation of if( Fifirst[i] < -99998. )
4959 
4960 
4961  if(CHARGE[i]>0){ // track must rotate clockwise looking into the beam.
4962  anglemax = FI0[i];
4963  anglemin = Fifirst[i];
4964  } else {
4965  anglemin = FI0[i];
4966  anglemax = Fifirst[i];
4967  }
4968  if(anglemax < anglemin) anglemax += 2.*PI;
4969  if(anglemax < anglemin) anglemax=anglemin; // this is just to be super-sure.
4970 
4971  } // end of if( Fifirst[i] < -99998. )
4972 
4973 
4974 //--------------------
4975 
4976  ngoodmix=0;
4977  nn[0]=0;
4978  for( imvdcand=0; imvdcand<fnMvdTrackCand; imvdcand++){
4979  Dist = 0.;
4980  ncont=0;
4981  nn[ngoodmix]=0;
4982  nHighQuality[ngoodmix]=0;
4983  for( jmvdhit=0; jmvdhit<fnHitMvdTrackCand[imvdcand]; jmvdhit++){
4984 
4985  if(fListHitTypeMvdTrackCand[imvdcand][jmvdhit]==
4986  FairRootManager::Instance()->GetBranchId(fMvdPixelBranch)){
4987  ncont++;
4988  angle = atan2(
4989  fYMvdPixel[fListHitMvdTrackCand[imvdcand][jmvdhit]]-fOy[i],
4990  fXMvdPixel[fListHitMvdTrackCand[imvdcand][jmvdhit]]-fOx[i]
4991  );
4992  if(angle<0.) angle += 2.*PI;
4993 
4994  if( angle>anglemax){
4995  angle -= 2.*PI;
4996  if( angle>anglemax) angle = anglemax;
4997  } else if (angle<anglemin){
4998  angle += 2.*PI;
4999  if (angle<anglemin) angle = anglemin;
5000  }
5001  if(angle > anglemin && angle < anglemax)
5002  {
5003  dist=fabs( sqrt(
5004  (fOx[i]-fXMvdPixel[fListHitMvdTrackCand[imvdcand][jmvdhit]])*
5005  (fOx[i]-fXMvdPixel[fListHitMvdTrackCand[imvdcand][jmvdhit]])
5006  +(fOy[i]-fYMvdPixel[fListHitMvdTrackCand[imvdcand][jmvdhit]])*
5007  (fOy[i]-fYMvdPixel[fListHitMvdTrackCand[imvdcand][jmvdhit]]))-fR[i]);
5008  if(dist<delta)
5009  {
5010  List[ngoodmix][nn[ngoodmix]]=
5011  fListHitMvdTrackCand[imvdcand][jmvdhit];
5012  ListType[ngoodmix][nn[ngoodmix]]=
5013  FairRootManager::Instance()->GetBranchId(fMvdPixelBranch);
5014  Dist += dist;
5015  if( dist<highqualitycut) nHighQuality[ngoodmix]++;
5016  nn[ngoodmix]++;
5017  }
5018  } // end of if(angle > anglemin)
5019 
5020  } else {// at this point this is a Strip hit; already made sure
5021  // earlier in the code that there is no third possibility.
5022 
5023  ncont++;
5024  angle = atan2(
5025  fYMvdStrip[fListHitMvdTrackCand[imvdcand][jmvdhit]]-fOy[i],
5026  fXMvdStrip[fListHitMvdTrackCand[imvdcand][jmvdhit]]-fOx[i]
5027  );
5028  if(angle<0.) angle += 2.*PI;
5029 
5030  if( angle>anglemax){
5031  angle -= 2.*PI;
5032  if( angle>anglemax) angle = anglemax;
5033  } else if (angle<anglemin){
5034  angle += 2.*PI;
5035  if (angle<anglemin) angle = anglemin;
5036  }
5037  if(angle > anglemin && angle < anglemax){
5038  dist=fabs( sqrt(
5039  (fOx[i]-fXMvdStrip[fListHitMvdTrackCand[imvdcand][jmvdhit]])*
5040  (fOx[i]-fXMvdStrip[fListHitMvdTrackCand[imvdcand][jmvdhit]])
5041  +(fOy[i]-fYMvdStrip[fListHitMvdTrackCand[imvdcand][jmvdhit]])*
5042  (fOy[i]-fYMvdStrip[fListHitMvdTrackCand[imvdcand][jmvdhit]])) -fR[i]);
5043  if(dist<delta)
5044  {
5045  List[ngoodmix][nn[ngoodmix]]=
5046  fListHitMvdTrackCand[imvdcand][jmvdhit];
5047  ListType[ngoodmix][nn[ngoodmix]]=
5048  FairRootManager::Instance()->GetBranchId(fMvdStripBranch);
5049  Dist += dist;
5050  if( dist<highqualitycut) nHighQuality[ngoodmix]++;
5051 
5052  nn[ngoodmix]++;
5053  }
5054  } // end of if(angle > anglemin)
5055  } // end of if(fListHitTypeMvdTrackCand[imvdcand][jmvdhit]
5056 
5057  } // end of for( jmvdhit=0; jmvdhit<fnHitMvdTrackCand[imvdcand];
5058 
5059 
5060  if( nn[ngoodmix]>0) {
5061  DIST[ngoodmix]=Dist/nn[ngoodmix];
5062  ngoodmix++;
5063 
5064 
5065 //--------- stampaggi
5066 if(istampa>=3 ){cout<<"\tquesto Mvd candidato (n. ngoodmix = "<<ngoodmix-1<<
5067  ") passa con i seguenti hits :"<<endl;
5068 
5069  for(int icc=0; icc<nn[ngoodmix-1]; icc++){
5070  if(ListType[ngoodmix-1][icc]==FairRootManager::Instance()->GetBranchId(fMvdPixelBranch)) {
5071  cout<<"\tPixel hit n. "<<List[ngoodmix-1][icc]<<endl;
5072  } else if(ListType[ngoodmix-1][icc]==
5073  FairRootManager::Instance()->GetBranchId(fMvdStripBranch)){
5074  cout<<"\tStrip hit n. "<<List[ngoodmix-1][icc]<<endl;
5075  } else{
5076  cout<<"\tNoise (?) , hit tipo "<<ListType[ngoodmix-1][icc]<<endl;
5077  }
5078  }
5079  cout<<endl;
5080 }
5081 //------------fine stampaggi
5082 
5083 
5084 
5085  }
5086  } // end of for( imvdcand=0;imvdcand<fnMvdTrackCand;imvdcand++)
5087 
5088 
5089 //------- now use the Mvd which are in no Mvd Track Candidate
5090 
5091 
5092 //------- first, the DS (downstream) Mvd hits
5093  nn[ngoodmix]=0;
5094  DIST[ngoodmix] = 0.;
5095  nHighQuality[ngoodmix]=0;
5096  for( jmvdhit=0; jmvdhit<fnMvdDSPixelHitNotTrackCand; jmvdhit++){
5097 
5098  angle = atan2(
5101  );
5102  if(angle<0.) angle += 2.*PI;
5103  if( angle>anglemax){
5104  angle -= 2.*PI;
5105  if( angle>anglemax) angle = anglemax;
5106  } else if (angle<anglemin){
5107  angle += 2.*PI;
5108  if (angle<anglemin) angle = anglemin;
5109  }
5110  if(angle > anglemin && angle < anglemax){
5111  dist=fabs( sqrt(
5116  ) -fR[i]);
5117  if(dist<delta)
5118  {
5119  List[ngoodmix][nn[ngoodmix]]=
5121  ListType[ngoodmix][nn[ngoodmix]]=
5122  FairRootManager::Instance()->GetBranchId(fMvdPixelBranch);
5123  DIST[ngoodmix] += dist;
5124  if( dist<highqualitycut) nHighQuality[ngoodmix]++;
5125  nn[ngoodmix]++;
5126  }
5127  } // end of if(angle > anglemin )
5128  } // end of for( jmvdhit=0; jmvdhit<fnMvdDSPixelHitNotTrackCand; jmvdhit++)
5129 
5130  for( jmvdhit=0; jmvdhit<fnMvdDSStripHitNotTrackCand; jmvdhit++){
5131 
5132  angle = atan2(
5135  );
5136  if(angle<0.) angle += 2.*PI;
5137  if( angle>anglemax){
5138  angle -= 2.*PI;
5139  if( angle>anglemax) angle = anglemax;
5140  } else if (angle<anglemin){
5141  angle += 2.*PI;
5142  if (angle<anglemin) angle = anglemin;
5143  }
5144  if(angle > anglemin && angle < anglemax){
5145 
5146  dist=fabs( sqrt(
5151  ) -fR[i]);
5152 
5153 
5154  if(dist<delta)
5155  {
5156  List[ngoodmix][nn[ngoodmix]]=
5158  ListType[ngoodmix][nn[ngoodmix]]=
5159  FairRootManager::Instance()->GetBranchId(fMvdStripBranch);
5160  DIST[ngoodmix] += dist;
5161  if( dist<highqualitycut) nHighQuality[ngoodmix]++;
5162  nn[ngoodmix]++;
5163  }
5164  } // end of if(angle > anglemin )
5165 
5166  } // end of for( jmvdhit=0; jmvdhit<fnMvdDSStripHitNotTrackCand; jmvdhit++)
5167 
5168  if( nn[ngoodmix]>0) {
5169  DIST[ngoodmix] /= nn[ngoodmix];
5170  ngoodmix++;
5171 //--------- stampaggi
5172 if(istampa>=3){cout<<"\tevento n. "<<IVOLTE<<" questi Mvd ALONE DS hits passano :\n"<<endl;
5173 
5174  for(int icc=0; icc<nn[ngoodmix-1]; icc++){
5175  if(ListType[ngoodmix-1][icc]==FairRootManager::Instance()->GetBranchId(fMvdPixelBranch)) {
5176  cout<<"\tDS Pixel hit n. "<<List[ngoodmix-1][icc]<<endl;
5177  } else if(ListType[ngoodmix-1][icc]==
5178  FairRootManager::Instance()->GetBranchId(fMvdStripBranch)){
5179  cout<<"\tDS Strip hit n. "<<List[ngoodmix-1][icc]<<endl;
5180  } else{
5181  cout<<"\tNoise (?) , hit tipo "<<ListType[ngoodmix-1][icc]<<endl;
5182  }
5183  }
5184 
5185 }
5186 //------------fine stampaggi
5187  } // end of if( nn[ngoodmix]>0)
5188 
5189 
5190 
5191 
5192 
5193 
5194 //-------- now the US (upstream) Mvd hits
5195 
5196  nn[ngoodmix]=0;
5197  DIST[ngoodmix] = 0.;
5198  nHighQuality[ngoodmix]=0;
5199  for( jmvdhit=0; jmvdhit<fnMvdUSPixelHitNotTrackCand; jmvdhit++){
5200 
5201  angle = atan2(
5204  );
5205  if(angle<0.) angle += 2.*PI;
5206  if( angle>anglemax){
5207  angle -= 2.*PI;
5208  if( angle>anglemax) angle = anglemax;
5209  } else if (angle<anglemin){
5210  angle += 2.*PI;
5211  if (angle<anglemin) angle = anglemin;
5212  }
5213  if(angle > anglemin && angle < anglemax){
5214  dist=fabs( sqrt(
5219  ) -fR[i]);
5220  if(dist<delta)
5221  {
5222  List[ngoodmix][nn[ngoodmix]]=
5224  ListType[ngoodmix][nn[ngoodmix]]=
5225  FairRootManager::Instance()->GetBranchId(fMvdPixelBranch);
5226  DIST[ngoodmix] += dist;
5227  if( dist<highqualitycut) nHighQuality[ngoodmix]++;
5228  nn[ngoodmix]++;
5229  }
5230  } // end of if(angle > anglemin )
5231 
5232  } // end of for( jmvdhit=0; jmvdhit<fnMvdUSPixelHitNotTrackCand; jmvdhit++)
5233 
5234  for( jmvdhit=0; jmvdhit<fnMvdUSStripHitNotTrackCand; jmvdhit++){
5235 
5236  angle = atan2(
5239  );
5240  if(angle<0.) angle += 2.*PI;
5241  if( angle>anglemax){
5242  angle -= 2.*PI;
5243  if( angle>anglemax) angle = anglemax;
5244  } else if (angle<anglemin){
5245  angle += 2.*PI;
5246  if (angle<anglemin) angle = anglemin;
5247  }
5248  if(angle > anglemin && angle < anglemax){
5249 
5250  dist=fabs( sqrt(
5255  ) -fR[i]);
5256 
5257 
5258  if(dist<delta)
5259  {
5260  List[ngoodmix][nn[ngoodmix]]=
5262  ListType[ngoodmix][nn[ngoodmix]]=
5263  FairRootManager::Instance()->GetBranchId(fMvdStripBranch);
5264  DIST[ngoodmix] += dist;
5265  if( dist<highqualitycut) nHighQuality[ngoodmix]++;
5266  nn[ngoodmix]++;
5267  }
5268  } // end of if(angle > anglemin )
5269 
5270  } // end of for( jmvdhit=0; jmvdhit<fnMvdUSStripHitNotTrackCand; jmvdhit++)
5271 
5272  if( nn[ngoodmix]>0) {
5273  DIST[ngoodmix] /= nn[ngoodmix];
5274  ngoodmix++;
5275 //--------- stampaggi
5276 if(istampa>=3){cout<<"\tevento n. "<<IVOLTE<<" questi Mvd ALONE US hits passano :\n"<<endl;
5277  if( ngoodmix>0) {
5278  for(int icc=0; icc<nn[ngoodmix-1]; icc++){
5279  if(ListType[ngoodmix-1][icc]==FairRootManager::Instance()->GetBranchId(fMvdPixelBranch)) {
5280  cout<<"\tUS Pixel hit n. "<<List[ngoodmix-1][icc]<<endl;
5281  } else if(ListType[ngoodmix-1][icc]==
5282  FairRootManager::Instance()->GetBranchId(fMvdStripBranch)){
5283  cout<<"\tUS Strip hit n. "<<List[ngoodmix-1][icc]<<endl;
5284  } else{
5285  cout<<"\tNoise (?) , hit tipo "<<ListType[ngoodmix-1][icc]<<endl;
5286  }
5287  }
5288  }
5289 
5290 }
5291 //------------fine stampaggi
5292  } // end of if( nn[ngoodmix]>0)
5293 
5294 
5295 
5296 
5297 //------- end of using the Mvd which are in no Mvd Track Candidate
5298 
5299 
5300 if(istampa>=3 ){cout<<"from PndTrkTracking2 : appena prima arbitration, IVOLTE = "<<
5301 IVOLTE<<", Stt track cand = "<<i<<", ngoodmix = "<<ngoodmix<<endl;}
5302 
5303  if( ngoodmix==1){
5304  chosenmix=0;
5305  chosenmix2=0;
5306  } else if( ngoodmix>1) {
5307 //--- here the arbitration if there are more than 1 Stt+Mvd hit combination for a given SttTrackCand
5308  oldtotal = DIST[0];
5309  oldtotal2 = DIST[0];
5310  oldN = nHighQuality[0];
5311 // oldtotal /= nTotali[0];
5312 if(istampa>=3 ){cout<<"from PndTrkTracking2 : goodmix n. 0, total distance (che e' = total distance2) = "<<oldtotal
5313  <<", e nHighQuality = "<<nHighQuality[0]<<endl;}
5314  chosenmix=0;
5315  chosenmix2=0;
5316  for(j1=1; j1<ngoodmix;j1++){
5317  total = DIST[j1];
5318 if(istampa>=3){cout<<"from PndTrkTracking2 :\t goodmix n. "<<j1<<", total distance "<<total
5319  <<", e nHighQuality = "<<nHighQuality[j1]<<endl;}
5320  if(oldN<nHighQuality[j1]){
5321  oldN=nHighQuality[j1];
5322  chosenmix2=j1;
5323  } else if (oldN==nHighQuality[j1]){
5324  if(total<oldtotal2){
5325  chosenmix2=j1;
5326  oldtotal2=total;
5327  }
5328  }
5329  if(total<oldtotal){
5330  oldtotal=total;
5331  chosenmix=j1;
5332  }
5333  }
5334  } // end of if( ngoodmix==1)
5335 //--- end of arbitration
5336 if(istampa>=3 ){cout<<"from PndTrkTracking2 : fine arbitration, IVOLTE = "<<
5337 IVOLTE<<", Stt track cand = "<<i<<endl;}
5338 
5339 
5340 
5341 
5342 
5343  nPixelHitsinTrack[i]=0;
5344  nStripHitsinTrack[i]=0;
5345  if( ngoodmix>0){
5346  chosenmix=chosenmix2;
5347  for(j=0;j<nn[chosenmix];j++){
5348  if( ListType[chosenmix][j]==
5349  FairRootManager::Instance()->GetBranchId(fMvdPixelBranch) ){
5350  ListPixelHitsinTrack[i]
5351  [nPixelHitsinTrack[i]]=List[chosenmix][j];
5352  nPixelHitsinTrack[i]++;
5353  } else if(
5354  ListType[chosenmix][j]==
5355  FairRootManager::Instance()->GetBranchId(fMvdStripBranch)){
5356  ListStripHitsinTrack[i]
5357  [nStripHitsinTrack[i]]=List[chosenmix][j];
5358  nStripHitsinTrack[i]++;
5359  }
5360  }
5361  } // end of if( ngoodmix>0)
5362 
5363 
5364  } // end of for(i=0; i<nSttTrackCand; i++)
5365 
5366 
5367  return;
5368 }
Double_t fYMvdStrip[MAXMVDSTRIPHITS]
Double_t fXMvdStrip[MAXMVDSTRIPHITS]
Short_t fListMvdDSPixelHitNotTrackCand[MAXMVDPIXELHITS]
Double_t fOy[MAXTRACKSPEREVENT]
Int_t i
Definition: run_full.C:25
Short_t fnMvdUSStripHitNotTrackCand
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
Short_t fListHitTypeMvdTrackCand[MAXMVDTRACKSPEREVENT][MAXMVDPIXELHITSINTRACK+MAXMVDSTRIPHITSINTRACK]
Double_t fOx[MAXTRACKSPEREVENT]
Short_t fListMvdUSPixelHitNotTrackCand[MAXMVDPIXELHITS]
Short_t fListMvdUSStripHitNotTrackCand[MAXMVDSTRIPHITS]
static const Short_t MAXMVDPIXELHITSINTRACK
Short_t fnMvdDSPixelHitNotTrackCand
char fMvdPixelBranch[200]
Double_t fXMvdPixel[MAXMVDPIXELHITS]
const Double_t PI
Short_t fListMvdDSStripHitNotTrackCand[MAXMVDSTRIPHITS]
Double_t
Short_t fListHitMvdTrackCand[MAXMVDTRACKSPEREVENT][MAXMVDPIXELHITSINTRACK+MAXMVDSTRIPHITSINTRACK]
Short_t fnMvdDSStripHitNotTrackCand
TF1 * total
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
static const Short_t MAXMVDSTRIPHITSINTRACK
Double_t fYMvdPixel[MAXMVDPIXELHITS]
Short_t fnMvdUSPixelHitNotTrackCand
friend F32vec4 atan2(const F32vec4 &y, const F32vec4 &x)
Definition: P4_F32vec4.h:117
Short_t fnHitMvdTrackCand[MAXMVDTRACKSPEREVENT]
Double_t angle
Double_t fR[MAXTRACKSPEREVENT]
char fMvdStripBranch[200]
static const Short_t MAXMVDTRACKSPEREVENT
void PndTrkTracking2::MatchMvdHitsToSttTracksagain ( Vec< bool > &  keepit,
Vec< bool > &  Mvdhits,
Double_t  delta,
Double_t  highqualitycut,
Short_t  nSttTrackCand,
Double_t FI0,
Double_t Fifirst,
Vec< Short_t > &  CHARGE,
Short_t *  nPixelHitsinTrack,
Short_t  ListPixelHitsinTrack[][MAXMVDPIXELHITSINTRACK],
Short_t *  nStripHitsinTrack,
Short_t  ListStripHitsinTrack[][MAXMVDSTRIPHITSINTRACK] 
)
private

Definition at line 4719 of file PndTrkTracking2.cxx.

References angle, atan2(), Double_t, fabs(), fnMvdPixelHit, fnMvdStripHit, fOx, fOy, fR, fXMvdPixel, fXMvdStrip, fYMvdPixel, fYMvdStrip, fZMvdPixel, MAXMVDPIXELHITS, MAXMVDPIXELHITSINTRACK, MAXMVDSTRIPHITS, MAXMVDSTRIPHITSINTRACK, PI, and sqrt().

4734 {
4735  //bool
4736  //downstream; //[R.K. 9/2018] unused
4737 
4738  Short_t j,
4739  itrack,
4740  ipix,
4741  istr,
4742  ndownstream,
4743  //ntot, //[R.K. 9/2018] unused
4744  naddpix,
4745  naddstr,
4747 
4748  Double_t angle,
4749  anglemax,
4750  anglemin,
4751  dist;
4752 
4753 
4754  for(itrack=0; itrack<nSttTrackCand; itrack++){
4755  if( ! keepit[itrack] ) continue;
4756 // if( ! Mvdhits[itrack] ) continue;
4757  //ntot=nPixelHitsinTrack[itrack]+nStripHitsinTrack[itrack]; //[R.K. 9/2018] unused
4758  if( Fifirst[itrack] < -99998. ){ // case with Fifirst[i]=-99999.; in this
4759  // case the circle is contained
4760  // in the Mvd region.
4761  anglemax = 2.*PI;
4762  anglemin = 0.;
4763  } else {
4764  if(CHARGE[itrack]>0){
4765  // track must rotate clockwise looking into the beam.
4766  anglemax = FI0[itrack];
4767  anglemin = Fifirst[itrack];
4768  } else {
4769  anglemin = FI0[itrack];
4770  anglemax = Fifirst[itrack];
4771  }
4772  if(anglemax < anglemin) anglemax += 2.*PI;
4773  if(anglemax < anglemin) anglemax=anglemin;// just to be super-sure.
4774 
4775  } // end of if( Fifirst[itrack] < -99998. )
4776 
4777 
4778 // find if this track goes downstream or upstream
4779 
4780  ndownstream=0;
4781  for(j=0; j<nPixelHitsinTrack[itrack]; j++){
4782  if( fZMvdPixel[ListPixelHitsinTrack[itrack][j]]>0.){
4783  ndownstream++ ;
4784  }
4785  }
4786  for(j=0; j<nStripHitsinTrack[itrack]; j++){
4787  if( fZMvdPixel[ListStripHitsinTrack[itrack][j]]>0.){
4788  ndownstream++ ;
4789  }
4790  }
4791  //if(ndownstream>ntot-ndownstream) downstream=true; //[R.K. 9/2018] unused
4792  //else downstream=false; //[R.K. 9/2018] unused
4793 
4794 // loop over the Mvd Pixel and try to attach new Pixels to each candidate track
4795 
4796  naddpix=0;
4797  for(ipix=0; ipix<fnMvdPixelHit; ipix++){
4798 
4799 /*
4800  flaggo=true;
4801  for(j=0; j<nPixelHitsinTrack[itrack]; j++){
4802  if( ListPixelHitsinTrack[itrack][j]==ipix){
4803  flaggo=false;
4804  break;
4805  }
4806  }
4807 */
4808 
4809 // if(flaggo){
4810  angle = atan2(fYMvdPixel[ipix]-fOy[itrack],
4811  fXMvdPixel[ipix]-fOx[itrack]);
4812  if(angle<0.) angle += 2.*PI;
4813  if( angle>anglemax){
4814  angle -= 2.*PI;
4815  if( angle>anglemax) angle = anglemax;
4816  } else if (angle<anglemin){
4817  angle += 2.*PI;
4818  if (angle<anglemin) angle = anglemin;
4819  }
4820  if(angle > anglemin && angle < anglemax){
4821  dist=fabs( sqrt(
4822  (fOx[itrack]-fXMvdPixel[ipix])*(fOx[itrack]-fXMvdPixel[ipix])
4823  +(fOy[itrack]-fYMvdPixel[ipix])*(fOy[itrack]-fYMvdPixel[ipix])
4824  ) -fR[itrack]);
4825  if(dist<highqualitycut){
4826  List[naddpix]=ipix;
4827  naddpix++;
4828  }
4829  } // end of if(angle > anglemin)
4830 // } // end of if(flaggo)
4831 
4832  } // end of for(ipix=0; ipix<fnMvdPixelHit; ipix++)
4833 
4834  if(naddpix>0){
4835  if(naddpix>MAXMVDPIXELHITSINTRACK){
4836  // protection against strange tracks (and also from
4837  // out-of-bound indexing of arrays);
4838  naddpix=MAXMVDPIXELHITSINTRACK;
4839  } //
4840  for(j=0;j<naddpix;j++){
4841  ListPixelHitsinTrack[itrack][j]=List[j];
4842  }
4843  nPixelHitsinTrack[itrack] = naddpix;
4844  } // end of if(naddpix>0)
4845 
4846 
4847  naddstr=0;
4848  for(istr=0; istr<fnMvdStripHit; istr++){
4849 /*
4850  flaggo=true;
4851  for(j=0; j<nStripHitsinTrack[itrack]; j++){
4852  if( ListStripHitsinTrack[itrack][j]==istr){
4853  flaggo=false;
4854  break;
4855  }
4856  }
4857 */
4858 // if(flaggo){
4859  angle = atan2(fYMvdStrip[istr]-fOy[itrack],
4860  fXMvdStrip[istr]-fOx[itrack]);
4861  if(angle<0.) angle += 2.*PI;
4862  if( angle>anglemax){
4863  angle -= 2.*PI;
4864  if( angle>anglemax) angle = anglemax;
4865  } else if (angle<anglemin){
4866  angle += 2.*PI;
4867  if (angle<anglemin) angle = anglemin;
4868  }
4869  if(angle > anglemin && angle < anglemax){
4870  dist=fabs( sqrt(
4871  (fOx[itrack]-fXMvdStrip[istr])*(fOx[itrack]-fXMvdStrip[istr])
4872  +(fOy[itrack]-fYMvdStrip[istr])*(fOy[itrack]-fYMvdStrip[istr])
4873  ) -fR[itrack]);
4874 
4875  if(dist<highqualitycut){
4876  List[naddstr]=istr;
4877  naddstr++;
4878  }
4879  } // end of if(angle > anglemin)
4880 
4881 // } // end of if(flaggo)
4882 
4883  } // end of for(istr=0; istr<fnMvdStripHit; istr++)
4884  if(naddstr>0){
4885  if(naddstr>MAXMVDSTRIPHITSINTRACK){
4886  // protection against strange tracks (and also from
4887  // out-of-bound indexing of arrays);
4888  naddstr=MAXMVDSTRIPHITSINTRACK;
4889  } //
4890  for(j=0;j<naddstr;j++){
4891  ListStripHitsinTrack[itrack][j]=List[j];
4892  }
4893  nStripHitsinTrack[itrack] = naddstr;
4894  } // end of if(naddpix>0)
4895 
4896 
4897  if(nPixelHitsinTrack[itrack]+nStripHitsinTrack[itrack]>0)
4898  Mvdhits[itrack]=true;
4899 
4900  } // end of for(itrack=0; itrack<nSttTrackCand; itrack++)
4901 
4902  return;
4903 }
Double_t fYMvdStrip[MAXMVDSTRIPHITS]
Double_t fXMvdStrip[MAXMVDSTRIPHITS]
Double_t fOy[MAXTRACKSPEREVENT]
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
Double_t fOx[MAXTRACKSPEREVENT]
static const Short_t MAXMVDPIXELHITSINTRACK
Double_t fXMvdPixel[MAXMVDPIXELHITS]
const Double_t PI
Double_t
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
static const Short_t MAXMVDPIXELHITS
static const Short_t MAXMVDSTRIPHITSINTRACK
Double_t fYMvdPixel[MAXMVDPIXELHITS]
friend F32vec4 atan2(const F32vec4 &y, const F32vec4 &x)
Definition: P4_F32vec4.h:117
Double_t fZMvdPixel[MAXMVDPIXELHITS]
Double_t angle
static const Short_t MAXMVDSTRIPHITS
Double_t fR[MAXTRACKSPEREVENT]
void PndTrkTracking2::NOCleanup ( )
inline

Definition at line 48 of file PndTrkTracking2.h.

References fYesCleanMvd, and fYesCleanStt.

48 {fYesCleanStt=false; fYesCleanMvd=false; return;};
void PndTrkTracking2::NOCleanupMvd ( )
inline

Definition at line 53 of file PndTrkTracking2.h.

References fYesCleanMvd.

53 {fYesCleanMvd=false; return;};
void PndTrkTracking2::NOCleanupStt ( )
inline

Definition at line 51 of file PndTrkTracking2.h.

References fYesCleanStt.

51 {fYesCleanStt=false; return;};
void PndTrkTracking2::NoMvdAloneTracking ( )
inline
void PndTrkTracking2::Ordering_Loading_ListTrackCandHit ( bool *  keepit,
Short_t  FirstCandidate,
Short_t  LastCandidate,
Double_t  info[][7],
Double_t  Trajectory_Start[][2],
Short_t *  CHARGE,
Double_t  SchosenSkew[][MAXSTTHITS] 
)
private

Definition at line 5527 of file PndTrkTracking2.cxx.

References fR, OrderingConformal_Loading_ListTrackCandHit(), OrderingR_Loading_ListTrackCandHit(), and RSTRAWDETECTORMAX.

Referenced by Exec().

5538 {
5539  Short_t ncand;
5540 
5541  for(ncand=FirstCandidate; ncand< LastCandidate; ncand++){
5542  // for small radius trajectory better the ordering with conformal.
5543 
5544 
5545  if( fR[ncand]< RSTRAWDETECTORMAX/2.){
5547  keepit,
5548  ncand,
5549  info,
5550  Trajectory_Start,
5551  CHARGE,
5552  SchosenSkew
5553  );
5554  } else { // otherwise it is better distance from (0,0) method.
5556  keepit,
5557  ncand,
5558  info
5559  );
5560  }
5561 
5562  } // end of for(ncand=FirstCandidate; ncand< LastCandidate; ncand++)
5563 
5564 
5565  return;
5566 }
const Double_t RSTRAWDETECTORMAX
void OrderingR_Loading_ListTrackCandHit(bool *keepit, Short_t ncand, Double_t info[][7])
void OrderingConformal_Loading_ListTrackCandHit(bool *keepit, Short_t ncand, Double_t info[][7], Double_t Trajectory_Start[][2], Short_t *CHARGE, Double_t SchosenSkew[][MAXSTTHITS])
Double_t fR[MAXTRACKSPEREVENT]
void PndTrkTracking2::OrderingConformal_Loading_ListTrackCandHit ( bool *  keepit,
Short_t  ncand,
Double_t  info[][7],
Double_t  Trajectory_Start[][2],
Short_t *  CHARGE,
Double_t  SchosenSkew[][MAXSTTHITS] 
)
private

Definition at line 5374 of file PndTrkTracking2.cxx.

References cos(), Double_t, fListMvdPixelHitsinTrack, fListMvdStripHitsinTrack, fListSttParHitsinTrack, fListSttSkewHitsinTrack, fListTrackCandHit, fListTrackCandHitType, fnMvdPixelHitsinTrack, fnMvdStripHitsinTrack, fnSttParHitsinTrack, fnSttSkewHitsinTrack, fnTrackCandHit, fOx, fOy, fR, fXMvdPixel, fXMvdStrip, fYMvdPixel, fYMvdStrip, i, istampa, MAXMVDPIXELHITS, MAXMVDPIXELHITSINTRACK, MAXMVDSTRIPHITS, MAXMVDSTRIPHITSINTRACK, MAXSTTHITSINTRACK, OrderingUsingConformal(), sin(), and XY.

Referenced by Ordering_Loading_ListTrackCandHit().

5382 {
5383 
5384  Short_t i,
5385  j,
5386  ipar,
5387  iskew;
5388 
5389 
5390 // ordering all the hits belonging to the candidate track, by increasing fR;
5391 // forming the new track with Mvd+Stt hits
5392 
5393 
5394  // arrays used to store temporarily the info of Mvd hits to be ordered.
5396  ListHits2[MAXSTTHITSINTRACK];
5398  XY2[MAXSTTHITSINTRACK][2];
5399 
5400 // for(ncand=FirstCandidate; ncand< LastCandidate; ncand++){
5401 
5402  if(!keepit[ncand]) return;
5404  fnMvdPixelHitsinTrack[ncand]+
5405  fnMvdStripHitsinTrack[ncand];
5406  // adding the Mvd hits (Pixel and Strips)
5407 
5408  if( fnMvdPixelHitsinTrack[ncand]+
5409  fnMvdStripHitsinTrack[ncand] >0){
5410  for(i=0; i< fnMvdPixelHitsinTrack[ncand]; i++){
5411  XY[i][0] = fXMvdPixel[ fListMvdPixelHitsinTrack[ncand][i] ];
5412  XY[i][1] = fYMvdPixel[ fListMvdPixelHitsinTrack[ncand][i] ];
5413  ListHits[i] = fListMvdPixelHitsinTrack[ncand][i];
5414  }
5415  for(i=0; i< fnMvdStripHitsinTrack[ncand]; i++){
5416  XY[i+fnMvdPixelHitsinTrack[ncand]][0] =
5418  XY[i+fnMvdPixelHitsinTrack[ncand]][1] =
5419  fYMvdStrip[ fListMvdStripHitsinTrack[ncand][i] ];
5420  // to distinguish between Pixels and Strips, add a number
5421  // to the original Strip hit number.
5422  ListHits[i+fnMvdPixelHitsinTrack[ncand]] =
5423  fListMvdStripHitsinTrack[ncand][i]+
5425  }
5426 
5427  // ordering the Mvd Hits
5429  fOx[ncand],
5430  fOy[ncand],
5431  &Trajectory_Start[ncand][0],
5432  fnMvdPixelHitsinTrack[ncand]+fnMvdStripHitsinTrack[ncand],
5433  XY, // XY[*][0] = X position, XY[*][0] = Y position.
5434  CHARGE[ncand], // input
5435  ListHits // output
5436  );
5437  // constructing the ordered new Track Candidate now
5438  for(i=0; i< fnMvdPixelHitsinTrack[ncand]+
5439  fnMvdStripHitsinTrack[ncand]; i++){
5440  if(ListHits[i]<(MAXMVDPIXELHITS+MAXMVDSTRIPHITS)*10){//Pixel.
5441  fListTrackCandHit[ncand][i] = ListHits[i];
5442  fListTrackCandHitType[ncand][i] = 0;
5443  } else { // Strip hits.
5444  fListTrackCandHit[ncand][i] = ListHits[i]-
5446  fListTrackCandHitType[ncand][i] = 1;
5447  }
5448  } // end of for(i=0; i< fnMvdPixelHitsinTrack[ncand]+
5449 
5450  } // end of if( fnMvdPixelHitsinTrack[ncand]+
5451 
5452 
5453 
5454 
5455  // construction of the second part of the ordered new Track Candidate
5456 
5457  if( fnSttParHitsinTrack[ncand]+fnSttSkewHitsinTrack[ncand] >0){
5458 
5459  for(i=0; i<fnSttParHitsinTrack[ncand]; i++){
5460  XY2[i][0] = info[ fListSttParHitsinTrack[ncand][i] ][0];
5461  XY2[i][1] = info[ fListSttParHitsinTrack[ncand][i] ][1];
5462  ListHits2[i] = fListSttParHitsinTrack[ncand][i];
5463 
5464 
5465  }
5466 
5467  for(i=0; i<fnSttSkewHitsinTrack[ncand]; i++){
5468  j = i+fnSttParHitsinTrack[ncand];
5469  XY2[j][0] = fOx[ncand]+fR[ncand]*
5470  cos(SchosenSkew[ncand][fListSttSkewHitsinTrack[ncand][i]]);
5471  XY2[j][1] = fOy[ncand]+fR[ncand]*
5472  sin(SchosenSkew[ncand][fListSttSkewHitsinTrack[ncand][i]]);
5473  ListHits2[j] = fListSttSkewHitsinTrack[ncand][i]+
5474  MAXSTTHITS*10; // in order to distinguish
5475  // the Skew hits.
5476  }
5477 
5478 
5479  // ordering the Stt Hits
5480 
5482  fOx[ncand],
5483  fOy[ncand],
5484  &Trajectory_Start[ncand][0],
5485  fnSttParHitsinTrack[ncand]+fnSttSkewHitsinTrack[ncand],
5486  XY2, // XY2[*][0] = X position, XY2[*][0] = Y position.
5487  CHARGE[ncand], // input
5488  ListHits2 // output
5489  );
5490 
5491  for(j=0,ipar=0,iskew=0;
5492  j< fnSttParHitsinTrack[ncand]+fnSttSkewHitsinTrack[ncand];j++){
5493  i = j+fnMvdPixelHitsinTrack[ncand]+ fnMvdStripHitsinTrack[ncand];
5494  if(ListHits2[j]<MAXSTTHITS*10){ // parallel Stt hit.
5495  fListTrackCandHit[ncand][i] = ListHits2[j];
5496  fListTrackCandHitType[ncand][i] = 2;
5497  fListSttParHitsinTrack[ncand][ipar]=ListHits2[j];
5498  ipar++;
5499  } else { // skew Stt hit.
5500  fListTrackCandHit[ncand][i] = ListHits2[j]-MAXSTTHITS*10;
5501  fListTrackCandHitType[ncand][i] = 3;
5502  fListSttSkewHitsinTrack[ncand][iskew]=ListHits2[j]-MAXSTTHITS*10;
5503  iskew++;
5504  } // end of if(ListHits2[j]<MAXSTTHITS*10)
5505  } // end of for(j=0,ipar=0,iskew=0; ....
5506 
5507  } // end of if( fnSttParHitsinTrack[ncand]+
5508 
5509 
5510 if(istampa>=3) for(int ica=0; ica<fnMvdPixelHitsinTrack[ncand]+fnMvdStripHitsinTrack[ncand]+
5511  fnSttParHitsinTrack[ncand]+fnSttSkewHitsinTrack[ncand]; ica++){
5512  cout<<"from PndTrkTracking2, hit n. "<<fListTrackCandHit[ncand][ica]<<", hit type "
5513  <<fListTrackCandHitType[ncand][ica]<<endl;
5514 }
5515 
5516 
5517 // } // end of for(ncand=FirstCandidate; ncand< LastCandidate; ncand++)
5518 
5519 
5520  return;
5521 }
friend F32vec4 cos(const F32vec4 &a)
Definition: P4_F32vec4.h:112
Double_t fYMvdStrip[MAXMVDSTRIPHITS]
Double_t fXMvdStrip[MAXMVDSTRIPHITS]
Short_t fListSttSkewHitsinTrack[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK]
Double_t fOy[MAXTRACKSPEREVENT]
Int_t i
Definition: run_full.C:25
void OrderingUsingConformal(Double_t oX, Double_t oY, Double_t Traj_Sta[2], Int_t nHits, Double_t XY[][2], Short_t Charge, Int_t *ListHits)
Short_t fListMvdStripHitsinTrack[MAXTRACKSPEREVENT][MAXMVDSTRIPHITSINTRACK]
friend F32vec4 sin(const F32vec4 &a)
Definition: P4_F32vec4.h:111
Short_t fnSttSkewHitsinTrack[MAXTRACKSPEREVENT]
Double_t fOx[MAXTRACKSPEREVENT]
Short_t fListTrackCandHit[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK+MAXMVDPIXELHITSINTRACK+MAXMVDSTRIPHITSINTRACK+MAXSCITILHITSINTRACK]
Short_t fnSttParHitsinTrack[MAXTRACKSPEREVENT]
Short_t fListTrackCandHitType[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK+MAXMVDPIXELHITSINTRACK+MAXMVDSTRIPHITSINTRACK+MAXSCITILHITSINTRACK]
static const Short_t MAXMVDPIXELHITSINTRACK
Double_t fXMvdPixel[MAXMVDPIXELHITS]
Double_t
static const Short_t MAXSTTHITSINTRACK
static const Short_t MAXMVDPIXELHITS
static const Short_t MAXMVDSTRIPHITSINTRACK
Double_t fYMvdPixel[MAXMVDPIXELHITS]
Short_t fnMvdPixelHitsinTrack[MAXTRACKSPEREVENT]
Short_t fListMvdPixelHitsinTrack[MAXTRACKSPEREVENT][MAXMVDPIXELHITSINTRACK]
Short_t fListSttParHitsinTrack[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK]
Short_t fnMvdStripHitsinTrack[MAXTRACKSPEREVENT]
Short_t fnTrackCandHit[MAXTRACKSPEREVENT]
static const Short_t MAXMVDSTRIPHITS
Double_t fR[MAXTRACKSPEREVENT]
static const Short_t MAXSTTHITS
void PndTrkTracking2::OrderingR_Loading_ListTrackCandHit ( bool *  keepit,
Short_t  ncand,
Double_t  info[][7] 
)
private

Definition at line 5573 of file PndTrkTracking2.cxx.

References Double_t, fListMvdPixelHitsinTrack, fListMvdStripHitsinTrack, fListSttParHitsinTrack, fListSttSkewHitsinTrack, fListTrackCandHit, fListTrackCandHitType, fnMvdPixelHitsinTrack, fnMvdStripHitsinTrack, fnSttParHitsinTrack, fnSttSkewHitsinTrack, fnTrackCandHit, fXMvdPixel, fXMvdStrip, fYMvdPixel, fYMvdStrip, i, and PndTrkMergeSort::Merge_Sort().

Referenced by Ordering_Loading_ListTrackCandHit().

5578 {
5579 
5580  Short_t i,
5581  j,
5582  ipar,
5583  iskew;
5584 
5585  PndTrkMergeSort MergeSort;
5586 
5587 // ordering all the hits belonging to the candidate track, by increasing fR;
5588 // forming the new track with Mvd+Stt hits
5589 
5590 
5591  if(!keepit[ncand]) return;
5593  fnMvdPixelHitsinTrack[ncand]+
5594  fnMvdStripHitsinTrack[ncand];
5595  Short_t tempmvdindex[fnMvdPixelHitsinTrack[ncand]+
5596  fnMvdStripHitsinTrack[ncand] ],
5597  tempmvdtype[fnMvdPixelHitsinTrack[ncand]+
5598  fnMvdStripHitsinTrack[ncand] ];
5599  Int_t auxIndex[fnMvdPixelHitsinTrack[ncand]+
5600  fnMvdStripHitsinTrack[ncand] ];
5601  Double_t auxR[fnMvdPixelHitsinTrack[ncand]+
5602  fnMvdStripHitsinTrack[ncand] ];
5603  // adding the Mvd hits (Pixel and Strips)
5604  for(i=0; i< fnMvdPixelHitsinTrack[ncand]; i++){
5605  auxR[i] =
5610  tempmvdindex[i]=fListMvdPixelHitsinTrack[ncand][i];
5611  tempmvdtype[i]=0;
5612  auxIndex[i] = i;
5613  }
5614  for(i=0; i< fnMvdStripHitsinTrack[ncand]; i++){
5615  auxR[i+fnMvdPixelHitsinTrack[ncand]] =
5620  tempmvdindex[i+fnMvdPixelHitsinTrack[ncand]]=
5621  fListMvdStripHitsinTrack[ncand][i];
5622  tempmvdtype[i+fnMvdPixelHitsinTrack[ncand]]=1;
5623  auxIndex[i+fnMvdPixelHitsinTrack[ncand]]=
5624  i+fnMvdPixelHitsinTrack[ncand];
5625  }
5626 
5627  // ordering the Mvd Hits
5628  if( fnMvdPixelHitsinTrack[ncand]+
5629  fnMvdStripHitsinTrack[ncand] >0){
5630  MergeSort.Merge_Sort( fnMvdPixelHitsinTrack[ncand]+
5631  fnMvdStripHitsinTrack[ncand],
5632  auxR, auxIndex);
5633 
5634  // constructing the first part of the ordered new Track Candidate
5635  for(i=0; i< fnMvdPixelHitsinTrack[ncand]+
5636  fnMvdStripHitsinTrack[ncand]; i++){
5637  fListTrackCandHit[ncand][i] = tempmvdindex[ auxIndex[i] ];
5638  fListTrackCandHitType[ncand][i] = tempmvdtype[ auxIndex[i] ];
5639 
5640  }
5641  } // end of if( fnMvdPixelHitsinTrack[ncand]+
5642 
5643  // construction of the second part of the ordered new Track Candidate
5644 
5645  Short_t tempmvdindex2[fnSttParHitsinTrack[ncand]+
5646  fnSttSkewHitsinTrack[ncand] ],
5647  tempmvdtype2[fnSttParHitsinTrack[ncand]+
5648  fnSttSkewHitsinTrack[ncand] ];
5649  Int_t auxIndex2[fnSttParHitsinTrack[ncand]+
5650  fnSttSkewHitsinTrack[ncand] ];
5651  Double_t auxR2[fnSttParHitsinTrack[ncand]+
5652  fnSttSkewHitsinTrack[ncand] ];
5653 
5654  for(i=0; i<fnSttParHitsinTrack[ncand]; i++){
5655  auxR2[i] =
5656  info[ fListSttParHitsinTrack[ncand][i] ][0]*
5657  info[ fListSttParHitsinTrack[ncand][i] ][0]+
5658  info[ fListSttParHitsinTrack[ncand][i] ][1]*
5659  info[ fListSttParHitsinTrack[ncand][i] ][1];
5660  tempmvdindex2[i]=fListSttParHitsinTrack[ncand][i];
5661  tempmvdtype2[i]=2;
5662  auxIndex2[i] = i;
5663  }
5664  for(i=0; i<fnSttSkewHitsinTrack[ncand]; i++){
5665  j = i+fnSttParHitsinTrack[ncand];
5666  auxR2[j] =
5667  info[ fListSttSkewHitsinTrack[ncand][i] ][0]*
5668  info[ fListSttSkewHitsinTrack[ncand][i] ][0]+
5669  info[ fListSttSkewHitsinTrack[ncand][i] ][1]*
5670  info[ fListSttSkewHitsinTrack[ncand][i] ][1];
5671  tempmvdindex2[j]=fListSttSkewHitsinTrack[ncand][i];
5672  tempmvdtype2[j]=3;
5673  auxIndex2[j] = j;
5674  }
5675 
5676 
5677  // ordering the Stt Hits
5678  if( fnSttParHitsinTrack[ncand]+fnSttSkewHitsinTrack[ncand] >0){
5679  MergeSort.Merge_Sort( fnSttParHitsinTrack[ncand]+fnSttSkewHitsinTrack[ncand],
5680  auxR2, auxIndex2);
5681 
5682  for(j=0,ipar=0,iskew=0;
5683  j< fnSttParHitsinTrack[ncand]+fnSttSkewHitsinTrack[ncand];j++){
5684  i = j+fnMvdPixelHitsinTrack[ncand]+
5685  fnMvdStripHitsinTrack[ncand];
5686  fListTrackCandHit[ncand][i] = tempmvdindex2[ auxIndex2[j] ];
5687  fListTrackCandHitType[ncand][i] = tempmvdtype2[ auxIndex2[j] ];
5688 
5689  if( fListTrackCandHitType[ncand][i]==2) {
5690  fListSttParHitsinTrack[ncand][ipar]=tempmvdindex2[auxIndex2[j]];
5691  ipar++;
5692  } else {
5693  fListSttSkewHitsinTrack[ncand][iskew]=tempmvdindex2[auxIndex2[j]];
5694  iskew++;
5695  }
5696  }
5697  } // end of if( fnSttParHitsinTrack[ncand]+
5698 
5699 
5700 
5701 
5702 
5703 
5704  return;
5705 }
Double_t fYMvdStrip[MAXMVDSTRIPHITS]
Double_t fXMvdStrip[MAXMVDSTRIPHITS]
Short_t fListSttSkewHitsinTrack[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK]
Int_t i
Definition: run_full.C:25
Short_t fListMvdStripHitsinTrack[MAXTRACKSPEREVENT][MAXMVDSTRIPHITSINTRACK]
Short_t fnSttSkewHitsinTrack[MAXTRACKSPEREVENT]
Short_t fListTrackCandHit[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK+MAXMVDPIXELHITSINTRACK+MAXMVDSTRIPHITSINTRACK+MAXSCITILHITSINTRACK]
Short_t fnSttParHitsinTrack[MAXTRACKSPEREVENT]
Short_t fListTrackCandHitType[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK+MAXMVDPIXELHITSINTRACK+MAXMVDSTRIPHITSINTRACK+MAXSCITILHITSINTRACK]
Double_t fXMvdPixel[MAXMVDPIXELHITS]
Double_t
Double_t fYMvdPixel[MAXMVDPIXELHITS]
void Merge_Sort(Short_t n_ele, Double_t *array, Int_t *ind)
Short_t fnMvdPixelHitsinTrack[MAXTRACKSPEREVENT]
Short_t fListMvdPixelHitsinTrack[MAXTRACKSPEREVENT][MAXMVDPIXELHITSINTRACK]
Short_t fListSttParHitsinTrack[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK]
Short_t fnMvdStripHitsinTrack[MAXTRACKSPEREVENT]
Short_t fnTrackCandHit[MAXTRACKSPEREVENT]
void PndTrkTracking2::OrderingSttSkewandSttParallel ( Double_t  oX,
Double_t  oY,
Double_t  Rr,
Short_t  nSkewhit,
Short_t *  ListSkewHits,
Double_t SList,
Short_t  Charge,
Short_t  nParHits,
Short_t *  ListParHits,
Double_t U,
Double_t V,
Short_t *  BigList 
)
private

Definition at line 5713 of file PndTrkTracking2.cxx.

References atan2(), b1, cos(), Double_t, i, PndTrkMergeSort::Merge_Sort(), PI, sign(), and sin().

5730 {
5731 
5732  Short_t
5733  i,
5734  j,
5735  tmp[nSkewhit+nParHits],
5736  tmpList[nSkewhit];
5737 
5738  Int_t index[nSkewhit+nParHits];
5739 
5740  Double_t aaa,
5741  b1,
5742  sign,
5743  aux[nSkewhit+nParHits];
5744 
5745 
5746  PndTrkMergeSort MergeSort;
5747 
5748 
5749 // here there is the ordering of the hits, under the assumption that the circumference
5750 // in XY goes through (0,0).
5751 // Moreover, the code before is supposed to have selected trajectories in XY with (fOx,fOy)
5752 // farther from (0,0) by > 0.9 * RminStrawDetector/2 and consequently fOx and fOy are not both 0.
5753 // The scheme for the ordering of the hit is as follows :
5754 // 1) order hits by increasing U of the conformal mapping; see Gianluigi's Logbook page 283;
5755 // 2) find the charge of the track by checking if it is closest to the center in XY
5756 // the first or the last of the ordered hits.
5757 
5758 
5759 
5760 // ordering of the hits
5761 
5762  aaa = atan2( oY, oX); // atan2 defined between -PI and PI.
5763 
5764  // the following statement is necessary since for unknown reason the root interpreter
5765  // gives a weird error when using PI directly in the if statement below!!!!!!! I lost
5766  // 2 hours trying to figure this out!
5767  b1 = PI/4.;
5768 
5769 
5770  if( (aaa>b1&&aaa<3.*b1 ) || (aaa>-3.*b1&&aaa<-b1)){ // case #1 or #3;see Gianluigi's Logbook page 285.
5771  if( (aaa>b1&&aaa<3.*b1 && Charge == -1)||( aaa>-3.*b1&&aaa<-b1 && Charge == 1) )
5772  { // for speeding up the ordering taking advantage
5773  // that the parallel hits were earlier ordered and
5774  // apply the trick of multiplying by -1.
5775  sign=-1.;
5776  } else { // normal calculation
5777  sign=1.;
5778  }
5779 
5780  for (j = 0 ; j< nParHits; j++){
5781  aux[j] = sign*U[j];
5782  }
5783  for (j = 0; j< nSkewhit; j++){
5784  // this is U in conformal space
5785  aux[j+nParHits]=sign*(oX + Rr*cos(SList[ListSkewHits[j]]))/
5786  (oX*oX+oY*oY+Rr*Rr + 2.*Rr*
5787  (oX*cos(SList[ListSkewHits[j]])
5788  +oY*sin(SList[ListSkewHits[j]])));
5789  }
5790 
5791 
5792  } else { // use V as ordering variable
5793  // [case 2 and 4 Gianluigi's Logbook page 285].
5794 
5795  if( ((aaa<=-3.*b1|| aaa>=3.*b1) && Charge == -1)
5796  || ( -b1 <= aaa && aaa <= b1 && Charge == 1) ){
5797  sign=-1.;
5798  } else {
5799  sign=1.;
5800  }
5801  for (j = 0 ; j< nParHits; j++){
5802  aux[j] = sign*V[j];
5803  }
5804  for (j = 0; j< nSkewhit; j++){
5805  // this is V in conformal space.
5806  aux[j+nParHits]=sign*(oY + Rr*sin(SList[ListSkewHits[j]]))/
5807  (oX*oX+oY*oY+Rr*Rr + 2.*Rr*
5808  (oX*cos(SList[ListSkewHits[j]])
5809  +oY*sin(SList[ListSkewHits[j]])));
5810  }
5811 
5812 
5813  } // end of if((aaa>b1&& ....
5814 
5815 
5816  for (j = 0 ; j< nParHits; j++){
5817  BigList[j]=ListParHits[j];
5818  index[j] = j;
5819  }
5820  for (j = 0; j< nSkewhit; j++){
5821  BigList[j+nParHits]=ListSkewHits[j];
5822  index[j+nParHits] = j+nParHits;
5823  }
5824 
5825  MergeSort.Merge_Sort( nSkewhit+nParHits, aux, index);
5826 
5827 
5828  for(i=0, j=0;i<nSkewhit+nParHits;i++){
5829  tmp[i]=BigList[index[i]];
5830  // reorder the ListSkewHits also.
5831  if( index[i] >= nParHits ){
5832  tmpList[j] = ListSkewHits[index[i]-nParHits];
5833  j++;
5834  }
5835  }
5836  for(i=0;i<nSkewhit+nParHits;i++){
5837  BigList[i]= tmp[i];
5838  }
5839  // reorder the ListSkewHits also.
5840  for(i=0;i<nSkewhit;i++){
5841  ListSkewHits[i]= tmpList[i];
5842  }
5843 
5844 
5845  return;
5846 
5847 }
friend F32vec4 cos(const F32vec4 &a)
Definition: P4_F32vec4.h:112
Int_t i
Definition: run_full.C:25
friend F32vec4 sin(const F32vec4 &a)
Definition: P4_F32vec4.h:111
const Double_t PI
Double_t
void Merge_Sort(Short_t n_ele, Double_t *array, Int_t *ind)
friend F32vec4 atan2(const F32vec4 &y, const F32vec4 &x)
Definition: P4_F32vec4.h:117
int sign(T val)
Definition: PndCADef.h:48
void PndTrkTracking2::OrderingUsingConformal ( Double_t  oX,
Double_t  oY,
Double_t  Traj_Sta[2],
Int_t  nHits,
Double_t  XY[][2],
Short_t  Charge,
Int_t *  ListHits 
)
private

Definition at line 5853 of file PndTrkTracking2.cxx.

References atan2(), b1, ccc, Double_t, i, PndTrkMergeSort::Merge_Sort(), nHits, and PI.

Referenced by OrderingConformal_Loading_ListTrackCandHit().

5862 {
5863 
5864 
5865 
5866 
5867  Short_t i,j,
5868  tmp[nHits];
5869  Double_t aaa,
5870  bbb,
5871  ccc,
5872  b1,
5873  U[nHits],
5874  V[nHits];
5875 
5876 
5877  PndTrkMergeSort MergeSort;
5878 
5879 
5880 
5881 // here there is the ordering of the hits, NOT under the assumption that the circumference
5882 // in XY goes through Trajectory_Start.
5883 // Moreover, the code before is supposed to have selected trajectories in XY with (fOx,fOy)
5884 // farther from (0,0) by > 0.9 * RminStrawDetector/2 and consequently fOx and fOy are not both 0.
5885 // The scheme for the ordering of the hit is as follows :
5886 // 1) order hits by increasing U or V of the conformal mapping; see Gianluigi's Logbook page 283;
5887 // 2) find the charge of the track by checking if it is closest to the center in XY
5888 // the first or the last of the ordered hits.
5889 // 3) in case, invert the ordering of U, V and ListHits such that the first hits in the
5890 // list are always those closer to the Trajectory_Start.
5891 
5892 
5893 // ordering of the hits
5894 
5895  aaa = atan2( oY-Traj_Sta[1], oX-Traj_Sta[0]); // atan2 defined between -PI and PI.
5896 
5897  // the following statement is necessary since for unknown reason the root interpreter
5898  // gives a weird error when using PI directly in the if statement below!!!!!!! I lost
5899  // 2 hours trying to figure this out!
5900  b1 = PI/4.;
5901 
5902  if((aaa>b1&&aaa<3.*b1) || (aaa>-3.*b1&&aaa<-b1)){//use U as ordering variable;
5903  //[case 1 or 3 Gianluigi's Logbook page 285].
5904  for (j = 0; j< nHits; j++){
5905  bbb = XY[j][0]-Traj_Sta[0];
5906  ccc = XY[j][1]-Traj_Sta[1];
5907  U[j]= bbb/(bbb*bbb+ccc*ccc);
5908  }
5909  MergeSort.Merge_Sort( nHits, U, ListHits);
5910 
5911  if((aaa>b1&&aaa<3.*b1)){ // case #1;
5912  if( Charge == -1){
5913  // inverting the order of the hits.
5914  for(i=0;i<nHits;i++){
5915  tmp[i]=ListHits[nHits-1-i];
5916  }
5917  for(i=0;i<nHits;i++){
5918  ListHits[i]=tmp[i];
5919  }
5920  }
5921  } else{ // case # 3.
5922  if(Charge == 1){
5923  // inverting the order of the hits.
5924  for(i=0;i<nHits;i++){
5925  tmp[i]=ListHits[nHits-1-i];
5926  }
5927  for(i=0;i<nHits;i++){
5928  ListHits[i]=tmp[i];
5929  }
5930  }// end of if( Charge ==1)
5931  }// end of if((aaa>b1&&aaa<3.*b1))
5932 
5933  } else { // use V as ordering variable [case 2 or 4 Gianluigi's Logbook page 285].
5934  for (j = 0; j< nHits; j++){
5935  bbb = XY[j][0]-Traj_Sta[0];
5936  ccc = XY[j][1]-Traj_Sta[1];
5937  V[j]= ccc/(bbb*bbb+ccc*ccc);
5938  }
5939  MergeSort.Merge_Sort( nHits, V, ListHits);
5940 
5941  if((aaa<=-3.*b1 || aaa>=3.*b1)){ // case #2;
5942  if( Charge == -1){
5943  // inverting the order of the hits.
5944  for(i=0;i<nHits;i++){
5945  tmp[i]=ListHits[nHits-1-i];
5946  }
5947  for(i=0;i<nHits;i++){
5948  ListHits[i]=tmp[i];
5949  }
5950  }
5951  } else{ // case # 4.
5952  if( Charge == 1){
5953  // inverting the order of the hits.
5954  for(i=0;i<nHits;i++){
5955  tmp[i]=ListHits[nHits-1-i];
5956  }
5957  for(i=0;i<nHits;i++){
5958  ListHits[i]=tmp[i];
5959  }
5960  }
5961  }
5962 
5963  } // end of if((aaa>b1&& ....
5964 
5965 
5966 
5967  return;
5968 
5969 
5970 }
Int_t i
Definition: run_full.C:25
const Double_t PI
int nHits
Definition: RiemannTest.C:16
Double_t
void Merge_Sort(Short_t n_ele, Double_t *array, Int_t *ind)
friend F32vec4 atan2(const F32vec4 &y, const F32vec4 &x)
Definition: P4_F32vec4.h:117
void PndTrkTracking2::PrintTime ( )
inline

Definition at line 66 of file PndTrkTracking2.h.

References fctime2, and frtime2.

67  {
68  cout<<"\nMy calculation of the time is :";
69  cout << " real time " << frtime2 << " sec., CPU time " << fctime2
70  << " seconds." << endl << endl;
71  return;
72 
73  };
void PndTrkTracking2::RefitMvdStt ( Short_t  nCandHit,
Short_t *  fListTrackCandHit,
Short_t *  fListTrackCandHitType,
Double_t  info[][7],
Double_t  rotationangle,
Double_t  trajectory_vertex[2],
Short_t  iexcl,
Double_t pAlfa,
Double_t pBeta,
Double_t pGamma,
bool *  status 
)
private

Definition at line 5976 of file PndTrkTracking2.cxx.

References Double_t, fabs(), PndTrkChi2Fits::FitHelixCylinder(), fXMvdPixel, fXMvdStrip, fYMvdPixel, fYMvdStrip, i, MAXHITSINFIT, MAXMVDPIXELHITSINTRACK, MAXMVDSTRIPHITSINTRACK, and MAXSTTHITSINTRACK.

5989 {
5990  bool Type;
5991 
5992  Short_t i,
5993  iparallel;
5994 
5995 
5996  Short_t exitstatus;
5997 
5998  Double_t dist2,
5999  mindis,
6000  emme,
6001  factor,
6002  gamma,
6003  qu,
6004  ErrorStraw = 0.03,
6005  ErrorMvd = 0.01,
6010 
6011 
6012 // PndTrkGlpkFits fit;
6013 // PndTrkLegendreFits fit;
6014  PndTrkChi2Fits fit;
6015 
6016 
6017  *status= false;
6018  factor=3.;
6019  mindis=0.5;
6020 
6021  for(i=0, iparallel=0; i<nCandHit && iparallel< MAXHITSINFIT; i++){
6022 
6023 
6024 
6025  if(i==iexcl) continue;
6026  if( ListCandHitType[i] == 0 ){ // mvd pixels
6027  //----- translate the little circumference in XY representing
6028  // approximately the sensitive area into the conformal space
6029  // circumference
6030 
6031  dist2 = (fXMvdPixel[ListCandHit[i]]-tv[0])*
6032  (fXMvdPixel[ListCandHit[i]]-tv[0])+
6033  (fYMvdPixel[ListCandHit[i]]-tv[1])*
6034  (fYMvdPixel[ListCandHit[i]]-tv[1]);
6035  if(dist2<mindis) continue; // this is to exclude Mvd hits too close to the traslated
6036  // center of reference frame (given by tv[0], tv[1]). This
6037  // would cause the subsequent fit to fail.
6038 
6039  gamma = dist2 - ErrorMvd*ErrorMvd; // for Pixels
6040  // I assume the 'drift radius' to be the max dimension of
6041  // the Pixel
6042  Xconformal[iparallel] = (fXMvdPixel[ListCandHit[i]]-tv[0])/gamma;
6043  Yconformal[iparallel] = (fYMvdPixel[ListCandHit[i]]-tv[1])/gamma;
6044  DriftRadiusconformal[iparallel]=-1.;// only to signal later this is a Mvd hit.
6045  ErrorDriftRadiusconformal[iparallel]=factor*ErrorMvd/fabs(gamma);
6046  iparallel++;
6047  } else if ( ListCandHitType[i] == 1 ){ // mvd strips
6048  //----- translate the little circumference in XY representing
6049  // approximately the sensitive area into the conformal space
6050  // circumference
6051  dist2 = (fXMvdStrip[ListCandHit[i]]-tv[0])*
6052  (fXMvdStrip[ListCandHit[i]]-tv[0])+
6053  (fYMvdStrip[ListCandHit[i]]-tv[1])*
6054  (fYMvdStrip[ListCandHit[i]]-tv[1]);
6055  if(dist2<mindis) continue; // this is to exclude Mvd hits too close to the traslated
6056  // center of reference frame (given by tv[0], tv[1]). This
6057  // would cause the subsequent fit to fail.
6058 
6059  gamma = dist2 - ErrorMvd*ErrorMvd;// for Strips also
6060  // I assume the 'drift radius' to be the largest error of
6061  // the Strips (which is in the X dimension)
6062  Xconformal[iparallel] = (fXMvdStrip[ListCandHit[i]]-tv[0])/gamma;
6063  Yconformal[iparallel] = (fYMvdStrip[ListCandHit[i]]-tv[1])/gamma;
6064  DriftRadiusconformal[iparallel]=-1.;// only to signal later this is a Mvd hit.
6065  ErrorDriftRadiusconformal[iparallel]=factor* ErrorMvd/fabs(gamma);
6066  iparallel++;
6067  } else if ( ListCandHitType[i] == 2 ){ // Stt parallel hit.
6068 
6069 
6070  dist2 = (info[ListCandHit[i]][0]-tv[0])*
6071  (info[ListCandHit[i]][0]-tv[0])+
6072  (info[ListCandHit[i]][1]-tv[1])*
6073  (info[ListCandHit[i]][1]-tv[1]);
6074  // this is to exclude hits too close to the traslated
6075  // center of reference frame (given by tv[0], tv[1]). This
6076  // would cause the subsequent fit to fail.
6077  if(dist2<mindis) continue;
6078  gamma = dist2 -
6079  info[ListCandHit[i]][3]*
6080  info[ListCandHit[i]][3];
6081  Xconformal[iparallel] = (info[ListCandHit[i]][0]-tv[0])/gamma;
6082  Yconformal[iparallel] = (info[ListCandHit[i]][1]-tv[1])/gamma;
6083  DriftRadiusconformal[iparallel]=info[ListCandHit[i]][3]/fabs(gamma);
6084  ErrorDriftRadiusconformal[iparallel]=factor*ErrorStraw/fabs(gamma);
6085  iparallel++;
6086 
6087  }
6088  } // end of for(i=0, iparallel=0;
6089 
6090  if( nCandHit < 2) return;
6091 
6092  exitstatus = fit.FitHelixCylinder(
6093  iparallel,
6094  Xconformal,
6095  Yconformal,
6096  DriftRadiusconformal,
6097  ErrorDriftRadiusconformal,
6098  rotationangle, // rotationangle, da mettere
6099  tv, // vertex in (X,Y) of this trajectory
6100  MAXHITSINFIT, // maximum n. of hits allowed in fast fit
6101  &emme,
6102  &qu,
6103  pAlfa,
6104  pBeta,
6105  pGamma,
6106  &Type,
6107  0, // istampa
6108  0 // IVOLTE
6109  );
6110 
6111 
6112  // existatus > 0, Type= true --> fit ok, it is a Circle in XY;
6113  // existatus > 0, Type= false --> fit ok, it is a Straigh Line in XY;
6114  // existatus < 0, fit failed; Type was set to false in this case;
6115  if( exitstatus > 0 && Type) *status=true;
6116  return;
6117 }
Double_t fYMvdStrip[MAXMVDSTRIPHITS]
Double_t fXMvdStrip[MAXMVDSTRIPHITS]
Int_t i
Definition: run_full.C:25
Short_t FitHelixCylinder(Short_t nHitsinTrack, Double_t *Xconformal, Double_t *Yconformal, Double_t *DriftRadiusconformal, Double_t *ErrorDriftRadiusconformal, Double_t rotationangle, Double_t trajectory_vertex[2], Short_t NMAX, Double_t *m, Double_t *q, Double_t *pAlfa, Double_t *pBeta, Double_t *pGamma, bool *Type, int istampa, int IVOLTE)
static const Short_t MAXMVDPIXELHITSINTRACK
Double_t fXMvdPixel[MAXMVDPIXELHITS]
Double_t
static const Short_t MAXSTTHITSINTRACK
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
static const Short_t MAXMVDSTRIPHITSINTRACK
Double_t fYMvdPixel[MAXMVDPIXELHITS]
const int MAXHITSINFIT
int status[10]
Definition: f_Init.h:28
void PndTrkTracking2::SeparateInnerOuterParallel ( Short_t  nHits,
Short_t *  ListHits,
Double_t  info[][7],
Double_t  RStrawDetInnerParMax,
Short_t *  nInnerHits,
Short_t *  ListInnerHits,
Short_t *  nOuterHits,
Short_t *  ListOuterHits,
Short_t *  nInnerHitsLeft,
Short_t *  ListInnerHitsLeft,
Short_t *  nInnerHitsRight,
Short_t *  ListInnerHitsRight,
Short_t *  nOuterHitsLeft,
Short_t *  ListOuterHitsLeft,
Short_t *  nOuterHitsRight,
Short_t *  ListOuterHitsRight 
)
private
void PndTrkTracking2::SetEventsToPlot ( int  nev)
inline

Definition at line 87 of file PndTrkTracking2.h.

References fNevents_to_plot.

87 {fNevents_to_plot = nev;};
void PndTrkTracking2::SetInputBranchName ( const char *  string1,
const char *  string2,
const char *  string3 
)
inline

Definition at line 75 of file PndTrkTracking2.h.

References fMvdPixelBranch, fMvdStripBranch, and fSttBranch.

Referenced by PndMasterRecoTask::PndMasterRecoTask(), prod_rec(), QAmacro_stt_3(), reco(), reco2_complete(), reco_complete(), reco_complete_gf2(), reco_complete_runs(), reco_complete_sec(), reco_rich(), and standard_tracking().

80  {
81  sprintf(fSttBranch,"%s", string1);
82  sprintf(fMvdPixelBranch,"%s", string2);
83  sprintf(fMvdStripBranch,"%s", string3);
84  return;
85  };
char fMvdPixelBranch[200]
char fSttBranch[200]
char fMvdStripBranch[200]
void PndTrkTracking2::SetParContainers ( )

Definition at line 800 of file PndTrkTracking2.cxx.

References fSttParameters, and rtdb.

800  {
801  FairRuntimeDb* rtdb = FairRunAna::Instance()->GetRuntimeDb();
802  fSttParameters = (PndGeoSttPar*) rtdb->getContainer("PndGeoSttPar");
803 }
FairRuntimeDb * rtdb
Definition: hit_dirc.C:66
PndGeoSttPar * fSttParameters
void PndTrkTracking2::SetPersistence ( Bool_t  persistence)
inline

set persistence flag

Definition at line 92 of file PndTrkTracking2.h.

References PndPersistencyTask::SetPersistency().

Referenced by prod_rec(), reco(), reco2_complete(), reco_complete(), reco_complete_gf2(), reco_complete_runs(), and reco_rich().

92 { SetPersistency(persistence); }
void SetPersistency(Bool_t val=kTRUE)
void PndPersistencyTask::SetPersistency ( Bool_t  val = kTRUE)
inlineinherited

Definition at line 31 of file PndPersistencyTask.h.

References PndPersistencyTask::fPersistency, and val.

Referenced by barrelTrackFinder(), digi_complete(), digi_complete_newSTT(), digiOnly_complete(), PndBarrelTrackFinder::PndBarrelTrackFinder(), PndCATracking::PndCATracking(), PndDrcHitFinder::PndDrcHitFinder(), PndEmc2DLocMaxFinder::PndEmc2DLocMaxFinder(), PndEmcExpClusterSplitter::PndEmcExpClusterSplitter(), PndEmcFullDigiTask::PndEmcFullDigiTask(), PndEmcFWEndcapDigi::PndEmcFWEndcapDigi(), PndEmcFWEndcapTimebasedWaveforms::PndEmcFWEndcapTimebasedWaveforms(), PndEmcHitProducer::PndEmcHitProducer(), PndEmcHitsToWaveform::PndEmcHitsToWaveform(), PndEmcMakeBump::PndEmcMakeBump(), PndEmcMakeCluster::PndEmcMakeCluster(), PndEmcMakeClusterOnline::PndEmcMakeClusterOnline(), PndEmcMakeDigi::PndEmcMakeDigi(), PndEmcMakeRecoHit::PndEmcMakeRecoHit(), PndEmcMultiWaveformToCalibratedDigi::PndEmcMultiWaveformToCalibratedDigi(), PndEmcPhiBumpSplitter::PndEmcPhiBumpSplitter(), PndEmcTmpWaveformToDigi::PndEmcTmpWaveformToDigi(), PndEmcWaveformToCalibratedDigi::PndEmcWaveformToCalibratedDigi(), PndEmcWaveformToDigi::PndEmcWaveformToDigi(), PndFtofHitProducerIdeal::PndFtofHitProducerIdeal(), PndFtsCATracking::PndFtsCATracking(), PndFtsHitProducerIdeal::PndFtsHitProducerIdeal(), PndFtsHitProducerRealFast::PndFtsHitProducerRealFast(), PndFtsHitProducerRealFull::PndFtsHitProducerRealFull(), PndFtsHoughTrackerTask::PndFtsHoughTrackerTask(), PndGemDigitize::PndGemDigitize(), PndGemFindHits::PndGemFindHits(), PndIdealTrackFinder::PndIdealTrackFinder(), PndLmdPixelClusterTask::PndLmdPixelClusterTask(), PndLmdPixelHitProducerFast::PndLmdPixelHitProducerFast(), PndMdtClusterTask::PndMdtClusterTask(), PndMdtDigitization::PndMdtDigitization(), PndMdtHitProducerIdeal::PndMdtHitProducerIdeal(), PndMdtPointsToWaveform::PndMdtPointsToWaveform(), PndMdtTrkProducer::PndMdtTrkProducer(), PndMissingPzCleanerTask::PndMissingPzCleanerTask(), PndMvdGemTrackFinderOnHits::PndMvdGemTrackFinderOnHits(), PndMvdHitProducerIdeal::PndMvdHitProducerIdeal(), PndMvdPixelClusterTask::PndMvdPixelClusterTask(), PndMvdTimeWalkCorrTask::PndMvdTimeWalkCorrTask(), PndMvdToPix4ClusterTask::PndMvdToPix4ClusterTask(), PndRecoKalmanTask::PndRecoKalmanTask(), PndRecoKalmanTask2::PndRecoKalmanTask2(), PndRecoMultiKalmanTask::PndRecoMultiKalmanTask(), PndRecoMultiKalmanTask2::PndRecoMultiKalmanTask2(), PndRichHitFinder::PndRichHitFinder(), PndRichHitProducer::PndRichHitProducer(), PndSciTDigiTask::PndSciTDigiTask(), PndSciTHitProducerIdeal::PndSciTHitProducerIdeal(), PndSdsHitProducerIdeal::PndSdsHitProducerIdeal(), PndSdsHybridHitProducer::PndSdsHybridHitProducer(), PndSdsIdealClusterTask::PndSdsIdealClusterTask(), PndSdsIdealRecoTask::PndSdsIdealRecoTask(), PndSdsNoiseProducer::PndSdsNoiseProducer(), PndSdsPixelClusterTask::PndSdsPixelClusterTask(), PndSdsStripClusterTask::PndSdsStripClusterTask(), PndSdsStripHitProducer::PndSdsStripHitProducer(), PndSdsTimeWalkCorrTask::PndSdsTimeWalkCorrTask(), PndSttFindTracks::PndSttFindTracks(), PndSttHelixHitProducer::PndSttHelixHitProducer(), PndSttHitProducerIdeal::PndSttHitProducerIdeal(), PndSttHitProducerRealFast::PndSttHitProducerRealFast(), PndSttHitProducerRealFull::PndSttHitProducerRealFull(), PndSttMatchTracks::PndSttMatchTracks(), PndSttMvdGemTracking::PndSttMvdGemTracking(), PndTrackSmearTask::PndTrackSmearTask(), PndTrkTracking2(), reco(), reco_complete(), reco_complete_gf2(), reco_complete_newSTT(), reco_complete_sec(), recoideal_complete(), PndMvdClusterTask::SetPersistance(), PndMvdDigiTask::SetPersistance(), PndLmdPixelHitProducerFast::SetPersistance(), PndSdsHitProducerIdeal::SetPersistance(), PndSttMvdGemTracking::SetPersistenc(), PndMdtClusterTask::SetPersistence(), PndSttHelixHitProducer::SetPersistence(), PndMissingPzCleanerTask::SetPersistence(), PndFtsHitProducerRealFast::SetPersistence(), PndFtsHitProducerRealFull::SetPersistence(), PndSttHitProducerRealFull::SetPersistence(), PndSttHitProducerIdeal::SetPersistence(), PndSttHitProducerRealFast::SetPersistence(), PndFtsHitProducerIdeal::SetPersistence(), PndTrackSmearTask::SetPersistence(), PndSciTHitProducerIdeal::SetPersistence(), PndIdealTrackFinder::SetPersistence(), PndSttMatchTracks::SetPersistence(), PndSttFindTracks::SetPersistence(), PndFtsHoughTrackerTask::SetPersistence(), SetPersistence(), PndEmcMakeRecoHit::SetStorageOfData(), PndEmcFWEndcapDigi::SetStorageOfData(), PndEmcMakeClusterOnline::SetStorageOfData(), PndEmcFWEndcapTimebasedWaveforms::SetStorageOfData(), PndEmcMakeDigi::SetStorageOfData(), PndMdtPointsToWaveform::SetStorageOfData(), PndEmc2DLocMaxFinder::SetStorageOfData(), PndEmcMakeCluster::SetStorageOfData(), PndEmcHitsToWaveform::SetStorageOfData(), PndEmcMakeBump::SetStorageOfData(), PndEmcTmpWaveformToDigi::SetStorageOfData(), PndEmcWaveformToDigi::SetStorageOfData(), PndEmcWaveformToCalibratedDigi::SetStorageOfData(), PndEmcMultiWaveformToCalibratedDigi::SetStorageOfData(), PndEmcExpClusterSplitter::SetStorageOfData(), PndEmcPhiBumpSplitter::SetStorageOfData(), standard_tracking(), and PndEmcFullDigiTask::StoreDigi().

31 { fPersistency = val; }
Double_t val[nBoxes][nFEBox]
Definition: createCalib.C:11
void PndTrkTracking2::StartFromSciTil ( Short_t *  Charge,
Short_t *  FiConformalIndex,
Double_t Fi_final_helix_referenceframe,
Double_t Fi_initial_helix_referenceframe,
Double_t Fi_low_limit,
Double_t Fi_up_limit,
Short_t  HitsinBoxConformal[][NRDIVCONFORMAL][NFIDIVCONFORMAL],
Double_t  info[][7],
Double_t  infoparalConformal[][5],
Short_t  nBoxConformal[][NFIDIVCONFORMAL],
Int_t  nSttParHit,
Int_t &  nSttTrackCand,
Short_t *  RConformalIndex,
Double_t trajectory_vertex,
Double_t UU,
Double_t VV 
)
private
void PndTrkTracking2::StoreSZ_MvdScitil ( Short_t  ncand)
private

Definition at line 6123 of file PndTrkTracking2.cxx.

References atan2(), DIMENSIONSCITIL, fCandidatePixelDriftRadius, fCandidatePixelErrorDriftRadius, fCandidatePixelS, fCandidatePixelZ, fCandidateSciTilDriftRadius, fCandidateSciTilErrorDriftRadius, fCandidateSciTilS, fCandidateSciTilZ, fCandidateStripDriftRadius, fCandidateStripErrorDriftRadius, fCandidateStripS, fCandidateStripZ, fListMvdPixelHitsinTrack, fListMvdStripHitsinTrack, fListSciTilHitsinTrack, fnMvdPixelHitsinTrack, fnMvdStripHitsinTrack, fnSciTilHitsinTrack, fOx, fOy, fposizSciTil, fS_SciTilHitsinTrack, fXMvdPixel, fXMvdStrip, fYMvdPixel, fYMvdStrip, fZMvdPixel, fZMvdStrip, i, and PI.

Referenced by Exec().

6124 {
6125 
6126  Short_t i,
6127  k;
6128 
6129  // the Mvd Pixels hit
6130  for(i=0; i< fnMvdPixelHitsinTrack[ncand]; i++){
6131  k=fListMvdPixelHitsinTrack[ncand][i];
6132  fCandidatePixelZ[k] = fZMvdPixel[k];
6133  fCandidatePixelS[k] = atan2( fYMvdPixel[k]-fOy[ncand],fXMvdPixel[k]-fOx[ncand]);
6134  if(fCandidatePixelS[k]<0.) fCandidatePixelS[k] +=2.*PI;
6135 
6136  // DriftRadius is set conventionally at -1, for later use in the SZ fit;
6137  // the error on the point used in the fit is ErrorDriftRadius and this
6138  // is overestimated to be 0.5 cm; this is not unreasonable since to this
6139  // error the uncertainty on the Helix radius and center contributes;
6141  // the following error is conventional for the chi**2 type of fit;
6143  }
6144 
6145  // the Mvd Strips hit
6146  for(i = 0; i< fnMvdStripHitsinTrack[ncand]; i++){
6147  k=fListMvdStripHitsinTrack[ncand][i];
6148  fCandidateStripZ[k] = fZMvdStrip[k];
6149  fCandidateStripS[k] = atan2( fYMvdStrip[k]-fOy[ncand],fXMvdStrip[k]-fOx[ncand]);
6150  if(fCandidateStripS[k]<0.) fCandidateStripS[k] +=2.*PI;
6151  // DriftRadius is set conventionally at -1, for later use in the SZ fit;
6152  // the error on the point used in the fit is ErrorDriftRadius and this
6153  // is overestimated to be 1cm.
6155  // the following error is conventional for the chi**2 type of fit;
6157  }
6158 
6159  // the SciTil hit ( when they are 2, the fS_SciTilHitsinTrack is already a mean
6160  // of the two; then consider only 1 SciTil hit, the first, and make an average
6161  // of the two Z positions).
6162 
6163  if(fnSciTilHitsinTrack[ncand]==2){
6165  fposizSciTil[fListSciTilHitsinTrack[ncand][1]][2]);
6167  // DriftRadius is set conventionally at -2, for later use in the SZ fit;
6168  // the error on the point used in the fit is ErrorDriftRadius and this
6169  // is overestimated to be DIMENSIONSCITIL/2.
6172  } else if (fnSciTilHitsinTrack[ncand]==1){
6175  // DriftRadius is set conventionally at -2, for later use in the SZ fit;
6176  // the error on the point used in the fit is ErrorDriftRadius and this
6177  // is overestimated to be DIMENSIONSCITIL/2.
6180  }
6181 
6182  return;
6183 }
Double_t fS_SciTilHitsinTrack[MAXTRACKSPEREVENT][MAXSCITILHITS]
Double_t fYMvdStrip[MAXMVDSTRIPHITS]
Double_t fXMvdStrip[MAXMVDSTRIPHITS]
Double_t fOy[MAXTRACKSPEREVENT]
Int_t i
Definition: run_full.C:25
Double_t fZMvdStrip[MAXMVDSTRIPHITS]
Short_t fListMvdStripHitsinTrack[MAXTRACKSPEREVENT][MAXMVDSTRIPHITSINTRACK]
Double_t fCandidatePixelDriftRadius[MAXMVDPIXELHITS]
Double_t fCandidateStripZ[MAXMVDSTRIPHITS]
Short_t fnSciTilHitsinTrack[MAXTRACKSPEREVENT]
Double_t fposizSciTil[MAXSCITILHITS][3]
Double_t fCandidateSciTilDriftRadius
Double_t fOx[MAXTRACKSPEREVENT]
Double_t fCandidateSciTilS
Double_t fXMvdPixel[MAXMVDPIXELHITS]
const Double_t PI
Double_t fCandidateStripErrorDriftRadius[MAXMVDSTRIPHITS]
Double_t fCandidateStripDriftRadius[MAXMVDSTRIPHITS]
Double_t fCandidateSciTilErrorDriftRadius
Double_t fCandidatePixelS[MAXMVDPIXELHITS]
Double_t fCandidatePixelErrorDriftRadius[MAXMVDPIXELHITS]
Double_t fYMvdPixel[MAXMVDPIXELHITS]
friend F32vec4 atan2(const F32vec4 &y, const F32vec4 &x)
Definition: P4_F32vec4.h:117
Short_t fListSciTilHitsinTrack[MAXTRACKSPEREVENT][MAXSCITILHITSINTRACK]
Short_t fnMvdPixelHitsinTrack[MAXTRACKSPEREVENT]
Short_t fListMvdPixelHitsinTrack[MAXTRACKSPEREVENT][MAXMVDPIXELHITSINTRACK]
Double_t fZMvdPixel[MAXMVDPIXELHITS]
Short_t fnMvdStripHitsinTrack[MAXTRACKSPEREVENT]
Double_t fCandidateSciTilZ
Double_t fCandidatePixelZ[MAXMVDPIXELHITS]
Double_t fCandidateStripS[MAXMVDSTRIPHITS]
const Double_t DIMENSIONSCITIL
bool PndTrkTracking2::SttParalCleanup ( Double_t  GAP,
Double_t  Oxx,
Double_t  Oyy,
Double_t  Rr,
Short_t  Charge,
Double_t  Start[3],
Double_t  FI0,
Double_t  FiLimitAdmissible,
Short_t  nHits,
Short_t *  Listofhits,
Double_t  info[][7],
Double_t  RStrawDetMin,
Double_t  RStrawDetInnerParMax,
Double_t  RStrawDetOuterParMin,
Double_t  RStrawDetMax 
)
private
bool PndTrkTracking2::SttSkewCleanup ( Double_t  GAP,
Double_t  Oxx,
Double_t  Oyy,
Double_t  Rr,
Short_t  Charge,
Double_t  Start[3],
Double_t  FI0,
Double_t  FiLimitAdmissible,
Short_t  nHits,
Short_t *  Listofhits,
Double_t S,
Double_t  info[][7],
Double_t  RminStrawSkew,
Double_t  RmaxStrawSkew,
Double_t  cut,
Short_t  maxnum 
)
private
bool PndTrkTracking2::TrackCleanup ( Double_t  GAP,
Double_t  Oxx,
Double_t  Oyy,
Double_t  Rr,
Double_t  KAPPA,
Double_t  FI0,
Short_t  Charge,
Double_t  Start[3],
Short_t &  nHitsPar,
Short_t *  ListHitsPar,
Short_t &  nHitsSkew,
Short_t *  ListHitsSkew,
Double_t auxS,
Double_t  info[][7],
Double_t  RStrawDetMin,
Double_t  ApotemaMaxInnerPar,
Double_t  ApotemaMinSkew,
Double_t  ApotemaMaxSkew,
Double_t  ApotemaMinOuterPar,
Double_t  RStrawDetMax 
)
private
Short_t PndTrkTracking2::TrkAssociatedParallelHitsToHelix5 ( bool *  ExclusionList,
Int_t  NhitsParallel,
Double_t  Oxx,
Double_t  Oyy,
Double_t  Rr,
Double_t  info[][7],
Double_t  Fi_low,
Double_t  Fi_up,
Short_t *  auxListHitsinTrack 
)
private
Short_t PndTrkTracking2::TrkAssociatedParallelHitsToHelixQuater ( bool *  ExclusionList,
Double_t  m,
Double_t  q,
Short_t  Status,
Short_t  nHitsinTrack,
Short_t *  ListHitsinTrack,
Int_t  NhitsParallel,
Double_t  Oxx,
Double_t  Oyy,
Double_t  Rr,
Double_t  info[][7],
Double_t  infoparalConformal[][5],
Short_t *  RConformalIndex,
Short_t *  FiConformalIndex,
Short_t  nBoxConformal[][NFIDIVCONFORMAL],
Short_t  HitsinBoxConformal[][NRDIVCONFORMAL][NFIDIVCONFORMAL],
Short_t *  auxListHitsinTrack 
)
private
void PndTrkTracking2::WriteHistograms ( )

Definition at line 808 of file PndTrkTracking2.cxx.

References file, hdeltaRPixel, hdeltaRPixel2, hdeltaRStrip, and hdeltaRStrip2.

808  {
809 
810  TFile* file = FairRootManager::Instance()->GetOutFile();
811  file->cd();
812  file->mkdir("PndTrkTracking2");
813  file->cd("PndTrkTracking2");
814  hdeltaRPixel->Write();
815  hdeltaRStrip->Write();
816  hdeltaRPixel2->Write();
817  hdeltaRStrip2->Write();
818  delete hdeltaRPixel;
819  delete hdeltaRStrip;
820  delete hdeltaRPixel2;
821  delete hdeltaRStrip2;
822 
823 }
TFile * file
void PndTrkTracking2::YesMvdAloneTracking ( )
inline

Definition at line 94 of file PndTrkTracking2.h.

References fMvdAloneTracking.

94 { fMvdAloneTracking=true; return;};

Member Data Documentation

bool PndTrkTracking2::doMcComparison
private

Definition at line 131 of file PndTrkTracking2.h.

Referenced by Exec(), Init(), and PndTrkTracking2().

Double_t PndTrkTracking2::fALFA[MAXTRACKSPEREVENT]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Exec(), and Initialization_ClassVariables().

Double_t PndTrkTracking2::fBETA[MAXTRACKSPEREVENT]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Exec(), and Initialization_ClassVariables().

Double_t PndTrkTracking2::fBFIELD
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Exec(), Init(), and LoadPndTrack_TrackCand().

Double_t PndTrkTracking2::fCandidatePixelDriftRadius[MAXMVDPIXELHITS]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Initialization_ClassVariables(), and StoreSZ_MvdScitil().

Double_t PndTrkTracking2::fCandidatePixelErrorDriftRadius[MAXMVDPIXELHITS]
private
Double_t PndTrkTracking2::fCandidatePixelS[MAXMVDPIXELHITS]
private
Double_t PndTrkTracking2::fCandidatePixelZ[MAXMVDPIXELHITS]
private
Double_t PndTrkTracking2::fCandidateSciTilDriftRadius
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Initialization_ClassVariables(), and StoreSZ_MvdScitil().

Double_t PndTrkTracking2::fCandidateSciTilErrorDriftRadius
private
Double_t PndTrkTracking2::fCandidateSciTilS
private
Double_t PndTrkTracking2::fCandidateSciTilZ
private
Double_t PndTrkTracking2::fCandidateSkewS[2 *MAXSTTHITS]
private
Double_t PndTrkTracking2::fCandidateSkewZ[2 *MAXSTTHITS]
private
Double_t PndTrkTracking2::fCandidateSkewZDrift[2 *MAXSTTHITS]
private
Double_t PndTrkTracking2::fCandidateSkewZError[2 *MAXSTTHITS]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Exec(), and LoadSZetc_forSZfit().

Double_t PndTrkTracking2::fCandidateStripDriftRadius[MAXMVDSTRIPHITS]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Initialization_ClassVariables(), and StoreSZ_MvdScitil().

Double_t PndTrkTracking2::fCandidateStripErrorDriftRadius[MAXMVDSTRIPHITS]
private
Double_t PndTrkTracking2::fCandidateStripS[MAXMVDSTRIPHITS]
private
Double_t PndTrkTracking2::fCandidateStripZ[MAXMVDSTRIPHITS]
private
Double_t PndTrkTracking2::fCosine[LEGIANDRE_NTHETADIV]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by CalculateSinandCosin(), and Exec().

Double_t PndTrkTracking2::fctime
private

Definition at line 296 of file PndTrkTracking2.h.

Referenced by Exec().

Double_t PndTrkTracking2::fctime2
private

Definition at line 296 of file PndTrkTracking2.h.

Referenced by Exec(), and PrintTime().

Double_t PndTrkTracking2::fCxMC[MAXMCTRACKS]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Initialization_ClassVariables().

Double_t PndTrkTracking2::fCyMC[MAXMCTRACKS]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Initialization_ClassVariables().

Double_t PndTrkTracking2::fDELTATHETA
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by CalculateSinandCosin().

Double_t PndTrkTracking2::fFimin
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Initialization_ClassVariables().

Double_t PndTrkTracking2::fGAMMA[MAXTRACKSPEREVENT]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Exec(), and Initialization_ClassVariables().

bool PndTrkTracking2::fInclusionListSciTil[MAXSCITILHITS]
private

Definition at line 131 of file PndTrkTracking2.h.

Referenced by Exec(), and Initialization_ClassVariables().

bool PndTrkTracking2::fInclusionListStt[MAXSTTHITS]
private

Definition at line 131 of file PndTrkTracking2.h.

Referenced by Exec(), Initialization_ClassVariables(), and MakeInclusionListStt().

bool PndTrkTracking2::finMvdTrackCandPixel[MAXMVDPIXELHITS]
private

Definition at line 131 of file PndTrkTracking2.h.

Referenced by Initialization_ClassVariables().

bool PndTrkTracking2::finMvdTrackCandStrip[MAXMVDSTRIPHITS]
private

Definition at line 131 of file PndTrkTracking2.h.

Referenced by Initialization_ClassVariables().

Short_t PndTrkTracking2::fListAxialInnerLeft[NUMBER_STRAWS]
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Init().

Short_t PndTrkTracking2::fListAxialInnerRight[NUMBER_STRAWS]
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Init().

Short_t PndTrkTracking2::fListAxialOuterLeft[NUMBER_STRAWS]
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Init().

Short_t PndTrkTracking2::fListAxialOuterRight[NUMBER_STRAWS]
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Init().

Short_t PndTrkTracking2::fListHitMvdTrackCand[MAXMVDTRACKSPEREVENT][MAXMVDPIXELHITSINTRACK+MAXMVDSTRIPHITSINTRACK]
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Initialization_ClassVariables(), and MatchMvdHitsToSttTracks2().

Short_t PndTrkTracking2::fListHitTypeMvdTrackCand[MAXMVDTRACKSPEREVENT][MAXMVDPIXELHITSINTRACK+MAXMVDSTRIPHITSINTRACK]
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Initialization_ClassVariables(), and MatchMvdHitsToSttTracks2().

Short_t PndTrkTracking2::fListMvdDSPixelHitNotTrackCand[MAXMVDPIXELHITS]
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Initialization_ClassVariables(), and MatchMvdHitsToSttTracks2().

Short_t PndTrkTracking2::fListMvdDSStripHitNotTrackCand[MAXMVDSTRIPHITS]
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Initialization_ClassVariables(), and MatchMvdHitsToSttTracks2().

Short_t PndTrkTracking2::fListMvdPixelHitsinTrack[MAXTRACKSPEREVENT][MAXMVDPIXELHITSINTRACK]
private
Short_t PndTrkTracking2::fListMvdStripHitsinTrack[MAXTRACKSPEREVENT][MAXMVDSTRIPHITSINTRACK]
private
Short_t PndTrkTracking2::fListMvdUSPixelHitNotTrackCand[MAXMVDPIXELHITS]
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Initialization_ClassVariables(), and MatchMvdHitsToSttTracks2().

Short_t PndTrkTracking2::fListMvdUSStripHitNotTrackCand[MAXMVDSTRIPHITS]
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Initialization_ClassVariables(), and MatchMvdHitsToSttTracks2().

Short_t PndTrkTracking2::fListParContiguous[NUMBER_STRAWS][6]
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Exec(), Init(), and Initialization_ClassVariables().

Short_t PndTrkTracking2::fListSciTilHitsinTrack[MAXTRACKSPEREVENT][MAXSCITILHITSINTRACK]
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Exec(), Initialization_ClassVariables(), and StoreSZ_MvdScitil().

Short_t PndTrkTracking2::fListSkewLeft[NUMBER_STRAWS]
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Init().

Short_t PndTrkTracking2::fListSkewRight[NUMBER_STRAWS]
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Init().

Short_t PndTrkTracking2::fListSttParHits[MAXSTTHITS]
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by CollectParSttHitsagain(), Exec(), and Initialization_ClassVariables().

Short_t PndTrkTracking2::fListSttParHitsinTrack[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK]
private
Short_t PndTrkTracking2::fListSttSkewHits[MAXSTTHITS]
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Exec(), and Initialization_ClassVariables().

Short_t PndTrkTracking2::fListSttSkewHitsinTrack[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK]
private
Short_t PndTrkTracking2::fListSttSkewHitsinTrackSolution[MAXTRACKSPEREVENT][MAXSTTHITSINTRACK]
private
Double_t PndTrkTracking2::fMCSkewAloneX[MAXSTTHITS]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Exec(), and Initialization_ClassVariables().

Double_t PndTrkTracking2::fMCSkewAloneY[MAXSTTHITS]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Exec(), and Initialization_ClassVariables().

Short_t PndTrkTracking2::fMCtrack_of_Pixel[MAXMVDPIXELHITS]
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Exec(), and Initialization_ClassVariables().

Short_t PndTrkTracking2::fMCtrack_of_Strip[MAXMVDSTRIPHITS]
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Exec(), and Initialization_ClassVariables().

TClonesArray* PndTrkTracking2::fMCTrackArray
private

MC Track Array

Definition at line 321 of file PndTrkTracking2.h.

Referenced by Exec(), Init(), and Initialization_ClassVariables().

Double_t PndTrkTracking2::fMCtruthTrkInfo[15][MAXMCTRACKS]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Initialization_ClassVariables().

bool PndTrkTracking2::fMvdAloneTracking
private

Definition at line 131 of file PndTrkTracking2.h.

Referenced by Init(), NoMvdAloneTracking(), PndTrkTracking2(), and YesMvdAloneTracking().

TClonesArray * PndTrkTracking2::fMvdMCPointArray
private

Input array of MC points of Mvd

Definition at line 321 of file PndTrkTracking2.h.

Referenced by Exec(), Init(), and Initialization_ClassVariables().

char PndTrkTracking2::fMvdPixelBranch[200]
private
TClonesArray * PndTrkTracking2::fMvdPixelHitArray
private

Input array of MvdPixelHitArray

Definition at line 321 of file PndTrkTracking2.h.

Referenced by Exec(), Init(), and Initialization_ClassVariables().

char PndTrkTracking2::fMvdStripBranch[200]
private
TClonesArray * PndTrkTracking2::fMvdStripHitArray
private

Input array of MvdStripHitArray

Definition at line 321 of file PndTrkTracking2.h.

Referenced by Exec(), Init(), and Initialization_ClassVariables().

TClonesArray * PndTrkTracking2::fMvdTrackCandArray
private

Input array of PndTracksCand of Mvd

Definition at line 321 of file PndTrkTracking2.h.

Referenced by Init(), and Initialization_ClassVariables().

Short_t PndTrkTracking2::fnAxialInnerLeft
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Init().

Short_t PndTrkTracking2::fnAxialInnerRight
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Init().

Short_t PndTrkTracking2::fnAxialOuterLeft
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Init().

Short_t PndTrkTracking2::fnAxialOuterRight
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Init().

int PndTrkTracking2::fNevents_to_plot
private
Short_t PndTrkTracking2::fnHitMvdTrackCand[MAXMVDTRACKSPEREVENT]
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Initialization_ClassVariables(), and MatchMvdHitsToSttTracks2().

Short_t PndTrkTracking2::fnMCTracks
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Exec(), and Initialization_ClassVariables().

Short_t PndTrkTracking2::fnMvdDSPixelHitNotTrackCand
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Initialization_ClassVariables(), and MatchMvdHitsToSttTracks2().

Short_t PndTrkTracking2::fnMvdDSStripHitNotTrackCand
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Initialization_ClassVariables(), and MatchMvdHitsToSttTracks2().

Short_t PndTrkTracking2::fnMvdPixelHit
private
Short_t PndTrkTracking2::fnMvdPixelHitsinTrack[MAXTRACKSPEREVENT]
private
Short_t PndTrkTracking2::fnMvdStripHit
private
Short_t PndTrkTracking2::fnMvdStripHitsinTrack[MAXTRACKSPEREVENT]
private
Short_t PndTrkTracking2::fnMvdTrackCand
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Initialization_ClassVariables(), and MatchMvdHitsToSttTracks2().

Short_t PndTrkTracking2::fnMvdUSPixelHitNotTrackCand
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Initialization_ClassVariables(), and MatchMvdHitsToSttTracks2().

Short_t PndTrkTracking2::fnMvdUSStripHitNotTrackCand
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Initialization_ClassVariables(), and MatchMvdHitsToSttTracks2().

Short_t PndTrkTracking2::fnParContiguous[NUMBER_STRAWS]
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Exec(), Init(), and Initialization_ClassVariables().

Short_t PndTrkTracking2::fnSciTilHits
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Exec(), and Initialization_ClassVariables().

Short_t PndTrkTracking2::fnSciTilHitsinTrack[MAXTRACKSPEREVENT]
private
Short_t PndTrkTracking2::fnSkewLeft
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Init().

Short_t PndTrkTracking2::fnSkewRight
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Init().

Short_t PndTrkTracking2::fnSttParHitsinTrack[MAXTRACKSPEREVENT]
private
Short_t PndTrkTracking2::fnSttSkewHitsinTrack[MAXTRACKSPEREVENT]
private
Short_t PndTrkTracking2::fnTrackCandHit[MAXTRACKSPEREVENT]
private
Double_t PndTrkTracking2::fOx[MAXTRACKSPEREVENT]
private
Double_t PndTrkTracking2::fOy[MAXTRACKSPEREVENT]
private
Double_t PndTrkTracking2::fposizSciTil[MAXSCITILHITS][3]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Exec(), Initialization_ClassVariables(), and StoreSZ_MvdScitil().

Double_t PndTrkTracking2::fpSciTilx[MAXSCITILHITS]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Exec().

Double_t PndTrkTracking2::fpSciTily[MAXSCITILHITS]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Exec().

Double_t PndTrkTracking2::fpSciTilz[MAXSCITILHITS]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Exec().

Double_t PndTrkTracking2::fR[MAXTRACKSPEREVENT]
private
Double_t PndTrkTracking2::fR_MC[MAXMCTRACKS]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Initialization_ClassVariables().

Double_t PndTrkTracking2::fradiaConf[NRDIVCONFORMAL]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Exec(), Init(), and Initialization_ClassVariables().

Double_t PndTrkTracking2::frefindexMvdPixel[MAXMVDPIXELHITS]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Exec(), and Initialization_ClassVariables().

Double_t PndTrkTracking2::frefindexMvdStrip[MAXMVDSTRIPHITS]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Exec(), and Initialization_ClassVariables().

Double_t PndTrkTracking2::frtime
private

Definition at line 296 of file PndTrkTracking2.h.

Referenced by Exec().

Double_t PndTrkTracking2::frtime2
private

Definition at line 296 of file PndTrkTracking2.h.

Referenced by Exec(), and PrintTime().

Double_t PndTrkTracking2::fS_SciTilHitsinTrack[MAXTRACKSPEREVENT][MAXSCITILHITS]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Exec(), and StoreSZ_MvdScitil().

TClonesArray * PndTrkTracking2::fSciTHitArray
private

SciTil Hit Array

Definition at line 321 of file PndTrkTracking2.h.

Referenced by Exec(), Init(), and Initialization_ClassVariables().

TClonesArray * PndTrkTracking2::fSciTPointArray
private

SciTil MC Point Array

Definition at line 321 of file PndTrkTracking2.h.

Referenced by Exec(), and Init().

Double_t PndTrkTracking2::fsigmaXMvdPixel[MAXMVDPIXELHITS]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Exec(), Initialization_ClassVariables(), and LoadPndTrack_TrackCand().

Double_t PndTrkTracking2::fsigmaXMvdStrip[MAXMVDSTRIPHITS]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Exec(), Initialization_ClassVariables(), and LoadPndTrack_TrackCand().

Double_t PndTrkTracking2::fsigmaYMvdPixel[MAXMVDPIXELHITS]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Exec(), and Initialization_ClassVariables().

Double_t PndTrkTracking2::fsigmaYMvdStrip[MAXMVDSTRIPHITS]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Exec(), and Initialization_ClassVariables().

Double_t PndTrkTracking2::fsigmaZMvdPixel[MAXMVDPIXELHITS]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Exec(), and Initialization_ClassVariables().

Double_t PndTrkTracking2::fsigmaZMvdStrip[MAXMVDSTRIPHITS]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Exec(), and Initialization_ClassVariables().

bool PndTrkTracking2::fSingleHitListStt[MAXSTTHITS]
private
Double_t PndTrkTracking2::fSinus[LEGIANDRE_NTHETADIV]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by CalculateSinandCosin(), and Exec().

Short_t PndTrkTracking2::fStrawCode[NUMBER_STRAWS]
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Exec(), Init(), and Initialization_ClassVariables().

Short_t PndTrkTracking2::fStrawCode2[NUMBER_STRAWS]
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Exec(), Init(), and Initialization_ClassVariables().

char PndTrkTracking2::fSttBranch[200]
private

Branch names to be used to fetch the hits of the backgound mixed events

Definition at line 149 of file PndTrkTracking2.h.

Referenced by Init(), Initialization_ClassVariables(), LoadPndTrack_TrackCand(), PndTrkTracking2(), and SetInputBranchName().

TClonesArray * PndTrkTracking2::fSttHitArray
private

Input array of PndSttHit

Definition at line 321 of file PndTrkTracking2.h.

Referenced by Exec(), Init(), and Initialization_ClassVariables().

TClonesArray * PndTrkTracking2::fSttMvdPndTrackArray
private

Output array of PndSttMvd PndTrack

Definition at line 321 of file PndTrkTracking2.h.

Referenced by Exec(), Init(), and Initialization_ClassVariables().

TClonesArray * PndTrkTracking2::fSttMvdPndTrackCandArray
private

Output array of PndSttMvd PndTrackCand

Definition at line 321 of file PndTrkTracking2.h.

Referenced by Exec(), Init(), Initialization_ClassVariables(), and LoadPndTrack_TrackCand().

PndGeoSttPar* PndTrkTracking2::fSttParameters
private

Definition at line 349 of file PndTrkTracking2.h.

Referenced by Init(), Initialization_ClassVariables(), and SetParContainers().

TClonesArray * PndTrkTracking2::fSttPointArray
private

Input array of PndSttPoints

Definition at line 321 of file PndTrkTracking2.h.

Referenced by Exec(), Init(), and Initialization_ClassVariables().

TClonesArray * PndTrkTracking2::fSttTrackArray
private

Input array of PndSttTracks

Definition at line 321 of file PndTrkTracking2.h.

Referenced by Initialization_ClassVariables().

TClonesArray * PndTrkTracking2::fSttTrackCandArray
private

Input array of PndTracksCand of Stt

Definition at line 321 of file PndTrkTracking2.h.

Referenced by Initialization_ClassVariables().

TClonesArray * PndTrkTracking2::fSttTubeArray
private

Input array of PndSttTube (map of STT tubes)

Definition at line 321 of file PndTrkTracking2.h.

Referenced by Exec(), Init(), and Initialization_ClassVariables().

TStopwatch PndTrkTracking2::ftimer
private

Definition at line 301 of file PndTrkTracking2.h.

Referenced by Exec().

TStopwatch PndTrkTracking2::ftimer2
private

Definition at line 301 of file PndTrkTracking2.h.

Referenced by Exec().

Short_t PndTrkTracking2::fTubeID[MAXSTTHITS]
private

Definition at line 157 of file PndTrkTracking2.h.

Referenced by Exec().

bool PndTrkTracking2::fTypeConf[MAXTRACKSPEREVENT]
private

Definition at line 131 of file PndTrkTracking2.h.

Referenced by Exec(), and Initialization_ClassVariables().

Double_t PndTrkTracking2::fXMvdPixel[MAXMVDPIXELHITS]
private
Double_t PndTrkTracking2::fXMvdStrip[MAXMVDSTRIPHITS]
private
Double_t PndTrkTracking2::fxTube[NUMBER_STRAWS]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Exec(), Init(), and Initialization_ClassVariables().

Double_t PndTrkTracking2::fxxyyTube[NUMBER_STRAWS]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Exec(), Init(), and Initialization_ClassVariables().

bool PndTrkTracking2::fYesCleanMvd
private

Definition at line 131 of file PndTrkTracking2.h.

Referenced by Cleanup(), CleanupMvd(), Exec(), NOCleanup(), NOCleanupMvd(), and PndTrkTracking2().

bool PndTrkTracking2::fYesCleanStt
private

Definition at line 131 of file PndTrkTracking2.h.

Referenced by Cleanup(), CleanupStt(), Exec(), NOCleanup(), NOCleanupStt(), and PndTrkTracking2().

bool PndTrkTracking2::fYesSciTil
private

Definition at line 131 of file PndTrkTracking2.h.

Referenced by Exec(), Init(), and PndTrkTracking2().

Double_t PndTrkTracking2::fYMvdPixel[MAXMVDPIXELHITS]
private
Double_t PndTrkTracking2::fYMvdStrip[MAXMVDSTRIPHITS]
private
Double_t PndTrkTracking2::fyTube[NUMBER_STRAWS]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Exec(), Init(), and Initialization_ClassVariables().

Double_t PndTrkTracking2::fZMvdPixel[MAXMVDPIXELHITS]
private
Double_t PndTrkTracking2::fZMvdStrip[MAXMVDSTRIPHITS]
private
Double_t PndTrkTracking2::fzTube[NUMBER_STRAWS]
private

Definition at line 229 of file PndTrkTracking2.h.

Referenced by Exec(), Init(), and Initialization_ClassVariables().

FILE* PndTrkTracking2::HANDLE
private

Definition at line 309 of file PndTrkTracking2.h.

Referenced by Exec(), Init(), and Initialization_ClassVariables().

FILE * PndTrkTracking2::HANDLE2
private

Definition at line 309 of file PndTrkTracking2.h.

Referenced by Exec(), Init(), and Initialization_ClassVariables().

TH1F* PndTrkTracking2::hdeltaRPixel
private

Definition at line 313 of file PndTrkTracking2.h.

Referenced by Init(), Initialization_ClassVariables(), and WriteHistograms().

TH1F * PndTrkTracking2::hdeltaRPixel2
private

Definition at line 313 of file PndTrkTracking2.h.

Referenced by Init(), Initialization_ClassVariables(), and WriteHistograms().

TH1F * PndTrkTracking2::hdeltaRStrip
private

Definition at line 313 of file PndTrkTracking2.h.

Referenced by Init(), Initialization_ClassVariables(), and WriteHistograms().

TH1F * PndTrkTracking2::hdeltaRStrip2
private

Definition at line 313 of file PndTrkTracking2.h.

Referenced by Init(), Initialization_ClassVariables(), and WriteHistograms().

bool PndTrkTracking2::iplotta
private

Definition at line 131 of file PndTrkTracking2.h.

Referenced by Exec(), Init(), and PndTrkTracking2().

int PndTrkTracking2::istampa
private
int PndTrkTracking2::IVOLTE
private

Definition at line 224 of file PndTrkTracking2.h.

Referenced by Exec(), Init(), and MatchMvdHitsToSttTracks2().

const Short_t PndTrkTracking2::LEGIANDRE_NRADIUSDIV = 100
staticprivate

Definition at line 108 of file PndTrkTracking2.h.

Referenced by Exec().

const Short_t PndTrkTracking2::LEGIANDRE_NTHETADIV = 2* BOCA_90DEGREES_DIVISIONS
staticprivate

Definition at line 109 of file PndTrkTracking2.h.

Referenced by CalculateSinandCosin(), and Exec().

const Short_t PndTrkTracking2::MAXMCTRACKS = 100
staticprivate

Definition at line 112 of file PndTrkTracking2.h.

Referenced by Exec().

const Short_t PndTrkTracking2::MAXMVDPIXELHITS = 500
staticprivate
const Short_t PndTrkTracking2::MAXMVDPIXELHITSINTRACK = 10
staticprivate
const Short_t PndTrkTracking2::MAXMVDSTRIPHITS = 500
staticprivate
const Short_t PndTrkTracking2::MAXMVDSTRIPHITSINTRACK = 10
staticprivate
const Short_t PndTrkTracking2::MAXMVDTRACKSPEREVENT = 400
staticprivate

Definition at line 117 of file PndTrkTracking2.h.

Referenced by MatchMvdHitsToSttTracks2().

const Short_t PndTrkTracking2::MAXSCITILHITS = 200
staticprivate

Definition at line 118 of file PndTrkTracking2.h.

Referenced by Exec().

const Short_t PndTrkTracking2::MAXSCITILHITSINTRACK = 2
staticprivate

Definition at line 119 of file PndTrkTracking2.h.

Referenced by Exec().

const Short_t PndTrkTracking2::MAXSTTHITS = 900
staticprivate
const Short_t PndTrkTracking2::MAXSTTHITSINTRACK = 40
staticprivate
const Short_t PndTrkTracking2::MAXTRACKSPEREVENT = 200
staticprivate

Definition at line 122 of file PndTrkTracking2.h.

Referenced by Exec().

const Short_t PndTrkTracking2::NFIDIVCONFORMAL = 282
staticprivate

Definition at line 124 of file PndTrkTracking2.h.

Referenced by Exec().

const Short_t PndTrkTracking2::NRDIVCONFORMAL = 10
staticprivate

Definition at line 125 of file PndTrkTracking2.h.

Referenced by Exec(), and Init().

const Short_t PndTrkTracking2::NUMBER_STRAWS = 4542
staticprivate

Definition at line 126 of file PndTrkTracking2.h.

Referenced by Exec(), and Init().


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