Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-07 22:33:35

0001 #include "L1Trigger/TrackFindingTracklet/interface/TrackFitMemory.h"
0002 #include "L1Trigger/TrackFindingTracklet/interface/SLHCEvent.h"
0003 #include "L1Trigger/TrackFindingTracklet/interface/Tracklet.h"
0004 #include <iomanip>
0005 #include <filesystem>
0006 
0007 using namespace std;
0008 using namespace trklet;
0009 
0010 TrackFitMemory::TrackFitMemory(string name, Settings const& settings, double phimin, double phimax)
0011     : MemoryBase(name, settings) {
0012   phimin_ = phimin;
0013   phimax_ = phimax;
0014 }
0015 
0016 void TrackFitMemory::writeTF(bool first, unsigned int iSector) {
0017   iSector_ = iSector;
0018   const string dirFT = settings_.memPath() + "FitTrack/";
0019 
0020   std::ostringstream oss;
0021   oss << dirFT << "TrackFit_" << getName() << "_" << std::setfill('0') << std::setw(2) << (iSector_ + 1) << ".dat";
0022   auto const& fname = oss.str();
0023 
0024   openfile(out_, first, dirFT, fname, __FILE__, __LINE__);
0025 
0026   out_ << "BX = " << (bitset<3>)bx_ << " Event : " << event_ << endl;
0027 
0028   for (unsigned int j = 0; j < tracks_.size(); j++) {
0029     out_ << "0x";
0030     out_ << std::setfill('0') << std::setw(2);
0031     out_ << hex << j << dec << " ";
0032     out_ << tracks_[j]->trackfitstr() << " " << trklet::hexFormat(tracks_[j]->trackfitstr());
0033     out_ << "\n";
0034   }
0035   out_.close();
0036 
0037   bx_++;
0038   event_++;
0039   if (bx_ > 7)
0040     bx_ = 0;
0041 }