diff --git a/reco/tasks/CbmTaskTofClusterizer.cxx b/reco/tasks/CbmTaskTofClusterizer.cxx index ceb8b33eff3921ccdd79c58b1cc5c22ac4bced04..4f0523bebf029519b8b349f62be9fb5803f5fdcb 100644 --- a/reco/tasks/CbmTaskTofClusterizer.cxx +++ b/reco/tasks/CbmTaskTofClusterizer.cxx @@ -17,6 +17,7 @@ #include "FairRootManager.h" #include "FairRunAna.h" #include "FairRuntimeDb.h" + #include <Logger.h> // ROOT Classes and includes @@ -24,12 +25,12 @@ #include "TStopwatch.h" // C++ Classes and includes -#include <iomanip> -#include <vector> - #include "compat/Filesystem.h" #include "config/Yaml.h" +#include <iomanip> +#include <vector> + /************************************************************************************/ CbmTaskTofClusterizer::CbmTaskTofClusterizer() : CbmTaskTofClusterizer("TestbeamClusterizer", 0, 0) {} @@ -203,7 +204,9 @@ void CbmTaskTofClusterizer::ExecEvent(Option_t* /*option*/, CbmEvent* tEvent) fTofHitsColl->Delete(); // Computationally costly!, but hopefully safe fTofDigiMatchColl->Delete(); FairRootFileSink* sink = (FairRootFileSink*) FairRootManager::Instance()->GetSink(); - if (sink) { fiOutputTreeEntry = sink->GetOutTree()->GetEntries(); } + if (sink) { + fiOutputTreeEntry = sink->GetOutTree()->GetEntries(); + } fiNbHits = 0; @@ -268,7 +271,9 @@ bool CbmTaskTofClusterizer::RegisterInputs() } // if( ! fBmonDigiVec ) fTsHeader = fManager->InitObjectAs<CbmTsEventHeader const*>("EventHeader."); //for data - if (NULL == fTsHeader) { LOG(info) << "CbmTaskTofClusterizer::RegisterInputs => Could not get TsHeader Object"; } + if (NULL == fTsHeader) { + LOG(info) << "CbmTaskTofClusterizer::RegisterInputs => Could not get TsHeader Object"; + } return true; } diff --git a/reco/tasks/CbmTaskTofClusterizer.h b/reco/tasks/CbmTaskTofClusterizer.h index 549b3bd110de8e29c24f1f6b37128eb8953d3492..a9adfaea0abdaeec982644d2f2ff7aa501279362 100644 --- a/reco/tasks/CbmTaskTofClusterizer.h +++ b/reco/tasks/CbmTaskTofClusterizer.h @@ -13,7 +13,6 @@ class CbmTsEventHeader; #include "CbmMatch.h" #include "CbmTofDigi.h" - #include "tof/Calibrate.h" #include "tof/Clusterizer.h" #include "tof/Hitfind.h" @@ -33,7 +32,7 @@ class TClonesArray; class CbmTaskTofClusterizer : public FairTask { -public: + public: /** ** @brief Constructor. **/ @@ -56,7 +55,7 @@ public: /** ** @brief Inherited from FairTask. **/ - virtual void SetParContainers() {}; + virtual void SetParContainers(){}; /** ** @brief Inherited from FairTask. @@ -90,8 +89,8 @@ public: void SetWriteHitsInOut(bool bHits) { fbWriteHitsInOut = bHits; } void SetDeadStrips(int32_t iDet, uint32_t ival); -protected: -private: + protected: + private: int32_t iNbTs = 0; int fiHitStart = 0; bool bAddBeamCounterSideDigi = true; @@ -136,9 +135,9 @@ private: const CbmTsEventHeader* fTsHeader; // Input variables - std::vector<CbmTofDigi> fTofDigiVec {}; //! TOF Digis - CbmDigiManager* fDigiMan; // TOF Input Digis - TClonesArray* fEventsColl; // CBMEvents (time based) + std::vector<CbmTofDigi> fTofDigiVec{}; //! TOF Digis + CbmDigiManager* fDigiMan; // TOF Input Digis + TClonesArray* fEventsColl; // CBMEvents (time based) // Output variables bool fbWriteHitsInOut; diff --git a/reco/tasks/CbmTaskTofClusterizerParWrite.cxx b/reco/tasks/CbmTaskTofClusterizerParWrite.cxx index 0908c7422948a56f50a6b2b6966733f5c171fddf..086fab63f82298fa7af7a021031451068042b17d 100644 --- a/reco/tasks/CbmTaskTofClusterizerParWrite.cxx +++ b/reco/tasks/CbmTaskTofClusterizerParWrite.cxx @@ -20,12 +20,11 @@ #include "FairRootManager.h" #include "FairRunAna.h" #include "FairRuntimeDb.h" -#include <Logger.h> - +#include "config/Yaml.h" #include "tof/CalibrateSetup.h" #include "tof/HitfindSetup.h" -#include "config/Yaml.h" +#include <Logger.h> // ROOT Classes and includes #include "TClonesArray.h" @@ -125,7 +124,8 @@ bool CbmTaskTofClusterizerParWrite::InitParameters() "with geometries after v14a !!!"; return false; } - if (iGeoVersion == k14a) fTofId = new CbmTofDetectorId_v14a(); + if (iGeoVersion == k14a) + fTofId = new CbmTofDetectorId_v14a(); else fTofId = new CbmTofDetectorId_v21a(); @@ -233,7 +233,9 @@ bool CbmTaskTofClusterizerParWrite::InitCalibParameter() } LOG(info) << "CbmTaskTofClusterizerParWrite::InitCalibParameter: defaults set"; - if (fCalMode <= 0) { return true; } // Skip calibration from histograms in mode zero + if (fCalMode <= 0) { + return true; + } // Skip calibration from histograms in mode zero /// Save old global file and folder pointer to avoid messing with FairRoot // <= To prevent histos from being sucked in by the param file of the TRootManager! @@ -301,7 +303,9 @@ bool CbmTaskTofClusterizerParWrite::InitCalibParameter() for (int32_t iCh = 0; iCh < iNbCh; iCh++) { for (int32_t iSide = 0; iSide < 2; iSide++) { double TotMean = htempTot_Mean->GetBinContent(iCh * 2 + 1 + iSide); //nh +1 empirical(?) - if (0.001 < TotMean) { vCPTotGain[iCh][iSide] *= fdTTotMean / TotMean; } + if (0.001 < TotMean) { + vCPTotGain[iCh][iSide] *= fdTTotMean / TotMean; + } vCPTotOff[iCh][iSide] = htempTot_Off->GetBinContent(iCh * 2 + 1 + iSide); } double YMean = ((TProfile*) htempPos_pfx)->GetBinContent(iCh + 1); //nh +1 empirical(?) @@ -444,7 +448,9 @@ bool CbmTaskTofClusterizerParWrite::InitAlgos() const int32_t rpcAddress = CbmTofAddress::GetUniqueAddress(iSm, iRpc, 0, 0, iSmType); CbmTofCell* channelInfo = fDigiPar->GetCell(rpcAddress); - if (channelInfo == nullptr) { continue; } + if (channelInfo == nullptr) { + continue; + } // prepare local->global trafo gGeoManager->FindNode(channelInfo->GetX(), channelInfo->GetY(), channelInfo->GetZ()); diff --git a/reco/tasks/CbmTaskTofClusterizerParWrite.h b/reco/tasks/CbmTaskTofClusterizerParWrite.h index f57a5a6a5c1f9a14c6a21b6e1dba517553e2dc60..1dc21f5c551b1aded1331e8ef8db0eacb2a1e5c1 100644 --- a/reco/tasks/CbmTaskTofClusterizerParWrite.h +++ b/reco/tasks/CbmTaskTofClusterizerParWrite.h @@ -29,7 +29,7 @@ class TClonesArray; class CbmTaskTofClusterizerParWrite : public FairTask { -public: + public: /** ** @brief Constructor. **/ @@ -57,12 +57,12 @@ public: /** ** @brief Inherited from FairTask. **/ - virtual void Exec(Option_t* option) {}; + virtual void Exec(Option_t* option){}; /** ** @brief Inherited from FairTask. **/ - virtual void Finish() {}; + virtual void Finish(){}; inline void SetCalMode(int32_t iMode) { fCalMode = iMode; } inline void PosYMaxScal(double val) { fPosYMaxScal = val; } @@ -78,8 +78,8 @@ public: void SwapChannelSides(bool bSwap) { fbSwapChannelSides = bSwap; } void SetDeadStrips(int32_t iDet, uint32_t ival); -protected: -private: + protected: + private: bool bAddBeamCounterSideDigi = true; const int32_t nbClWalkBinX = 50; // was 100 (11.10.2018) const int32_t nbClWalkBinY = 41; // choose odd number to have central bin symmetric around 0