14 #include "StEventTypes.h"
16 #include "StThreeVectorD.hh"
17 #include "StThreeVectorF.hh"
19 #include "StTrackGeometry.h"
20 #include "StDcaGeometry.h"
21 #include "StDedxPidTraits.h"
22 #include "StTrackPidTraits.h"
23 #include "StarClassLibrary/StParticleTypes.hh"
24 #include "StarClassLibrary/StParticleDefinition.hh"
25 #include "StTpcDedxPidAlgorithm.h"
26 #include "StEventUtilities/StuRefMult.hh"
27 #include "PhysicalConstants.h"
28 #include "StPhysicalHelixD.hh"
30 #include "StTofUtil/tofPathLength.hh"
31 #include "StTofUtil/StTofrDaqMap.h"
32 #include "StTofUtil/StTofINLCorr.h"
33 #include "StTofUtil/StTofrGeometry.h"
34 #include "StTofUtil/StTofCellCollection.h"
35 #include "tables/St_pvpdStrobeDef_Table.h"
36 #include "tables/St_tofPedestal_Table.h"
37 #include "tables/St_tofConfig_Table.h"
38 #include "tables/St_tofTrayConfig_Table.h"
40 #include "StTofUtil/tofPathLength.hh"
45 #include "StMessMgr.h"
46 #include "StMemoryInfo.hh"
48 #include "StTofrMatchMaker.h"
54 const Int_t StTofrMatchMaker::mDAQOVERFLOW = 255;
55 const Int_t StTofrMatchMaker::mNTOFP = 41;
56 const Int_t StTofrMatchMaker::mNPVPD = 6;
57 const Int_t StTofrMatchMaker::mNTOFR = 120;
58 const Int_t StTofrMatchMaker::mNTOFR5 = 192;
60 const Int_t StTofrMatchMaker::mNTOF = 192;
61 const Int_t StTofrMatchMaker::mNModule = 32;
62 const Int_t StTofrMatchMaker::mNCell = 6;
63 const Int_t StTofrMatchMaker::mNVPD = 19;
65 const Int_t StTofrMatchMaker::mEastVpdTrayId = 122;
66 const Int_t StTofrMatchMaker::mWestVpdTrayId = 121;
68 const Int_t StTofrMatchMaker::mNValidTrays_Run3 = 1;
69 const Int_t StTofrMatchMaker::mNValidTrays_Run4 = 1;
70 const Int_t StTofrMatchMaker::mNValidTrays_Run5 = 1;
71 const Int_t StTofrMatchMaker::mNValidTrays_Run6 = 0;
72 const Int_t StTofrMatchMaker::mNValidTrays_Run7 = 0;
73 const Int_t StTofrMatchMaker::mNValidTrays_Run8 = 5;
75 const Int_t StTofrMatchMaker::mTdigBoard = 10;
76 const Int_t StTofrMatchMaker::mTdcOnBoard = 4;
77 const Int_t StTofrMatchMaker::mTdcChannel = 1024;
80 StTofrMatchMaker::StTofrMatchMaker(
const Char_t *name):
StMaker(name)
84 , mPvpdAdcLoRes( mNPVPD,0)
86 , mStrobeTdcMin(mNPVPD,0)
87 , mStrobeTdcMax(mNPVPD,0)
91 , mTofr5Tdc(mNTOFR5,0)
92 , mTofr5ToT(mNTOFR5,0)
93 , mHitCorr(mNValidTrays_Run8,(TH2D*)0)
94 , mHitCorrModule(mNValidTrays_Run8,(TH2D*)0)
99 mAcceptedEventCounter = 0;
100 mTofEventCounter = 0;
101 mTofStrobeEventCounter = 0;
102 mAcceptAndStrobe = 0;
111 setValidAdcRange(1,1200);
112 setValidTdcRange(1,2047);
113 setOuterTrackGeometry();
114 setMinHitsPerTrack(15);
115 setMinFitPointsPerTrack(15);
116 setMinFitPointsOverMax(0.52);
119 setCreateHistoFlag(kFALSE);
120 setHistoFileName(
"tofana.root");
121 setCreateTreeFlag(kFALSE);
122 setSaveGeometry(kFALSE);
123 doPrintMemoryInfo = kFALSE;
124 doPrintCpuInfo = kFALSE;
127 StTofrMatchMaker::~StTofrMatchMaker(){ }
132 Int_t StTofrMatchMaker::Init(){
133 gMessMgr->Info(
"StTofrMatchMaker -- initializing ...",
"OS");
134 LOG_INFO <<
"Valid TDC range: " << mMinValidTdc <<
" " << mMaxValidTdc << endm;
135 LOG_INFO <<
"Valid ADC range: " << mMinValidAdc <<
" " << mMaxValidAdc << endm;
136 LOG_INFO <<
"Minimum hits per track: " << mMinHitsPerTrack << endm;
137 LOG_INFO <<
"Minimum fitpoints per track: " << mMinFitPointsPerTrack << endm;
138 LOG_INFO <<
"Maximum DCA: " << mMaxDCA << endm;
139 if (!mOuterTrackGeometry)
140 gMessMgr->Warning(
"Warning: using standard trackgeometry()",
"OS");
146 setHistoFileName(
"");
151 LOG_INFO <<
"Histograms are booked" << endm;
152 if (mHistoFileName!=
"")
153 LOG_INFO <<
"Histograms will be stored in " << mHistoFileName.c_str() << endm;
158 mAcceptedEventCounter = 0;
159 mTofEventCounter = 0;
160 mTofStrobeEventCounter = 0;
161 mAcceptAndStrobe = 0;
169 Int_t StTofrMatchMaker::InitRun(Int_t runnumber){
172 mYear2 = (runnumber<4000000);
173 mYear3 = (runnumber>4000000&&runnumber<5000000);
174 mYear4 = (runnumber>5000000&&runnumber<6000000);
175 mYear5 = (runnumber>6000000&&runnumber<7000000);
176 mYear8 = (runnumber>9000000&&runnumber<10000000);
177 mYearX = (runnumber>10000000);
180 Error(
":InitRun",
"Wrong BFC configuration for run %d. Use StBTofHitMaker for Run9+ data.",runnumber);
184 gMessMgr->Info(
"StTofrMatchMaker -- Initializing TofGeometry (InitRun)",
"OS");
189 mTofrGeom =
new StTofrGeometry(
"tofrGeom",
"tofrGeom in MatchMaker");
190 if(!mTofrGeom->IsInitDone()) {
191 gMessMgr->Info(
"TofrGemetry initialization..." ,
"OS");
193 mTofrGeom->Init(starHall);
197 if(
TDataSet *geom = GetDataSet(
"tofrGeometry"))
delete geom;
198 AddConst(
new TObjectSet(
"tofrGeometry",mTofrGeom));
202 gMessMgr->Info(
" Test the TofrGeometry",
"OS");
206 gMessMgr->Warning(
"Warning: no Top node!",
"OS");
213 LOG_INFO <<
" # of trays = " << topNode->GetListSize() << endm;
214 TList *list = topNode->Nodes();
217 for(Int_t i=0;i<list->GetSize();i++) {
218 sectorVolume =
dynamic_cast<TVolumeView*
> (list->At(i));
219 if ( i>=60 ) ibtoh = 1;
220 LOG_INFO <<
" test sector size = " <<sectorVolume->GetListSize() << endm;
224 TList *list1 = trayVolume->Nodes();
225 LOG_INFO <<
" # of modules in tray " << tray->Index() <<
" = " << trayVolume->GetListSize() << endm;
226 if (!list1 )
continue;
228 for(Int_t j=0;j<list1->GetSize();j++) {
229 sensorVolume =
dynamic_cast<TVolumeView*
> (list1->At(j));
243 if(mYear2||mYear3||mYear4) {
244 if(mYear3) mDaqMap->setNValidTrays(mNValidTrays_Run3);
245 if(mYear4) mDaqMap->setNValidTrays(mNValidTrays_Run4);
248 LOG_INFO <<
" Initialize Daq map for run 2,3,4 ... " << endm;
251 for(Int_t i=0;i<mNTOFR;i++) {
252 LOG_INFO << i <<
" -- adc=" << mDaqMap->DaqChan2ADCChan(i) <<
" -- tdc=" << mDaqMap->DaqChan2TDCChan(i) << endm;
253 IntVec map = mDaqMap->DaqChan2Cell(i);
254 LOG_INFO <<
" tray=" << map[0] <<
" module=" << map[1] <<
" cell=" << map[2] << endm;
262 gMessMgr->Info(
" -- retrieving run parameters from Calibrations_tof",
"OS");
263 TDataSet *mDbDataSet = GetDataBase(
"Calibrations/tof/pvpdStrobeDef");
265 gMessMgr->Error(
"unable to get TOF pvpdStrobeDef table",
"OS");
269 St_pvpdStrobeDef* pvpdStrobeDef =
static_cast<St_pvpdStrobeDef*
>(mDbDataSet->
Find(
"pvpdStrobeDef"));
271 gMessMgr->Error(
"unable to find pVPD strobe def parameters",
"OS");
275 pvpdStrobeDef_st *strobeDef =
static_cast<pvpdStrobeDef_st*
>(pvpdStrobeDef->GetArray());
276 Int_t numRows = pvpdStrobeDef->GetNRows();
277 if (mNPVPD != numRows) gMessMgr->Warning(
"#tubes inconsistency in dbase");
278 for (Int_t i=0;i<mNPVPD;i++){
279 Int_t ii = strobeDef[i].id - 1;
280 mStrobeTdcMin[ii] = strobeDef[i].strobeTdcMin;
281 mStrobeTdcMax[ii] = strobeDef[i].strobeTdcMax;
283 LOG_INFO <<
"tube " << strobeDef[i].id <<
" min:"<< strobeDef[i].strobeTdcMin
284 <<
" max:"<< strobeDef[i].strobeTdcMax<< endm;
288 mDbDataSet = GetDataBase(
"Calibrations/tof/tofPedestal");
290 gMessMgr->Error(
"unable to access TOF tofPedestal table",
"OS");
294 St_tofPedestal* tofPed =
static_cast<St_tofPedestal*
>(mDbDataSet->
Find(
"tofPedestal"));
296 gMessMgr->Error(
"unable to find TOF pedestal table",
"OS");
300 tofPedestal_st *pedestal =
static_cast<tofPedestal_st*
>(tofPed->GetArray());
301 Int_t entries = (Int_t)(pedestal[0].entries);
302 if (mNTOFR>entries) gMessMgr->Warning(
"#TOFr channels inconsistency in dbase");
303 for (Int_t i=0;i<entries;i++) {
304 Int_t ii = pedestal[0].daqChannel[i];
305 Int_t adcChan = pedestal[0].adcChan[i];
307 mPedTOFr[ii] = (Double_t)(pedestal[0].adcPedestal[i]);
309 LOG_INFO <<
"daqChannel" << ii <<
" ped:" << pedestal[0].adcPedestal[i] <<endm;
331 mDaqMap->setNValidTrays(mNValidTrays_Run5);
332 mDaqMap->initFromDbaseY5(
this);
333 LOG_INFO <<
" Initialize Daq map for run 5 ... " << endm;
337 for(Int_t i=0;i<mNTOFR5;i++) {
338 IntVec map = mDaqMap->Tofr5TDCChan2Cell(i);
339 LOG_INFO <<
"InitRun():i="<<i<<
" tray=" << map[0] <<
" module=" << map[1] <<
" cell=" << map[2] << endm;
343 mDaqMap->setNValidTrays(mNValidTrays_Run8);
344 mDaqMap->initFromDbaseGeneral(
this);
345 LOG_INFO <<
" Initialize Daq map for run 8 ... " << endm;
347 mTofINLCorr->setNValidTrays(mNValidTrays_Run8);
348 mTofINLCorr->initFromDbase(
this);
349 LOG_INFO <<
" Initialize INL table for run 8 ... " << endm;
357 Int_t StTofrMatchMaker::FinishRun(Int_t runnumber){
359 LOG_INFO <<
"StTofrMatchMaker -- cleaning up geometry (FinishRun)" << endm;
360 if (mTofrGeom)
delete mTofrGeom;
363 if(mDaqMap)
delete mDaqMap;
366 if(mTofINLCorr)
delete mTofINLCorr;
376 LOG_INFO <<
"StTofrMatchMaker ----- RUN SUMMARY ----- (Finish)\n"
377 <<
"\tProcessed " << mEventCounter <<
" events."
378 <<
" Accepted " << mAcceptedEventCounter <<
" events."
379 <<
" Rejected " << mEventCounter - mAcceptedEventCounter <<
" events\n"
380 <<
"\tTOF events " << mTofEventCounter
381 <<
". Beam " << mTofEventCounter - mTofStrobeEventCounter
382 <<
" Strobe " << mTofStrobeEventCounter
383 <<
"\n\t Accept & Strobe " << mAcceptAndStrobe <<
" events\n"
384 <<
"\t Accept & Beam " << mAcceptAndBeam <<
" events" << endm;
387 if (mHistoFileName!=
"") writeHistogramsToFile();
394 gMessMgr->Info(
"StTofrMatchMaker -- welcome",
"OS");
397 if(mYear2||mYear3||mYear4) {
398 iret = processEventYear2to4();
400 iret = processEventYear5();
402 iret = processEventYear8();
408 Int_t StTofrMatchMaker::processEventYear2to4(){
409 if(mHisto) mEventCounterHisto->Fill(0);
411 mEvent = (
StEvent *) GetInputDS(
"StEvent");
412 if (!validEvent(mEvent)){
413 gMessMgr->Info(
"StTofrMatchMaker -- nothing to do ... bye-bye",
"OS");
418 gMessMgr->Info(
"StTofrMatchMaker -- no TOFr in Year2!",
"OS");
424 if (doPrintCpuInfo) timer.start();
425 if (doPrintMemoryInfo) StMemoryInfo::instance()->snapshot();
434 Float_t sumAdcTofr(0.); Int_t nAdcTofr(0), nTdcTofr(0), nAdcTdcTofr(0);
435 for (Int_t i=0;i<mNTOFR;i++){
436 sumAdcTofr += mTofrAdc[i];
437 bool tdcValid = validTdc(mTofrTdc[i]);
438 bool adcValid = validAdc(mTofrAdc[i]);
439 if (tdcValid) nTdcTofr++;
440 if (adcValid) nAdcTofr++;
441 if (adcValid && tdcValid) nAdcTdcTofr++;
444 LOG_INFO <<
" Tofr #Adc:" << nAdcTofr <<
" #Tdc:" << nTdcTofr << endm;
448 Float_t sumAdcPvpd=0; Int_t nAdcPvpd=0, nTdcPvpd=0;
449 for (Int_t i=0;i<mNPVPD;i++){
450 sumAdcPvpd += mPvpdAdc[i];
451 bool tdcValid = validTdc(mPvpdTdc[i]);
452 bool adcValid = validAdc(mPvpdAdc[i]);
453 if (tdcValid) nTdcPvpd++;
454 if (adcValid) nAdcPvpd++;
457 LOG_INFO <<
" pVPD #Adc:" << nAdcPvpd <<
" #Tdc:" << nTdcPvpd << endm;
464 bool richTofMuDST = (mEvent->summary()->numberOfExoticTracks() == -999);
466 refmult = mEvent->summary()->numberOfGoodTracks();
468 refmult = uncorrectedNumberOfPrimaries(*mEvent);
471 LOG_INFO <<
" #Tracks :" << mEvent->summary()->numberOfTracks()
472 <<
"\n #goodPrimaryTracks:" << mEvent->summary()->numberOfGoodPrimaryTracks()
473 <<
"\n #uncorr.prim.tracks :" << refmult << endm;
475 LOG_INFO <<
" #goodTracks (global):" << mEvent->summary()->numberOfGoodTracks() << endm;
481 tofCellHitVector daqCellsHitVec;
483 idVector validModuleVec;
485 for (Int_t i=0;i<mNTOFR;i++){
486 Float_t rawAdc = mTofrAdc[i];
487 Float_t rawTdc = mTofrTdc[i];
488 if (mHisto) mDaqOccupancy->Fill(i);
490 if (validAdc(rawAdc) && validTdc(rawTdc) && rawAdc>mPedTOFr[i] ){
491 IntVec map = mDaqMap->DaqChan2Cell(i);
492 Int_t IDtray = map[0];
493 Int_t IDmodule = map[1];
494 Int_t IDcell = map[2];
496 StructCellHit aDaqCellHit;
497 aDaqCellHit.channel = i;
498 aDaqCellHit.tray = IDtray;
499 aDaqCellHit.module = IDmodule;
500 aDaqCellHit.cell = IDcell;
501 daqCellsHitVec.push_back(aDaqCellHit);
503 int id = IDtray*100+IDmodule;
505 for(
size_t iv=0;iv<validModuleVec.size();iv++) {
506 if(
id==validModuleVec[iv]) {
511 if(!ifind) validModuleVec.push_back(
id);
514 mDaqOccupancyValid->Fill(i);
515 Int_t adcchan = mDaqMap->DaqChan2ADCChan(i);
516 Int_t tdcchan = mDaqMap->DaqChan2TDCChan(i);
517 mADCTDCCorelation->Fill(tdcchan, adcchan);
520 LOG_INFO <<
"A: daqId=" << i <<
" rawAdc= " << rawAdc <<
" rawTdc="<< rawTdc <<endm;
526 LOG_INFO <<
" total # of cells = " << daqCellsHitVec.size() << endm;
527 for(
size_t iv = 0;iv<validModuleVec.size();iv++) {
528 LOG_INFO <<
" module # " << validModuleVec[iv] <<
" Valid! " << endm;
532 mCellsMultInEvent->Fill(daqCellsHitVec.size());
533 if(daqCellsHitVec.size()) mEventCounterHisto->Fill(6);
535 if(!daqCellsHitVec.size())
return kStOK;
540 tofCellHitVector allCellsHitVec;
542 StructCellHit cellHit;
544 StSPtrVecTrackNode& nodes = mEvent->trackNodes();
546 for (
unsigned int iNode=0; iNode<nodes.size(); iNode++){
547 tofCellHitVector cellHitVec;
549 StTrack *theTrack = nodes[iNode]->track(global);
552 if (validTrack(theTrack)){
557 if(!mTofrGeom->projTrayVector(theHelix, projTrayVec))
continue;
569 if(mTofrGeom->HelixCrossCellIds(theHelix, validModuleVec, projTrayVec, idVec, pathVec, crossVec)) {
570 Int_t cells = idVec.size();
571 for (Int_t i=0; i<cells; i++) {
572 Int_t icell,imodule,itray;
573 Double_t local[3],global[3];
574 for(Int_t i2=0;i2<3;i2++){
577 global[0]=crossVec[i].x();
578 global[1]=crossVec[i].y();
579 global[2]=crossVec[i].z();
580 mTofrGeom->DecodeCellId(idVec[i], icell, imodule, itray);
583 mTofrGeom->GetGeomSensor(imodule,itray);
585 gMessMgr->Warning(
"",
"OS") <<
" No sensitive module in the projection??? -- Something weird!!! " << endm;
588 sensor->Master2Local(&global[0],&local[0]);
589 icell = sensor->FindCellIndex(local);
594 if (local[2]<=3.4&&local[2]>=-2.7) {
595 Int_t Iarray = mDaqMap->Cell2DaqChan(itray, imodule, icell);
596 if(Iarray>=mDAQOVERFLOW)
continue;
598 cellHit.channel = Iarray;
599 cellHit.tray = itray;
600 cellHit.module = imodule;
601 cellHit.cell = icell;
602 cellHit.trackIdVec.push_back(iNode);
603 cellHit.hitPosition = glo;
604 cellHit.zhit = (Float_t)hitPos.z();
605 cellHit.yhit = (Float_t)hitPos.y();
606 cellHitVec.push_back(cellHit);
607 allCellsHitVec.push_back(cellHit);
609 mDaqOccupancyProj->Fill(Iarray);
610 mHitsPosition->Fill(hitPos.y(), hitPos.z());
614 LOG_INFO <<
"B: nodeid=" << iNode <<
" projected in " <<
" tray="<< itray <<
" module="<<imodule<<
" cell="<<icell<<endm;
615 LOG_INFO <<
" hit position " << hitPos << endm;
620 if(ncells>0&&mHisto) mHitsMultPerTrack->Fill(ncells);
625 LOG_INFO <<
"B: matched/available/total #tracknodes: " <<allCellsHitVec.size() <<
"/" <<nAllTracks <<
"/" << nodes.size() << endm;
627 mHitsMultInEvent->Fill(allCellsHitVec.size());
628 if(allCellsHitVec.size()) mEventCounterHisto->Fill(7);
635 tofCellHitVector matchHitCellsVec;
638 tofCellHitVectorIter daqIter = daqCellsHitVec.begin();
639 for(
unsigned int idaq=0;idaq<daqCellsHitVec.size();idaq++, daqIter++) {
640 tofCellHitVectorIter proIter = allCellsHitVec.begin();
641 for(
unsigned int ipro=0;ipro<allCellsHitVec.size();ipro++, proIter++) {
642 if( (daqIter->tray==proIter->tray)&&
643 (daqIter->module==proIter->module) &&
644 ( ( (proIter->cell==6)&&((proIter->cell==daqIter->cell) ||
645 (proIter->cell==daqIter->cell+1)) )
646 || ( (proIter->cell==1)&&((proIter->cell==daqIter->cell) ||
647 (proIter->cell==daqIter->cell-1)) )
648 || ( (proIter->cell>=2&&proIter->cell<=6) &&
649 ( (proIter->cell==daqIter->cell) ||
650 (proIter->cell==daqIter->cell-1) ||
651 (proIter->cell==daqIter->cell+1) ) ) ) ) {
652 cellHit.channel = daqIter->channel;
653 cellHit.tray = daqIter->tray;
654 cellHit.module = daqIter->module;
655 cellHit.cell = daqIter->cell;
656 cellHit.hitPosition = proIter->hitPosition;
657 cellHit.trackIdVec = proIter->trackIdVec;
658 cellHit.zhit = proIter->zhit;
659 cellHit.yhit = proIter->yhit;
660 matchHitCellsVec.push_back(cellHit);
665 LOG_INFO <<
"C: before/after: " << allCellsHitVec.size() <<
"/" << matchHitCellsVec.size() << endm;
667 if(mHisto&&matchHitCellsVec.size()) mEventCounterHisto->Fill(8);
672 Int_t nSingleHitCells(0);
673 Int_t nMultiHitsCells(0);
675 tofCellHitVector singleHitCellsVec;
676 tofCellHitVector multiHitsCellsVec;
680 tofCellHitVector tempVec = matchHitCellsVec;
681 tofCellHitVector erasedVec = tempVec;
682 while (tempVec.size() != 0) {
686 tofCellHitVectorIter tempIter=tempVec.begin();
687 tofCellHitVectorIter erasedIter=erasedVec.begin();
688 while(erasedIter!= erasedVec.end()) {
689 if(tempIter->tray == erasedIter->tray &&
690 tempIter->module == erasedIter->module &&
691 tempIter->cell == erasedIter->cell) {
693 trackIdVec.push_back(erasedIter->trackIdVec.back());
694 erasedVec.erase(erasedIter);
700 cellHit.channel = tempIter->channel;
701 cellHit.cell = tempIter->cell;
702 cellHit.module = tempIter->module;
703 cellHit.tray = tempIter->tray;
704 cellHit.hitPosition = tempIter->hitPosition;
705 cellHit.trackIdVec = trackIdVec;
706 cellHit.zhit = tempIter->zhit;
707 cellHit.yhit = tempIter->yhit;
709 Float_t ycenter = (tempIter->cell-1-2.5)*mWidthPad;
710 Float_t dy = tempIter->yhit - ycenter;
711 Float_t dz = tempIter->zhit;
714 mTracksPerCellMatch1->Fill(trackIdVec.size());
715 mDaqOccupancyMatch1->Fill(tempIter->channel);
716 mDeltaHitMatch1->Fill(dy, dz);
721 singleHitCellsVec.push_back(cellHit);
722 }
else if (nTracks>1){
724 multiHitsCellsVec.push_back(cellHit);
728 LOG_INFO <<
"D: no tracks extrapolate to matched cell ... should not happen!" << endm;
732 LOG_INFO <<
"D: itray=" << cellHit.tray <<
" imodule=" << cellHit.module <<
" icell=" << cellHit.cell <<
"\ttrackid:";
733 idVectorIter ij=trackIdVec.begin();
734 while (ij != trackIdVec.end()) { LOG_INFO <<
" " << *ij; ij++; }
741 LOG_INFO <<
"D: before/after: " << matchHitCellsVec.size() <<
"/" << singleHitCellsVec.size() << endm;
744 mCellsPerEventMatch1->Fill(singleHitCellsVec.size()+multiHitsCellsVec.size());
745 if(singleHitCellsVec.size()) mEventCounterHisto->Fill(9);
751 tofCellHitVector FinalMatchedCellsVec;
753 tempVec = singleHitCellsVec;
755 mCellsPerEventMatch2->Fill(tempVec.size());
756 for(
unsigned int ii=0;ii<tempVec.size();ii++) {
757 mTracksPerCellMatch2->Fill(tempVec[ii].trackIdVec.size());
758 mDaqOccupancyMatch2->Fill(tempVec[ii].channel);
759 Float_t ycenter = (tempVec[ii].cell-1-2.5)*mWidthPad;
760 Float_t dy = tempVec[ii].yhit-ycenter;
761 Float_t dz = tempVec[ii].zhit;
762 mDeltaHitMatch2->Fill(dy, dz);
767 while (tempVec.size() != 0) {
768 StructCellHit cellHit;
771 vector<StThreeVectorD> vPosition;
772 vector<Int_t> vchannel, vtray, vmodule, vcell;
773 vector<Float_t> vzhit, vyhit;
775 tofCellHitVectorIter tempIter=tempVec.begin();
776 tofCellHitVectorIter erasedIter=erasedVec.begin();
777 while(erasedIter!= erasedVec.end()) {
778 if(tempIter->trackIdVec.back() == erasedIter->trackIdVec.back()) {
780 vchannel.push_back(erasedIter->channel);
781 vtray.push_back(erasedIter->tray);
782 vmodule.push_back(erasedIter->module);
783 vcell.push_back(erasedIter->cell);
784 vPosition.push_back(erasedIter->hitPosition);
785 vTrackId.push_back(erasedIter->trackIdVec.back());
786 vzhit.push_back(erasedIter->zhit);
787 vyhit.push_back(erasedIter->yhit);
789 erasedVec.erase(erasedIter);
798 cellHit.channel = vchannel[0];
799 cellHit.tray = vtray[0];
800 cellHit.module = vmodule[0];
801 cellHit.cell = vcell[0];
802 cellHit.trackIdVec.push_back(vTrackId[0]);
803 cellHit.hitPosition = vPosition[0];
804 cellHit.matchFlag = 0;
805 cellHit.zhit = vzhit[0];
806 cellHit.yhit = vyhit[0];
808 FinalMatchedCellsVec.push_back(cellHit);
812 LOG_INFO <<
"E: itray=" << cellHit.tray <<
" imodule=" << cellHit.module <<
" icell=" << cellHit.cell <<
"\ttrackid:";
813 idVectorIter ij=vTrackId.begin();
814 while (ij != vTrackId.end()) { LOG_INFO <<
" " << *ij; ij++; }
819 Int_t thiscandidate(-99);
820 Int_t thisMatchFlag(0);
824 vector<Int_t> weightCandidates;
826 if (Debug()) LOG_INFO <<
"E: find ... weight ";
827 for (Int_t i=0;i<nCells;i++){
828 if(vchannel[i]>=0&&vchannel[i]<mNTOFR) {
829 Float_t adcwt = mTofrAdc[vchannel[i]]-mPedTOFr[vchannel[i]];
832 weightCandidates.clear();
833 weightCandidates.push_back(i);
834 }
else if (adcwt == weight) {
835 weightCandidates.push_back(i);
839 if (weightCandidates.size()==1){
840 thiscandidate = weightCandidates[0];
841 Int_t daqId = vchannel[thiscandidate];
842 if (Debug()) LOG_INFO <<
"candidate =" << daqId << endm;
846 if (weightCandidates.size()>1){
848 vector<Int_t> ssCandidates;
850 if (Debug()) LOG_INFO <<
" ss ";
851 for (
unsigned int i=0;i<weightCandidates.size();i++){
852 Int_t ii=weightCandidates[i];
855 Float_t yy = ahit.y();
856 Float_t ycell = (vcell[ii]-1-2.5)*mWidthPad;
857 Float_t ll = fabs(yy-ycell);
860 ssCandidates.clear();
861 ssCandidates.push_back(ii);
863 ssCandidates.push_back(ii);
865 if (ssCandidates.size()==1){
866 thiscandidate = ssCandidates[0];
867 Int_t daqId = vchannel[thiscandidate];
868 if (Debug()) LOG_INFO <<
"candidate =" << daqId << endm;
873 if (thiscandidate>=0) {
874 cellHit.channel = vchannel[thiscandidate];
875 cellHit.tray = vtray[thiscandidate];
876 cellHit.module = vmodule[thiscandidate];
877 cellHit.cell = vcell[thiscandidate];
878 cellHit.trackIdVec.push_back(vTrackId[thiscandidate]);
879 cellHit.hitPosition = vPosition[thiscandidate];
880 cellHit.matchFlag = thisMatchFlag;
881 cellHit.zhit = vzhit[thiscandidate];
882 cellHit.yhit = vyhit[thiscandidate];
884 FinalMatchedCellsVec.push_back(cellHit);
888 LOG_INFO <<
"E: itray=" << cellHit.tray <<
" imodule=" << cellHit.module <<
" icell=" << cellHit.cell <<
"\ttrackid:" << vTrackId[thiscandidate] << endm;
893 LOG_INFO <<
"E: no cells belong to this track ... should not happen!" << endm;
899 LOG_INFO <<
"E: before/after: " << singleHitCellsVec.size() <<
"/" << FinalMatchedCellsVec.size() << endm;
907 tempVec = FinalMatchedCellsVec;
909 if(FinalMatchedCellsVec.size()) mEventCounterHisto->Fill(10);
910 mCellsPerEventMatch3->Fill(tempVec.size());
911 for(
unsigned int ii=0;ii<tempVec.size();ii++) {
912 mTracksPerCellMatch3->Fill(tempVec[ii].trackIdVec.size());
913 mDaqOccupancyMatch3->Fill(tempVec[ii].channel);
914 Float_t ycenter = (tempVec[ii].cell-1-2.5)*mWidthPad;
915 Float_t dy = tempVec[ii].yhit - ycenter;
916 Float_t dz = tempVec[ii].zhit;
917 mDeltaHitMatch3->Fill(dy, dz);
922 Int_t nValidSingleHitCells(0), nValidSinglePrimHitCells(0);
924 for (
size_t ii=0; ii < FinalMatchedCellsVec.size(); ii++){
925 Int_t daqId = FinalMatchedCellsVec[ii].channel;
927 Int_t tray = FinalMatchedCellsVec[ii].tray;
928 Int_t module = FinalMatchedCellsVec[ii].module;
929 Int_t cell = FinalMatchedCellsVec[ii].cell;
931 Float_t ycenter = (cell-1-2.5)*mWidthPad;
932 Float_t dy = FinalMatchedCellsVec[ii].yhit - ycenter;
933 if (FinalMatchedCellsVec[ii].trackIdVec.size()!=1)
934 LOG_INFO <<
"F: WHAT!?! mult.matched cell in single cell list " << daqId << endm;
937 if (validTdc(mTofrTdc[jj])) nValidSingleHitCells++;
940 unsigned int trackNode = FinalMatchedCellsVec[ii].trackIdVec[0];
941 StTrack *theTrack = nodes[trackNode]->track(primary);
945 if (validTofTrack(theTrack) && fabs(dy)<1.9 ){
946 nValidSinglePrimHitCells++;
949 Int_t nHitsPerTrack = theTrack->topologyMap().numberOfHits(kTpcId);
958 Double_t pathLength = tofPathLength(&mEvent->primaryVertex()->position(),
959 &FinalMatchedCellsVec[ii].hitPosition,
960 theTrackGeometry->helix().curvature());
970 Float_t dedx(0.), cherang(0);
971 Int_t dedx_np(0), cherang_nph(0);
972 StSPtrVecTrackPidTraits& traits = theTrack->pidTraits();
973 for (
unsigned int it=0;it<traits.size();it++){
974 if (traits[it]->detector() == kTpcId){
976 if (pid && pid->method() ==kTruncatedMeanId){
978 dedx_np = pid->numberOfPoints();
980 }
else if (traits[it]->detector() == kRichId){
984 if (pidinfo && pidinfo->getCherenkovPhotons()>2){
985 cherang = pidinfo->getCherenkovAngle();
986 cherang_nph = pidinfo->getCherenkovPhotons();
996 StTofCell *tofCell =
new StTofCell(tray, module, cell, daqId, (Int_t)(mTofrAdc[jj]-mPedTOFr[jj]),(Int_t)mTofrTdc[jj],theTrack,FinalMatchedCellsVec[ii].zhit,FinalMatchedCellsVec[ii].matchFlag,FinalMatchedCellsVec[ii].hitPosition);
997 mCellCollection->push_back(tofCell);
1001 LOG_INFO <<
"F: itray=" << tray <<
" imodule=" << module <<
" icell=" << cell <<
"\tnodeid:";
1002 idVectorIter ij=FinalMatchedCellsVec[ii].trackIdVec.begin();
1003 while (ij != FinalMatchedCellsVec[ii].trackIdVec.end()) { LOG_INFO <<
" " << *ij; ij++; }
1004 LOG_INFO <<
"\tR=" << 1/(theTrackGeometry->helix().curvature())
1005 <<
"\tpT=" << momentum.perp() <<
"\tp=" << momentum.mag()
1006 <<
"\thits="<< nHitsPerTrack <<
"\ts="<< pathLength
1007 <<
"\t#fitp=" <<theTrack->fitTraits().numberOfFitPoints(kTpcId)
1009 <<
" \tdedx=" << dedx
1010 <<
" \tdca="<< globalTrack->geometry()->helix().
distance(mEvent->primaryVertex()->position())<<
" and "<<theTrackGeometry->helix().
distance(mEvent->primaryVertex()->position());
1011 if (cherang!=0) LOG_INFO <<
" \trich="<< cherang <<
" (" << cherang_nph <<
")";
1018 storeMatchData(mCellCollection,theTof);
1019 delete mCellCollection;
1022 if (theTof->dataPresent())
1023 LOG_INFO <<
" TofCollection: raw data container present" << endm;
1024 if (theTof->cellsPresent()){
1025 LOG_INFO <<
" TofCollection: cell container present."<<endm;
1027 StSPtrVecTofCell& tmpCellTofVec = theTof->tofCells();
1028 for (
size_t i = 0; i < tmpCellTofVec.size(); i++) {
1030 LOG_INFO << p->trayIndex() <<
" " << p->moduleIndex() <<
" " << p->cellIndex() <<
" " << p->adc() <<
" " << p->tdc() <<
" " << p->associatedTrack() <<
" " << p->matchFlag() <<
" " << p->position() << endm;
1036 LOG_INFO <<
"F: before/after" << FinalMatchedCellsVec.size() <<
"/" <<nValidSinglePrimHitCells << endm;
1039 LOG_INFO <<
"#(cell tracks): " << allCellsHitVec.size()
1040 <<
" #(hit cells): " << FinalMatchedCellsVec.size()
1041 <<
" #cells (valid tdc): " << nTdcTofr
1042 <<
"\n#(single hits): " << nSingleHitCells
1043 <<
" #(single valid hits): " << nValidSingleHitCells
1044 <<
" #(single prim valid hits): " << nValidSinglePrimHitCells
1049 if (doPrintMemoryInfo) {
1050 StMemoryInfo::instance()->snapshot();
1051 StMemoryInfo::instance()->print();
1053 if (doPrintCpuInfo) {
1055 LOG_INFO <<
"CPU time for StTofrMatchMaker::Make(): "
1056 << timer.elapsedTime() <<
" sec\n" << endm;
1059 LOG_INFO <<
"StTofrMatchMaker -- bye-bye" << endm;
1064 Int_t StTofrMatchMaker::processEventYear5(){
1067 if(mHisto) mEventCounterHisto->Fill(0);
1069 mEvent = (
StEvent *) GetInputDS(
"StEvent");
1070 if (!validEvent(mEvent)){
1071 gMessMgr->Info(
"StTofrMatchMaker -- nothing to do ... bye-bye",
"OS");
1077 if (doPrintCpuInfo) timer.start();
1078 if (doPrintMemoryInfo) StMemoryInfo::instance()->snapshot();
1087 IntVec validchannel = mSortTofRawData->GetValidChannel();
1089 if(validchannel.size()<=0) {
1090 LOG_INFO <<
" No hits in TOF or pVPD! " << endm;
1093 LOG_INFO <<
" Number of TOF+pVPD fired hits: " << validchannel.size() << endm;
1096 for(
size_t iv=0;iv<validchannel.size();iv++) {
1098 LOG_INFO <<
" channel = " << validchannel[iv]<<endm;
1099 IntVec leTdc = mSortTofRawData->GetLeadingTdc(validchannel[iv]);
1100 IntVec teTdc = mSortTofRawData->GetTrailingTdc(validchannel[iv]);
1101 for(
size_t iv1=0;iv1<leTdc.size();iv1++) {
1102 LOG_INFO <<
" leading Tdc = " << leTdc[iv1]<<endm;
1104 for(
size_t iv2=0;iv2<teTdc.size();iv2++) {
1105 LOG_INFO <<
" trailing Tdc = " << teTdc[iv2] << endm;
1113 refmult = uncorrectedNumberOfPrimaries(*mEvent);
1116 LOG_INFO <<
" #Tracks :" << mEvent->summary()->numberOfTracks()
1117 <<
"\n #goodPrimaryTracks:" << mEvent->summary()->numberOfGoodPrimaryTracks()
1118 <<
"\n #uncorr.prim.tracks :" << refmult << endm;
1124 tofCellHitVector daqCellsHitVec;
1126 idVector validModuleVec;
1128 for(
size_t ich=0;ich<validchannel.size();ich++) {
1129 int ichan = validchannel[ich];
1130 if(ichan<0||ichan>=mNTOFR5)
continue;
1131 IntVec map = mDaqMap->Tofr5TDCChan2Cell(ichan);
1132 if(map.size()!=3)
continue;
1134 Int_t IDtray = map[0];
1135 Int_t IDmodule = map[1];
1136 Int_t IDcell = map[2];
1138 StructCellHit aDaqCellHit;
1139 aDaqCellHit.channel = ichan;
1140 aDaqCellHit.tray = IDtray;
1141 aDaqCellHit.module = IDmodule;
1142 aDaqCellHit.cell = IDcell;
1143 daqCellsHitVec.push_back(aDaqCellHit);
1146 int id = IDtray*100+IDmodule;
1147 bool ifind = kFALSE;
1148 for(
size_t iv=0;iv<validModuleVec.size();iv++) {
1149 if(
id==validModuleVec[iv]) {
1154 if(!ifind) validModuleVec.push_back(
id);
1159 LOG_INFO <<
" total # of cells = " << daqCellsHitVec.size() << endm;
1160 for(
size_t iv = 0;iv<validModuleVec.size();iv++) {
1161 LOG_INFO <<
" module # " << validModuleVec[iv] <<
" Valid! " << endm;
1165 mCellsMultInEvent->Fill(daqCellsHitVec.size());
1166 if(daqCellsHitVec.size()) mEventCounterHisto->Fill(6);
1168 if(!daqCellsHitVec.size())
return kStOK;
1173 tofCellHitVector allCellsHitVec;
1175 StructCellHit cellHit;
1177 StSPtrVecTrackNode& nodes = mEvent->trackNodes();
1179 for (
unsigned int iNode=0; iNode<nodes.size(); iNode++){
1180 tofCellHitVector cellHitVec;
1182 StTrack *theTrack = nodes[iNode]->track(global);
1185 if (validTrack(theTrack)){
1190 if(!mTofrGeom->projTrayVector(theHelix, projTrayVec))
continue;
1202 if(mTofrGeom->HelixCrossCellIds(theHelix, validModuleVec, projTrayVec, idVec, pathVec, crossVec)) {
1203 Int_t cells = idVec.size();
1204 for (Int_t i=0; i<cells; i++) {
1205 Int_t icell,imodule,itray;
1206 Double_t local[3],global[3];
1207 for(Int_t i2=0;i2<3;i2++){
1210 global[0]=crossVec[i].
x();
1211 global[1]=crossVec[i].y();
1212 global[2]=crossVec[i].z();
1213 mTofrGeom->DecodeCellId(idVec[i], icell, imodule, itray);
1214 LOG_INFO <<
" decode " << idVec[i] <<
" to tray#" << itray <<
" module#" << imodule <<
" cell#" << icell << endm;
1216 mTofrGeom->GetGeomSensor(imodule,itray);
1218 gMessMgr->Warning(
"",
"OS") <<
" No sensitive module in the projection??? -- Something weird!!! " << endm;
1221 sensor->Master2Local(&global[0],&local[0]);
1222 icell = sensor->FindCellIndex(local);
1228 Int_t Iarray = mDaqMap->Tofr5Cell2TDCChan(itray, imodule, icell);
1229 if(Iarray>=mDAQOVERFLOW||Iarray<0)
continue;
1231 cellHit.channel = Iarray;
1232 cellHit.tray = itray;
1233 cellHit.module = imodule;
1234 cellHit.cell = icell;
1235 cellHit.trackIdVec.push_back(iNode);
1236 cellHit.hitPosition = glo;
1237 cellHit.zhit = (Float_t)hitPos.z();
1238 cellHit.yhit = (Float_t)hitPos.y();
1239 cellHitVec.push_back(cellHit);
1240 allCellsHitVec.push_back(cellHit);
1242 mDaqOccupancyProj->Fill(Iarray);
1243 mHitsPosition->Fill(hitPos.y(), hitPos.z());
1247 LOG_INFO <<
"B: nodeid=" << iNode <<
" projected in " <<
" tray="<< itray <<
" module="<<imodule<<
" cell="<<icell<<endm;
1248 LOG_INFO <<
" hit position " << hitPos << endm;
1253 if(ncells>0&&mHisto) mHitsMultPerTrack->Fill(ncells);
1258 LOG_INFO <<
"B: matched/available/total #tracknodes: " <<allCellsHitVec.size() <<
"/" <<nAllTracks <<
"/" << nodes.size() << endm;
1260 mHitsMultInEvent->Fill(allCellsHitVec.size());
1261 if(allCellsHitVec.size()) mEventCounterHisto->Fill(7);
1268 tofCellHitVector matchHitCellsVec;
1271 tofCellHitVectorIter daqIter = daqCellsHitVec.begin();
1272 for(
unsigned int idaq=0;idaq<daqCellsHitVec.size();idaq++, daqIter++) {
1273 tofCellHitVectorIter proIter = allCellsHitVec.begin();
1274 for(
unsigned int ipro=0;ipro<allCellsHitVec.size();ipro++, proIter++) {
1275 if( (daqIter->tray==proIter->tray)&&
1276 (daqIter->module==proIter->module) &&
1277 ( ( (proIter->cell==6)&&((proIter->cell==daqIter->cell) ||
1278 (proIter->cell==daqIter->cell+1)) )
1279 || ( (proIter->cell==1)&&((proIter->cell==daqIter->cell) ||
1280 (proIter->cell==daqIter->cell-1)) )
1281 || ( (proIter->cell>=2&&proIter->cell<=6) &&
1282 ( (proIter->cell==daqIter->cell) ||
1283 (proIter->cell==daqIter->cell-1) ||
1284 (proIter->cell==daqIter->cell+1) ) ) ) ) {
1285 cellHit.channel = daqIter->channel;
1286 cellHit.tray = daqIter->tray;
1287 cellHit.module = daqIter->module;
1288 cellHit.cell = daqIter->cell;
1289 cellHit.hitPosition = proIter->hitPosition;
1290 cellHit.trackIdVec = proIter->trackIdVec;
1291 cellHit.zhit = proIter->zhit;
1292 cellHit.yhit = proIter->yhit;
1293 matchHitCellsVec.push_back(cellHit);
1298 LOG_INFO <<
"C: before/after: " << allCellsHitVec.size() <<
"/" << matchHitCellsVec.size() << endm;
1300 if(mHisto&&matchHitCellsVec.size()) mEventCounterHisto->Fill(8);
1305 Int_t nSingleHitCells(0);
1306 Int_t nMultiHitsCells(0);
1308 tofCellHitVector singleHitCellsVec;
1309 tofCellHitVector multiHitsCellsVec;
1313 tofCellHitVector tempVec = matchHitCellsVec;
1314 tofCellHitVector erasedVec = tempVec;
1315 while (tempVec.size() != 0) {
1317 idVector trackIdVec;
1319 tofCellHitVectorIter tempIter=tempVec.begin();
1320 tofCellHitVectorIter erasedIter=erasedVec.begin();
1321 while(erasedIter!= erasedVec.end()) {
1322 if(tempIter->tray == erasedIter->tray &&
1323 tempIter->module == erasedIter->module &&
1324 tempIter->cell == erasedIter->cell) {
1326 trackIdVec.push_back(erasedIter->trackIdVec.back());
1327 erasedVec.erase(erasedIter);
1333 cellHit.channel = tempIter->channel;
1334 cellHit.cell = tempIter->cell;
1335 cellHit.module = tempIter->module;
1336 cellHit.tray = tempIter->tray;
1337 cellHit.hitPosition = tempIter->hitPosition;
1338 cellHit.trackIdVec = trackIdVec;
1339 cellHit.zhit = tempIter->zhit;
1340 cellHit.yhit = tempIter->yhit;
1342 Float_t ycenter = (tempIter->cell-1-2.5)*mWidthPad;
1343 Float_t dy = tempIter->yhit - ycenter;
1344 Float_t dz = tempIter->zhit;
1347 mTracksPerCellMatch1->Fill(trackIdVec.size());
1348 mDaqOccupancyMatch1->Fill(tempIter->channel);
1349 mDeltaHitMatch1->Fill(dy, dz);
1354 singleHitCellsVec.push_back(cellHit);
1355 }
else if (nTracks>1){
1357 multiHitsCellsVec.push_back(cellHit);
1361 LOG_INFO <<
"D: no tracks extrapolate to matched cell ... should not happen!" << endm;
1365 LOG_INFO <<
"D: itray=" << cellHit.tray <<
" imodule=" << cellHit.module <<
" icell=" << cellHit.cell <<
"\ttrackid:";
1366 idVectorIter ij=trackIdVec.begin();
1367 while (ij != trackIdVec.end()) { LOG_INFO <<
" " << *ij; ij++; }
1371 tempVec = erasedVec;
1374 LOG_INFO <<
"D: before/after: " << matchHitCellsVec.size() <<
"/" << singleHitCellsVec.size() << endm;
1377 mCellsPerEventMatch1->Fill(singleHitCellsVec.size()+multiHitsCellsVec.size());
1378 if(singleHitCellsVec.size()) mEventCounterHisto->Fill(9);
1384 tofCellHitVector FinalMatchedCellsVec;
1386 tempVec = singleHitCellsVec;
1388 mCellsPerEventMatch2->Fill(tempVec.size());
1389 for(
unsigned int ii=0;ii<tempVec.size();ii++) {
1390 mTracksPerCellMatch2->Fill(tempVec[ii].trackIdVec.size());
1391 mDaqOccupancyMatch2->Fill(tempVec[ii].channel);
1392 Float_t ycenter = (tempVec[ii].cell-1-2.5)*mWidthPad;
1393 Float_t dy = tempVec[ii].yhit-ycenter;
1394 Float_t dz = tempVec[ii].zhit;
1395 mDeltaHitMatch2->Fill(dy, dz);
1399 erasedVec = tempVec;
1400 while (tempVec.size() != 0) {
1401 StructCellHit cellHit;
1404 vector<StThreeVectorD> vPosition;
1405 vector<Int_t> vchannel, vtray, vmodule, vcell;
1406 vector<Float_t> vzhit, vyhit;
1408 tofCellHitVectorIter tempIter=tempVec.begin();
1409 tofCellHitVectorIter erasedIter=erasedVec.begin();
1410 while(erasedIter!= erasedVec.end()) {
1411 if(tempIter->trackIdVec.back() == erasedIter->trackIdVec.back()) {
1413 vchannel.push_back(erasedIter->channel);
1414 vtray.push_back(erasedIter->tray);
1415 vmodule.push_back(erasedIter->module);
1416 vcell.push_back(erasedIter->cell);
1417 vPosition.push_back(erasedIter->hitPosition);
1418 vTrackId.push_back(erasedIter->trackIdVec.back());
1419 vzhit.push_back(erasedIter->zhit);
1420 vyhit.push_back(erasedIter->yhit);
1422 erasedVec.erase(erasedIter);
1430 cellHit.channel = vchannel[0];
1431 cellHit.tray = vtray[0];
1432 cellHit.module = vmodule[0];
1433 cellHit.cell = vcell[0];
1434 cellHit.trackIdVec.push_back(vTrackId[0]);
1435 cellHit.hitPosition = vPosition[0];
1436 cellHit.matchFlag = 0;
1437 cellHit.zhit = vzhit[0];
1438 cellHit.yhit = vyhit[0];
1440 FinalMatchedCellsVec.push_back(cellHit);
1444 LOG_INFO <<
"E: itray=" << cellHit.tray <<
" imodule=" << cellHit.module <<
" icell=" << cellHit.cell <<
"\ttrackid:";
1445 idVectorIter ij=vTrackId.begin();
1446 while (ij != vTrackId.end()) { LOG_INFO <<
" " << *ij; ij++; }
1451 Int_t thiscandidate(-99);
1452 Int_t thisMatchFlag(0);
1456 vector<Int_t> ssCandidates;
1458 if (Debug()) LOG_INFO <<
" ss " << endm;
1459 for (Int_t i=0;i<nCells;i++){
1460 Float_t yy = vyhit[i];
1461 Float_t ycell = (vcell[i]-1-2.5)*mWidthPad;
1462 Float_t ll = fabs(yy-ycell);
1465 ssCandidates.clear();
1466 ssCandidates.push_back(i);
1468 ssCandidates.push_back(i);
1470 if (ssCandidates.size()==1){
1471 thiscandidate = ssCandidates[0];
1472 Int_t daqId = vchannel[thiscandidate];
1473 if (Debug()) LOG_INFO <<
"candidate =" << daqId << endm;
1477 if (thiscandidate>=0) {
1478 cellHit.channel = vchannel[thiscandidate];
1479 cellHit.tray = vtray[thiscandidate];
1480 cellHit.module = vmodule[thiscandidate];
1481 cellHit.cell = vcell[thiscandidate];
1482 cellHit.trackIdVec.push_back(vTrackId[thiscandidate]);
1483 cellHit.hitPosition = vPosition[thiscandidate];
1484 cellHit.matchFlag = thisMatchFlag;
1485 cellHit.zhit = vzhit[thiscandidate];
1486 cellHit.yhit = vyhit[thiscandidate];
1488 FinalMatchedCellsVec.push_back(cellHit);
1492 LOG_INFO <<
"E: itray=" << cellHit.tray <<
" imodule=" << cellHit.module <<
" icell=" << cellHit.cell <<
"\ttrackid:" << vTrackId[thiscandidate] << endm;
1497 LOG_INFO <<
"E: no cells belong to this track ... should not happen!" << endm;
1500 tempVec = erasedVec;
1503 LOG_INFO <<
"E: before/after: " << singleHitCellsVec.size() <<
"/" << FinalMatchedCellsVec.size() << endm;
1511 tempVec = FinalMatchedCellsVec;
1513 if(FinalMatchedCellsVec.size()) mEventCounterHisto->Fill(10);
1514 mCellsPerEventMatch3->Fill(tempVec.size());
1515 for(
unsigned int ii=0;ii<tempVec.size();ii++) {
1516 mTracksPerCellMatch3->Fill(tempVec[ii].trackIdVec.size());
1517 mDaqOccupancyMatch3->Fill(tempVec[ii].channel);
1518 Float_t ycenter = (tempVec[ii].cell-1-2.5)*mWidthPad;
1519 Float_t dy = tempVec[ii].yhit - ycenter;
1520 Float_t dz = tempVec[ii].zhit;
1521 mDeltaHitMatch3->Fill(dy, dz);
1526 Int_t nValidSingleHitCells(0), nValidSinglePrimHitCells(0);
1528 for (
size_t ii=0; ii < FinalMatchedCellsVec.size(); ii++){
1529 Int_t daqId = FinalMatchedCellsVec[ii].channel;
1531 Int_t tray = FinalMatchedCellsVec[ii].tray;
1532 Int_t module = FinalMatchedCellsVec[ii].module;
1533 Int_t cell = FinalMatchedCellsVec[ii].cell;
1535 Float_t ycenter = (cell-1-2.5)*mWidthPad;
1536 Float_t dy = FinalMatchedCellsVec[ii].yhit - ycenter;
1537 if (FinalMatchedCellsVec[ii].trackIdVec.size()!=1)
1538 LOG_INFO <<
"F: WHAT!?! mult.matched cell in single cell list " << daqId << endm;
1557 int letdc = (mSortTofRawData->GetLeadingTdc(jj))[0];
1558 int tetdc=(mSortTofRawData->GetTrailingTdc(jj))[0];
1561 unsigned int trackNode = FinalMatchedCellsVec[ii].trackIdVec[0];
1562 StTrack *theTrack = nodes[trackNode]->track(primary);
1563 StTrack *globalTrack = nodes[trackNode]->track(global);
1566 if (validTofTrack(theTrack) && fabs(dy)<1.9 ){
1567 nValidSinglePrimHitCells++;
1570 Int_t nHitsPerTrack = theTrack->topologyMap().numberOfHits(kTpcId);
1579 Double_t pathLength = tofPathLength(&mEvent->primaryVertex()->position(),
1580 &FinalMatchedCellsVec[ii].hitPosition,
1581 theTrackGeometry->helix().curvature());
1591 Float_t dedx(0.), cherang(0);
1592 Int_t dedx_np(0), cherang_nph(0);
1593 StSPtrVecTrackPidTraits& traits = theTrack->pidTraits();
1594 for (
unsigned int it=0;it<traits.size();it++){
1595 if (traits[it]->detector() == kTpcId){
1597 if (pid && pid->method() ==kTruncatedMeanId){
1599 dedx_np = pid->numberOfPoints();
1601 }
else if (traits[it]->detector() == kRichId){
1605 if (pidinfo && pidinfo->getCherenkovPhotons()>2){
1606 cherang = pidinfo->getCherenkovAngle();
1607 cherang_nph = pidinfo->getCherenkovPhotons();
1620 StTofCell *tofCell =
new StTofCell(tray, module, cell, daqId, tetdc,letdc,theTrack,FinalMatchedCellsVec[ii].zhit,FinalMatchedCellsVec[ii].matchFlag,FinalMatchedCellsVec[ii].hitPosition);
1621 mCellCollection->push_back(tofCell);
1625 LOG_INFO <<
"F: itray=" << tray <<
" imodule=" << module <<
" icell=" << cell <<
"\tnodeid:";
1626 idVectorIter ij=FinalMatchedCellsVec[ii].trackIdVec.begin();
1627 while (ij != FinalMatchedCellsVec[ii].trackIdVec.end()) { LOG_INFO <<
" " << *ij; ij++; }
1628 LOG_INFO <<
"\tR=" << 1/(theTrackGeometry->helix().curvature())
1629 <<
"\tpT=" << momentum.perp() <<
"\tp=" << momentum.mag()
1630 <<
"\thits="<< nHitsPerTrack <<
"\ts="<< pathLength
1631 <<
"\t#fitp=" <<theTrack->fitTraits().numberOfFitPoints(kTpcId)
1633 <<
" \tdedx=" << dedx
1634 <<
" \tdca="<< globalTrack->geometry()->helix().
distance(mEvent->primaryVertex()->position())<<
" and "<<theTrackGeometry->helix().
distance(mEvent->primaryVertex()->position());
1635 if (cherang!=0) LOG_INFO <<
" \trich="<< cherang <<
" (" << cherang_nph <<
")";
1642 storeMatchData(mCellCollection,theTof);
1643 delete mCellCollection;
1645 delete mSortTofRawData;
1646 mSortTofRawData = 0;
1649 if (theTof->dataPresent())
1650 LOG_INFO <<
" TofCollection: raw data container present" << endm;
1651 if (theTof->cellsPresent()){
1652 LOG_INFO <<
" TofCollection: cell container present."<<endm;
1654 StSPtrVecTofCell& tmpCellTofVec = theTof->tofCells();
1655 LOG_INFO <<
" # of matched cells " << tmpCellTofVec.size() << endm;
1656 for (
size_t i = 0; i < tmpCellTofVec.size(); i++) {
1658 LOG_INFO << p->trayIndex() <<
" " << p->moduleIndex() <<
" " << p->cellIndex() <<
" " << p->trailingEdgeTime() <<
" " << p->leadingEdgeTime() <<
" " << p->associatedTrack() <<
" " << p->matchFlag() <<
" " << p->position() << endm;
1664 LOG_INFO <<
"F: before/after" << FinalMatchedCellsVec.size() <<
"/" <<nValidSinglePrimHitCells << endm;
1667 LOG_INFO <<
"#(cell tracks): " << allCellsHitVec.size()
1668 <<
" #(hit cells): " << FinalMatchedCellsVec.size()
1669 <<
"\n#(single hits): " << nSingleHitCells
1670 <<
" #(single valid hits): " << nValidSingleHitCells
1671 <<
" #(single prim valid hits): " << nValidSinglePrimHitCells
1676 if (doPrintMemoryInfo) {
1677 StMemoryInfo::instance()->snapshot();
1678 StMemoryInfo::instance()->print();
1680 if (doPrintCpuInfo) {
1682 LOG_INFO <<
"CPU time for StTofrMatchMaker::Make(): "
1683 << timer.elapsedTime() <<
" sec\n" << endm;
1686 LOG_INFO <<
"StTofrMatchMaker -- bye-bye" << endm;
1694 Int_t StTofrMatchMaker::processEventYear8(){
1697 if(Debug()) LOG_INFO <<
" processing event in run 8 " << endm;
1698 if(mHisto) mEventCounterHisto->Fill(0);
1700 mEvent = (
StEvent *) GetInputDS(
"StEvent");
1702 if(!mEvent || !(mEvent->tofCollection()) || !(mEvent->tofCollection()->rawdataPresent()) ) {
1703 gMessMgr->Info(
"StTofrMatchMaker -- nothing to do ... bye-bye",
"OS");
1706 if(mHisto) mEventCounterHisto->Fill(1);
1710 if (doPrintCpuInfo) timer.start();
1711 if (doPrintMemoryInfo) StMemoryInfo::instance()->snapshot();
1724 tofCellHitVector daqCellsHitVec;
1726 idVector validModuleVec;
1731 IntVec validtray = mDaqMap->ValidTrays();
1732 for(
size_t i=0;i<validtray.size();i++) {
1733 int trayId = validtray[i];
1734 IntVec validchannel = mSortTofRawData->GetValidChannel(trayId);
1735 if(Debug()) LOG_INFO <<
" Number of fired hits on tray " << trayId <<
" = " << validchannel.size() << endm;
1737 for(
size_t iv=0;iv<validchannel.size();iv++) {
1738 IntVec leTdc = mSortTofRawData->GetLeadingTdc(trayId, validchannel[iv], kTRUE);
1739 IntVec teTdc = mSortTofRawData->GetTrailingTdc(trayId, validchannel[iv], kTRUE);
1741 if(!leTdc.size() || !teTdc.size())
continue;
1743 int chan = validchannel[iv];
1744 IntVec map = mDaqMap->TDIGChan2Cell(chan);
1745 int moduleId = map[0];
1746 int cellId = map[1];
1748 StructCellHit aDaqCellHit;
1749 aDaqCellHit.channel = chan;
1750 aDaqCellHit.tray = trayId;
1751 aDaqCellHit.module = moduleId;
1752 aDaqCellHit.cell = cellId;
1753 daqCellsHitVec.push_back(aDaqCellHit);
1756 int id = trayId*100+moduleId;
1757 bool ifind = kFALSE;
1758 for(
size_t im=0;im<validModuleVec.size();im++) {
1759 if(
id==validModuleVec[im]) {
1764 if(!ifind) validModuleVec.push_back(
id);
1768 mDaqOccupancyValid->Fill((moduleId-1)*mNCell+(cellId-1));
1769 mDaqOccupancyValidAll->Fill((trayId-76)*mNTOF+(moduleId-1)*mNCell+(cellId-1));
1774 int dataIndex = (trayId-1)*mNTOF + (moduleId-1)*mNCell + (cellId-1);
1776 theTof->addData(aData);
1779 for(
size_t iv1=0;iv1<leTdc.size();iv1++) {
1780 LOG_INFO <<
" leading Tdc = " << leTdc[iv1]<<endm;
1782 for(
size_t iv2=0;iv2<teTdc.size();iv2++) {
1783 LOG_INFO <<
" trailing Tdc = " << teTdc[iv2] << endm;
1791 for(
int ivpd=0;ivpd<2;ivpd++) {
1792 int trayId = (ivpd==0) ? mWestVpdTrayId : mEastVpdTrayId;
1793 IntVec validtube = mSortTofRawData->GetValidChannel(trayId);
1794 if(Debug()) LOG_INFO <<
" Number of fired hits on tray(vpd) " << trayId <<
" = " << validtube.size() << endm;
1796 if(!validtube.size())
continue;
1797 for(
int i=0;i<mNVPD;i++) {
1799 int lechan = (ivpd==0) ? mDaqMap->WestPMT2TDIGLeChan(tubeId) : mDaqMap->EastPMT2TDIGLeChan(tubeId);
1800 IntVec leTdc = mSortTofRawData->GetLeadingTdc(trayId, lechan, kTRUE);
1801 IntVec teTdc = mSortTofRawData->GetTrailingTdc(trayId, lechan, kTRUE);
1803 if(leTdc.size()&&mHisto) mDaqOccupancyVpd->Fill(ivpd*mNVPD+i);
1805 if(leTdc.size() && teTdc.size()) {
1806 int dataIndex = (ivpd+120)*mNTOF + (tubeId-1);
1808 theTof->addData(aData);
1810 if(mHisto) mDaqOccupancyValidVpd->Fill(ivpd*mNVPD+i);
1818 LOG_INFO <<
" total # of cells = " << daqCellsHitVec.size() << endm;
1819 for(
size_t iv = 0;iv<validModuleVec.size();iv++) {
1820 LOG_INFO <<
" module # " << validModuleVec[iv] <<
" Valid! " << endm;
1824 mCellsMultInEvent->Fill(daqCellsHitVec.size());
1825 if(daqCellsHitVec.size()) mEventCounterHisto->Fill(6);
1832 tofCellHitVector allCellsHitVec;
1834 StructCellHit cellHit;
1836 StSPtrVecTrackNode& nodes = mEvent->trackNodes();
1838 for (
unsigned int iNode=0; iNode<nodes.size(); iNode++){
1839 tofCellHitVector cellHitVec;
1842 if(!theTrack)
continue;
1845 float pt = mom.perp();
1846 float eta = mom.pseudoRapidity();
1847 float phi = mom.phi();
1848 if (phi<0.) phi += 2.*3.14159;
1852 float nSigmaPion = -999.;
1854 static StPionPlus* Pion = StPionPlus::instance();
1858 nSigmaPion = PidAlgorithm.numberOfSigma(Pion);
1860 if ( PidAlgorithm.traits() ) {
1861 dEdx = PidAlgorithm.traits()->mean();
1862 ndEdxpts = PidAlgorithm.traits()->numberOfPoints();
1864 int nfitpts = theTrack->fitTraits().numberOfFitPoints(kTpcId);
1870 if (validTrackRun8(theTrack)){
1872 mTrackPtEta->Fill(pt, eta);
1873 mTrackPtPhi->Fill(pt, phi);
1874 mTrackNFitPts->Fill(nfitpts);
1875 if(dEdx>0.) mTrackdEdxvsp->Fill(mom.mag(), dEdx*1.e6);
1876 if(fabs(nSigmaPion)<5.) mNSigmaPivsPt->Fill(pt, nSigmaPion+5.*theTrack->geometry()->charge());
1881 trackTree.eta = eta;
1882 trackTree.phi = phi;
1883 trackTree.nfitpts = nfitpts;
1884 trackTree.dEdx = dEdx*1.e6;
1885 trackTree.ndEdxpts = ndEdxpts;
1886 trackTree.charge = theTrack->geometry()->charge();
1887 trackTree.projTrayId = 0;
1888 trackTree.projCellChan = -1;
1889 trackTree.projY = -999.;
1890 trackTree.projZ = -999.;
1908 if(mTofrGeom->HelixCrossCellIds(theHelix,idVec,pathVec,crossVec) ) {
1910 Int_t cells = idVec.size();
1911 for (Int_t i=0; i<cells; i++) {
1912 Int_t icell,imodule,itray;
1913 Double_t local[3],global[3];
1914 for(Int_t i2=0;i2<3;i2++){
1917 global[0]=crossVec[i].
x();
1918 global[1]=crossVec[i].y();
1919 global[2]=crossVec[i].z();
1920 mTofrGeom->DecodeCellId(idVec[i], icell, imodule, itray);
1921 LOG_INFO <<
" decode " << idVec[i] <<
" to tray#" << itray <<
" module#" << imodule <<
" cell#" << icell << endm;
1923 mTofrGeom->GetGeomSensor(imodule,itray);
1925 gMessMgr->Warning(
"",
"OS") <<
" No sensitive module in the projection??? -- Something weird!!! " << endm;
1928 sensor->Master2Local(&global[0],&local[0]);
1929 icell = sensor->FindCellIndex(local);
1934 if (local[2]<=2.7&&local[2]>=-3.4) {
1935 Int_t Iarray = mDaqMap->Cell2TDIGChan(imodule, icell);
1936 if(Iarray>=mDAQOVERFLOW||Iarray<0)
continue;
1938 cellHit.channel = Iarray;
1939 cellHit.tray = itray;
1940 cellHit.module = imodule;
1941 cellHit.cell = icell;
1942 cellHit.trackIdVec.push_back(iNode);
1943 cellHit.hitPosition = glo;
1944 cellHit.zhit = (Float_t)hitPos.z();
1945 cellHit.yhit = (Float_t)hitPos.y();
1946 cellHitVec.push_back(cellHit);
1947 allCellsHitVec.push_back(cellHit);
1950 if(itray>=76&&itray<=80) {
1951 mDaqOccupancyProj->Fill((imodule-1)*mNCell+(icell-1));
1952 mDaqOccupancyProjAll->Fill((itray-76)*mNTOF+(imodule-1)*mNCell+(icell-1));
1953 mHitsPosition->Fill(hitPos.y(), hitPos.z());
1958 trackTree.projTrayId = itray;
1959 trackTree.projCellChan = (imodule-1)*mNCell+(icell-1);
1960 trackTree.projY = local[1];
1961 trackTree.projZ = local[2];
1965 LOG_INFO <<
"B: nodeid=" << iNode <<
" projected in " <<
" tray="<< itray <<
" module="<<imodule<<
" cell="<<icell<<endm;
1966 LOG_INFO <<
" hit position " << hitPos << endm;
1971 if(ncells>0&&mHisto) mHitsMultPerTrack->Fill(ncells);
1973 if(mHisto && mSaveTree) mTrackTree->Fill();
1978 LOG_INFO <<
"B: matched/available/total #tracknodes: " <<allCellsHitVec.size() <<
"/" <<nAllTracks <<
"/" << nodes.size() << endm;
1980 mHitsMultInEvent->Fill(allCellsHitVec.size());
1981 if(allCellsHitVec.size()) mEventCounterHisto->Fill(7);
1988 tofCellHitVector matchHitCellsVec;
1991 tofCellHitVectorIter daqIter = daqCellsHitVec.begin();
1992 for(
unsigned int idaq=0;idaq<daqCellsHitVec.size();idaq++, daqIter++) {
1993 tofCellHitVectorIter proIter = allCellsHitVec.begin();
1994 for(
unsigned int ipro=0;ipro<allCellsHitVec.size();ipro++, proIter++) {
1996 int daqIndex = (daqIter->module-1)*6 + (daqIter->cell-1);
1997 int proIndex = (proIter->module-1)*6 + (proIter->cell-1);
1998 int hisIndex = daqIter->tray - 76;
1999 int daqAllIndex = (daqIter->tray - 76)*192 + daqIndex;
2000 int proAllIndex = (proIter->tray - 76)*192 + proIndex;
2001 if (mHisto) mHitCorrAll->Fill(proAllIndex,daqAllIndex);
2002 if(daqIter->tray==proIter->tray) {
2004 if(hisIndex>=0&&hisIndex<5) {
2005 mHitCorr[hisIndex]->Fill(proIndex,daqIndex);
2006 mHitCorrModule[hisIndex]->Fill(proIter->module-1,daqIter->module-1);
2008 cout <<
" weird tray # " << daqIter->tray << endl;
2012 if( (daqIter->tray==proIter->tray)&&
2013 (daqIter->module==proIter->module) &&
2014 ( ( (proIter->cell==6)&&((proIter->cell==daqIter->cell) ||
2015 (proIter->cell==daqIter->cell+1)) )
2016 || ( (proIter->cell==1)&&((proIter->cell==daqIter->cell) ||
2017 (proIter->cell==daqIter->cell-1)) )
2018 || ( (proIter->cell>=2&&proIter->cell<=6) &&
2019 ( (proIter->cell==daqIter->cell) ||
2020 (proIter->cell==daqIter->cell-1) ||
2021 (proIter->cell==daqIter->cell+1) ) ) ) ) {
2022 cellHit.channel = daqIter->channel;
2023 cellHit.tray = daqIter->tray;
2024 cellHit.module = daqIter->module;
2025 cellHit.cell = daqIter->cell;
2026 cellHit.hitPosition = proIter->hitPosition;
2027 cellHit.trackIdVec = proIter->trackIdVec;
2028 cellHit.zhit = proIter->zhit;
2029 cellHit.yhit = proIter->yhit;
2030 matchHitCellsVec.push_back(cellHit);
2035 LOG_INFO <<
"C: before/after: " << allCellsHitVec.size() <<
"/" << matchHitCellsVec.size() << endm;
2037 if(mHisto&&matchHitCellsVec.size()) mEventCounterHisto->Fill(8);
2042 Int_t nSingleHitCells(0);
2043 Int_t nMultiHitsCells(0);
2045 tofCellHitVector singleHitCellsVec;
2046 tofCellHitVector multiHitsCellsVec;
2050 tofCellHitVector tempVec = matchHitCellsVec;
2051 tofCellHitVector erasedVec = tempVec;
2052 while (tempVec.size() != 0) {
2054 idVector trackIdVec;
2056 tofCellHitVectorIter tempIter=tempVec.begin();
2057 tofCellHitVectorIter erasedIter=erasedVec.begin();
2058 while(erasedIter!= erasedVec.end()) {
2059 if(tempIter->tray == erasedIter->tray &&
2060 tempIter->module == erasedIter->module &&
2061 tempIter->cell == erasedIter->cell) {
2063 trackIdVec.push_back(erasedIter->trackIdVec.back());
2064 erasedVec.erase(erasedIter);
2070 cellHit.channel = tempIter->channel;
2071 cellHit.cell = tempIter->cell;
2072 cellHit.module = tempIter->module;
2073 cellHit.tray = tempIter->tray;
2074 cellHit.hitPosition = tempIter->hitPosition;
2075 cellHit.trackIdVec = trackIdVec;
2076 cellHit.zhit = tempIter->zhit;
2077 cellHit.yhit = tempIter->yhit;
2079 Float_t ycenter = (tempIter->cell-1-2.5)*mWidthPad;
2080 Float_t dy = tempIter->yhit - ycenter;
2081 Float_t dz = tempIter->zhit;
2084 mTracksPerCellMatch1->Fill(trackIdVec.size());
2086 mDaqOccupancyMatch1->Fill((tempIter->module-1)*mNCell+(tempIter->cell-1));
2087 mDeltaHitMatch1->Fill(dy, dz);
2092 singleHitCellsVec.push_back(cellHit);
2093 }
else if (nTracks>1){
2095 multiHitsCellsVec.push_back(cellHit);
2099 LOG_INFO <<
"D: no tracks extrapolate to matched cell ... should not happen!" << endm;
2103 LOG_INFO <<
"D: itray=" << cellHit.tray <<
" imodule=" << cellHit.module <<
" icell=" << cellHit.cell <<
"\ttrackid:";
2104 idVectorIter ij=trackIdVec.begin();
2105 while (ij != trackIdVec.end()) { LOG_INFO <<
" " << *ij; ij++; }
2109 tempVec = erasedVec;
2112 LOG_INFO <<
"D: before/after: " << matchHitCellsVec.size() <<
"/" << singleHitCellsVec.size() << endm;
2115 mCellsPerEventMatch1->Fill(singleHitCellsVec.size()+multiHitsCellsVec.size());
2116 if(singleHitCellsVec.size()) mEventCounterHisto->Fill(9);
2122 tofCellHitVector FinalMatchedCellsVec;
2124 tempVec = singleHitCellsVec;
2126 mCellsPerEventMatch2->Fill(tempVec.size());
2127 for(
unsigned int ii=0;ii<tempVec.size();ii++) {
2128 mTracksPerCellMatch2->Fill(tempVec[ii].trackIdVec.size());
2130 mDaqOccupancyMatch2->Fill((tempVec[ii].module-1)*mNCell+(tempVec[ii].cell-1));
2131 Float_t ycenter = (tempVec[ii].cell-1-2.5)*mWidthPad;
2132 Float_t dy = tempVec[ii].yhit-ycenter;
2133 Float_t dz = tempVec[ii].zhit;
2134 mDeltaHitMatch2->Fill(dy, dz);
2138 erasedVec = tempVec;
2139 while (tempVec.size() != 0) {
2140 StructCellHit cellHit;
2143 vector<StThreeVectorD> vPosition;
2144 vector<Int_t> vchannel, vtray, vmodule, vcell;
2145 vector<Float_t> vzhit, vyhit;
2147 tofCellHitVectorIter tempIter=tempVec.begin();
2148 tofCellHitVectorIter erasedIter=erasedVec.begin();
2149 while(erasedIter!= erasedVec.end()) {
2150 if(tempIter->trackIdVec.back() == erasedIter->trackIdVec.back()) {
2152 vchannel.push_back(erasedIter->channel);
2153 vtray.push_back(erasedIter->tray);
2154 vmodule.push_back(erasedIter->module);
2155 vcell.push_back(erasedIter->cell);
2156 vPosition.push_back(erasedIter->hitPosition);
2157 vTrackId.push_back(erasedIter->trackIdVec.back());
2158 vzhit.push_back(erasedIter->zhit);
2159 vyhit.push_back(erasedIter->yhit);
2161 erasedVec.erase(erasedIter);
2169 cellHit.channel = vchannel[0];
2170 cellHit.tray = vtray[0];
2171 cellHit.module = vmodule[0];
2172 cellHit.cell = vcell[0];
2173 cellHit.trackIdVec.push_back(vTrackId[0]);
2174 cellHit.hitPosition = vPosition[0];
2175 cellHit.matchFlag = 0;
2176 cellHit.zhit = vzhit[0];
2177 cellHit.yhit = vyhit[0];
2179 FinalMatchedCellsVec.push_back(cellHit);
2183 LOG_INFO <<
"E: itray=" << cellHit.tray <<
" imodule=" << cellHit.module <<
" icell=" << cellHit.cell <<
"\ttrackid:";
2184 idVectorIter ij=vTrackId.begin();
2185 while (ij != vTrackId.end()) { LOG_INFO <<
" " << *ij; ij++; }
2190 Int_t thiscandidate(-99);
2191 Int_t thisMatchFlag(0);
2195 vector<Int_t> ssCandidates;
2197 if (Debug()) LOG_INFO <<
" ss " << endm;
2198 for (Int_t i=0;i<nCells;i++){
2199 Float_t yy = vyhit[i];
2200 Float_t ycell = (vcell[i]-1-2.5)*mWidthPad;
2201 Float_t ll = fabs(yy-ycell);
2204 ssCandidates.clear();
2205 ssCandidates.push_back(i);
2207 ssCandidates.push_back(i);
2209 if (ssCandidates.size()==1){
2210 thiscandidate = ssCandidates[0];
2211 Int_t daqId = vchannel[thiscandidate];
2212 if (Debug()) LOG_INFO <<
"candidate =" << daqId << endm;
2216 if (thiscandidate>=0) {
2217 cellHit.channel = vchannel[thiscandidate];
2218 cellHit.tray = vtray[thiscandidate];
2219 cellHit.module = vmodule[thiscandidate];
2220 cellHit.cell = vcell[thiscandidate];
2221 cellHit.trackIdVec.push_back(vTrackId[thiscandidate]);
2222 cellHit.hitPosition = vPosition[thiscandidate];
2223 cellHit.matchFlag = thisMatchFlag;
2224 cellHit.zhit = vzhit[thiscandidate];
2225 cellHit.yhit = vyhit[thiscandidate];
2227 FinalMatchedCellsVec.push_back(cellHit);
2231 LOG_INFO <<
"E: itray=" << cellHit.tray <<
" imodule=" << cellHit.module <<
" icell=" << cellHit.cell <<
"\ttrackid:" << vTrackId[thiscandidate] << endm;
2236 LOG_INFO <<
"E: no cells belong to this track ... should not happen!" << endm;
2239 tempVec = erasedVec;
2242 LOG_INFO <<
"E: before/after: " << singleHitCellsVec.size() <<
"/" << FinalMatchedCellsVec.size() << endm;
2250 tempVec = FinalMatchedCellsVec;
2252 if(FinalMatchedCellsVec.size()) mEventCounterHisto->Fill(10);
2253 mCellsPerEventMatch3->Fill(tempVec.size());
2254 for(
unsigned int ii=0;ii<tempVec.size();ii++) {
2255 mTracksPerCellMatch3->Fill(tempVec[ii].trackIdVec.size());
2257 mDaqOccupancyMatch3->Fill((tempVec[ii].module-1)*mNCell+(tempVec[ii].cell-1));
2258 Float_t ycenter = (tempVec[ii].cell-1-2.5)*mWidthPad;
2259 Float_t dy = tempVec[ii].yhit - ycenter;
2260 Float_t dz = tempVec[ii].zhit;
2261 mDeltaHitMatch3->Fill(dy, dz);
2266 Int_t nValidSingleHitCells(0), nValidSinglePrimHitCells(0);
2268 for (
size_t ii=0; ii < FinalMatchedCellsVec.size(); ii++){
2269 Int_t daqId = FinalMatchedCellsVec[ii].channel;
2271 Int_t tray = FinalMatchedCellsVec[ii].tray;
2272 Int_t module = FinalMatchedCellsVec[ii].module;
2273 Int_t cell = FinalMatchedCellsVec[ii].cell;
2277 if (FinalMatchedCellsVec[ii].trackIdVec.size()!=1)
2278 LOG_INFO <<
"F: WHAT!?! mult.matched cell in single cell list " << daqId << endm;
2283 int tmptdc = (mSortTofRawData->GetLeadingTdc(tray,jj,kTRUE))[0];
2284 int bin = (int)tmptdc&0x3ff;
2285 double tmptdc_f = tmptdc + mTofINLCorr->getTrayINLCorr(tray, jj, bin);
2286 double letime = tmptdc_f*VHRBIN2PS / 1000.;
2288 tmptdc=(mSortTofRawData->GetTrailingTdc(tray,jj,kTRUE))[0];
2289 bin = (int)tmptdc&0x3ff;
2290 tmptdc_f = tmptdc + mTofINLCorr->getTrayINLCorr(tray, jj, bin);
2291 double tetime = tmptdc_f*VHRBIN2PS / 1000.;
2294 unsigned int trackNode = FinalMatchedCellsVec[ii].trackIdVec[0];
2296 StTrack *globalTrack = nodes[trackNode]->track(global);
2300 nValidSinglePrimHitCells++;
2312 StTofCell *tofCell =
new StTofCell(tray, module, cell, daqId, globalTrack, FinalMatchedCellsVec[ii].zhit, FinalMatchedCellsVec[ii].matchFlag, FinalMatchedCellsVec[ii].hitPosition);
2313 tofCell->setLeadingEdgeTime(letime);
2314 tofCell->setTrailingEdgeTime(tetime);
2315 mCellCollection->push_back(tofCell);
2319 LOG_INFO <<
"F: itray=" << tray <<
" imodule=" << module <<
" icell=" << cell <<
"\tnodeid:";
2320 idVectorIter ij=FinalMatchedCellsVec[ii].trackIdVec.begin();
2321 while (ij != FinalMatchedCellsVec[ii].trackIdVec.end()) { LOG_INFO <<
" " << *ij; ij++; }
2330 StSPtrVecTofData &tofData = theTof->tofData();
2331 for(
size_t ii = 0; ii<tofData.size(); ii++) {
2333 if(!aData)
continue;
2335 int dataIndex = aData->dataIndex();
2336 int trayId = dataIndex / mNTOF;
2337 if(trayId<120)
continue;
2338 int ewId = trayId - 120 + 1;
2340 int tubeId = dataIndex % mNTOF + 1;
2341 int lechan = (ewId==1) ? mDaqMap->WestPMT2TDIGLeChan(tubeId) : mDaqMap->EastPMT2TDIGLeChan(tubeId);
2342 int techan = (ewId==1) ? mDaqMap->WestPMT2TDIGTeChan(tubeId) : mDaqMap->EastPMT2TDIGTeChan(tubeId);
2344 int tmptdc = aData->leadingTdc();
2345 int bin = (int)tmptdc&0x3ff;
2346 double tmptdc_f = tmptdc + mTofINLCorr->getVpdINLCorr(ewId, lechan, bin);
2347 double letime = tmptdc_f*VHRBIN2PS / 1000.;
2349 tmptdc = aData->trailingTdc();
2350 bin = (int)tmptdc&0x3ff;
2351 tmptdc_f = tmptdc + mTofINLCorr->getVpdINLCorr(ewId, techan, bin);
2352 double tetime = tmptdc_f*VHRBIN2PS / 1000.;
2356 tofCell->setLeadingEdgeTime(letime);
2357 tofCell->setTrailingEdgeTime(tetime);
2358 mCellCollection->push_back(tofCell);
2361 LOG_INFO <<
"F: itray=" << trayId <<
" imodule=" << 0 <<
" itube=" << tubeId <<
" letime=" << letime <<
" tetime=" << tetime << endm;
2366 storeMatchData(mCellCollection,theTof);
2367 delete mCellCollection;
2369 delete mSortTofRawData;
2370 mSortTofRawData = 0;
2373 if (theTof->dataPresent())
2374 LOG_INFO <<
" TofCollection: raw data container present" << endm;
2375 if (theTof->cellsPresent()){
2376 LOG_INFO <<
" TofCollection: cell container present."<<endm;
2378 StSPtrVecTofCell& tmpCellTofVec = theTof->tofCells();
2379 LOG_INFO <<
" # of matched cells " << tmpCellTofVec.size() << endm;
2380 for (
size_t i = 0; i < tmpCellTofVec.size(); i++) {
2382 LOG_INFO << p->trayIndex() <<
" " << p->moduleIndex() <<
" " << p->cellIndex() <<
" " << p->trailingEdgeTime() <<
" " << p->leadingEdgeTime() <<
" " << p->associatedTrack() <<
" " << p->matchFlag() <<
" " << p->position() << endm;
2388 LOG_INFO <<
"F: before/after" << FinalMatchedCellsVec.size() <<
"/" <<nValidSinglePrimHitCells << endm;
2391 LOG_INFO <<
"#(cell tracks): " << allCellsHitVec.size()
2392 <<
" #(hit cells): " << FinalMatchedCellsVec.size()
2393 <<
"\n#(single hits): " << nSingleHitCells
2394 <<
" #(single valid hits): " << nValidSingleHitCells
2395 <<
" #(single prim valid hits): " << nValidSinglePrimHitCells
2400 if (doPrintMemoryInfo) {
2401 StMemoryInfo::instance()->snapshot();
2402 StMemoryInfo::instance()->print();
2404 if (doPrintCpuInfo) {
2406 LOG_INFO <<
"CPU time for StTofrMatchMaker::Make(): "
2407 << timer.elapsedTime() <<
" sec\n" << endm;
2410 LOG_INFO <<
"StTofrMatchMaker -- bye-bye" << endm;
2422 LOG_INFO <<
"Error: no TofCollection -- returning" << endm;
2426 for (
size_t j=0;j<cellCollection->size();j++){
2427 tofCollection->addCell(cellCollection->getCell(j));
2429 LOG_INFO <<
"storing " << j <<
" " <<
" tray:"
2430 << cellCollection->getCell(j)->trayIndex() <<
" module:"
2431 << cellCollection->getCell(j)->moduleIndex() <<
" cell:"
2432 << cellCollection->getCell(j)->cellIndex() << endm;
2441 if (!tofCollection)
return kStERR;
2442 LOG_INFO <<
" Read in tof data ... " << endm;
2443 StSPtrVecTofData &tofData = tofCollection->tofData();
2447 LOG_INFO <<
"TOF raw data consistency test ...";
2449 Int_t tofsize = tofData.size();
2453 gMessMgr->Warning(
"The size of tofData is NOT 184!",
"OS");
2464 for (Int_t i=0;i<nTOFr;i++){
2465 Int_t iAdc = mDaqMap->DaqChan2ADCChan(i);
2466 mTofrAdc[i] = tofData[iAdc]->adc();
2467 Int_t iTdc = mDaqMap->DaqChan2TDCChan(i);
2468 mTofrTdc[i] = tofData[iTdc]->tdc();
2471 for (Int_t i=0;i<6;i++){
2472 mPvpdAdc[i] = tofData[42+i]->adc();
2473 mPvpdTdc[i] = tofData[42+i]->tdc();
2475 mPvpdAdcLoRes[i] = tofData[54+i]->adc();
2486 void StTofrMatchMaker::bookHistograms(
void){
2488 mEventCounterHisto =
new TH1D(
"eventCounter",
"eventCounter",20,0,20);
2490 mADCTDCCorelation =
new TH2D(
"ADCTDCCorelation",
"ADCTDCCorelation",200,0,200,200,0,200);
2491 mCellsMultInEvent =
new TH1D(
"cellsPerEvent",
"cellsPerEvent",100,0,100);
2492 mHitsMultInEvent =
new TH1D(
"hitsPerEvent",
"hitsPerEvent",100,0,100);
2493 mHitsMultPerTrack =
new TH1D(
"hitsPerTrack",
"hitsPerTrack",10,0,10);
2494 mDaqOccupancy =
new TH1D(
"daqOccupancy",
"daqOccupancy",192,0,192);
2495 mDaqOccupancyValid=
new TH1D(
"daqOccupancyValid",
"daqOccupancyValid",192,0,192);
2496 mDaqOccupancyProj =
new TH1D(
"daqOccupancyProj",
"daqOccupancyProj",192,0,192);
2497 mHitsPosition =
new TH2D(
"hitsPosition",
"hitsPositions",300,-15.,15.,200,-5.,5.);
2499 mDaqOccupancyValidAll =
new TH1D(
"daqOccupancyValidAll",
"",960,0,960);
2500 mDaqOccupancyProjAll =
new TH1D(
"daqOccupancyProjAll",
"",960,0,960);
2502 mDaqOccupancyVpd =
new TH1D(
"daqOccupancyVpd",
"",38,0,38);
2503 mDaqOccupancyValidVpd =
new TH1D(
"daqOccupancyValidVpd",
"",38,0,38);
2506 for(
int i=0;i<mNValidTrays_Run8;i++) {
2508 sprintf(hisname,
"Tray_%d",i+76);
2509 mHitCorr[i] =
new TH2D(hisname,
"",192,0,192,192,0,192);
2510 sprintf(hisname,
"Tray_%d_module",i+76);
2511 mHitCorrModule[i] =
new TH2D(hisname,
"",32,0,32,32,0,32);
2513 mHitCorrAll =
new TH2D(
"Tray_All",
"",960,0,960,960,0,960);
2517 mTrackTree =
new TTree(
"track",
"track");
2518 mTrackTree->Branch(
"pt",&trackTree.pt,
"pt/F");
2519 mTrackTree->Branch(
"eta",&trackTree.eta,
"eta/F");
2520 mTrackTree->Branch(
"phi",&trackTree.phi,
"phi/F");
2521 mTrackTree->Branch(
"nfitpts",&trackTree.nfitpts,
"nfitpts/I");
2522 mTrackTree->Branch(
"dEdx",&trackTree.dEdx,
"dEdx/F");
2523 mTrackTree->Branch(
"ndEdxpts",&trackTree.ndEdxpts,
"ndEdxpts/I");
2524 mTrackTree->Branch(
"charge",&trackTree.charge,
"charge/I");
2525 mTrackTree->Branch(
"projTrayId",&trackTree.projTrayId,
"projTrayId/I");
2526 mTrackTree->Branch(
"projCellChan",&trackTree.projCellChan,
"projCellChan/I");
2527 mTrackTree->Branch(
"projY",&trackTree.projY,
"projY/F");
2528 mTrackTree->Branch(
"projZ",&trackTree.projZ,
"projZ/F");
2531 mTrackPtEta =
new TH2D(
"trackPtEta",
"",100,0.,5.,60,-1.5,1.5);
2532 mTrackPtPhi =
new TH2D(
"trackPtPhi",
"",100,0.,5.,120,0.,2*3.14159);
2533 mTrackNFitPts =
new TH1D(
"trackNFitPts",
"",50,0.,50.);
2534 mTrackdEdxvsp =
new TH2D(
"trackdEdxvsp",
"",500,0.,5.,1000,0.,10.);
2535 mNSigmaPivsPt =
new TH2D(
"nSigmaPivsPt",
"",500,0.,5.,1000,-10.,10.);
2538 mCellsPerEventMatch1 =
new TH1D(
"cellsPerEventMatch1",
"cellPerEventMatch1",100,0,100);
2539 mHitsPerEventMatch1 =
new TH1D(
"hitsPerEventMatch1",
"hitsPerEventMatch1",100,0,100);
2540 mCellsPerTrackMatch1 =
new TH1D(
"cellsPerTrackMatch1",
"cellsPerTrackMatch1",100,0,100);
2541 mTracksPerCellMatch1 =
new TH1D(
"tracksPerCellMatch1",
"tracksPerCellMatch1",100,0,100);
2542 mDaqOccupancyMatch1 =
new TH1D(
"daqOccupancyMatch1",
"daqOccupancyMatch1",192,0,192);
2543 mDeltaHitMatch1 =
new TH2D(
"deltaHitMatch1",
"deltaHitMatch1",300,-15,15,200,-5.,5.);
2546 mCellsPerEventMatch2 =
new TH1D(
"cellsPerEventMatch2",
"cellPerEventMatch2",100,0,100);
2547 mHitsPerEventMatch2 =
new TH1D(
"hitsPerEventMatch2",
"hitsPerEventMatch2",100,0,100);
2548 mCellsPerTrackMatch2 =
new TH1D(
"cellsPerTrackMatch2",
"cellsPerTrackMatch2",100,0,100);
2549 mTracksPerCellMatch2 =
new TH1D(
"tracksPerCellMatch2",
"tracksPerCellMatch2",100,0,100);
2550 mDaqOccupancyMatch2 =
new TH1D(
"daqOccupancyMatch2",
"daqOccupancyMatch2",192,0,192);
2551 mDeltaHitMatch2 =
new TH2D(
"deltaHitMatch2",
"deltaHitMatch2",300,-15,15,200,-5.,5.);
2554 mCellsPerEventMatch3 =
new TH1D(
"cellsPerEventMatch3",
"cellPerEventMatch3",100,0,100);
2555 mHitsPerEventMatch3 =
new TH1D(
"hitsPerEventMatch3",
"hitsPerEventMatch3",100,0,100);
2556 mCellsPerTrackMatch3 =
new TH1D(
"cellsPerTrackMatch3",
"cellsPerTrackMatch3",100,0,100);
2557 mTracksPerCellMatch3 =
new TH1D(
"tracksPerCellMatch3",
"tracksPerCellMatch3",100,0,100);
2558 mDaqOccupancyMatch3 =
new TH1D(
"daqOccupancyMatch3",
"daqOccupancyMatch3",192,0,192);
2559 mDeltaHitMatch3 =
new TH2D(
"deltaHitMatch3",
"deltaHitMatch3",300,-15,15,200,-5.,5.);
2567 void StTofrMatchMaker::writeHistogramsToFile(){
2569 TFile *theHistoFile =
new TFile(mHistoFileName.c_str(),
"RECREATE");
2570 LOG_INFO <<
"StTofrMatchMaker::writeHistogramsToFile()"
2571 <<
" histogram file " << mHistoFileName << endm;
2577 mEventCounterHisto->Write();
2578 mADCTDCCorelation->Write();
2579 mCellsMultInEvent->Write();
2580 mHitsMultInEvent->Write();
2581 mHitsMultPerTrack->Write();
2582 mDaqOccupancy->Write();
2583 mDaqOccupancyValid->Write();
2584 mDaqOccupancyProj->Write();
2585 mHitsPosition->Write();
2587 mDaqOccupancyValidAll->Write();
2588 mDaqOccupancyProjAll->Write();
2589 mDaqOccupancyVpd->Write();
2590 mDaqOccupancyValidVpd->Write();
2592 for(
int i=0;i<mNValidTrays_Run8;i++) {
2593 mHitCorr[i]->Write();
2594 mHitCorrModule[i]->Write();
2596 mHitCorrAll->Write();
2598 mTrackPtEta->Write();
2599 mTrackPtPhi->Write();
2600 mTrackNFitPts->Write();
2601 mTrackdEdxvsp->Write();
2602 mNSigmaPivsPt->Write();
2604 mCellsPerEventMatch1->Write();
2605 mHitsPerEventMatch1->Write();
2606 mCellsPerTrackMatch1->Write();
2607 mTracksPerCellMatch1->Write();
2608 mDaqOccupancyMatch1->Write();
2609 mDeltaHitMatch1->Write();
2611 mCellsPerEventMatch2->Write();
2612 mHitsPerEventMatch2->Write();
2613 mCellsPerTrackMatch2->Write();
2614 mTracksPerCellMatch2->Write();
2615 mDaqOccupancyMatch2->Write();
2616 mDeltaHitMatch2->Write();
2618 mCellsPerEventMatch3->Write();
2619 mHitsPerEventMatch3->Write();
2620 mCellsPerTrackMatch3->Write();
2621 mTracksPerCellMatch3->Write();
2622 mDaqOccupancyMatch3->Write();
2623 mDeltaHitMatch3->Write();
2625 theHistoFile->Write();
2626 theHistoFile->Close();
2631 TFile *theTreeFile =
new TFile((mHistoFileName+
".tree.root").c_str(),
"RECREATE");
2633 mTrackTree->Write();
2634 theTreeFile->Write();
2635 theTreeFile->Close();
2644 bool StTofrMatchMaker::strobeEvent(StSPtrVecTofData& tofData){
2647 Int_t nStrobedPvpdTdcs=0;
2648 for(Int_t i=0;i<mNPVPD;i++)
2649 if((tofData[42+i]->tdc()>mStrobeTdcMin[i]) &&
2650 (tofData[42+i]->tdc()<mStrobeTdcMax[i]))
2653 if (nStrobedPvpdTdcs==mNPVPD)
return true;
2661 bool StTofrMatchMaker::validEvent(
StEvent *event){
2664 if (!event)
return false;
2665 if(mHisto) mEventCounterHisto->Fill(1);
2669 mAcceptedEventCounter++;
2670 if(mHisto) mEventCounterHisto->Fill(2);
2673 if (!event->tofCollection()){
2674 LOG_INFO <<
"TOF is not present" << endm;
2677 if(mHisto) mEventCounterHisto->Fill(3);
2680 if (!(event->tofCollection()->dataPresent()||
event->tofCollection()->rawdataPresent())){
2681 LOG_INFO <<
"TOF is present but no Raw Data" << endm;
2682 if (!(event->tofCollection()->cellsPresent())){
2683 LOG_INFO <<
" and no Cell Data" << endm;
2688 if(mHisto) mEventCounterHisto->Fill(4);
2693 if(event->tofCollection()->dataPresent()) {
2694 StSPtrVecTofData &tofData =
event->tofCollection()->tofData();
2695 LOG_INFO <<
" tofData size = " << tofData.size() << endm;
2696 if (strobeEvent(tofData)){
2697 mTofStrobeEventCounter++;
2698 if (event->primaryVertex()) mAcceptAndStrobe++;
2699 gMessMgr->Info(
"strobe event",
"OTS");
2703 if(mHisto) mEventCounterHisto->Fill(5);
2708 gMessMgr->Info(
"TOF present ... and valid beam event",
"OTS");
2718 if (!track)
return false;
2721 if (track->flag()<=0)
return false;
2724 if (track->topologyMap().numberOfHits(kTpcId) < mMinHitsPerTrack)
return false;
2726 if (track->fitTraits().numberOfFitPoints(kTpcId) < mMinFitPointsPerTrack)
return false;
2728 float ratio = (1.0*track->fitTraits().numberOfFitPoints(kTpcId)) / (1.0*track->numberOfPossiblePoints(kTpcId));
2729 if (ratio < mMinFitPointsOverMax)
return false;
2736 bool StTofrMatchMaker::validTrackRun8(
StGlobalTrack *track){
2738 if (!track)
return false;
2741 if (track->flag()<=0)
return false;
2744 if (track->topologyMap().numberOfHits(kTpcId) < mMinHitsPerTrack)
return false;
2746 if (track->fitTraits().numberOfFitPoints(kTpcId) < mMinFitPointsPerTrack)
return false;
2748 float chi2 = track->fitTraits().chi2(0);
2749 if ( chi2 > 10. )
return false;
2753 if(!dcaGeom)
return false;
2754 float pt = dcaGeom->pt();
2755 float sigma_pT = sqrt(dcaGeom->errMatrix()[9])*pt*pt;
2756 if ( sigma_pT/pt > 0.3 )
return false;
2764 bool StTofrMatchMaker::validTofTrack(
StTrack *track){
2768 if (!track)
return false;
2771 if (track->flag()<=0)
return false;
2774 if (!dynamic_cast<StPrimaryTrack*>(track))
return false;
2777 Double_t DCA= track->impactParameter();
2778 Int_t charge = track->geometry()->charge();
2779 if (DCA > mMaxDCA) {LOG_INFO <<
"dca>max:" << DCA<< endm;
return false;}
2780 if (charge==0) { LOG_INFO <<
" neutral charge" << endm;
return false; }
2790 if (!track)
return 0;
2792 if (mOuterTrackGeometry)
2793 thisTrackGeometry = track->outerGeometry();
2795 thisTrackGeometry = track->geometry();
2796 return thisTrackGeometry;
double x(double s) const
coordinates of helix at point s
double distance(const StThreeVector< double > &p, bool scanPeriods=true) const
minimal distance between point and helix
virtual void ls(Option_t *option="") const
virtual TDataSet * Find(const char *path) const