Skip to content
Snippets Groups Projects
Commit a277c317 authored by Sergey Gorbunov's avatar Sergey Gorbunov
Browse files

clang-format

parent 2438c2d3
No related branches found
No related tags found
1 merge request!1578mvd: bugfix in the coordinate transformation
......@@ -17,11 +17,11 @@
// Includes from base
#include "CbmMCTrack.h"
#include "FairGeoNode.h"
#include "FairRootManager.h"
#include "FairRunAna.h"
#include "FairRuntimeDb.h"
#include <Logger.h>
// Includes from ROOT
......@@ -262,7 +262,9 @@ void CbmMvdSensorFindHitTask::Exec()
digi = (CbmMvdDigi*) fInputBuffer->At(iDigi);
if (!digi) { LOG(error) << "CbmMvdSensorFindHitTask - Fatal: No Digits found in this event."; }
if (!digi) {
LOG(error) << "CbmMvdSensorFindHitTask - Fatal: No Digits found in this event.";
}
Int_t nDigis = fInputBuffer->GetEntriesFast();
......@@ -302,7 +304,9 @@ void CbmMvdSensorFindHitTask::Exec()
digi = (CbmMvdDigi*) fInputBuffer->At(k);
refId = digi->GetRefId();
if (refId < 0) { LOG(fatal) << "RefID of this digi is -1 this should not happend "; }
if (refId < 0) {
LOG(fatal) << "RefID of this digi is -1 this should not happend ";
}
//apply fNeighThreshold
if (GetAdcCharge(digi->GetCharge()) < fNeighThreshold) continue;
......@@ -397,7 +401,9 @@ void CbmMvdSensorFindHitTask::Exec()
void CbmMvdSensorFindHitTask::AddNoiseToDigis(CbmMvdDigi* digi)
{
Double_t noise = fGausArray[fGausArrayIt++]; // noise is simulated by a gauss
if (fGausArrayIt - 2 > fGausArrayLimit) { fGausArrayIt = 0; };
if (fGausArrayIt - 2 > fGausArrayLimit) {
fGausArrayIt = 0;
};
Double_t charge = digi->GetCharge() + noise;
digi->SetCharge((int) charge);
}
......@@ -584,7 +590,9 @@ void CbmMvdSensorFindHitTask::CreateHit(vector<Int_t>* clusterArray, TVector3& p
nClusters = fClusters->GetEntriesFast();
CbmMvdCluster* clusterNew =
new ((*fClusters)[nClusters]) CbmMvdCluster(digiArray, digisInArray, clusterSize, latestClusterIndex);
if (latestCluster) { latestCluster->SetNeighbourUp(nClusters); }
if (latestCluster) {
latestCluster->SetNeighbourUp(nClusters);
}
latestCluster = clusterNew;
latestClusterIndex = nClusters;
digisInArray = 0;
......@@ -596,7 +604,9 @@ void CbmMvdSensorFindHitTask::CreateHit(vector<Int_t>* clusterArray, TVector3& p
CbmMvdCluster* clusterNew =
new ((*fClusters)[nClusters]) CbmMvdCluster(digiArray, digisInArray, clusterSize, latestClusterIndex);
clusterNew->SetNeighbourUp(-1);
if (latestCluster) { latestCluster->SetNeighbourUp(nClusters); };
if (latestCluster) {
latestCluster->SetNeighbourUp(nClusters);
};
};
......@@ -721,7 +731,9 @@ void CbmMvdSensorFindHitTask::UpdateDebugHistos(vector<Int_t>* clusterArray, Int
((TH1F*) fPixelChargeHistos->At(51))->Fill(q25);
((TH1F*) fPixelChargeHistos->At(52))->Fill(q49);
if (fHitPosX - xCentralTrack > 0.003 && fHitPosZ < 6) { fBadHitHisto->Fill(fHitPosX, fHitPosY); }
if (fHitPosX - xCentralTrack > 0.003 && fHitPosZ < 6) {
fBadHitHisto->Fill(fHitPosX, fHitPosY);
}
fResolutionHistoX->Fill(fHitPosX - xCentralTrack);
fResolutionHistoY->Fill(fHitPosY - yCentralTrack);
......@@ -918,10 +930,14 @@ Int_t CbmMvdSensorFindHitTask::GetAdcCharge(Float_t charge)
Int_t adcCharge;
if (charge < fAdcOffset) { return 0; };
if (charge < fAdcOffset) {
return 0;
};
adcCharge = int((charge - fAdcOffset) / fAdcStepSize);
if (adcCharge > fAdcSteps - 1) { adcCharge = fAdcSteps - 1; }
if (adcCharge > fAdcSteps - 1) {
adcCharge = fAdcSteps - 1;
}
return adcCharge;
}
......
......@@ -520,10 +520,14 @@ Int_t CbmMvdSensorHitfinderTask::GetAdcCharge(Float_t charge)
Int_t adcCharge;
if (charge < fAdcOffset) { return 0; };
if (charge < fAdcOffset) {
return 0;
};
adcCharge = int((charge - fAdcOffset) / fAdcStepSize);
if (adcCharge > fAdcSteps - 1) { adcCharge = fAdcSteps - 1; }
if (adcCharge > fAdcSteps - 1) {
adcCharge = fAdcSteps - 1;
}
return adcCharge;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment