CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
trklet::TrackletCalculator Class Reference

#include <TrackletCalculator.h>

Inheritance diagram for trklet::TrackletCalculator:
trklet::TrackletCalculatorBase trklet::ProcessBase

Public Member Functions

void addInput (MemoryBase *memory, std::string input) override
 
void addOutput (MemoryBase *memory, std::string output) override
 
void addOutputProjection (TrackletProjectionsMemory *&outputProj, MemoryBase *memory)
 
void execute (unsigned int iSector, double phimin, double phimax)
 
 TrackletCalculator (std::string name, Settings const &settings, Globals *globals)
 
 ~TrackletCalculator () override=default
 
- Public Member Functions inherited from trklet::TrackletCalculatorBase
void addDiskProj (Tracklet *tracklet, int disk)
 
bool addLayerProj (Tracklet *tracklet, int layer)
 
void addProjection (int layer, int iphi, TrackletProjectionsMemory *trackletprojs, Tracklet *tracklet)
 
void addProjectionDisk (int disk, int iphi, TrackletProjectionsMemory *trackletprojs, Tracklet *tracklet)
 
bool barrelSeeding (const Stub *innerFPGAStub, const L1TStub *innerStub, const Stub *outerFPGAStub, const L1TStub *outerStub)
 
bool diskSeeding (const Stub *innerFPGAStub, const L1TStub *innerStub, const Stub *outerFPGAStub, const L1TStub *outerStub)
 
void exactproj (double rproj, double rinv, double phi0, double t, double z0, double &phiproj, double &zproj, double &phider, double &zder)
 
void exactprojdisk (double zproj, double rinv, double phi0, double t, double z0, double &phiproj, double &rproj, double &phider, double &rder)
 
void exacttracklet (double r1, double z1, double phi1, double r2, double z2, double phi2, double, double &rinv, double &phi0, double &t, double &z0, double phiproj[N_LAYER - 2], double zproj[N_LAYER - 2], double phider[N_LAYER - 2], double zder[N_LAYER - 2], double phiprojdisk[N_DISK], double rprojdisk[N_DISK], double phiderdisk[N_DISK], double rderdisk[N_DISK])
 
void exacttrackletdisk (double r1, double z1, double phi1, double r2, double z2, double phi2, double, double &rinv, double &phi0, double &t, double &z0, double phiprojLayer[N_PSLAYER], double zprojLayer[N_PSLAYER], double phiderLayer[N_PSLAYER], double zderLayer[N_PSLAYER], double phiproj[N_DISK - 2], double rproj[N_DISK - 2], double phider[N_DISK - 2], double rder[N_DISK - 2])
 
void exacttrackletOverlap (double r1, double z1, double phi1, double r2, double z2, double phi2, double, double &rinv, double &phi0, double &t, double &z0, double phiprojLayer[N_PSLAYER], double zprojLayer[N_PSLAYER], double phiderLayer[N_PSLAYER], double zderLayer[N_PSLAYER], double phiproj[N_DISK - 2], double rproj[N_DISK - 2], double phider[N_DISK - 2], double rder[N_DISK - 2])
 
bool goodTrackPars (bool goodrinv, bool goodz0)
 
bool inSector (int iphi0, int irinv, double phi0approx, double rinvapprox)
 
bool overlapSeeding (const Stub *innerFPGAStub, const L1TStub *innerStub, const Stub *outerFPGAStub, const L1TStub *outerStub)
 
 TrackletCalculatorBase (std::string name, Settings const &settings, Globals *global)
 
 ~TrackletCalculatorBase () override=default
 
- Public Member Functions inherited from trklet::ProcessBase
unsigned int getISeed (const std::string &name)
 
std::string const & getName () const
 
void initLayerDisk (unsigned int pos, int &layer, int &disk)
 
void initLayerDisk (unsigned int pos, int &layer, int &disk, int &layerdisk)
 
unsigned int initLayerDisk (unsigned int pos)
 
void initLayerDisksandISeed (unsigned int &layerdisk1, unsigned int &layerdisk2, unsigned int &iSeed)
 
void initLayerDisksandISeedDisp (unsigned int &layerdisk1, unsigned int &layerdisk2, unsigned int &layerdisk3, unsigned int &iSeed)
 
unsigned int nbits (unsigned int power)
 
 ProcessBase (std::string name, Settings const &settings, Globals *global)
 
virtual ~ProcessBase ()=default
 

Private Member Functions

void writeFirmwareDesign (void(*writeDesign)(const std::vector< VarBase *> &, const std::string &))
 
void writeInvTable (void(*writeLUT)(const VarInv &, const std::string &))
 

Private Attributes

std::vector< AllStubsMemory * > innerallstubs_
 
int iTC_
 
std::vector< AllStubsMemory * > outerallstubs_
 
std::vector< StubPairsMemory * > stubpairs_
 

Additional Inherited Members

- Protected Attributes inherited from trklet::TrackletCalculatorBase
unsigned int iSector_
 
unsigned int iSeed_
 
unsigned int layerdisk1_
 
unsigned int layerdisk2_
 
double phimax_
 
double phimin_
 
int TCIndex_
 
TrackletParametersMemorytrackletpars_
 
std::vector< std::vector< TrackletProjectionsMemory * > > trackletprojdisks_
 
std::vector< std::vector< TrackletProjectionsMemory * > > trackletprojlayers_
 
- Protected Attributes inherited from trklet::ProcessBase
Globalsglobals_
 
std::string name_
 
Settings const & settings_
 

Detailed Description

Definition at line 20 of file TrackletCalculator.h.

Constructor & Destructor Documentation

◆ TrackletCalculator()

TrackletCalculator::TrackletCalculator ( std::string  name,
Settings const &  settings,
Globals globals 
)

Definition at line 17 of file TrackletCalculator.cc.

References funct::abs(), cms::cuda::assert(), make_classfiles::fs, trklet::ProcessBase::globals_, trklet::VarBase::hls, trklet::VarBase::hls_print(), trklet::ProcessBase::initLayerDisksandISeed(), trklet::TrackletCalculatorBase::iSeed_, iTC_, trklet::Globals::ITC_L1L2(), trklet::VarBase::K(), trklet::TrackletCalculatorBase::layerdisk1_, trklet::TrackletCalculatorBase::layerdisk2_, trklet::N_DISK, trklet::N_LAYER, trklet::Settings::nallstubs(), trklet::ProcessBase::name_, trklet::Settings::ntrackletmax(), trklet::IMATH_TrackletCalculator::phi0_final, trklet::Settings::rcrit(), trklet::Settings::reduced(), trklet::IMATH_TrackletCalculator::rinv_final, trklet::ProcessBase::settings_, trklet::TrackletCalculatorBase::TCIndex_, createJobs::tmp, trklet::TrackletCalculatorBase::trackletprojdisks_, trklet::TrackletCalculatorBase::trackletprojlayers_, trklet::Settings::usephicritapprox(), findQualityFiles::v, trklet::VarBase::verilog, trklet::VarBase::verilog_print(), funct::void, writeFirmwareDesign(), trklet::Settings::writeHLS(), trklet::Settings::writeHLSInvTable(), writeInvTable(), trklet::Settings::writeInvTable(), trklet::Settings::writeTable(), trklet::Settings::writeVerilog(), and x.

18  : TrackletCalculatorBase(name, settings, globals) {
19  for (unsigned int ilayer = 0; ilayer < N_LAYER; ilayer++) {
20  vector<TrackletProjectionsMemory*> tmp(settings.nallstubs(ilayer), nullptr);
21  trackletprojlayers_.push_back(tmp);
22  }
23 
24  for (unsigned int idisk = 0; idisk < N_DISK; idisk++) {
25  vector<TrackletProjectionsMemory*> tmp(settings.nallstubs(idisk + N_LAYER), nullptr);
26  trackletprojdisks_.push_back(tmp);
27  }
28 
30 
31  // set TC index
32  iTC_ = name_[7] - 'A';
33 
34  TCIndex_ = (iSeed_ << 4) + iTC_;
35  assert(TCIndex_ >= 0 && TCIndex_ <= (int)settings_.ntrackletmax());
36 
38  double phicritFactor =
40  if (std::abs(phicritFactor - 2.) > 0.25)
41  edm::LogPrint("Tracklet")
42  << "TrackletCalculator::TrackletCalculator phicrit approximation may be invalid! Please check.";
43  }
44 
45  // reduced config has only one TC, so this must be the first
46  const bool isFirstTC = (iTC_ == 0 || settings_.reduced());
47 
48  // write the drinv and invt inverse tables
49  if ((settings_.writeInvTable() || settings_.writeHLSInvTable() || settings_.writeTable()) && isFirstTC) {
50  void (*writeLUT)(const VarInv&, const string&) = nullptr;
51  if (settings.writeInvTable()) { // Verilog version
52  writeLUT = [](const VarInv& x, const string& basename) -> void {
53  ofstream fs(basename + ".tab");
54  return x.writeLUT(fs, VarBase::verilog);
55  };
56  } else { // HLS version
57  writeLUT = [](const VarInv& x, const string& basename) -> void {
58  ofstream fs(basename + ".tab");
59  return x.writeLUT(fs, VarBase::hls);
60  };
61  }
62  writeInvTable(writeLUT);
63  }
64 
65  // write the firmware design for the calculation of the tracklet parameters
66  // and projections
67  if ((settings_.writeVerilog() || settings_.writeHLS()) && isFirstTC) {
68  void (*writeDesign)(const vector<VarBase*>&, const string&) = nullptr;
69  if (settings.writeVerilog()) { // Verilog version
70  writeDesign = [](const vector<VarBase*>& v, const string& basename) -> void {
71  ofstream fs(basename + ".v");
72  return VarBase::verilog_print(v, fs);
73  };
74  } else { // HLS version
75  writeDesign = [](const vector<VarBase*>& v, const string& basename) -> void {
76  ofstream fs(basename + ".cpp");
77  return VarBase::hls_print(v, fs);
78  };
79  }
80  writeFirmwareDesign(writeDesign);
81  }
82 }
static void verilog_print(const std::vector< VarBase *> &v, std::ofstream &fs)
Definition: imath.h:275
static void hls_print(const std::vector< VarBase *> &v, std::ofstream &fs)
Definition: imath.h:276
constexpr int N_DISK
Definition: Settings.h:26
bool writeHLS() const
Definition: Settings.h:208
bool writeTable() const
Definition: Settings.h:201
std::string name_
Definition: ProcessBase.h:42
void initLayerDisksandISeed(unsigned int &layerdisk1, unsigned int &layerdisk2, unsigned int &iSeed)
Definition: ProcessBase.cc:63
Settings const & settings_
Definition: ProcessBase.h:44
bool writeVerilog() const
Definition: Settings.h:207
Globals * globals_
Definition: ProcessBase.h:45
void writeFirmwareDesign(void(*writeDesign)(const std::vector< VarBase *> &, const std::string &))
bool reduced() const
Definition: Settings.h:279
assert(be >=bs)
static struct trklet::VarBase::Verilog verilog
TEMPL(T2) struct Divides void
Definition: Factorize.h:24
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
IMATH_TrackletCalculator * ITC_L1L2()
Definition: Globals.h:48
Log< level::Warning, true > LogPrint
double K() const
Definition: imath.h:247
std::vector< std::vector< TrackletProjectionsMemory * > > trackletprojdisks_
static struct trklet::VarBase::HLS hls
std::vector< std::vector< TrackletProjectionsMemory * > > trackletprojlayers_
TrackletCalculatorBase(std::string name, Settings const &settings, Globals *global)
bool writeHLSInvTable() const
Definition: Settings.h:210
void writeInvTable(void(*writeLUT)(const VarInv &, const std::string &))
float x
unsigned int ntrackletmax() const
Definition: Settings.h:378
bool writeInvTable() const
Definition: Settings.h:209
tmp
align.sh
Definition: createJobs.py:716
bool usephicritapprox() const
Definition: Settings.h:248
constexpr int N_LAYER
Definition: Settings.h:25
double rcrit() const
Definition: Settings.h:334

◆ ~TrackletCalculator()

trklet::TrackletCalculator::~TrackletCalculator ( )
overridedefault

Member Function Documentation

◆ addInput()

void TrackletCalculator::addInput ( MemoryBase memory,
std::string  input 
)
overridevirtual

Implements trklet::ProcessBase.

Definition at line 131 of file TrackletCalculator.cc.

References cms::cuda::assert(), Exception, innerallstubs_, input, mps_setup::memory, trklet::ProcessBase::name_, outerallstubs_, trklet::ProcessBase::settings_, stubpairs_, createJobs::tmp, and trklet::Settings::writetrace().

131  {
132  if (settings_.writetrace()) {
133  edm::LogVerbatim("Tracklet") << "In " << name_ << " adding input from " << memory->getName() << " to input "
134  << input;
135  }
136  if (input == "innerallstubin") {
137  auto* tmp = dynamic_cast<AllStubsMemory*>(memory);
138  assert(tmp != nullptr);
139  innerallstubs_.push_back(tmp);
140  return;
141  }
142  if (input == "outerallstubin") {
143  auto* tmp = dynamic_cast<AllStubsMemory*>(memory);
144  assert(tmp != nullptr);
145  outerallstubs_.push_back(tmp);
146  return;
147  }
148  if (input.substr(0, 8) == "stubpair") {
149  auto* tmp = dynamic_cast<StubPairsMemory*>(memory);
150  assert(tmp != nullptr);
151  stubpairs_.push_back(tmp);
152  return;
153  }
154  throw cms::Exception("BadConfig") << __FILE__ << " " << __LINE__ << " Could not find intput : " << input;
155 }
Log< level::Info, true > LogVerbatim
std::string name_
Definition: ProcessBase.h:42
Settings const & settings_
Definition: ProcessBase.h:44
bool writetrace() const
Definition: Settings.h:195
assert(be >=bs)
std::vector< AllStubsMemory * > innerallstubs_
static std::string const input
Definition: EdmProvDump.cc:50
std::vector< StubPairsMemory * > stubpairs_
std::vector< AllStubsMemory * > outerallstubs_
tmp
align.sh
Definition: createJobs.py:716

◆ addOutput()

void TrackletCalculator::addOutput ( MemoryBase memory,
std::string  output 
)
overridevirtual

Implements trklet::ProcessBase.

Definition at line 89 of file TrackletCalculator.cc.

References cms::cuda::assert(), Exception, mps_setup::memory, trklet::N_DISK, trklet::N_LAYER, trklet::ProcessBase::name_, convertSQLitetoXML_cfg::output, trklet::ProcessBase::settings_, createJobs::tmp, trklet::TrackletCalculatorBase::trackletpars_, trklet::TrackletCalculatorBase::trackletprojdisks_, trklet::TrackletCalculatorBase::trackletprojlayers_, and trklet::Settings::writetrace().

89  {
90  if (settings_.writetrace()) {
91  edm::LogVerbatim("Tracklet") << "In " << name_ << " adding output to " << memory->getName() << " to output "
92  << output;
93  }
94  if (output == "trackpar") {
95  auto* tmp = dynamic_cast<TrackletParametersMemory*>(memory);
96  assert(tmp != nullptr);
98  return;
99  }
100 
101  if (output.substr(0, 7) == "projout") {
102  //output is on the form 'projoutL2PHIC' or 'projoutD3PHIB'
103  auto* tmp = dynamic_cast<TrackletProjectionsMemory*>(memory);
104  assert(tmp != nullptr);
105 
106  unsigned int layerdisk = output[8] - '1'; //layer or disk counting from 0
107  unsigned int phiregion = output[12] - 'A'; //phiregion counting from 0
108 
109  if (output[7] == 'L') {
110  assert(layerdisk < N_LAYER);
111  assert(phiregion < trackletprojlayers_[layerdisk].size());
112  //check that phiregion not already initialized
113  assert(trackletprojlayers_[layerdisk][phiregion] == nullptr);
114  trackletprojlayers_[layerdisk][phiregion] = tmp;
115  return;
116  }
117 
118  if (output[7] == 'D') {
119  assert(layerdisk < N_DISK);
120  assert(phiregion < trackletprojdisks_[layerdisk].size());
121  //check that phiregion not already initialized
122  assert(trackletprojdisks_[layerdisk][phiregion] == nullptr);
123  trackletprojdisks_[layerdisk][phiregion] = tmp;
124  return;
125  }
126  }
127 
128  throw cms::Exception("BadConfig") << __FILE__ << " " << __LINE__ << " Could not find output : " << output;
129 }
size
Write out results.
Log< level::Info, true > LogVerbatim
constexpr int N_DISK
Definition: Settings.h:26
std::string name_
Definition: ProcessBase.h:42
Settings const & settings_
Definition: ProcessBase.h:44
bool writetrace() const
Definition: Settings.h:195
assert(be >=bs)
TrackletParametersMemory * trackletpars_
std::vector< std::vector< TrackletProjectionsMemory * > > trackletprojdisks_
std::vector< std::vector< TrackletProjectionsMemory * > > trackletprojlayers_
Definition: output.py:1
tmp
align.sh
Definition: createJobs.py:716
constexpr int N_LAYER
Definition: Settings.h:25

◆ addOutputProjection()

void TrackletCalculator::addOutputProjection ( TrackletProjectionsMemory *&  outputProj,
MemoryBase memory 
)

Definition at line 84 of file TrackletCalculator.cc.

References cms::cuda::assert(), and mps_setup::memory.

84  {
85  outputProj = dynamic_cast<TrackletProjectionsMemory*>(memory);
86  assert(outputProj != nullptr);
87 }
assert(be >=bs)

◆ execute()

void TrackletCalculator::execute ( unsigned int  iSector,
double  phimin,
double  phimax 
)

Definition at line 157 of file TrackletCalculator.cc.

References accept(), trklet::TrackletCalculatorBase::barrelSeeding(), trklet::Settings::debugTracklet(), trklet::TrackletCalculatorBase::diskSeeding(), Exception, trklet::ProcessBase::getName(), trklet::ProcessBase::globals_, mps_fire::i, trklet::TrackletCalculatorBase::iSector_, trklet::Stub::l1tstub(), trklet::Stub::layerdisk(), trklet::Settings::maxStep(), trklet::N_LAYER, trklet::Settings::ntrackletmax(), trklet::TrackletParametersMemory::nTracklets(), trklet::Globals::ofstream(), trklet::TrackletCalculatorBase::overlapSeeding(), phimax, trklet::TrackletCalculatorBase::phimax_, phimin, trklet::TrackletCalculatorBase::phimin_, trklet::ProcessBase::settings_, stubpairs_, trklet::TrackletCalculatorBase::trackletpars_, and trklet::Settings::writeMonitorData().

157  {
158  unsigned int countall = 0;
159  unsigned int countsel = 0;
160 
161  phimin_ = phimin;
162  phimax_ = phimax;
163  iSector_ = iSector;
164 
165  //Helpfull to have for debugging the HLS code - will keep here for now.
166  //bool print = (iSector == 3) && (getName() == "TC_L1L2G");
167  //print = false;
168 
169  for (auto& stubpair : stubpairs_) {
171  edm::LogVerbatim("Tracklet") << "Will break on too many tracklets in " << getName();
172  break;
173  }
174  for (unsigned int i = 0; i < stubpair->nStubPairs(); i++) {
175  countall++;
176  const Stub* innerFPGAStub = stubpair->getVMStub1(i).stub();
177  const L1TStub* innerStub = innerFPGAStub->l1tstub();
178 
179  const Stub* outerFPGAStub = stubpair->getVMStub2(i).stub();
180  const L1TStub* outerStub = outerFPGAStub->l1tstub();
181 
182  if (settings_.debugTracklet()) {
183  edm::LogVerbatim("Tracklet") << "TrackletCalculator execute " << getName() << "[" << iSector << "]";
184  }
185 
186  if (innerFPGAStub->layerdisk() < N_LAYER && (getName() != "TC_D1L2A" && getName() != "TC_D1L2B")) {
187  if (outerFPGAStub->layerdisk() >= N_LAYER) {
188  //overlap seeding
189  bool accept = overlapSeeding(outerFPGAStub, outerStub, innerFPGAStub, innerStub);
190  if (accept)
191  countsel++;
192  } else {
193  //barrel+barrel seeding
194  bool accept = barrelSeeding(innerFPGAStub, innerStub, outerFPGAStub, outerStub);
195  if (accept)
196  countsel++;
197  }
198  } else {
199  if (outerFPGAStub->layerdisk() >= N_LAYER) {
200  //disk+disk seeding
201  bool accept = diskSeeding(innerFPGAStub, innerStub, outerFPGAStub, outerStub);
202  if (accept)
203  countsel++;
204  } else if (innerFPGAStub->layerdisk() >= N_LAYER) {
205  //layer+disk seeding
206  bool accept = overlapSeeding(innerFPGAStub, innerStub, outerFPGAStub, outerStub);
207  if (accept)
208  countsel++;
209  } else {
210  throw cms::Exception("LogicError") << __FILE__ << " " << __LINE__ << " invalid seeding";
211  }
212  }
213 
215  edm::LogVerbatim("Tracklet") << "Will break on number of tracklets in " << getName();
216  break;
217  }
218 
219  if (countall >= settings_.maxStep("TC")) {
220  if (settings_.debugTracklet())
221  edm::LogVerbatim("Tracklet") << "Will break on MAXTC 1";
222  break;
223  }
224  if (settings_.debugTracklet()) {
225  edm::LogVerbatim("Tracklet") << "TrackletCalculator execute done";
226  }
227  }
228  if (countall >= settings_.maxStep("TC")) {
229  if (settings_.debugTracklet())
230  edm::LogVerbatim("Tracklet") << "Will break on MAXTC 2";
231  break;
232  }
233  }
234 
235  if (settings_.writeMonitorData("TC")) {
236  globals_->ofstream("trackletcalculator.txt") << getName() << " " << countall << " " << countsel << endl;
237  }
238 }
Log< level::Info, true > LogVerbatim
unsigned int maxStep(std::string module) const
Definition: Settings.h:125
bool diskSeeding(const Stub *innerFPGAStub, const L1TStub *innerStub, const Stub *outerFPGAStub, const L1TStub *outerStub)
Settings const & settings_
Definition: ProcessBase.h:44
Globals * globals_
Definition: ProcessBase.h:45
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:31
bool overlapSeeding(const Stub *innerFPGAStub, const L1TStub *innerStub, const Stub *outerFPGAStub, const L1TStub *outerStub)
std::vector< StubPairsMemory * > stubpairs_
L1TStub * l1tstub()
Definition: Stub.h:83
TrackletParametersMemory * trackletpars_
bool writeMonitorData(std::string module) const
Definition: Settings.h:118
unsigned int layerdisk() const
Definition: Stub.cc:193
bool debugTracklet() const
Definition: Settings.h:194
std::ofstream & ofstream(std::string fname)
Definition: Globals.cc:44
unsigned int ntrackletmax() const
Definition: Settings.h:378
std::string const & getName() const
Definition: ProcessBase.h:22
constexpr int N_LAYER
Definition: Settings.h:25
bool barrelSeeding(const Stub *innerFPGAStub, const L1TStub *innerStub, const Stub *outerFPGAStub, const L1TStub *outerStub)

◆ writeFirmwareDesign()

void TrackletCalculator::writeFirmwareDesign ( void(*)(const std::vector< VarBase *> &, const std::string &)  writeDesign)
private

Definition at line 285 of file TrackletCalculator.cc.

References trklet::IMATH_TrackletCalculatorDisk::der_phiD_final, trklet::IMATH_TrackletCalculatorOverlap::der_phiD_final, trklet::IMATH_TrackletCalculator::der_phiD_final, trklet::IMATH_TrackletCalculatorDisk::der_phiL_final, trklet::IMATH_TrackletCalculatorOverlap::der_phiL_final, trklet::IMATH_TrackletCalculator::der_phiL_final, trklet::IMATH_TrackletCalculatorDisk::der_rD_final, trklet::IMATH_TrackletCalculatorOverlap::der_rD_final, trklet::IMATH_TrackletCalculator::der_rD_final, trklet::IMATH_TrackletCalculatorDisk::der_zL_final, trklet::IMATH_TrackletCalculatorOverlap::der_zL_final, trklet::IMATH_TrackletCalculator::der_zL_final, trklet::ProcessBase::globals_, trklet::TrackletCalculatorBase::iSeed_, trklet::Globals::ITC_B1B2(), trklet::Globals::ITC_B3B4(), trklet::Globals::ITC_F1F2(), trklet::Globals::ITC_F3F4(), trklet::Globals::ITC_L1B1(), trklet::Globals::ITC_L1F1(), trklet::Globals::ITC_L1L2(), trklet::Globals::ITC_L2B1(), trklet::Globals::ITC_L2F1(), trklet::Globals::ITC_L2L3(), trklet::Globals::ITC_L3L4(), trklet::Globals::ITC_L5L6(), trklet::IMATH_TrackletCalculatorDisk::phi0_final, trklet::IMATH_TrackletCalculatorOverlap::phi0_final, trklet::IMATH_TrackletCalculator::phi0_final, trklet::IMATH_TrackletCalculatorDisk::phiD_0_final, trklet::IMATH_TrackletCalculatorOverlap::phiD_0_final, trklet::IMATH_TrackletCalculator::phiD_0_final, trklet::IMATH_TrackletCalculatorDisk::phiD_1_final, trklet::IMATH_TrackletCalculatorOverlap::phiD_1_final, trklet::IMATH_TrackletCalculator::phiD_1_final, trklet::IMATH_TrackletCalculatorDisk::phiD_2_final, trklet::IMATH_TrackletCalculatorOverlap::phiD_2_final, trklet::IMATH_TrackletCalculator::phiD_2_final, trklet::IMATH_TrackletCalculatorOverlap::phiD_3_final, trklet::IMATH_TrackletCalculator::phiD_3_final, trklet::IMATH_TrackletCalculator::phiD_4_final, trklet::IMATH_TrackletCalculatorDisk::phiL_0_final, trklet::IMATH_TrackletCalculatorOverlap::phiL_0_final, trklet::IMATH_TrackletCalculator::phiL_0_final, trklet::IMATH_TrackletCalculatorDisk::phiL_1_final, trklet::IMATH_TrackletCalculatorOverlap::phiL_1_final, trklet::IMATH_TrackletCalculator::phiL_1_final, trklet::IMATH_TrackletCalculatorDisk::phiL_2_final, trklet::IMATH_TrackletCalculatorOverlap::phiL_2_final, trklet::IMATH_TrackletCalculator::phiL_2_final, trklet::IMATH_TrackletCalculator::phiL_3_final, trklet::IMATH_TrackletCalculatorDisk::rD_0_final, trklet::IMATH_TrackletCalculatorOverlap::rD_0_final, trklet::IMATH_TrackletCalculator::rD_0_final, trklet::IMATH_TrackletCalculatorDisk::rD_1_final, trklet::IMATH_TrackletCalculatorOverlap::rD_1_final, trklet::IMATH_TrackletCalculator::rD_1_final, trklet::IMATH_TrackletCalculatorDisk::rD_2_final, trklet::IMATH_TrackletCalculatorOverlap::rD_2_final, trklet::IMATH_TrackletCalculator::rD_2_final, trklet::IMATH_TrackletCalculatorOverlap::rD_3_final, trklet::IMATH_TrackletCalculator::rD_3_final, trklet::IMATH_TrackletCalculator::rD_4_final, trklet::IMATH_TrackletCalculatorDisk::rinv_final, trklet::IMATH_TrackletCalculatorOverlap::rinv_final, trklet::IMATH_TrackletCalculator::rinv_final, trklet::IMATH_TrackletCalculatorDisk::t_final, trklet::IMATH_TrackletCalculatorOverlap::t_final, trklet::IMATH_TrackletCalculator::t_final, findQualityFiles::v, trklet::IMATH_TrackletCalculatorDisk::z0_final, trklet::IMATH_TrackletCalculatorOverlap::z0_final, trklet::IMATH_TrackletCalculator::z0_final, trklet::IMATH_TrackletCalculatorDisk::zL_0_final, trklet::IMATH_TrackletCalculatorOverlap::zL_0_final, trklet::IMATH_TrackletCalculator::zL_0_final, trklet::IMATH_TrackletCalculatorDisk::zL_1_final, trklet::IMATH_TrackletCalculatorOverlap::zL_1_final, trklet::IMATH_TrackletCalculator::zL_1_final, trklet::IMATH_TrackletCalculatorDisk::zL_2_final, trklet::IMATH_TrackletCalculatorOverlap::zL_2_final, trklet::IMATH_TrackletCalculator::zL_2_final, and trklet::IMATH_TrackletCalculator::zL_3_final.

Referenced by TrackletCalculator().

285  {
286  switch (iSeed_) {
287  case 0: // L1L2
288  {
289  const vector<VarBase*> v = {&globals_->ITC_L1L2()->rinv_final, &globals_->ITC_L1L2()->phi0_final,
302  writeDesign(v, "TC_L1L2");
303  } break;
304  case 1: // L2L3
305  {
306  const vector<VarBase*> v = {&globals_->ITC_L2L3()->rinv_final, &globals_->ITC_L2L3()->phi0_final,
319  writeDesign(v, "TC_L2L3");
320  } break;
321  case 2: // L3L4
322  {
323  const vector<VarBase*> v = {&globals_->ITC_L3L4()->rinv_final, &globals_->ITC_L3L4()->phi0_final,
336  writeDesign(v, "TC_L3L4");
337  } break;
338  case 3: // L5L6
339  {
340  const vector<VarBase*> v = {&globals_->ITC_L5L6()->rinv_final, &globals_->ITC_L5L6()->phi0_final,
353  writeDesign(v, "TC_L5L6");
354  } break;
355  case 4: // D1D2
356  {
357  const vector<VarBase*> v = {&globals_->ITC_F1F2()->rinv_final, &globals_->ITC_F1F2()->phi0_final,
367  writeDesign(v, "TC_F1F2");
368  }
369  {
370  const vector<VarBase*> v = {&globals_->ITC_B1B2()->rinv_final, &globals_->ITC_B1B2()->phi0_final,
380  writeDesign(v, "TC_B1B2");
381  }
382  break;
383  case 5: // D3D4
384  {
385  const vector<VarBase*> v = {&globals_->ITC_F3F4()->rinv_final, &globals_->ITC_F3F4()->phi0_final,
395  writeDesign(v, "TC_F3F4");
396  }
397  {
398  const vector<VarBase*> v = {&globals_->ITC_B3B4()->rinv_final, &globals_->ITC_B3B4()->phi0_final,
408  writeDesign(v, "TC_B3B4");
409  }
410  break;
411  case 6: // L1D1
412  {
413  const vector<VarBase*> v = {&globals_->ITC_L1F1()->rinv_final, &globals_->ITC_L1F1()->phi0_final,
424  writeDesign(v, "TC_L1F1");
425  }
426  {
427  const vector<VarBase*> v = {&globals_->ITC_L1B1()->rinv_final, &globals_->ITC_L1B1()->phi0_final,
438  writeDesign(v, "TC_L1B1");
439  }
440  break;
441  case 7: // L2D1
442  {
443  const vector<VarBase*> v = {&globals_->ITC_L2F1()->rinv_final, &globals_->ITC_L2F1()->phi0_final,
454  writeDesign(v, "TC_L2F1");
455  }
456  {
457  const vector<VarBase*> v = {&globals_->ITC_L2B1()->rinv_final, &globals_->ITC_L2B1()->phi0_final,
468  writeDesign(v, "TC_L2B1");
469  }
470  break;
471  }
472 }
IMATH_TrackletCalculator * ITC_L2L3()
Definition: Globals.h:49
Globals * globals_
Definition: ProcessBase.h:45
IMATH_TrackletCalculatorOverlap * ITC_L2B1()
Definition: Globals.h:61
IMATH_TrackletCalculatorDisk * ITC_B1B2()
Definition: Globals.h:55
IMATH_TrackletCalculatorDisk * ITC_F3F4()
Definition: Globals.h:54
IMATH_TrackletCalculatorOverlap * ITC_L1F1()
Definition: Globals.h:58
IMATH_TrackletCalculator * ITC_L1L2()
Definition: Globals.h:48
IMATH_TrackletCalculatorDisk * ITC_B3B4()
Definition: Globals.h:56
IMATH_TrackletCalculatorDisk * ITC_F1F2()
Definition: Globals.h:53
IMATH_TrackletCalculator * ITC_L5L6()
Definition: Globals.h:51
IMATH_TrackletCalculator * ITC_L3L4()
Definition: Globals.h:50
IMATH_TrackletCalculatorOverlap * ITC_L1B1()
Definition: Globals.h:59
IMATH_TrackletCalculatorOverlap * ITC_L2F1()
Definition: Globals.h:60

◆ writeInvTable()

void TrackletCalculator::writeInvTable ( void(*)(const VarInv &, const std::string &)  writeLUT)
private

Definition at line 240 of file TrackletCalculator.cc.

References trklet::IMATH_TrackletCalculatorDisk::drinv, trklet::IMATH_TrackletCalculatorOverlap::drinv, trklet::IMATH_TrackletCalculator::drinv, trklet::ProcessBase::globals_, trklet::IMATH_TrackletCalculatorDisk::invt, trklet::IMATH_TrackletCalculatorOverlap::invt, trklet::IMATH_TrackletCalculator::invt, trklet::TrackletCalculatorBase::iSeed_, trklet::Globals::ITC_B1B2(), trklet::Globals::ITC_B3B4(), trklet::Globals::ITC_F1F2(), trklet::Globals::ITC_F3F4(), trklet::Globals::ITC_L1B1(), trklet::Globals::ITC_L1F1(), trklet::Globals::ITC_L1L2(), trklet::Globals::ITC_L2B1(), trklet::Globals::ITC_L2F1(), trklet::Globals::ITC_L2L3(), trklet::Globals::ITC_L3L4(), trklet::Globals::ITC_L5L6(), trklet::ProcessBase::settings_, and trklet::Settings::tablePath().

Referenced by TrackletCalculator().

240  {
241  switch (iSeed_) {
242  case 0: // L1L2
243  writeLUT(globals_->ITC_L1L2()->drinv, settings_.tablePath() + "TC_L1L2_drinv");
244  writeLUT(globals_->ITC_L1L2()->invt, settings_.tablePath() + "TC_L1L2_invt");
245  break;
246  case 1: // L2L3
247  writeLUT(globals_->ITC_L2L3()->drinv, settings_.tablePath() + "TC_L2L3_drinv");
248  writeLUT(globals_->ITC_L2L3()->invt, settings_.tablePath() + "TC_L2L3_invt");
249  break;
250  case 2: // L3L4
251  writeLUT(globals_->ITC_L3L4()->drinv, settings_.tablePath() + "TC_L3L4_drinv");
252  writeLUT(globals_->ITC_L3L4()->invt, settings_.tablePath() + "TC_L3L4_invt");
253  break;
254  case 3: // L5L6
255  writeLUT(globals_->ITC_L5L6()->drinv, settings_.tablePath() + "TC_L5L6_drinv");
256  writeLUT(globals_->ITC_L5L6()->invt, settings_.tablePath() + "TC_L5L6_invt");
257  break;
258  case 4: // D1D2
259  writeLUT(globals_->ITC_F1F2()->drinv, settings_.tablePath() + "TC_F1F2_drinv");
260  writeLUT(globals_->ITC_F1F2()->invt, settings_.tablePath() + "TC_F1F2_invt");
261  writeLUT(globals_->ITC_B1B2()->drinv, settings_.tablePath() + "TC_B1B2_drinv");
262  writeLUT(globals_->ITC_B1B2()->invt, settings_.tablePath() + "TC_B1B2_invt");
263  break;
264  case 5: // D3D4
265  writeLUT(globals_->ITC_F3F4()->drinv, settings_.tablePath() + "TC_F3F4_drinv");
266  writeLUT(globals_->ITC_F3F4()->invt, settings_.tablePath() + "TC_F3F4_invt");
267  writeLUT(globals_->ITC_B3B4()->drinv, settings_.tablePath() + "TC_B3B4_drinv");
268  writeLUT(globals_->ITC_B3B4()->invt, settings_.tablePath() + "TC_B3B4_invt");
269  break;
270  case 6: // L1D1
271  writeLUT(globals_->ITC_L1F1()->drinv, settings_.tablePath() + "TC_L1F1_drinv");
272  writeLUT(globals_->ITC_L1F1()->invt, settings_.tablePath() + "TC_L1F1_invt");
273  writeLUT(globals_->ITC_L1B1()->drinv, settings_.tablePath() + "TC_L1B1_drinv");
274  writeLUT(globals_->ITC_L1B1()->invt, settings_.tablePath() + "TC_L1B1_invt");
275  break;
276  case 7: // L2D1
277  writeLUT(globals_->ITC_L2F1()->drinv, settings_.tablePath() + "TC_L2F1_drinv");
278  writeLUT(globals_->ITC_L2F1()->invt, settings_.tablePath() + "TC_L2F1_invt");
279  writeLUT(globals_->ITC_L2B1()->drinv, settings_.tablePath() + "TC_L2B1_drinv");
280  writeLUT(globals_->ITC_L2B1()->invt, settings_.tablePath() + "TC_L2B1_invt");
281  break;
282  }
283 }
IMATH_TrackletCalculator * ITC_L2L3()
Definition: Globals.h:49
Settings const & settings_
Definition: ProcessBase.h:44
Globals * globals_
Definition: ProcessBase.h:45
IMATH_TrackletCalculatorOverlap * ITC_L2B1()
Definition: Globals.h:61
IMATH_TrackletCalculatorDisk * ITC_B1B2()
Definition: Globals.h:55
IMATH_TrackletCalculatorDisk * ITC_F3F4()
Definition: Globals.h:54
IMATH_TrackletCalculatorOverlap * ITC_L1F1()
Definition: Globals.h:58
std::string tablePath() const
Definition: Settings.h:205
IMATH_TrackletCalculator * ITC_L1L2()
Definition: Globals.h:48
IMATH_TrackletCalculatorDisk * ITC_B3B4()
Definition: Globals.h:56
IMATH_TrackletCalculatorDisk * ITC_F1F2()
Definition: Globals.h:53
IMATH_TrackletCalculator * ITC_L5L6()
Definition: Globals.h:51
IMATH_TrackletCalculator * ITC_L3L4()
Definition: Globals.h:50
IMATH_TrackletCalculatorOverlap * ITC_L1B1()
Definition: Globals.h:59
IMATH_TrackletCalculatorOverlap * ITC_L2F1()
Definition: Globals.h:60

Member Data Documentation

◆ innerallstubs_

std::vector<AllStubsMemory*> trklet::TrackletCalculator::innerallstubs_
private

Definition at line 35 of file TrackletCalculator.h.

Referenced by addInput().

◆ iTC_

int trklet::TrackletCalculator::iTC_
private

Definition at line 33 of file TrackletCalculator.h.

Referenced by TrackletCalculator().

◆ outerallstubs_

std::vector<AllStubsMemory*> trklet::TrackletCalculator::outerallstubs_
private

Definition at line 36 of file TrackletCalculator.h.

Referenced by addInput().

◆ stubpairs_

std::vector<StubPairsMemory*> trklet::TrackletCalculator::stubpairs_
private

Definition at line 37 of file TrackletCalculator.h.

Referenced by addInput(), and execute().