diff --git a/macro/run/run_reco.C b/macro/run/run_reco.C index 936982452904bd4c61be8989e81ba9c4acf67641..2b309f2139dba88cb916faa858f66bd6f7ea0b4e 100644 --- a/macro/run/run_reco.C +++ b/macro/run/run_reco.C @@ -390,7 +390,7 @@ void run_reco(TString input = "", Int_t nTimeSlices = -1, Int_t firstTimeSlice = std::cout << "Using material budget file " << parFile << std::endl; l1->SetStsMaterialBudgetFileName(parFile.Data()); } - + // ---- L1Algo runtime constants selection interface example ------ l1->GetL1Parameters()->SetMaxDoubletsPerSinglet(149); // ---------------------------------------------------------------- diff --git a/reco/L1/CbmL1.cxx b/reco/L1/CbmL1.cxx index 968f1653866e96d200e2366ffcf31ce1790ad93e..8c6f16537cbec47cf7a47555788dd833a5616591 100644 --- a/reco/L1/CbmL1.cxx +++ b/reco/L1/CbmL1.cxx @@ -755,7 +755,8 @@ InitStatus CbmL1::Init() if (fL1ParametersPtr) { algo->SetL1Parameters(*fL1ParametersPtr); delete fL1ParametersPtr; - } else { + } + else { LOG(error) << "-E- CbmL1: L1Parameters object was not transfered to the L1Algo core. Default parameters " << "will be used."; } @@ -1630,9 +1631,8 @@ void CbmL1::WriteSTAPAlgoData() // must be called after ReadEvent // write StsHitsStartIndex and StsHitsStopIndex n = 20; for (int i = 0; i < n; i++) { - if (int(L1Parameters::kMaxNstations) + 1 > i) { - fadata << algo->StsHitsStartIndex[i] << endl; - } else { + if (int(L1Parameters::kMaxNstations) + 1 > i) { fadata << algo->StsHitsStartIndex[i] << endl; } + else { fadata << 0 << endl; } }; @@ -1661,7 +1661,7 @@ void CbmL1::WriteSTAPPerfData() // must be called after ReadEvent TString fpdata_name = fSTAPDataDir + "data_perfo.txt"; // write data for performance in file // if ( vNEvent <= maxNEvent ) { - if (1) { + if (1) { if (vNEvent == 1) fpdata.open(fpdata_name, std::fstream::out); // begin new file else @@ -1888,7 +1888,7 @@ void CbmL1::ReadSTAPAlgoData() << " have been read." << endl; } // read StsHitsStartIndex and StsHitsStopIndex - n = 20; // TODO: Why 20? + n = 20; // TODO: Why 20? for (int i = 0; i < n; i++) { int tmp; fadata >> tmp; diff --git a/reco/L1/CbmL1.h b/reco/L1/CbmL1.h index 0094e4e85349b9d20884a7f7acfae6b93bf4bae2..6ce48fc37c41b97a6a7dd312291df8f66d9e568d 100644 --- a/reco/L1/CbmL1.h +++ b/reco/L1/CbmL1.h @@ -117,7 +117,7 @@ public: TString fSTAPDataDir_ = "./", int findParticleMode_ = 0); ~CbmL1(/*if (targetFieldSlice) delete;*/); - + L1Parameters* GetL1Parameters() { return fL1ParametersPtr; } void SetStsMaterialBudgetFileName(TString fileName) { fStsMatBudgetFileName = fileName; } @@ -217,7 +217,7 @@ public: private: static CbmL1* fInstance; - L1Parameters* fL1ParametersPtr {new L1Parameters()}; ///< pointer to L1Algo parameters class instance + L1Parameters* fL1ParametersPtr {new L1Parameters()}; ///< pointer to L1Algo parameters class instance L1AlgoInputData* fData {nullptr}; diff --git a/reco/L1/L1Algo/L1Algo.cxx b/reco/L1/L1Algo/L1Algo.cxx index c43f87e0c74600afec1786f0a5efbca3d70f78ab..b806bfd33995fdbec14bdce88129804c48e94812 100644 --- a/reco/L1/L1Algo/L1Algo.cxx +++ b/reco/L1/L1Algo/L1Algo.cxx @@ -17,9 +17,9 @@ L1Algo::L1Algo(unsigned int nThreads) void L1Algo::SetNThreads(unsigned int n) { - if (n > static_cast<unsigned int>(L1Parameters::kMaxNthreads)) { // TODO: Why do we need static_cast here? + if (n > static_cast<unsigned int>(L1Parameters::kMaxNthreads)) { // TODO: Why do we need static_cast here? LOG(fatal) << "L1Algo: n threads " << n << " is greater than the maximum " - << static_cast<unsigned int>(L1Parameters::kMaxNthreads); // The same + << static_cast<unsigned int>(L1Parameters::kMaxNthreads); // The same } fNThreads = n; @@ -61,7 +61,7 @@ void L1Algo::SetNThreads(unsigned int n) void L1Algo::Init(const L1Vector<fscal>& geo, const bool UseHitErrors, const TrackingMode mode, const bool MissingHits) { - fL1Parameters.Print(); // TODO: Wrap this line into debug + fL1Parameters.Print(); // TODO: Wrap this line into debug for (int iProc = 0; iProc < 4; iProc++) { for (int i = 0; i < 8; i++) { diff --git a/reco/L1/L1Algo/L1Algo.h b/reco/L1/L1Algo/L1Algo.h index c4c5057918456ce366aa1e695aec642e4cdb560b..78c91cca3d461ef2eb4a09c6634eee37977012f8 100644 --- a/reco/L1/L1Algo/L1Algo.h +++ b/reco/L1/L1Algo/L1Algo.h @@ -96,9 +96,9 @@ public: float fDefaultMass = 0.10565800; // muon mass // NOTE: technically it is a default value, so it can be modified - // with a setter. But on other hand it is a phys constant, so we must + // with a setter. But on other hand it is a phys constant, so we must // think again whether to handle the numerical literal as constexpr or not - //float fDefaultMass = L1Parameters::kMuonMass; // muon mass + //float fDefaultMass = L1Parameters::kMuonMass; // muon mass /////--> moved to L1Parameters /////static constexpr unsigned int fkStationBits = 6; @@ -111,14 +111,14 @@ public: /////--> moved to L1Parameters /////unsigned int fMaxDoubletsPerSinglet = 150; - /////unsigned int fMaxTripletPerDoublets = 15; + /////unsigned int fMaxTripletPerDoublets = 15; /// pack station, thread and triplet indices to an unique triplet ID static unsigned int PackTripletId(unsigned int Station, unsigned int Thread, unsigned int Triplet) { #ifndef FAST_CODE assert(Station < L1Parameters::kMaxNstations); - assert(Thread < L1Parameters::kMaxNthreads); + assert(Thread < L1Parameters::kMaxNthreads); assert(Triplet < L1Parameters::kMaxNtriplets); #endif constexpr unsigned int kMoveThread = L1Parameters::kTripletBits; @@ -149,14 +149,15 @@ public: } - L1Vector<L1Triplet> fTriplets[L1Parameters::kMaxNstations][L1Parameters::kMaxNthreads] { //<-------- + L1Vector<L1Triplet> fTriplets[L1Parameters::kMaxNstations][L1Parameters::kMaxNthreads] { + //<-------- {"L1Algo::fTriplets"}}; // created triplets at station + thread // Track candidates created out of adjacent triplets before the final track selection. // The candidates may share any amount of hits. L1Vector<L1Branch> fTrackCandidates[L1Parameters::kMaxNthreads] {"L1Algo::fTrackCandidates"}; - Tindex fDupletPortionStopIndex[L1Parameters::kMaxNstations] {0}; // end of the duplet portions for the station + Tindex fDupletPortionStopIndex[L1Parameters::kMaxNstations] {0}; // end of the duplet portions for the station L1Vector<Tindex> fDupletPortionSize {"L1Algo::fDupletPortionSize"}; // N duplets in a portion // @@ -223,7 +224,7 @@ public: int NStsStrips {0}; // number of strips L1Vector<L1Hit>* vStsHits {nullptr}; // hits as a combination of front-, backstrips and z-position - L1Grid vGrid[L1Parameters::kMaxNstations]; // hits as a combination of front-, backstrips and z-position + L1Grid vGrid[L1Parameters::kMaxNstations]; // hits as a combination of front-, backstrips and z-position L1Grid vGridTime[L1Parameters::kMaxNstations]; L1Vector<unsigned char>* fStripFlag {nullptr}; // information of hits station & using hits in tracks; @@ -285,8 +286,9 @@ public: MaxNPortion = 40 * coeff / multiCoeff, - MaxArrSize = - MaxNPortion * MaxPortionDoublets / L1Parameters::kMaxNstations //200000, // standart size of big arrays // mas be 40000 for normal work in cbmroot! + MaxArrSize = MaxNPortion * MaxPortionDoublets + / L1Parameters:: + kMaxNstations //200000, // standart size of big arrays // mas be 40000 for normal work in cbmroot! }; @@ -305,7 +307,7 @@ public: THitI StsHitsUnusedStopIndexEnd[L1Parameters::kMaxNstations + 1] {0}; - L1Vector<int> TripForHit[2] {"L1Algo::TripForHit"}; // TODO: what does '2' stand for? + L1Vector<int> TripForHit[2] {"L1Algo::TripForHit"}; // TODO: what does '2' stand for? // fvec u_front[Portion/fvecLen], u_back[Portion/fvecLen]; @@ -367,13 +369,13 @@ public: /// Sets L1Algo parameters object void SetL1Parameters(const L1Parameters& other) { fL1Parameters = other; } - /// Gets a constant reference to the L1Algo parameters object + /// Gets a constant reference to the L1Algo parameters object const L1Parameters& GetL1Parameters() const { return fL1Parameters; } - // TODO: We should think about, where non-constexpr L1Alog parameters can be modified. At the moment we can create a - // L1Parameters object somewhere outside the L1Algo, fill its fields there and then pass it directly to - // the L1Algo instance. + // TODO: We should think about, where non-constexpr L1Alog parameters can be modified. At the moment we can create a + // L1Parameters object somewhere outside the L1Algo, fill its fields there and then pass it directly to + // the L1Algo instance. - private: +private: /// Object containing L1Parameters. Default consturctor is used L1Parameters fL1Parameters; diff --git a/reco/L1/L1Algo/L1BaseStationInfo.h b/reco/L1/L1Algo/L1BaseStationInfo.h index fd6f0f79cd4dc0609d2ef2db50c582d79686b156..72d487dd6bc36e9f2532f5d121eb627d3cc0f54f 100644 --- a/reco/L1/L1Algo/L1BaseStationInfo.h +++ b/reco/L1/L1Algo/L1BaseStationInfo.h @@ -17,29 +17,30 @@ #define L1BaseStationInfo_h 1 // L1 core +#include "L1Def.h" #include "L1Parameters.h" #include "L1Station.h" -#include "L1Def.h" // C++ std -#include <string> #include <bitset> #include <iomanip> +#include <string> //#include <cmath> /// A base class which provides interface to L1Algo station geometry class L1BaseStationInfo { - private: - enum { // Here we list all the fields, which must be initialized by user +private: + enum + { // Here we list all the fields, which must be initialized by user // Basic fields initialization // L1Station initialization kEtype, kEtimeInfo, kEz, - kERmin, - kERmax, - kEmaterialInfoThick, + kERmin, + kERmax, + kEmaterialInfoThick, kEmaterialInfoRL, kEfieldSlice, kEstripsFrontPhi, @@ -49,27 +50,28 @@ class L1BaseStationInfo { // The last item is equal to the number of bits in fInitFlags kEND }; - public: - L1BaseStationInfo() { - std::cout << ">>>>>> L1BaseStationInfo: Constructor called\n"; // Temporary + +public: + L1BaseStationInfo() + { + std::cout << ">>>>>> L1BaseStationInfo: Constructor called\n"; // Temporary } - virtual ~L1BaseStationInfo() { - std::cout << ">>>>>> L1BaseStationInfo: Destructor called\n"; // Temporary + virtual ~L1BaseStationInfo() + { + std::cout << ">>>>>> L1BaseStationInfo: Destructor called\n"; // Temporary } //-------------------------------------------------------------------------------------------------------// // Basic methods // //-------------------------------------------------------------------------------------------------------// - + /// Returns the name of the station (TODO: connect official naming) std::string GetTypeName() const { return fTypeName; } /// Checks if all the necessary fields are initialized by user bool IsInitialized() const { return fInitFlags.size() == fInitFlags.count(); } /// Transfers all gathered data to L1Algo (TODO) - void TransferL1Station() { - /**********/ - } - void TransferData() { /*********/ } + void TransferL1Station() { /**********/ } + void TransferData() { /*********/ } //-------------------------------------------------------------------------------------------------------// // Interface for L1Station object initialization // @@ -78,54 +80,77 @@ class L1BaseStationInfo { // // Setters // - /// Sets type of station - void SetStationType(int inType) { fL1Station.type = inType; fInitFlags[kEtype] = true;} - // TODO: Temporary method, a type must be selected automatically in the derived classes - void SetTimeInfo(int inTimeInfo) { fL1Station.timeInfo = inTimeInfo; fInitFlags[kEtimeInfo] = true;} - // ??? + /// Sets type of station + void SetStationType(int inType) + { + fL1Station.type = inType; + fInitFlags[kEtype] = true; + } + // TODO: Temporary method, a type must be selected automatically in the derived classes + void SetTimeInfo(int inTimeInfo) + { + fL1Station.timeInfo = inTimeInfo; + fInitFlags[kEtimeInfo] = true; + } + // ??? /// Sets nominal z position of the station - void SetZ(double inZ) { fL1Station.z = inZ; fInitFlags[kEz] = true; } + void SetZ(double inZ) + { + fL1Station.z = inZ; + fInitFlags[kEz] = true; + } /// Sets min transverse size of the station - void SetRmin(double inRmin) { fL1Station.Rmin = inRmin; fInitFlags[kERmin] = true; } + void SetRmin(double inRmin) + { + fL1Station.Rmin = inRmin; + fInitFlags[kERmin] = true; + } /// Sets max transverse size of the station - void SetRmax(double inRmax) { fL1Station.Rmax = inRmax; fInitFlags[kERmax] = true; } + void SetRmax(double inRmax) + { + fL1Station.Rmax = inRmax; + fInitFlags[kERmax] = true; + } /// Sets station thickness and radiational length - void SetMaterial(double inThickness, double inRL) { -#ifndef L1_NO_ASSERT // check for zero denominator + void SetMaterial(double inThickness, double inRL) + { +#ifndef L1_NO_ASSERT // check for zero denominator L1_ASSERT(inRL, "Attempt of entering zero inRL (radiational length) value"); -#endif - fL1Station.materialInfo.thick = inThickness; - fL1Station.materialInfo.RL = inRL; - fL1Station.materialInfo.RadThick = fL1Station.materialInfo.thick / fL1Station.materialInfo.RL; +#endif + fL1Station.materialInfo.thick = inThickness; + fL1Station.materialInfo.RL = inRL; + fL1Station.materialInfo.RadThick = fL1Station.materialInfo.thick / fL1Station.materialInfo.RL; fL1Station.materialInfo.logRadThick = log(fL1Station.materialInfo.RadThick); - fInitFlags[kEmaterialInfoThick] = true; - fInitFlags[kEmaterialInfoRL] = true; + fInitFlags[kEmaterialInfoThick] = true; + fInitFlags[kEmaterialInfoRL] = true; } /// Sets arrays of the approximation coefficients for the field x, y and z-components, respectively - void SetFieldSlice(const double* Cx, const double* Cy, const double* Cz) { + void SetFieldSlice(const double* Cx, const double* Cy, const double* Cz) + { for (int idx = 0; idx < L1Parameters::kMaxNFieldApproxCoefficients; ++idx) { fL1Station.fieldSlice.cx[idx] = Cx[idx]; fL1Station.fieldSlice.cy[idx] = Cy[idx]; fL1Station.fieldSlice.cz[idx] = Cz[idx]; - fInitFlags[kEfieldSlice] = true; + fInitFlags[kEfieldSlice] = true; } } - /// Sets stereo angles and sigmas for front and back strips, automatically set frontInfo, backInfo, + /// Sets stereo angles and sigmas for front and back strips, automatically set frontInfo, backInfo, /// XYInfo, xInfo and yInfo - void SetFrontBackStripsGeometry(double f_phi, double f_sigma, double b_phi, double b_sigma) { - // TODO: may be is it better to define separate setters for these values and then calculate the + void SetFrontBackStripsGeometry(double f_phi, double f_sigma, double b_phi, double b_sigma) + { + // TODO: may be is it better to define separate setters for these values and then calculate the // rest somewhere below? // TODO: move into .cxx file //----- Original code from L1Algo ---------------------------------------------------------------------// - double c_f = cos(f_phi); - double s_f = sin(f_phi); - double c_b = cos(b_phi); - double s_b = sin(b_phi); + double c_f = cos(f_phi); + double s_f = sin(f_phi); + double c_b = cos(b_phi); + double s_b = sin(b_phi); // NOTE: Here additional double variables are used to save the precission @@ -136,7 +161,6 @@ class L1BaseStationInfo { fL1Station.backInfo.cos_phi = c_b; fL1Station.backInfo.sin_phi = s_b; fL1Station.backInfo.sigma2 = b_sigma * b_sigma; - //if (fabs(b_phi - f_phi) < .1) { // double th = b_phi - f_phi; @@ -167,7 +191,7 @@ class L1BaseStationInfo { fL1Station.yInfo.sin_phi = -c_f / (c_b * s_f - c_f * s_b); fL1Station.yInfo.sigma2 = fL1Station.XYInfo.C11; //-----------------------------------------------------------------------------------------------------// - + fInitFlags[kEstripsFrontPhi] = true; fInitFlags[kEstripsFrontSigma] = true; fInitFlags[kEstripsBackPhi] = true; @@ -179,36 +203,36 @@ class L1BaseStationInfo { // /// Gets nominal z position of the station - fvec GetZ() const { return fL1Station.z; } + fvec GetZ() const { return fL1Station.z; } /// Gets min transverse size of the station - fvec GetRmin() const { return fL1Station.Rmin; } + fvec GetRmin() const { return fL1Station.Rmin; } /// Gets max transverse size of the station - fvec GetRmax() const { return fL1Station.Rmax; } + fvec GetRmax() const { return fL1Station.Rmax; } /// Gets material thickness - fvec GetMaterialThick() const { return fL1Station.materialInfo.thick; } - // TODO: investigate if thick, RL and RadThick are useful, may be we should have only - // GetMateralLogRadThick? + fvec GetMaterialThick() const { return fL1Station.materialInfo.thick; } + // TODO: investigate if thick, RL and RadThick are useful, may be we should have only + // GetMateralLogRadThick? /// Gets the radiation length of the station material - fvec GetMaterialRL() const { return fL1Station.materialInfo.RL; } // TODO: -//- + fvec GetMaterialRL() const { return fL1Station.materialInfo.RL; } // TODO: -//- /// Gets the relative material thickness in units of the radiational length - fvec GetMaterialRadThick() const { return fL1Station.materialInfo.RadThick; } // TODO: Rename? + fvec GetMaterialRadThick() const { return fL1Station.materialInfo.RadThick; } // TODO: Rename? /// Gets log of the relative material thickness in units of the radiational length - fvec GetMaterialLogRadThick() const { return fL1Station.materialInfo.logRadThick; } + fvec GetMaterialLogRadThick() const { return fL1Station.materialInfo.logRadThick; } /// Gets a coefficient with idx for the field x-component approximation - fvec GetFieldSliceCx(int idx) const { return fL1Station.fieldSlice.cx[idx]; } + fvec GetFieldSliceCx(int idx) const { return fL1Station.fieldSlice.cx[idx]; } /// Gets a coefficient with idx for the field y-component approximation - fvec GetFieldSliceCy(int idx) const { return fL1Station.fieldSlice.cy[idx]; } + fvec GetFieldSliceCy(int idx) const { return fL1Station.fieldSlice.cy[idx]; } /// Gets a coefficient with idx for the field z-component approximation - fvec GetFieldSliceCz(int idx) const { return fL1Station.fieldSlice.cz[idx]; } + fvec GetFieldSliceCz(int idx) const { return fL1Station.fieldSlice.cz[idx]; } /// Gets array of the coefficients for the field x-component approximation - const fvec * GetFieldSliceCx() const { return fL1Station.fieldSlice.cx; } + const fvec* GetFieldSliceCx() const { return fL1Station.fieldSlice.cx; } /// Gets array of the coefficients for the field y-component approximation - const fvec * GetFieldSliceCy() const { return fL1Station.fieldSlice.cy; } + const fvec* GetFieldSliceCy() const { return fL1Station.fieldSlice.cy; } /// Gets array of the coefficients for the field z-component approximation - const fvec * GetFieldSliceCz() const { return fL1Station.fieldSlice.cz; } + const fvec* GetFieldSliceCz() const { return fL1Station.fieldSlice.cz; } //-------------------------------------------------------------------------------------------------------// @@ -216,24 +240,25 @@ class L1BaseStationInfo { //-------------------------------------------------------------------------------------------------------// /// Prints registered fields (TODO: tmp, may be one needs to wrap it into debug directives) - void Print() { + void Print() + { LOG(INFO) << "== L1Algo: station info ==========================================================="; LOG(INFO) << ""; LOG(INFO) << " L1Station fields:"; - LOG(INFO) << " z position: " << fL1Station.z[0] ; - LOG(INFO) << " Rmin: " << fL1Station.Rmin[0] ; - LOG(INFO) << " Rmax: " << fL1Station.Rmax[0] ; - LOG(INFO) << " Thickness (X): " << fL1Station.materialInfo.thick[0] ; - LOG(INFO) << " Radiational length (X0): " << fL1Station.materialInfo.RL[0] ; - LOG(INFO) << " X / X0: " << fL1Station.materialInfo.RadThick[0] ; - LOG(INFO) << " log(X / X0): " << fL1Station.materialInfo.logRadThick[0] ; + LOG(INFO) << " z position: " << fL1Station.z[0]; + LOG(INFO) << " Rmin: " << fL1Station.Rmin[0]; + LOG(INFO) << " Rmax: " << fL1Station.Rmax[0]; + LOG(INFO) << " Thickness (X): " << fL1Station.materialInfo.thick[0]; + LOG(INFO) << " Radiational length (X0): " << fL1Station.materialInfo.RL[0]; + LOG(INFO) << " X / X0: " << fL1Station.materialInfo.RadThick[0]; + LOG(INFO) << " log(X / X0): " << fL1Station.materialInfo.logRadThick[0]; LOG(INFO) << " Field approximation coefficients:"; LOG(INFO) << " idx CX CY CZ"; for (int idx = 0; idx < L1Parameters::kMaxNFieldApproxCoefficients; ++idx) { - LOG(INFO) << std::setw(9) << std::setfill(' ') << idx << ' ' - << std::setw(10) << std::setfill(' ') << fL1Station.fieldSlice.cx[idx][0] << ' ' - << std::setw(10) << std::setfill(' ') << fL1Station.fieldSlice.cy[idx][0] << ' ' - << std::setw(10) << std::setfill(' ') << fL1Station.fieldSlice.cz[idx][0]; + LOG(INFO) << std::setw(9) << std::setfill(' ') << idx << ' ' << std::setw(10) << std::setfill(' ') + << fL1Station.fieldSlice.cx[idx][0] << ' ' << std::setw(10) << std::setfill(' ') + << fL1Station.fieldSlice.cy[idx][0] << ' ' << std::setw(10) << std::setfill(' ') + << fL1Station.fieldSlice.cz[idx][0]; } LOG(INFO) << " Strips geometry:"; LOG(INFO) << " Front:"; @@ -259,20 +284,17 @@ class L1BaseStationInfo { LOG(INFO) << ""; LOG(INFO) << "==================================================================================="; } - private: + +private: /// Flags set. A particular flag is up if the corresponding setter was called (experimental) std::bitset<L1BaseStationInfo::kEND> fInitFlags; - std::string fTypeName {"BASE"}; - L1Station fL1Station {}; - // TODO (!!!!) MUST THINK ABOUT THIS OBJECT LIFE TIME: will it be better to copy - // or to move it to the core? If the second, what should we do with - // getters? Do we need to lock them, when the fL1Station object will - // be transfered? - - - + std::string fTypeName {"BASE"}; + L1Station fL1Station {}; + // TODO (!!!!) MUST THINK ABOUT THIS OBJECT LIFE TIME: will it be better to copy + // or to move it to the core? If the second, what should we do with + // getters? Do we need to lock them, when the fL1Station object will + // be transfered? }; - -#endif // L1BaseStationInfo_h +#endif // L1BaseStationInfo_h diff --git a/reco/L1/L1Algo/L1Parameters.h b/reco/L1/L1Algo/L1Parameters.h index ee0091d265b34e334c8089ad0e34f7800550975b..493add49a12ee213abbc106fc4915a741635a5f8 100644 --- a/reco/L1/L1Algo/L1Parameters.h +++ b/reco/L1/L1Algo/L1Parameters.h @@ -15,28 +15,28 @@ #include <FairLogger.h> class L1Parameters { - public: +public: //-------------------------------------------------------------------------------------------------------// // Compile time constants // //-------------------------------------------------------------------------------------------------------// /// Amount of coefficients in field approximations - static constexpr int kMaxNFieldApproxCoefficients {21}; // TODO: May be it is better to use the polynomial - // order instead of this? + static constexpr int kMaxNFieldApproxCoefficients {21}; // TODO: May be it is better to use the polynomial + // order instead of this? /// Amount of bits to code one station static constexpr unsigned int kStationBits {6}; /// Amount of bits to code one thread - static constexpr unsigned int kThreadBits {6}; + static constexpr unsigned int kThreadBits {6}; /// Amount of bits to code one triple static constexpr unsigned int kTripletBits {32 - kStationBits - kThreadBits}; /// Max number of stations static constexpr unsigned int kMaxNstations {1 << kStationBits}; // 2^6 = 64 /// Max number of threads - static constexpr unsigned int kMaxNthreads {1 << kThreadBits}; // 2^6 = 64 + static constexpr unsigned int kMaxNthreads {1 << kThreadBits}; // 2^6 = 64 /// Max number of triplets static constexpr unsigned int kMaxNtriplets {1 << kTripletBits}; // 2^20 = 1,048,576 - public: +public: //-------------------------------------------------------------------------------------------------------// // Basic methods // //-------------------------------------------------------------------------------------------------------// @@ -53,7 +53,8 @@ class L1Parameters { /// Move assignment operator L1Parameters& operator=(L1Parameters&& /*other*/) = default; /// Prints configuration - void Print() { + void Print() + { LOG(INFO) << "== L1Algo parameters =============================================================="; LOG(INFO) << ""; LOG(INFO) << " COMPILE TIME CONSTANTS"; @@ -69,10 +70,10 @@ class L1Parameters { LOG(INFO) << " Max number of triplets per doublet: " << fMaxTripletPerDoublets; LOG(INFO) << "==================================================================================="; } - // TODO: change constant names with actual (human) names - // TODO: create a map with parameters, their description and + // TODO: change constant names with actual (human) names + // TODO: create a map with parameters, their description and - public: +public: //-------------------------------------------------------------------------------------------------------// // Runtime constants // //-------------------------------------------------------------------------------------------------------// @@ -85,12 +86,11 @@ class L1Parameters { unsigned int GetMaxTripletPerDoublets() const { return fMaxTripletPerDoublets; } - private: - /// +private: + /// unsigned int fMaxDoubletsPerSinglet {150}; /// unsigned int fMaxTripletPerDoublets {15}; - }; -#endif // L1Parameters_h +#endif // L1Parameters_h diff --git a/reco/L1/L1Algo/L1TrackFitter.cxx b/reco/L1/L1Algo/L1TrackFitter.cxx index da68b3fc4e4727337ca0ae9c797b6ec545d9aed7..3a385070b7278548f5cfc045a884dd95405d5541 100644 --- a/reco/L1/L1Algo/L1TrackFitter.cxx +++ b/reco/L1/L1Algo/L1TrackFitter.cxx @@ -352,10 +352,10 @@ void L1Algo::L1KFTrackFitter() L1Station* sta = vStations; L1Station staFirst, staLast; - fvec x[L1Parameters::kMaxNstations], u[L1Parameters::kMaxNstations], v[L1Parameters::kMaxNstations], - y[L1Parameters::kMaxNstations], time[L1Parameters::kMaxNstations], timeEr[L1Parameters::kMaxNstations], + fvec x[L1Parameters::kMaxNstations], u[L1Parameters::kMaxNstations], v[L1Parameters::kMaxNstations], + y[L1Parameters::kMaxNstations], time[L1Parameters::kMaxNstations], timeEr[L1Parameters::kMaxNstations], z[L1Parameters::kMaxNstations]; - fvec d_x[L1Parameters::kMaxNstations], d_y[L1Parameters::kMaxNstations], d_xy[L1Parameters::kMaxNstations], + fvec d_x[L1Parameters::kMaxNstations], d_y[L1Parameters::kMaxNstations], d_xy[L1Parameters::kMaxNstations], d_u[L1Parameters::kMaxNstations], d_v[L1Parameters::kMaxNstations]; fvec x_first, y_first, time_first, x_last, y_last, time_last, time_er_first, time_er_last, d_x_fst, d_y_fst, d_xy_fst, time_er_lst, d_x_lst, d_y_lst, d_xy_lst; @@ -776,10 +776,10 @@ void L1Algo::L1KFTrackFitterMuch() L1Station* sta = vStations; L1Station staFirst, staLast; - fvec x[L1Parameters::kMaxNstations], u[L1Parameters::kMaxNstations], v[L1Parameters::kMaxNstations], - y[L1Parameters::kMaxNstations], time[L1Parameters::kMaxNstations], timeEr[L1Parameters::kMaxNstations], + fvec x[L1Parameters::kMaxNstations], u[L1Parameters::kMaxNstations], v[L1Parameters::kMaxNstations], + y[L1Parameters::kMaxNstations], time[L1Parameters::kMaxNstations], timeEr[L1Parameters::kMaxNstations], z[L1Parameters::kMaxNstations]; - fvec d_x[L1Parameters::kMaxNstations], d_y[L1Parameters::kMaxNstations], d_xy[L1Parameters::kMaxNstations], + fvec d_x[L1Parameters::kMaxNstations], d_y[L1Parameters::kMaxNstations], d_xy[L1Parameters::kMaxNstations], d_u[L1Parameters::kMaxNstations], d_v[L1Parameters::kMaxNstations]; fvec x_first, y_first, time_first, x_last, y_last, time_last, time_er_fst, d_x_fst, d_y_fst, d_xy_fst, time_er_lst, d_x_lst, d_y_lst, d_xy_lst, dz;