diff --git a/analysis/detectors/tof/CbmTofAnaTestbeam.cxx b/analysis/detectors/tof/CbmTofAnaTestbeam.cxx index baeb24620c72b6e6299bea0b73bdc9296ce87d3e..836295c04612277d4152cb8a59aa7da37f8166ad 100644 --- a/analysis/detectors/tof/CbmTofAnaTestbeam.cxx +++ b/analysis/detectors/tof/CbmTofAnaTestbeam.cxx @@ -73,7 +73,7 @@ using std::endl; using std::vector; const Int_t DetMask = 0x001FFFFF; // for v21a geometries -const Double_t DTDMAX = 6.; // diamond inspection range in ns +const Double_t DTDMAX = 6.; // diamond inspection range in ns Double_t dTDia; Double_t dDTD4Min = 1.E8; @@ -4917,14 +4917,15 @@ Bool_t CbmTofAnaTestbeam::FillHistos() { fhTIR_all->Fill(dTIR); - LOG(debug) << Form( - " FoundMatches: %d with first chi2s = %12.1f, %12.1f, %12.1f, %12.1f", - iNbMatchedHits, - Chi2List[0], - Chi2List[1], - Chi2List[2], - Chi2List[3]) - << Form(", Muls %4.0f, %4.0f, %4.0f", dMulD, dMul0, dMul4); + LOG(debug) + << Form( + " FoundMatches: %d with first chi2s = %12.1f, %12.1f, %12.1f, %12.1f", + iNbMatchedHits, + Chi2List[0], + Chi2List[1], + Chi2List[2], + Chi2List[3]) + << Form(", Muls %4.0f, %4.0f, %4.0f", dMulD, dMul0, dMul4); if (BSel[0]) { @@ -6638,7 +6639,7 @@ Bool_t CbmTofAnaTestbeam::FillHistos() { Double_t dDX = pHit->GetX() - pTrk->GetFitX( - pHit->GetZ()); // - tPar->GetX() - tPar->GetTx()*dDZ; + pHit->GetZ()); // - tPar->GetX() - tPar->GetTx()*dDZ; Double_t dDXB = pTrk->GetXdif( fiDutAddr, pHit); // ignore pHit in calc of reference Double_t dDY = @@ -6649,7 +6650,7 @@ Bool_t CbmTofAnaTestbeam::FillHistos() { Double_t dDT = pHit->GetTime() - pTrk->GetFitT( - pHit->GetZ()); // pTrk->GetTdif(fStationType[iSt]); + pHit->GetZ()); // pTrk->GetTdif(fStationType[iSt]); Double_t dDTB = pTrk->GetTdif( fiDutAddr, pHit); // ignore pHit in calc of reference @@ -6996,13 +6997,13 @@ Bool_t CbmTofAnaTestbeam::FillHistos() { fhLHTime[iDet]->FindBin(hitpos_local[0], hitpos_local[1]); Int_t iBinA = iBin - 1; // index in pointer array if (0) - LOG(info) << Form( - "Insert Dut hit for Det %d, Bin %d, x %f, y %f, poi ", - iDet, - iBinA, - hitpos_local[0], - hitpos_local[1]) - << fhLHTime[iDet]; + LOG(info) + << Form("Insert Dut hit for Det %d, Bin %d, x %f, y %f, poi ", + iDet, + iBinA, + hitpos_local[0], + hitpos_local[1]) + << fhLHTime[iDet]; if (iBin <= 0 || iBin > fhLHTime[iDet]->GetNbinsX() @@ -7404,7 +7405,8 @@ Bool_t CbmTofAnaTestbeam::FillHistos() { } else { fhSelMCTrackEfficiency->Fill(kFALSE, fiNAccRefTracks); - fhSelMCTrackEfficiencyTIS->Fill(kFALSE, (dTAv - fdStartSpillTime) / 1.E9); + fhSelMCTrackEfficiencyTIS->Fill(kFALSE, + (dTAv - fdStartSpillTime) / 1.E9); } } } @@ -7575,7 +7577,7 @@ Bool_t CbmTofAnaTestbeam::FillHistos() { for (Int_t iHit = 0; iHit < tTracklet->GetNofHits(); iHit++) { if (5 == CbmTofAddress::GetSmType( - (tTracklet->GetTofHitPointer(iHit))->GetAddress())) { + (tTracklet->GetTofHitPointer(iHit))->GetAddress())) { iNTrackletHits--; } } diff --git a/analysis/detectors/tof/CbmTofAnaTestbeam.h b/analysis/detectors/tof/CbmTofAnaTestbeam.h index 7d828a0a31b688b899e5e4ad48797f6ef82f82ae..ba475f2df43e335327c1911d0da024d7e53c467a 100644 --- a/analysis/detectors/tof/CbmTofAnaTestbeam.h +++ b/analysis/detectors/tof/CbmTofAnaTestbeam.h @@ -729,14 +729,15 @@ private: Double_t fdMulDMax; // max multiplicity in Diamond counter Double_t fdSpillDuration; // min. spill length in sec Double_t fdSpillBreak; // min. spill break in sec - Double_t fdStartSpillTime; // Start of Spill, if negative find begin of first spill - Double_t fdDTDia; // max time difference between diamonds - Double_t fdDTD4MAX; // max time difference between reference & diamond - Double_t fdMul0Max; // max multiplicity in Dut - Double_t fdMul4Max; // max multiplicity in HD/Buc Ref counter - Double_t fdCh4Sel; // Center of selected strip numbers - Double_t fdDCh4Sel; // Width of selected strip numbers - Double_t fdPosY4Sel; // Fraction of Y-Size + Double_t + fdStartSpillTime; // Start of Spill, if negative find begin of first spill + Double_t fdDTDia; // max time difference between diamonds + Double_t fdDTD4MAX; // max time difference between reference & diamond + Double_t fdMul0Max; // max multiplicity in Dut + Double_t fdMul4Max; // max multiplicity in HD/Buc Ref counter + Double_t fdCh4Sel; // Center of selected strip numbers + Double_t fdDCh4Sel; // Width of selected strip numbers + Double_t fdPosY4Sel; // Fraction of Y-Size Double_t fdPosY4SelOff; // Offset of selection interval in cm Double_t fdChS2Sel; // Center of selected strip numbers Double_t fdDChS2Sel; // Width of selected strip numbers diff --git a/core/eventdisplay/CbmEvDisTracks.cxx b/core/eventdisplay/CbmEvDisTracks.cxx index 8064594eeea94546ab3a6913b6ad75746dcf7089..82a45823df26112fcd08e61397a36a33f65553b1 100644 --- a/core/eventdisplay/CbmEvDisTracks.cxx +++ b/core/eventdisplay/CbmEvDisTracks.cxx @@ -29,10 +29,10 @@ #include <TEveVector.h> // for TEveVector, TEveVectorT #include <TGLAnnotation.h> #include <TGLViewer.h> -#include <TGenericClassInfo.h> // for TGenericClassInfo -#include <TObjArray.h> // for TObjArray -#include <TParticle.h> // for TParticle -#include <TString.h> // for Form, TString +#include <TGenericClassInfo.h> // for TGenericClassInfo +#include <TObjArray.h> // for TObjArray +#include <TParticle.h> // for TParticle +#include <TString.h> // for Form, TString #include <string.h> // for strcmp @@ -122,7 +122,7 @@ void CbmEvDisTracks::Exec(Option_t* option) { Reset(); LOG(debug4) << " CbmEvDisTracks:: NTrks " << fTrackList->GetEntries(); - Int_t TMul[10]={10*0}; //FIXME - don't use constants in code + Int_t TMul[10] = {10 * 0}; //FIXME - don't use constants in code for (Int_t iOpt = 0; iOpt < 2; iOpt++) for (Int_t i = 0; i < fTrackList->GetEntriesFast(); i++) { @@ -132,7 +132,7 @@ void CbmEvDisTracks::Exec(Option_t* option) { Int_t Np = tr->GetNofHits(); #if TOFDisplay == 1 //List for TEvePointSets - if(iOpt==0) TMul[Np]++; + if (iOpt == 0) TMul[Np]++; fPSList = GetPSGroup(Np, iOpt); #endif @@ -266,18 +266,24 @@ void CbmEvDisTracks::Exec(Option_t* option) { fEventManager->SetEvtMaxEnergy(MaxEnergyLimit); fEventManager->SetEvtMinEnergy(MinEnergyLimit); - TString cEventInfo=Form("ev# %d ",fEventManager->GetCurrentEvent()); - TString cTrackInfo="trkl mul: "; // to be completed while building the display - for (Int_t i=9; i>0; i--) if(TMul[i]>0) cTrackInfo += Form("M%d %d/",i,TMul[i]); + TString cEventInfo = Form("ev# %d ", fEventManager->GetCurrentEvent()); + TString cTrackInfo = + "trkl mul: "; // to be completed while building the display + for (Int_t i = 9; i > 0; i--) + if (TMul[i] > 0) cTrackInfo += Form("M%d %d/", i, TMul[i]); TGLViewer* v = gEve->GetDefaultGLViewer(); - if(NULL != anne) anne->SetText(cEventInfo); - else anne = new TGLAnnotation(v,cEventInfo,0.01,0.95); - if(NULL != annt) annt->SetText(cTrackInfo); - else annt = new TGLAnnotation(v,cTrackInfo,0.01,0.92); - anne->SetTextSize(0.03);// % of window diagonal - annt->SetTextSize(0.03);// % of window diagonal + if (NULL != anne) + anne->SetText(cEventInfo); + else + anne = new TGLAnnotation(v, cEventInfo, 0.01, 0.95); + if (NULL != annt) + annt->SetText(cTrackInfo); + else + annt = new TGLAnnotation(v, cTrackInfo, 0.01, 0.92); + anne->SetTextSize(0.03); // % of window diagonal + annt->SetTextSize(0.03); // % of window diagonal anne->SetTextColor(4); annt->SetTextColor(4); diff --git a/core/eventdisplay/CbmPointSetArray.cxx b/core/eventdisplay/CbmPointSetArray.cxx index c561d8fefa6930c44c54210cd28ae800f4817ae1..fe83926c4bb67ee9613b3bce31969baa18c442de 100644 --- a/core/eventdisplay/CbmPointSetArray.cxx +++ b/core/eventdisplay/CbmPointSetArray.cxx @@ -100,7 +100,9 @@ void CbmPointSetArray::ApplyColorMode() { * (nCol - binCol - 1) / (eveTime - binTime))); } - LOG(info) << "Color for id " << id << ", ind " << fIndex[id] << ", t "<<fTime[id]<<": " << this->GetBin(fIndex[id])->GetMainColor(); + LOG(info) << "Color for id " << id << ", ind " << fIndex[id] << ", t " + << fTime[id] << ": " + << this->GetBin(fIndex[id])->GetMainColor(); break; case 2: //according to Tot of hit diff --git a/core/eventdisplay/CbmPointSetArrayDraw.cxx b/core/eventdisplay/CbmPointSetArrayDraw.cxx index d796c589363b312ec15600594cde05c24e12b072..3a052971977b0565d76348b3228c01fe1eff7a75 100644 --- a/core/eventdisplay/CbmPointSetArrayDraw.cxx +++ b/core/eventdisplay/CbmPointSetArrayDraw.cxx @@ -142,7 +142,7 @@ Int_t CbmPointSetArrayDraw::GetClusterSize(TObject* obj) { CbmTofHit* p = (CbmTofHit*) obj; Double_t cluSize = p->GetFlag(); //Flag= #digis = 2*cluSize +100 if used for track - cluSize=((int)cluSize%100)/2; + cluSize = ((int) cluSize % 100) / 2; LOG(debug3) << "-I- CbmPointSetArrayDraw::GetClusterSize(): " << cluSize; return cluSize; } diff --git a/reco/detectors/tof/CbmTofCalibrator.cxx b/reco/detectors/tof/CbmTofCalibrator.cxx index 2ff489ef54a473f6864cd89042b06da97cd9b079..4608f45bc8f3789c4c05cc1900396e2cd29114c4 100644 --- a/reco/detectors/tof/CbmTofCalibrator.cxx +++ b/reco/detectors/tof/CbmTofCalibrator.cxx @@ -133,10 +133,16 @@ Bool_t CbmTofCalibrator::CreateCalHist() { fhCalR0 = new TH1D( "hCalR0", "Tracklet distance to nominal vertex; R_0 [cm]", 100, 0., 0.5); - fhCalDX0 = new TH1D( - "hCalDX0", "Tracklet distance to nominal vertex; #DeltaX_0 [cm]", 100, -0.5, 0.5); - fhCalDY0 = new TH1D( - "hCalDY0", "Tracklet distance to nominal vertex; #DeltaY_0 [cm]", 100, -0.5, 0.5); + fhCalDX0 = new TH1D("hCalDX0", + "Tracklet distance to nominal vertex; #DeltaX_0 [cm]", + 100, + -0.5, + 0.5); + fhCalDY0 = new TH1D("hCalDY0", + "Tracklet distance to nominal vertex; #DeltaY_0 [cm]", + 100, + -0.5, + 0.5); fhCalPos.resize(iNbDet); fhCalTOff.resize(iNbDet); @@ -370,9 +376,9 @@ void CbmTofCalibrator::FillCalHist(CbmTofTracklet* pTrk, Int_t iOpt) { + (1. - 2. * tDigi0->GetSide()) * hlocal_d[1] / fDigiBdfPar->GetSigVel(iSmType, iSm, iRpc) - pTrk->GetFitT( - pHit - ->GetZ()) //-fTrackletTools->GetTexpected(pTrk, iDetId, pHit) - + fTofFindTracks->GetTOff(iDetId) + pHit + ->GetZ()) //-fTrackletTools->GetTexpected(pTrk, iDetId, pHit) + + fTofFindTracks->GetTOff(iDetId) + 2. * (1. - 2. * tDigi0->GetSide()) * (hlocal_d[1] - hlocal_f[1]) / fDigiBdfPar->GetSigVel(iSmType, iSm, iRpc)); /* @@ -391,8 +397,8 @@ void CbmTofCalibrator::FillCalHist(CbmTofTracklet* pTrk, Int_t iOpt) { + (1. - 2. * tDigi1->GetSide()) * hlocal_d[1] / fDigiBdfPar->GetSigVel(iSmType, iSm, iRpc) - pTrk->GetFitT( - pHit - ->GetZ()) //-fTrackletTools->GetTexpected(pTrk, iDetId, pHit) + pHit + ->GetZ()) //-fTrackletTools->GetTexpected(pTrk, iDetId, pHit) + fTofFindTracks->GetTOff(iDetId) + 2. * (1. - 2. * tDigi1->GetSide()) * (hlocal_d[1] - hlocal_f[1]) / fDigiBdfPar->GetSigVel(iSmType, iSm, iRpc)); @@ -400,8 +406,8 @@ void CbmTofCalibrator::FillCalHist(CbmTofTracklet* pTrk, Int_t iOpt) { case 0: { Double_t dDeltaT = 0.5 * (tDigi0->GetTime() + tDigi1->GetTime()) - + fTofFindTracks->GetTOff(iDetId) - - pTrk->GetFitT(pHit->GetZ()); + + fTofFindTracks->GetTOff(iDetId) + - pTrk->GetFitT(pHit->GetZ()); fhCalWalk[iDetIndx][iCh0][iSide0]->Fill(tDigi0->GetTot(), dDeltaT); fhCalWalk[iDetIndx][iCh1][iSide1]->Fill(tDigi1->GetTot(), dDeltaT); } break; @@ -488,8 +494,8 @@ Bool_t CbmTofCalibrator::UpdateCalHist(Int_t iOpt) { } } } break; - case 2: // update individual channel walks - if(iSmType==5) continue; // no walk correction for beam counter + case 2: // update individual channel walks + if (iSmType == 5) continue; // no walk correction for beam counter const Double_t MinCounts = 10.; Int_t iNbCh = fDigiBdfPar->GetNbChan(iSmType, iRpc); for (Int_t iCh = 0; iCh < iNbCh; iCh++) { diff --git a/reco/detectors/tof/CbmTofEventClusterizer.cxx b/reco/detectors/tof/CbmTofEventClusterizer.cxx index cecf9bfc8576f25680af75e94fadcecb58cc270f..85db628c2241a2795c60291c007d7bd94ad1eb9d 100644 --- a/reco/detectors/tof/CbmTofEventClusterizer.cxx +++ b/reco/detectors/tof/CbmTofEventClusterizer.cxx @@ -351,7 +351,7 @@ void CbmTofEventClusterizer::Exec(Option_t* option) { LOG(info) << "CbmTofEventClusterizer::Exec => New timeslice " << iNbTs << " with " << fEventsColl->GetEntriesFast() << " events, " << fDigiMan->GetNofDigis(ECbmModuleId::kTof) << " TOF digis + " - << fDigiMan->GetNofDigis(ECbmModuleId::kT0) << " T0 digis "; + << fDigiMan->GetNofDigis(ECbmModuleId::kT0) << " T0 digis "; iNbTs++; Int_t iNbHits = 0; @@ -364,17 +364,18 @@ void CbmTofEventClusterizer::Exec(Option_t* option) { fTofDigiVec.clear(); //if (fTofDigisColl) fTofDigisColl->Clear("C"); //Int_t iNbDigis=0; (VF) not used - LOG(debug) << "TS event "<<iEvent<<" with " - <<tEvent->GetNofData(ECbmDataType::kT0Digi) << " T0 and " - <<tEvent->GetNofData(ECbmDataType::kTofDigi) << " Tof digis "; + LOG(debug) << "TS event " << iEvent << " with " + << tEvent->GetNofData(ECbmDataType::kT0Digi) << " T0 and " + << tEvent->GetNofData(ECbmDataType::kTofDigi) << " Tof digis "; for (Int_t iDigi = 0; iDigi < tEvent->GetNofData(ECbmDataType::kT0Digi); iDigi++) { Int_t iDigiIndex = static_cast<Int_t>(tEvent->GetIndex(ECbmDataType::kT0Digi, iDigi)); const CbmTofDigi* tDigi = fDigiMan->Get<CbmTofDigi>(iDigiIndex); - if( tDigi->GetType() != 5 ) - LOG(fatal) << "Wrong T0 type " << tDigi->GetType() << ", Addr 0x" <<std::hex<< tDigi->GetAddress(); + if (tDigi->GetType() != 5) + LOG(fatal) << "Wrong T0 type " << tDigi->GetType() << ", Addr 0x" + << std::hex << tDigi->GetAddress(); fTofDigiVec.push_back(CbmTofDigi(*tDigi)); } for (Int_t iDigi = 0; iDigi < tEvent->GetNofData(ECbmDataType::kTofDigi); @@ -2797,8 +2798,9 @@ Bool_t CbmTofEventClusterizer::FillHistos() { || (TMath::Sqrt( TMath::Power( pHit->GetX() - dzscal * pTrig[iSel]->GetX(), 2.) - + TMath::Power( - pHit->GetY() - dzscal * pTrig[iSel]->GetY(), 2.)) + + TMath::Power(pHit->GetY() + - dzscal * pTrig[iSel]->GetY(), + 2.)) < fdCaldXdYMax)) { BSel[iSel] = kTRUE; Double_t dX2Y2 = TMath::Sqrt(dSEl2dXdz * dSEl2dXdz @@ -3241,11 +3243,11 @@ Bool_t CbmTofEventClusterizer::FillHistos() { * (pHit->GetZ() - (pTrig[iSel]->GetZ()))), 2.) + TMath::Power( - pHit->GetY() - - (pTrig[iSel]->GetY() - + ddYdZ[iSel] - * (pHit->GetZ() - (pTrig[iSel]->GetZ()))), - 2.)) + pHit->GetY() + - (pTrig[iSel]->GetY() + + ddYdZ[iSel] + * (pHit->GetZ() - (pTrig[iSel]->GetZ()))), + 2.)) > 0.5 * fdCaldXdYMax) continue; // refine position selection cut in cosmic measurement dTcor[iSel] = 0.; // precaution @@ -5422,8 +5424,7 @@ Bool_t CbmTofEventClusterizer::BuildClusters() { (0 == pDigi->GetSide()) ? 1 : 0, pDigi->GetType()); LOG(debug) << "Duplicated digi " << fTofDigiVec.size() - << " with address 0x" << std::hex - << pDigiN->GetAddress(); + << " with address 0x" << std::hex << pDigiN->GetAddress(); } } iNbTofDigi = fTofDigiVec.size(); @@ -6936,55 +6937,72 @@ Bool_t CbmTofEventClusterizer::BuildHits() { (CbmTofHit*) fTofHitsColl->At(fiNbHits - 1); if (iDetId == pHitL->GetAddress() && dWeightedTime == pHitL->GetTime()) { - LOG(debug) << "Store Hit twice? " - << " fiNbHits " << fiNbHits << ", " - << Form("0x%08x, MatchCollSize %d, IndRefSize %lu ", - iDetId, fTofDigiMatchColl->GetEntriesFast(),vDigiIndRef.size()); + LOG(debug) + << "Store Hit twice? " + << " fiNbHits " << fiNbHits << ", " + << Form("0x%08x, MatchCollSize %d, IndRefSize %lu ", + iDetId, + fTofDigiMatchColl->GetEntriesFast(), + vDigiIndRef.size()); for (UInt_t i = 0; i < vDigiIndRef.size(); i++) { - if(vDigiIndRef.at(i) < (Int_t) fTofCalDigiVec->size()) { - CbmTofDigi* pDigiC = &(fTofCalDigiVec->at(vDigiIndRef.at(i))); - LOG(debug) << " Digi " <<i<<" "<< pDigiC->ToString(); - } else { - LOG(fatal) << "Insufficient CalDigiVec size for i " - << i <<", Ind " << vDigiIndRef.at(i); - } + if (vDigiIndRef.at(i) + < (Int_t) fTofCalDigiVec->size()) { + CbmTofDigi* pDigiC = + &(fTofCalDigiVec->at(vDigiIndRef.at(i))); + LOG(debug) + << " Digi " << i << " " << pDigiC->ToString(); + } else { + LOG(fatal) + << "Insufficient CalDigiVec size for i " << i + << ", Ind " << vDigiIndRef.at(i); + } } - if(NULL == fTofDigiMatchColl) assert("No DigiMatchColl"); - CbmMatch* digiMatchL=NULL; - if( fTofDigiMatchColl->GetEntriesFast() >= fiNbHits-1) { - digiMatchL=(CbmMatch*) fTofDigiMatchColl->At(fiNbHits-1); - }else{ - LOG(fatal) << "DigiMatchColl has insufficient size " - << fTofDigiMatchColl->GetEntriesFast(); + if (NULL == fTofDigiMatchColl) + assert("No DigiMatchColl"); + CbmMatch* digiMatchL = NULL; + if (fTofDigiMatchColl->GetEntriesFast() + >= fiNbHits - 1) { + digiMatchL = + (CbmMatch*) fTofDigiMatchColl->At(fiNbHits - 1); + } else { + LOG(fatal) << "DigiMatchColl has insufficient size " + << fTofDigiMatchColl->GetEntriesFast(); } - if(NULL != digiMatchL) - for (Int_t i = 0; i < digiMatchL->GetNofLinks(); i++) { - CbmLink L0 = digiMatchL->GetLink(i); - LOG(debug) << "report link "<<i<<"("<<digiMatchL->GetNofLinks()<<"), ind "<<L0.GetIndex(); - Int_t iDigIndL = L0.GetIndex(); - if (iDigIndL >= (Int_t) vDigiIndRef.size()) { - if (iDetId != fiBeamRefAddr) { - LOG(warn) << Form( - "Invalid DigiRefInd for det 0x%08x", iDetId); + if (NULL != digiMatchL) + for (Int_t i = 0; i < digiMatchL->GetNofLinks(); + i++) { + CbmLink L0 = digiMatchL->GetLink(i); + LOG(debug) << "report link " << i << "(" + << digiMatchL->GetNofLinks() + << "), ind " << L0.GetIndex(); + Int_t iDigIndL = L0.GetIndex(); + if (iDigIndL >= (Int_t) vDigiIndRef.size()) { + if (iDetId != fiBeamRefAddr) { + LOG(warn) + << Form("Invalid DigiRefInd for det 0x%08x", + iDetId); + continue; + } + } + if (vDigiIndRef.at(iDigIndL) + >= (Int_t) fTofCalDigiVec->size()) { + LOG(warn) << "Invalid CalDigiInd"; continue; } + CbmTofDigi* pDigiC = + &(fTofCalDigiVec->at(vDigiIndRef.at(iDigIndL))); + LOG(debug) << " DigiL " << pDigiC->ToString(); } - if (vDigiIndRef.at(iDigIndL) - >= (Int_t) fTofCalDigiVec->size()) { - LOG(warn) << "Invalid CalDigiInd"; - continue; - } - CbmTofDigi* pDigiC = - &(fTofCalDigiVec->at(vDigiIndRef.at(iDigIndL))); - LOG(debug) << " DigiL " << pDigiC->ToString(); - } else { - LOG(warn) << "Invalid digMatch Link at Index " << fiNbHits-1; + else { + LOG(warn) << "Invalid digMatch Link at Index " + << fiNbHits - 1; } } - LOG(debug)<< "Current HitsColl length " << fTofHitsColl->GetEntriesFast(); + LOG(debug) << "Current HitsColl length " + << fTofHitsColl->GetEntriesFast(); } CbmTofHit* pHit = new CbmTofHit( iDetId, @@ -6992,7 +7010,8 @@ Bool_t CbmTofEventClusterizer::BuildHits() { hitPosErr, //local detector coordinates fiNbHits, // this number is used as reference!! dWeightedTime, - vDigiIndRef.size(), // number of linked digis = 2*CluSize + vDigiIndRef + .size(), // number of linked digis = 2*CluSize //vPtsRef.size(), // flag = number of TofPoints generating the cluster Int_t(dWeightsSum * 10.)); //channel -> Tot //0) ; //channel @@ -7542,11 +7561,12 @@ Bool_t CbmTofEventClusterizer::CalibRawDigis() { << fDigiBdfPar->GetNbChan(pDigi->GetType(), 0); } - if (0) // (bAddBeamCounterSideDigi) + if (0) // (bAddBeamCounterSideDigi) if (pCalDigi->GetType() == 5 || pCalDigi->GetType() == 8) { // for Pad counters generate fake digi to mockup a strip - LOG(debug) << "add Pad counter 2. Side digi for 0x" << std::hex << pCalDigi->GetAddress(); + LOG(debug) << "add Pad counter 2. Side digi for 0x" << std::hex + << pCalDigi->GetAddress(); fTofCalDigiVec->push_back(CbmTofDigi(*pCalDigi)); CbmTofDigi* pCalDigi2 = &(fTofCalDigiVec->back()); iDigIndCal++; diff --git a/reco/detectors/tof/CbmTofFindTracks.cxx b/reco/detectors/tof/CbmTofFindTracks.cxx index 079a167a36d137bda4f32f51f1fdaacbeddecd84..c34a9d76f584d7551345b3076e54ce52c1fa39ad 100644 --- a/reco/detectors/tof/CbmTofFindTracks.cxx +++ b/reco/detectors/tof/CbmTofFindTracks.cxx @@ -289,18 +289,19 @@ InitStatus CbmTofFindTracks::Init() { for (Int_t iCell = 0; iCell < fDigiPar->GetNrOfModules(); iCell++) { Int_t iCellId = fDigiPar->GetCellId(iCell); Int_t iCh = fTofId->GetCell(iCellId); - if ( 0 == iCh ) { - LOG(info) << Form( - "Init found RpcInd %d, %lu at Addr 0x%08x, ModType %d, ModId %d, RpcId %d ", - iRpc, fRpcAddr.size(), - iCellId, - fTofId->GetSMType(iCellId), - fTofId->GetSModule(iCellId), - fTofId->GetCounter(iCellId)); + if (0 == iCh) { + LOG(info) << Form("Init found RpcInd %d, %lu at Addr 0x%08x, ModType %d, " + "ModId %d, RpcId %d ", + iRpc, + fRpcAddr.size(), + iCellId, + fTofId->GetSMType(iCellId), + fTofId->GetSModule(iCellId), + fTofId->GetCounter(iCellId)); if (fTofId->GetSMType(iCellId) == 5) { bBeamCounter = kTRUE; LOG(info) << "Found beam counter in setup! at RpcInd " << iRpc - << ", Addr.size " << fRpcAddr.size(); + << ", Addr.size " << fRpcAddr.size(); } fMapRpcIdParInd[iCellId] = iRpc; fRpcAddr.push_back(iCellId); @@ -738,7 +739,7 @@ Bool_t CbmTofFindTracks::WriteHistos() { TF1* fg = hpy->GetFunction("gaus"); Double_t dFMeanError = fg->GetParError(1); LOG(info) << "Update hPullT_Smt_Off3 Ind " << ix - << Form(", 0x%08x: ",fRpcAddr[ix]) + << Form(", 0x%08x: ", fRpcAddr[ix]) << fhPullT_Smt_Off->GetBinContent(ix + 1) << " + " << dFMean << ", Err " << dFMeanError << " -> " << dVal << ", Width " << dRMS << ", Chi2 " << fg->GetChisquare(); @@ -749,7 +750,8 @@ Bool_t CbmTofFindTracks::WriteHistos() { != fiBeamCounter) // don't correct beam counter time fhPullT_Smt_Off->SetBinContent(ix + 1, dVal); else - LOG(info)<<"No Off3 correction for beam counter at index "<<ix; + LOG(info) << "No Off3 correction for beam counter at index " + << ix; fhPullT_Smt_Width->SetBinContent(ix + 1, dRMS); } } else { @@ -812,7 +814,8 @@ Bool_t CbmTofFindTracks::WriteHistos() { << fhPullX_Smt_Off->GetBinContent(ix + 1) << " + " << htmp1D->GetBinContent(ix + 1) << " -> " << dVal << ", Width " << dRMS; - if( fRpcAddr[ix] != fiBeamCounter ) // don't correct beam counter position + if (fRpcAddr[ix] + != fiBeamCounter) // don't correct beam counter position fhPullX_Smt_Off->SetBinContent(ix + 1, dVal); fhPullX_Smt_Width->SetBinContent(ix + 1, dRMS); } @@ -835,7 +838,8 @@ Bool_t CbmTofFindTracks::WriteHistos() { for (Int_t ix = 0; ix < nx; ix++) { Double_t dVal = fhPullY_Smt_Off->GetBinContent(ix + 1); dVal -= htmp1D->GetBinContent(ix + 1); - if( fRpcAddr[ix] != fiBeamCounter ) // don't correct beam counter position + if (fRpcAddr[ix] + != fiBeamCounter) // don't correct beam counter position fhPullY_Smt_Off->SetBinContent(ix + 1, dVal); TH1D* hpy = fhPullY_Smt->ProjectionY("_py", ix + 1, ix + 1); @@ -1746,7 +1750,9 @@ void CbmTofFindTracks::FindVertex() { w, fMinNofHits); - if (w > (Double_t) + if ( + w + > (Double_t) fMinNofHits) { // for further analysis request minimum number of hits fVTXNorm += w; fVTX_T += w * pTrk->GetFitT(0.); @@ -1900,13 +1906,13 @@ void CbmTofFindTracks::FillHistograms() { Double_t dDX = pHit->GetX() - pTrk->GetFitX( - pHit->GetZ()); // - tPar->GetX() - tPar->GetTx()*dDZ; + pHit->GetZ()); // - tPar->GetX() - tPar->GetTx()*dDZ; Double_t dDY = pHit->GetY() - pTrk->GetFitY(pHit->GetZ()); // - tPar->GetTy()*dDZ; Double_t dDT = pHit->GetTime() - pTrk->GetFitT( - pHit->GetZ()); // pTrk->GetTdif(fMapStationRpcId[iSt]); + pHit->GetZ()); // pTrk->GetTdif(fMapStationRpcId[iSt]); Double_t dDTB = fTrackletTools->GetTdif(pTrk, fMapStationRpcId[iSt], @@ -1914,20 +1920,21 @@ void CbmTofFindTracks::FillHistograms() { Double_t dTOT = pHit->GetCh() / 10.; // misuse of channel field Double_t dZZ = pHit->GetZ() - tPar->GetZy(pHit->GetY()); - LOG(debug) << Form( - " St %d Id 0x%08x Hit %2d, Z %6.2f - DX %6.2f, DY %6.2f, " - "Z %6.2f, DT %6.2f, %6.2f, ZZ %6.2f, Tt %6.4f ", - iSt, - fMapStationRpcId[iSt], - iH, - pHit->GetZ(), - dDX, - dDY, - dDZ, - dDT, - dDTB, - dZZ, - dTt) << tPar->ToString(); + LOG(debug) + << Form(" St %d Id 0x%08x Hit %2d, Z %6.2f - DX %6.2f, DY %6.2f, " + "Z %6.2f, DT %6.2f, %6.2f, ZZ %6.2f, Tt %6.4f ", + iSt, + fMapStationRpcId[iSt], + iH, + pHit->GetZ(), + dDX, + dDY, + dDZ, + dDT, + dDTB, + dZZ, + dTt) + << tPar->ToString(); vhPullX[iSt]->Fill(dDX); vhPullY[iSt]->Fill(dDY); @@ -2036,7 +2043,7 @@ void CbmTofFindTracks::FillHistograms() { Double_t dDX = pHit->GetX() - pTrk->GetFitX( - pHit->GetZ()); // - tPar->GetX() - tPar->GetTx()*dDZ; + pHit->GetZ()); // - tPar->GetX() - tPar->GetTx()*dDZ; Double_t dDY = pHit->GetY() - pTrk->GetFitY(pHit->GetZ()); // - tPar->GetTy()*dDZ; //Double_t dDT = pHit->GetTime() - pTrk->GetFitT(pHit->GetR()); //pTrk->GetTdif(fMapStationRpcId[iSt]); diff --git a/reco/detectors/tof/CbmTofTrackFinderNN.cxx b/reco/detectors/tof/CbmTofTrackFinderNN.cxx index d7083ece590cdd0645660bb66691c58a5527a49c..2d725e67eaefed1b613fa4a47842747d119968a1 100644 --- a/reco/detectors/tof/CbmTofTrackFinderNN.cxx +++ b/reco/detectors/tof/CbmTofTrackFinderNN.cxx @@ -22,8 +22,9 @@ // CBMroot classes and includes #include "CbmMatch.h" -#include "CbmTofAddress.h" // in cbmdata/tof -#include "CbmTofCell.h" // in tof/TofData +#include "CbmTofAddress.h" // in cbmdata/tof +#include "CbmTofCell.h" // in tof/TofData +#include "CbmTofClusterizersDef.h" #include "CbmTofDetectorId_v12b.h" // in cbmdata/tof #include "CbmTofDetectorId_v14a.h" // in cbmdata/tof #include "CbmTofDigiBdfPar.h" // in tof/TofParam @@ -35,7 +36,6 @@ #include "CbmTofTrackFitter.h" #include "CbmTofTracklet.h" #include "CbmTofTrackletParam.h" -#include "CbmTofClusterizersDef.h" #include "LKFMinuit.h" #include <CbmEvDisTracks.h> // in eventdisplay/tof @@ -97,8 +97,8 @@ CbmTofTrackFinderNN::CbmTofTrackFinderNN(const CbmTofTrackFinderNN& finder) } // assignment operator -CbmTofTrackFinderNN& -CbmTofTrackFinderNN::operator=(const CbmTofTrackFinderNN& /*fSource*/) { +CbmTofTrackFinderNN& CbmTofTrackFinderNN:: +operator=(const CbmTofTrackFinderNN& /*fSource*/) { // do copy // ... (too lazy) ... // return the existing object @@ -204,7 +204,7 @@ Int_t CbmTofTrackFinderNN::DoFind(TClonesArray* fTofHits, fvTrkVec[iHit].size()); if (iAddr == fFindTracks->GetAddrOfStation( - iSt0)) { // generate new track seed + iSt0)) { // generate new track seed LOG(debug) << Form( "<I> TofTracklet seed St0 %2d, St1 %2d, Mul %2d, Hit %2d, addr = " "0x%08x - X %6.2f, Y %6.2f Z %6.2f T %6.2f TM %lu", @@ -270,7 +270,7 @@ Int_t CbmTofTrackFinderNN::DoFind(TClonesArray* fTofHits, //if (iSmType1 == fFindTracks->GetStationType(1)) { // generate new track seed if (iAddr1 == fFindTracks->GetAddrOfStation( - iSt1)) { // generate new track seed + iSt1)) { // generate new track seed Int_t iChId1 = pHit1->GetAddress(); CbmTofCell* fChannelInfo1 = fDigiPar->GetCell(iChId1); Int_t iCh1 = CbmTofAddress::GetChannelId(iChId1); @@ -829,7 +829,7 @@ void CbmTofTrackFinderNN::TrklSeed(Int_t iHit) { //if (iSmType1 == fFindTracks->GetStationType(iDet1)) { // generate candidate for new track seed if (iAddr1 == fFindTracks->GetAddrOfStation( - iDet1)) { // generate candidate for new track seed + iDet1)) { // generate candidate for new track seed Int_t iChId1 = pHit1->GetAddress(); CbmTofCell* fChannelInfo1 = fDigiPar->GetCell(iChId1); Int_t iCh1 = CbmTofAddress::GetChannelId(iChId1); diff --git a/sim/detectors/tof/CbmTofDigitize.cxx b/sim/detectors/tof/CbmTofDigitize.cxx index f5e9c11efea2514c1e62b39440011abc3fe58166..f536b3bcaef429a3c8b0c5f327a0f36c666d7e71 100644 --- a/sim/detectors/tof/CbmTofDigitize.cxx +++ b/sim/detectors/tof/CbmTofDigitize.cxx @@ -2362,7 +2362,7 @@ Bool_t CbmTofDigitize::DigitizeFlatDisc() { Double_t dChargeCentral = dClustCharge * ComputeClusterAreaOnChannel( - iChanId, dClusterSize, poipos_local[0], poipos_local[1]); + iChanId, dClusterSize, poipos_local[0], poipos_local[1]); LOG(debug2) << "CbmTofDigitize::DigitizeFlatDisc: ChargeCentral " << dChargeCentral << ", " << dClustCharge << Form(", 0x%08x", iChanId) << ", " << dClusterSize << ", " @@ -2721,7 +2721,7 @@ Bool_t CbmTofDigitize::DigitizeFlatDisc() { Double_t dChargeSideCh = dClustCharge * ComputeClusterAreaOnChannel( - iSideChId, dClusterSize, poipos_local[0], poipos_local[1]); + iSideChId, dClusterSize, poipos_local[0], poipos_local[1]); dChargeSideCh /= dClustArea; if (dClustCharge + 0.0000001 < dChargeSideCh) { LOG(error) << "CbmTofDigitize::DigitizeFlatDisc => Side Charge " @@ -2970,7 +2970,7 @@ Bool_t CbmTofDigitize::DigitizeFlatDisc() { Double_t dChargeSideCh = dClustCharge * ComputeClusterAreaOnChannel( - iSideChId, dClusterSize, poipos_local[0], poipos_local[1]); + iSideChId, dClusterSize, poipos_local[0], poipos_local[1]); dChargeSideCh /= dClustArea; // Fee Threshold on charge @@ -3047,7 +3047,7 @@ Bool_t CbmTofDigitize::DigitizeFlatDisc() { Double_t dChargeSideCh = dClustCharge * ComputeClusterAreaOnChannel( - iSideChId, dClusterSize, poipos_local[0], poipos_local[1]); + iSideChId, dClusterSize, poipos_local[0], poipos_local[1]); // Fee Threshold on charge if (dChargeSideCh @@ -4134,16 +4134,16 @@ Bool_t CbmTofDigitize::DigitizeGaussCharge() { dClustToReadout = TMath::Sqrt( TMath::Power(poipos_local[1], 2) + TMath::Power( - poipos_local[0] - - (+(1 - 2 * iRow) * fChannelInfo->GetSizex() / 2.0), - 2)); + poipos_local[0] + - (+(1 - 2 * iRow) * fChannelInfo->GetSizex() / 2.0), + 2)); else // Horizontal => base = bottom/upper edge dClustToReadout = TMath::Sqrt( TMath::Power(poipos_local[0], 2) + TMath::Power( - poipos_local[1] - - (-(1 - 2 * iRow) * fChannelInfo->GetSizey() / 2.0), - 2)); + poipos_local[1] + - (-(1 - 2 * iRow) * fChannelInfo->GetSizey() / 2.0), + 2)); dPadTime += gRandom->Gaus(0.0, fdTimeResElec)