Commit 560ad9df authored by Norbert Herrmann's avatar Norbert Herrmann
Browse files

replace hard coded beamcounter identification

parent 55b769bf
...@@ -320,8 +320,7 @@ InitStatus CbmTofFindTracks::Init() { ...@@ -320,8 +320,7 @@ InitStatus CbmTofFindTracks::Init() {
if (fTofCalibrator->Init() != kSUCCESS) return kFATAL; if (fTofCalibrator->Init() != kSUCCESS) return kFATAL;
if (bBeamCounter) { if (bBeamCounter) {
fTofCalibrator->SetBeam(bBeamCounter); fTofCalibrator->SetBeam(bBeamCounter);
fTofCalibrator->SetR0Lim( fTofCalibrator->SetR0Lim(fdR0Lim);
fdR0Lim); // FIXME, hardwired parameter for debugging
LOG(info) << "Set CbmTofCalibrator::R0Lim to " << fdR0Lim; LOG(info) << "Set CbmTofCalibrator::R0Lim to " << fdR0Lim;
} }
} }
...@@ -1042,6 +1041,9 @@ Bool_t CbmTofFindTracks::WriteHistos() { ...@@ -1042,6 +1041,9 @@ Bool_t CbmTofFindTracks::WriteHistos() {
// ----- Public method Exec -------------------------------------------- // ----- Public method Exec --------------------------------------------
void CbmTofFindTracks::Exec(Option_t* opt) { void CbmTofFindTracks::Exec(Option_t* opt) {
if (gLogger->IsLogNeeded(fair::Severity::debug)) {
fDigiBdfPar->printParams();
}
if (!fEventsColl) { if (!fEventsColl) {
// fTofHitArray = (TClonesArray*)fTofHitArrayIn->Clone(); // fTofHitArray = (TClonesArray*)fTofHitArrayIn->Clone();
fTofHitArray = (TClonesArray*) fTofHitArrayIn; fTofHitArray = (TClonesArray*) fTofHitArrayIn;
...@@ -1105,7 +1107,7 @@ void CbmTofFindTracks::ExecFind(Option_t* /*opt*/) { ...@@ -1105,7 +1107,7 @@ void CbmTofFindTracks::ExecFind(Option_t* /*opt*/) {
if (fiBeamCounter > -1) { if (fiBeamCounter > -1) {
// set diamond positions to (0,0,0) to allow inclusion in straight line fit // set diamond positions to (0,0,0) to allow inclusion in straight line fit
if ((iDetId & 0x0000F00F) == 0x00005006) // modify diamond position if ((iDetId & DetMask) == fiBeamCounter) // modify diamond position
{ {
if (0. != fdBeamMomentumLab) { if (0. != fdBeamMomentumLab) {
Double_t dTargetTimeOffset = Double_t dTargetTimeOffset =
...@@ -1145,8 +1147,8 @@ void CbmTofFindTracks::ExecFind(Option_t* /*opt*/) { ...@@ -1145,8 +1147,8 @@ void CbmTofFindTracks::ExecFind(Option_t* /*opt*/) {
// tune positions and times // tune positions and times
Double_t dTcor = 0.; Double_t dTcor = 0.;
if ((iDetId & 0x0000F00F) if ((iDetId & DetMask)
!= 0x00005006) { // do not modify diamond position != fiBeamCounter) { // do not modify diamond position
Int_t iRpcInd = fMapRpcIdParInd[iDetId]; Int_t iRpcInd = fMapRpcIdParInd[iDetId];
if (fhPullT_Smt_Off != NULL) { if (fhPullT_Smt_Off != NULL) {
dTcor = (Double_t) fhPullT_Smt_Off->GetBinContent(iRpcInd + 1); dTcor = (Double_t) fhPullT_Smt_Off->GetBinContent(iRpcInd + 1);
...@@ -1170,11 +1172,12 @@ void CbmTofFindTracks::ExecFind(Option_t* /*opt*/) { ...@@ -1170,11 +1172,12 @@ void CbmTofFindTracks::ExecFind(Option_t* /*opt*/) {
MarkStationFired(iSt); MarkStationFired(iSt);
LOG(debug) << Form( LOG(debug) << Form(
"Exec found Hit %02d, addr 0x%08x, sta %02d, HM %02d, X %6.2f(%3.2f) Y " "Exec found Hit %02d, addr 0x%08x, sta %02d, %02d, HM %02d, X %6.2f(%3.2f) Y "
"%6.2f(%3.2f) Z %6.2f(%3.2f) T %6.2f(%3.2f) (%6.2f)", "%6.2f(%3.2f) Z %6.2f(%3.2f) T %6.2f(%3.2f) (%6.2f)",
iHit, iHit,
pHit->GetAddress(), pHit->GetAddress(),
GetStationOfAddr(iDetId), GetStationOfAddr(iDetId),
fDigiBdfPar->GetTrackingStation(pHit),
fStationHMul[GetStationOfAddr(iDetId)], fStationHMul[GetStationOfAddr(iDetId)],
pHit->GetX(), pHit->GetX(),
pHit->GetDx(), pHit->GetDx(),
...@@ -1187,9 +1190,10 @@ void CbmTofFindTracks::ExecFind(Option_t* /*opt*/) { ...@@ -1187,9 +1190,10 @@ void CbmTofFindTracks::ExecFind(Option_t* /*opt*/) {
dTcor); dTcor);
} }
LOG(debug) << Form("CbmTofFindTracks::Exec NStationsFired %d > %d Min ?", LOG(debug) << Form("CbmTofFindTracks::Exec NStationsFired %d > %d Min ?, NbStations %d",
GetNStationsFired(), GetNStationsFired(),
GetMinNofHits()); GetMinNofHits(),
fDigiBdfPar->GetNbTrackingStations());
if (GetNStationsFired() < GetMinNofHits()) { if (GetNStationsFired() < GetMinNofHits()) {
fInspectEvent = kFALSE; // mark event as non trackable fInspectEvent = kFALSE; // mark event as non trackable
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment