//*-- Author : Anar Rustamov //*-- Modified : 24/11/2004 by V. Pechenov //*-- Modified : 02/12/2004 by V. Pechenov /////////////////////////////////////////////////////////////////////////// // // HMetaMatch // // Keep indexes of hits for one track, matching qualities, and // indexes of track objects (HSplineTrack, HKickTrackB,...). // // Indexis of hits: // trkCandInd - index of HTrkCand object // ----------- System=0 ----------------- // showerHitTofInd - index of HShowerHitTof object // ----------- System=1 ----------------- // tofHitInd - index of HTofHit or HTofCluster object // ----------- RICH ----------------- // aRichIndTable[RICH_TAB_SIZE] - arr.of indexes of HRichHit objects // aRichIPUIndTable[RICH_TAB_SIZE] - arr.of indexes of HRichHitIPU objects // // Arrais aRichIndTable and aRichIPUIndTable are sorted by matching quality // and can keep up to 3 ring indexes. // // Quality MDC SHOWER matching: // Xs,Ys - shower hit position in coordinate system of shower module // dXs,dYs - hit position errors (== HShowerHit::getSigmaX(), getSigmaY()) // Xm,Ym - mdc segment cross point with shower module in coordinate system // of corresponding shower module // showerSigmaXOffset & showerSigmaYOffset - from HMetaMatchPar cont. // showerSigmaXMdc & showerSigmaYMdc - from HMetaMatchPar cont. // qualityShower = // sqrt[((Xs - Xm - showerSigmaXOffset)/sqrt(dXs^2 + showerSigmaXMdc^2))^2 + // ((Ys - Ym - showerSigmaYOffset)/sqrt(dYs^2 + showerSigmaYMdc^2))^2] // // Tof: // Xt,Yt - toh hit (or tof cluster position in coordinate system of tof module // Xm,Ym - mdc segment cross point with tof module in coordinate system // of corresponding tof module // tofSigmaXOffset, tofSigmaYOffset - from HMetaMatchPar cont. // tofSigmaX, tofSigmaY - from HMetaMatchPar cont. // qualityTof = sqrt[ ((Xt - Xm - tofSigmaXOffset)/tofSigmaX)^2 + // ((Yt - Ym - tofSigmaYOffset)/tofSigmaY)^2 ] // /////////////////////////////////////////////////////////////////////////// #include "hmetamatch.h" #include using namespace std; HMetaMatch::HMetaMatch() { sector = -1; trkCandInd = -1; firstCandForMeta = -1; nRichId = 0; nRichIPUId = 0; for(Int_t i = 0; i < RICH_TAB_SIZE; i++) { aRichIndTable[i] = -1; aRichIPUIndTable[i] = -1; } setDefForRest(); } HMetaMatch::HMetaMatch(Short_t sec, Int_t tkInd, Int_t ind) { sector = sec; trkCandInd = tkInd; firstCandForMeta = ind; nRichId = 0; nRichIPUId = 0; for(Int_t i = 0; i < RICH_TAB_SIZE; i++) { aRichIndTable[i] = -1; aRichIPUIndTable[i] = -1; } setDefForRest(); } HMetaMatch::HMetaMatch(HMetaMatch* fMetaMatch, Int_t ind) { // ind - index of this object fMetaMatch->nextCandForMeta = ind; sector = fMetaMatch->sector; trkCandInd = fMetaMatch->trkCandInd; firstCandForMeta = fMetaMatch->firstCandForMeta; nRichId = fMetaMatch->nRichId; nRichIPUId = fMetaMatch->nRichIPUId; for(Int_t i = 0; i < RICH_TAB_SIZE; i++) { aRichIndTable[i] = fMetaMatch->aRichIndTable[i]; aRichIPUIndTable[i] = fMetaMatch->aRichIPUIndTable[i]; } setDefForRest(); } void HMetaMatch::setDefForRest(void) { showerHitInd = -1; tofHitInd = -1; nCandForMeta = -1; nextCandForMeta = -1; rtInd = -1; kickInd = -1; kick123Ind = -1; splineInd = -1; rungeKuttaInd = -1; kalmanFilterInd = -1; flag = 0; tofClusterSize = 0; indMMForTofClst = -1; nextMMForTofHit = -1; numMMForSameMeta = 0; nextMMForSameMeta = -1; firstMMForSameMeta = -1; qualityTOF = -1.f; qualitySHOWER = -1.f; xSegCr = 0.f; ySegCr = 0.f; dxMeta = 0.f; dyMeta = 0.f; } HMetaMatch& HMetaMatch::operator=(const HMetaMatch& met) { trkCandInd = met.trkCandInd; showerHitInd = met.showerHitInd; nCandForMeta = met.nCandForMeta; nextCandForMeta = met.nextCandForMeta; firstCandForMeta = met.firstCandForMeta; qualityTOF = met.qualityTOF; qualitySHOWER = met.qualitySHOWER; dxMeta = met.dxMeta; dyMeta = met.dyMeta; splineInd = met.splineInd; rtInd = met.rtInd; kickInd = met.kickInd; kick123Ind = met.kick123Ind; rungeKuttaInd = met.rungeKuttaInd; kalmanFilterInd = met.kalmanFilterInd; sector = met.sector; nRichId = met.nRichId; nRichIPUId = met.nRichIPUId; for(Int_t i=0; i=0) setSplineAccept(); else unsetSplineAccept(); } void HMetaMatch::setRtInd(Int_t rtind) { //????????? rtInd=rtind; if(rtInd>=0) setRtAccept(); else unsetRtAccept(); } void HMetaMatch::setKickInd(Int_t kicktr) { //????????? kickInd=kicktr; if(kickInd>=0) setKickAccept(); else unsetKickAccept(); } void HMetaMatch::setKick123Ind(Int_t kicktr){ //????????? kick123Ind=kicktr; if(kick123Ind>=0) setKick123Accept(); else unsetKick123Accept(); } void HMetaMatch::setRungeKuttaInd(Int_t rktr) { rungeKuttaInd=rktr; if(rungeKuttaInd>=0) setRungeKuttaAccept(); else unsetRungeKuttaAccept(); } void HMetaMatch::setKalmanFilterInd(Int_t kftr) { kalmanFilterInd = kftr; if(kalmanFilterInd>=0) setKalmanFilterAccept(); else unsetKalmanFilterAccept(); } void HMetaMatch::print(void) { printf("HMetaMatch: %i sector, index of trkCand=%i\n",sector+1,trkCandInd); printf(" nCandForMeta=%i firstCandForMeta=%i nextCandForMeta=%i\n", nCandForMeta,firstCandForMeta,nextCandForMeta); if(showerHitInd>=0) printf(" showerHitTofInd=%i qualitySHOWER=%g\n", showerHitInd,qualitySHOWER); if(tofHitInd>=0) printf(" tofHitInd=%i qualityTOF=%g tofClusterSize=%i\n", tofHitInd,qualityTOF,tofClusterSize); if(indMMForTofClst>=0) printf( " index of MM for tof cluster =%i, index of MM for next rot in tof cluster =%i\n", indMMForTofClst,nextMMForTofHit); printf(" The same meta hit: num.of MM obj. =%i, next MM =%i, first MM=%i\n", numMMForSameMeta,nextMMForSameMeta,firstMMForSameMeta); if(nRichId>0) { printf(" richHitInd ="); for(Int_t n=0;n0) { printf(" richHitIPUInd ="); for(Int_t n=0;n=0) printf(" splineInd=%i",splineInd); if(rtInd>=0) printf(" rtInd=%i",rtInd); if(kickInd>=0) printf(" kickInd=%i",kickInd); if(kick123Ind>=0) printf(" kick123Ind=%i",kick123Ind); if(rungeKuttaInd>=0) printf(" rungeKuttaInd=%i",rungeKuttaInd); if(kalmanFilterInd>=0) printf(" kalmanFilterInd=%i", kalmanFilterInd); printf("\n"); } ClassImp(HMetaMatch)