FairRoot/PandaRoot
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PndLmdTrackFinderCATask Class Reference

#include <PndLmdTrackFinderCATask.h>

Inheritance diagram for PndLmdTrackFinderCATask:

Public Member Functions

 PndLmdTrackFinderCATask ()
 
 PndLmdTrackFinderCATask (const bool missPl, const double setdmax, Int_t innSensPP=8, Int_t innP=4, TString hitBranch="LMDHitsStrip")
 
virtual ~PndLmdTrackFinderCATask ()
 
virtual void SetParContainers ()
 
virtual InitStatus Init ()
 
virtual InitStatus ReInit ()
 
virtual void Exec (Option_t *opt)
 
void SetVerbose (Int_t verbose)
 
void SetInaccuracy (Double_t accu)
 
void SetSensStripFlag (bool fS)
 
void SetSensPixelFlag (bool fS)
 
void SetTrkCandCutsFlag (bool fS)
 
void FinishTask ()
 

Private Member Functions

bool SortHitsByDet (std::vector< std::vector< std::pair< Int_t, bool > > > &hitsd, Int_t nStripHits)
 
bool SortHitsByDetSimple (std::vector< std::vector< Int_t > > &hitsd, Int_t nStripHits)
 
bool SortHitsByDetSimple2 (std::vector< std::vector< Int_t > > &hitsd, Int_t nStripHits)
 
bool SortHitsByZ (std::vector< std::vector< std::pair< Int_t, bool > > > &hitsd, Int_t nStripHits)
 
Double_t GetTrackDip (PndMCTrack *myTrack)
 
Double_t GetTrackCurvature (PndMCTrack *myTrack)
 
bool Neighbor (int &icell0, int &icell1)
 
bool Neighbor (PndSdsCell *cell0, PndSdsCell *cell1)
 
void Evolution (int &pv0, int &pv1, int &pv0_n, int &pv1_n, bool isch)
 
TClonesArray * ForwardEvolution (TClonesArray *fCellArray, int niter=100)
 
TClonesArray * CookAllCells (std::vector< std::vector< Int_t > > hitsd)
 
TClonesArray * CookCells (std::vector< std::vector< Int_t > > hitsd, int &pl0, int &pl1, TClonesArray *tCellArray)
 
void Register ()
 
void Reset ()
 
void ProduceHits ()
 
 ClassDef (PndLmdTrackFinderCATask, 4)
 

Private Attributes

Double_t dXY
 
double rule_max
 
int nSensPP
 
int nP
 
TString fHitBranchStrip
 
bool missPlAlgo
 
bool flagStipSens
 
bool flagPixelSens
 
bool flagTrkCandCuts
 
TClonesArray * fStripHitArray
 
TClonesArray * fTrackCandArray
 
TClonesArray * fCellArray
 

Detailed Description

Definition at line 24 of file PndLmdTrackFinderCATask.h.

Constructor & Destructor Documentation

PndLmdTrackFinderCATask::PndLmdTrackFinderCATask ( )

Default constructor

Definition at line 25 of file PndLmdTrackFinderCATask.cxx.

References dXY, fHitBranchStrip, flagPixelSens, flagStipSens, flagTrkCandCuts, missPlAlgo, nP, nSensPP, and rule_max.

26  : FairTask("LMD Track Finding Task (Cellular Automation)") {
27  missPlAlgo = false;
28  flagTrkCandCuts = true;
29  fHitBranchStrip = "LMDHitsStrip";
30 
31  dXY = 0.5;
32  rule_max = 1e-6;
33  nSensPP = 8;
34  nP = 4;
35  flagStipSens = false;
36  flagPixelSens = false;
37 }
PndLmdTrackFinderCATask::PndLmdTrackFinderCATask ( const bool  missPl,
const double  setdmax,
Int_t  innSensPP = 8,
Int_t  innP = 4,
TString  hitBranch = "LMDHitsStrip" 
)

Constructor

PndLmdTrackFinderCATask::~PndLmdTrackFinderCATask ( )
virtual

Destructor

Definition at line 63 of file PndLmdTrackFinderCATask.cxx.

63 {}

Member Function Documentation

PndLmdTrackFinderCATask::ClassDef ( PndLmdTrackFinderCATask  ,
 
)
private
TClonesArray * PndLmdTrackFinderCATask::CookAllCells ( std::vector< std::vector< Int_t > >  hitsd)
private

Definition at line 421 of file PndLmdTrackFinderCATask.cxx.

References CookCells(), fStripHitArray, fVerbose, and missPlAlgo.

422  {
423  TClonesArray *tCellArray = new TClonesArray("PndSdsCell");
424  // int ncells=0; //[R.K. 01/2017] unused variable
425  if (fVerbose > 2) {
426  int nPixelHits = fStripHitArray->GetEntriesFast();
427  cout << "Start cell contruction from " << nPixelHits << " hits" << endl;
428  }
429  for (int pl0 = 0; pl0 < 3; pl0++) {
430  int pl1 = pl0 + 1; // no "missing plane"
431  tCellArray = CookCells(hitsd, pl0, pl1, tCellArray);
432  if (missPlAlgo && pl0 < 4 - 2) {
433  pl1 = pl0 + 2; // with "missing plane"
434  tCellArray = CookCells(hitsd, pl0, pl1, tCellArray);
435  }
436  }
437  return tCellArray;
438 }
int fVerbose
Definition: poormantracks.C:24
TClonesArray * CookCells(std::vector< std::vector< Int_t > > hitsd, int &pl0, int &pl1, TClonesArray *tCellArray)
TClonesArray * PndLmdTrackFinderCATask::CookCells ( std::vector< std::vector< Int_t > >  hitsd,
int &  pl0,
int &  pl1,
TClonesArray *  tCellArray 
)
private

Definition at line 441 of file PndLmdTrackFinderCATask.cxx.

References fStripHitArray, fVerbose, and i.

Referenced by CookAllCells(), and Exec().

443  {
444  int ncells = tCellArray->GetEntriesFast();
445  if (fVerbose > 2) {
446  int nPixelHits = fStripHitArray->GetEntriesFast();
447  cout << "Start cell contruction from " << nPixelHits << " hits" << endl;
448  }
449  for (unsigned int i = 0; i < hitsd.at(pl0).size(); i++) {
450  for (unsigned int j = 0; j < hitsd.at(pl1).size(); j++) {
451  if (fVerbose > 2)
452  cout << "new cell with hits #" << hitsd.at(pl0).at(i) << " and "
453  << hitsd.at(pl1).at(j) << endl;
454  // PndSdsCell *cell = new PndSdsCell(hitsd.at(pl1).at(j),
455  // hitsd.at(pl0).at(i));
456  // new((*tCellArray)[ncells]) PndSdsCell(*(cell)); //save Track
457  // delete cell;
458  new ((*tCellArray)[ncells]) PndSdsCell(hitsd.at(pl1).at(j),
459  hitsd.at(pl0).at(i)); // save cell
460  ncells++;
461  }
462  }
463  return tCellArray;
464 }
int fVerbose
Definition: poormantracks.C:24
Int_t i
Definition: run_full.C:25
void PndLmdTrackFinderCATask::Evolution ( int &  pv0,
int &  pv1,
int &  pv0_n,
int &  pv1_n,
bool  isch 
)
private

Definition at line 321 of file PndLmdTrackFinderCATask.cxx.

References fVerbose.

323  { // isstop // [R.K.03/2017] unused variable(s)
324  // isstop = true; // // [R.K.03/2017] unused variable
325  if (pv0 == pv1) {
326  if (pv1 < 0)
327  pv0_n = 0;
328  else
329  pv0_n = pv0;
330  pv1_n = pv1 + 1;
331  // isstop = false; // // [R.K.03/2017] unused variable
332  if (fVerbose > 2) cout << "pv 0 = " << pv0_n << " pv 1 = " << pv1_n << endl;
333  }
334 }
int fVerbose
Definition: poormantracks.C:24
void PndLmdTrackFinderCATask::Exec ( Option_t *  opt)
virtual

Virtual method Exec

strip sensors

pixel sensors

Definition at line 467 of file PndLmdTrackFinderCATask.cxx.

References PndTrackCand::AddHit(), CookCells(), fCellArray, flagPixelSens, flagStipSens, ForwardEvolution(), fStripHitArray, fTrackCandArray, fVerbose, PndSdsCell::GetHitDw(), PndSdsCell::GetHitUp(), PndSdsHit::GetPosition(), PndSdsCell::GetPV(), hit(), i, missPlAlgo, Neighbor(), nP, PndSdsHit::Print(), push_back(), PndSdsCell::SetPV(), SortHitsByDetSimple(), SortHitsByDetSimple2(), and vec.

467  {
468  TStopwatch *timer_array = new TStopwatch();
469 
470  if (fVerbose > 0) timer_array->Start();
471 
472  // Reset output array
473  if (!fTrackCandArray) Fatal("Exec", "No trackCandArray");
474  fTrackCandArray->Clear("C");
475 
476  Int_t nPixelHits = fStripHitArray->GetEntriesFast();
477  if (nPixelHits < 2) {
478  if (fVerbose > 2)
479  cout << "Evt finsihed: too less hits-----" << endl << endl;
480  return;
481  }
482 
483  std::vector<std::vector<Int_t> > hitsd(
484  nP); // hit'ids splitted by detectorplane
485  bool resSortHits;
486  if (flagStipSens)
487  resSortHits = SortHitsByDetSimple(hitsd, nPixelHits);
488  else {
489  if (flagPixelSens)
490  resSortHits = SortHitsByDetSimple2(hitsd, nPixelHits);
491  else {
492  std::cout << "Algorithm depend on sensor type! Please, set it via "
493  "SetSensStripFlag(bool fS) or SetSensPixelFlag(bool fS)"
494  << std::endl;
495  return;
496  }
497  }
498  if (!resSortHits) {
499  if (fVerbose > 2)
500  cout << "Evt finsihed: too less planes-----" << endl << endl;
501  return;
502  }
503 
504  // print hits (debug)
505  TVector3 start, tmp, vec, dstart, dvec; // temp-vars
506  if (fVerbose > 2) {
507  for (Int_t iPlane = 0; iPlane < nP; iPlane++) {
508  if (hitsd.at(iPlane).size() > 0) {
509  for (unsigned int i = 0; i < hitsd.at(iPlane).size(); i++) {
510  PndSdsHit *hit =
511  (PndSdsHit *)fStripHitArray->At(hitsd.at(iPlane).at(i));
512  if (fVerbose > 2)
513  cout << " Hit#" << hitsd.at(iPlane).at(i) << " Plane" << iPlane
514  << " Hit=(" << hit->GetX() << ", " << hit->GetY() << ", "
515  << hit->GetZ() << ") with err=(" << hit->GetDx() << ", "
516  << hit->GetDy() << ", " << hit->GetDz() << ")"
517  << ", MChitID = " << hit->GetRefIndex() << endl;
518  }
519  }
520  }
521  }
522  if (fVerbose > 0) {
523  cout << "array preparation: " << endl;
524  timer_array->Stop();
525  timer_array->Print();
526  }
527  //
528 
529  // Build cells
530  fCellArray->Clear();
531  // const unsigned int nplanes = nP; //[R.K. 01/2017] unused variable
532  TStopwatch *timer_cook_cells = new TStopwatch();
533  if (fVerbose > 0) timer_cook_cells->Start();
534 
535  /*
536  //CA2: all cells at once
537  fCellArray = CookAllCells(hitsd);
538  */
539 
540  // CA3: build cells between 2 pairs of layers
541  // ATTENTION: the detector is assumed to have exactly 4 planes!
542  // TODO: generalize to nplanes>4
543  // PART1: build cells only between first 3 layers ----------------------------
544  for (int pl0 = 0; pl0 < 2; pl0++) {
545  int pl1 = pl0 + 1;
546  fCellArray = CookCells(hitsd, pl0, pl1, fCellArray);
547  }
548 
549  // if(missPlAlgo){
550  // int pl0 = 1; int pl1 = 3;
551  // fCellArray = CookCells(hitsd, pl0, pl1, fCellArray);
552  // }
553 
554  fCellArray = ForwardEvolution(fCellArray, 2); // clean cells without neigbors
555  // int prev_st_size = fCellArray->GetEntriesFast() - 1;
556  // prev_st_size = 0;
557  // cout<<" !!!! prev_st_siz = "<< prev_st_size<<endl;
558  int pvd = -1;
559  for (int icell0 = 0; icell0 < fCellArray->GetEntries(); icell0++) {
560  PndSdsCell *cell0 = (PndSdsCell *)fCellArray->At(icell0);
561  cell0->SetPV(pvd);
562  }
563  //[END] PART1
564  //------------------------------------------------------------------
565 
566  // PART2: build cells only between last 3 layers ----------------------------
567  // if(missPlAlgo){
568  // int pl0 = 0; int pl1 = 2;
569  // fCellArray = CookCells(hitsd, pl0, pl1, fCellArray);
570  // }
571 
572  for (int pl0 = 1; pl0 < 3; pl0++) {
573  int pl1 = pl0 + 1;
574  fCellArray = CookCells(hitsd, pl0, pl1, fCellArray);
575  }
576 
577  fCellArray = ForwardEvolution(fCellArray, 2); // clean cells without neigbors
578  for (int icell0 = 0; icell0 < fCellArray->GetEntries(); icell0++) {
579  PndSdsCell *cell0 = (PndSdsCell *)fCellArray->At(icell0);
580  cell0->SetPV(pvd);
581  }
582  //[END] PART2
583  //------------------------------------------------------------------
584 
585  // //PART3: add combinations for missing planes
586  // ---------------------------------
587  if (missPlAlgo) {
588  // 0-2-3
589  int pl0 = 0;
590  int pl1 = 2;
591  fCellArray = CookCells(hitsd, pl0, pl1, fCellArray);
592  pl0 = 2;
593  pl1 = 3;
594  fCellArray = CookCells(hitsd, pl0, pl1, fCellArray);
595  fCellArray =
596  ForwardEvolution(fCellArray, 2); // clean cells without neigbors
597 
598  pl0 = 1;
599  pl1 = 3;
600  fCellArray = CookCells(hitsd, pl0, pl1, fCellArray);
601  pl0 = 0;
602  pl1 = 1;
603  fCellArray = CookCells(hitsd, pl0, pl1, fCellArray);
604  fCellArray =
605  ForwardEvolution(fCellArray, 2); // clean cells without neigbors
606  }
607  // //[END] PART3
608  // -----------------------------------------------------------------------
609 
610  for (int icell0 = 0; icell0 < fCellArray->GetEntries(); icell0++) {
611  PndSdsCell *cell0 = (PndSdsCell *)fCellArray->At(icell0);
612  cell0->SetPV(pvd);
613  }
614 
615  if (fVerbose > 0) {
616  cout << "Cells cooking:" << endl;
617  timer_cook_cells->Stop();
618  timer_cook_cells->Print();
619  }
620 
621  TStopwatch *timer_neighbors_cells = new TStopwatch();
622  if (fVerbose > 0) timer_cook_cells->Start();
623 
624  // Find neighbors between cells
626  int nCells = fCellArray->GetEntriesFast(); // final number of cells [could be
627  // different from the initial]
628 
629  // Build tracks from cells combination --------------------------------
630  TStopwatch *timer_build_trk_combinations = new TStopwatch();
631 
632  if (fVerbose > 0) timer_build_trk_combinations->Start();
633 
634  // find max number of cells in a track
635  int pcmax = 0;
636  for (int cid = 1; cid < nCells; cid++) {
637  PndSdsCell *cell = (PndSdsCell *)fCellArray->At(cid);
638  int tag_cur = cell->GetPV();
639  if (tag_cur > pcmax) pcmax = tag_cur;
640  }
641  if (fVerbose > 4) cout << "track can contain " << pcmax << "+1 cells" << endl;
642  const unsigned int trk_arr_size = pcmax + 1;
643  std::vector<std::vector<int> > trk_cells(trk_arr_size);
644 
645  int trk_count = -1;
646  for (unsigned int newpcmax = pcmax; newpcmax > 0;
647  newpcmax--) { // loop over possible number of cells in trk
648  unsigned int cur_max_tag = newpcmax;
649  if (fVerbose > 4)
650  cout << "Now we are looking for trk with max " << cur_max_tag + 1
651  << " cells among " << nCells << " cells" << endl;
652  // bool newtrk=true;
653  for (int icell0 = 0; icell0 < nCells; icell0++) {
654  PndSdsCell *cell0 = (PndSdsCell *)fCellArray->At(icell0);
655  if (cell0->GetPV() ==
656  (int)cur_max_tag) { // from "upstream" to "downstream"
657  for (int icell1 = 0; icell1 < nCells; icell1++) {
658  PndSdsCell *cell1 = (PndSdsCell *)fCellArray->At(icell1);
659  if ((cell0->GetPV() - cell1->GetPV()) == 1 &&
660  ((cell1->GetHitUp()) ==
661  (cell0->GetHitDw()))) { // cells have common point
662  bool isNeighbor = Neighbor(cell1, cell0);
663  if (isNeighbor) {
664  if (fVerbose > 2)
665  cout << "trk #" << trk_count << " " << cell0->GetPV() << ", "
666  << cell1->GetPV() << "; ";
667  if (cell1->GetPV() > 0) { // search for the last connected cell;
668  // TODO: this works only for number of
669  // planes = 4!!! extend it to infinite
670  // number of planes?
671  for (int icell2 = 0; icell2 < nCells; icell2++) {
672  PndSdsCell *cell2 = (PndSdsCell *)fCellArray->At(icell2);
673  if ((cell1->GetPV() - cell2->GetPV()) == 1 &&
674  (cell2->GetHitUp()) ==
675  (cell1->GetHitDw())) { // cells have common point
676  bool isNeighbor2 = Neighbor(cell2, cell1);
677  if (isNeighbor2) {
678  trk_count++;
679  trk_cells.at(cell0->GetPV()).push_back(icell0);
680  trk_cells.at(cell1->GetPV()).push_back(icell1);
681  trk_cells.at(cell2->GetPV()).push_back(icell2);
682  if (fVerbose > 2) cout << " " << cell2->GetPV();
683  }
684  }
685  }
686  } else {
687  trk_count++;
688  trk_cells.at(cell0->GetPV()).push_back(icell0);
689  trk_cells.at(cell1->GetPV()).push_back(icell1);
690  if ((cell0->GetPV() + 1) == pcmax) {
691  trk_cells.at(cell0->GetPV() + 1).push_back(-1);
692  if (fVerbose > 2) cout << " -1";
693  }
694  }
695  if (fVerbose > 2) cout << "" << endl;
696  }
697  }
698  }
699  }
700  }
701  }
702  if (fVerbose > 0) {
703  timer_build_trk_combinations->Stop();
704  cout << "Build trks combinations: " << endl;
705  timer_build_trk_combinations->Print();
706  }
707  if (fVerbose > 2)
708  cout << "Before filtering number of trk-cands = " << trk_cells.at(0).size()
709  << endl;
710 
711  // filter ----------------------------------------------------
712  TStopwatch *timer_filter_trk_combinations = new TStopwatch();
713 
714  if (fVerbose > 0) timer_filter_trk_combinations->Start();
715 
716  if (fVerbose > 4) cout << "--- filter trk-cand array: " << endl;
717  if (fVerbose > 4)
718  cout << " Attention each trk candidate with repeated cells, but smaller "
719  "cells number will be deleted!"
720  << endl;
721  vector<unsigned int> cell_parts;
722  vector<bool> trk_accept;
723  for (unsigned int itrk = 0; itrk < trk_cells.at(0).size(); itrk++) {
724  int maxcellnum = trk_arr_size;
725  int curr_arr = trk_arr_size;
726  while (curr_arr > 0) {
727  curr_arr--;
728  if (fVerbose > 4)
729  cout << " we have: trk_cells.at(" << curr_arr << ").at(" << itrk
730  << ")=" << trk_cells.at(curr_arr).at(itrk) << endl;
731  if (trk_cells.at(curr_arr).at(itrk) < 0) maxcellnum--;
732  }
733  cell_parts.push_back(maxcellnum);
734  if (maxcellnum > 0)
735  trk_accept.push_back(true);
736  else
737  trk_accept.push_back(false);
738  if (fVerbose > 4) cout << " with:" << maxcellnum << " cells" << endl;
739  }
740 
741  for (int itrc = (cell_parts.size() - 1); itrc >= 0; itrc--) {
742  if (!trk_accept[itrc]) continue;
743  int cup = itrc - 1;
744  for (int itrc2 = cup; itrc2 >= 0; itrc2--) {
745  if (!trk_accept[itrc]) break;
746  if (!trk_accept[itrc2]) continue;
747  // cout<<"compare trk#"<<itrc<<" and #"<<itrc2<<endl;
748 
749  if (cell_parts[itrc] < cell_parts[itrc2]) {
750  unsigned int count_re = 0;
751  unsigned int count_hits = 0;
752  // reject trk-cand with smaller number of cells and similar cells
753  int curr_arr = trk_arr_size;
754  while (curr_arr > 0) {
755  curr_arr--;
756  int cellnum1 = trk_cells.at(curr_arr).at(itrc);
757  int cellnum2 = trk_cells.at(curr_arr).at(itrc2);
758  // check by cells
759  if (cellnum1 < 0 || cellnum2 < 0) continue;
760  if (cellnum1 == cellnum2) count_re++;
761  // check by cells ends (hits)
762  PndSdsCell *cell0 = (PndSdsCell *)fCellArray->At(cellnum1);
763  PndSdsCell *cell1 = (PndSdsCell *)fCellArray->At(cellnum2);
764  int hit0_0 = cell0->GetHitDw();
765  int hit1_0 = cell0->GetHitUp();
766  int hit0_1 = cell1->GetHitDw();
767  int hit1_1 = cell1->GetHitUp();
768  if (hit0_0 == hit0_1) count_hits++;
769  if (hit1_0 == hit1_1) count_hits++;
770  if (hit0_0 == hit1_1) count_hits++;
771  if (hit1_0 == hit0_1) count_hits++;
772  }
773  if (fVerbose > 3)
774  cout << "Cand.No" << itrc
775  << ": Number of repeating cells = " << count_re
776  << " and cells in tot = " << cell_parts[itrc]
777  << " Number of repeating hits = " << count_hits << endl;
778  if (count_re > 0.55 * cell_parts[itrc] || count_hits > 2) {
779  trk_accept[itrc] = false;
780  if (fVerbose > 4) {
781  cout << "Delete: trk-cand#" << itrc << " because it contains ("
782  << count_re << ") more then 55% cells from trk-cand#" << itrc2
783  << endl;
784  }
785  }
786  }
787  }
788  }
789 
790  if (fVerbose > 0) {
791  timer_filter_trk_combinations->Stop();
792  cout << "Filter: " << endl;
793  timer_filter_trk_combinations->Print();
794  }
795 
796  // save trk-cands ----------------------------------------
797  int NtrkRec = 0;
798  for (unsigned int itrk = 0; itrk < trk_accept.size(); itrk++) {
799  if (!trk_accept[itrk]) continue; // filter
800  bool firstHit = true;
801  PndTrackCand *myTCand = new PndTrackCand();
802  TVector3 dir;
803  if (fVerbose > 2) cout << "Trk-cand contains hits:";
804  for (unsigned int icell = 0; icell < trk_arr_size; icell++) {
805  int cellNum = trk_cells.at(icell).at(itrk);
806  if (cellNum < 0) continue;
807  // cout<<"; from cell#"<<cellNum<<": ";
808  PndSdsCell *cell = (PndSdsCell *)fCellArray->At(cellNum);
809  if (firstHit) { // fill trk-cand seed
810  PndSdsHit *myHit = (PndSdsHit *)fStripHitArray->At(cell->GetHitDw());
811  if (fVerbose > 2) cout << " " << cell->GetHitDw();
812  myTCand->AddHit(myHit->GetDetectorID(), cell->GetHitDw(),
813  myHit->GetPosition().Z());
814  PndSdsHit *myHit1 = (PndSdsHit *)fStripHitArray->At(cell->GetHitUp());
815  dir = myHit1->GetPosition() - myHit->GetPosition();
816  dir *= 1. / dir.Mag();
817  firstHit = false;
818  }
819  if (fVerbose > 2) cout << " " << cell->GetHitUp();
820  PndSdsHit *myHit1 = (PndSdsHit *)fStripHitArray->At(cell->GetHitUp());
821  myTCand->AddHit(myHit1->GetDetectorID(), cell->GetHitUp(),
822  myHit1->GetPosition().Z());
823  }
824  if (fVerbose > 2) cout << " " << endl;
825 
826  new ((*fTrackCandArray)[NtrkRec++])
827  PndTrackCand(*(myTCand)); // save Track Candidate
828 
829  if (fVerbose > 3) cout << "Ntrk No. " << NtrkRec << endl;
830  delete myTCand;
831  }
832 
833  hitsd.erase(hitsd.begin(), hitsd.end());
834  if (fVerbose > 2) {
835  Int_t ntcandFin = fTrackCandArray->GetEntriesFast();
836  cout << "Number of Trk-Cands is " << ntcandFin << endl;
837  cout << "Evt finsihed--------------" << endl << endl;
838  cout << endl;
839  }
840 
841  fCellArray->Clear();
842 
843  delete timer_array;
844  delete timer_cook_cells;
845  delete timer_neighbors_cells;
846  delete timer_build_trk_combinations;
847  delete timer_filter_trk_combinations;
848 
849  fStripHitArray->Clear("C");
850 }
int fVerbose
Definition: poormantracks.C:24
virtual void Print(const Option_t *opt=0) const
Definition: PndSdsHit.cxx:66
Int_t i
Definition: run_full.C:25
int GetPV()
Definition: PndSdsCell.h:36
TVector3 GetPosition() const
Definition: PndSdsHit.h:93
labels push_back("electron")
bool SortHitsByDetSimple(std::vector< std::vector< Int_t > > &hitsd, Int_t nStripHits)
bool Neighbor(int &icell0, int &icell1)
int GetHitDw()
Definition: PndSdsCell.h:35
TClonesArray * ForwardEvolution(TClonesArray *fCellArray, int niter=100)
void AddHit(UInt_t detId, UInt_t hitId, Double_t rho)
int hit(Int_t nEvents=0, TString inFile="sim.root", TString parFile="par.root", TString inDigi="digi.root", TString outFile="hit.root", Int_t timeBased=0)
Definition: hit.C:1
int GetHitUp()
Definition: PndSdsCell.h:34
void SetPV(int &ipv)
Definition: PndSdsCell.h:33
bool SortHitsByDetSimple2(std::vector< std::vector< Int_t > > &hitsd, Int_t nStripHits)
TClonesArray * CookCells(std::vector< std::vector< Int_t > > hitsd, int &pl0, int &pl1, TClonesArray *tCellArray)
dble_vec_t vec[12]
Definition: ranlxd.cxx:380
void PndLmdTrackFinderCATask::FinishTask ( )

Definition at line 862 of file PndLmdTrackFinderCATask.cxx.

References fCellArray.

862  {
863  delete fCellArray;
864  // delete lmddim;
865  // delete fCellArray_tmp;
866 }
TClonesArray * PndLmdTrackFinderCATask::ForwardEvolution ( TClonesArray *  fCellArray,
int  niter = 100 
)
private

Set counters values –—


Definition at line 336 of file PndLmdTrackFinderCATask.cxx.

References fVerbose, PndSdsCell::GetHitDw(), PndSdsCell::GetHitUp(), PndSdsCell::GetPV(), Neighbor(), niter, and PndSdsCell::SetPV().

Referenced by Exec().

337  {
338  // Find neighbors between cells
340  std::vector<int> pv_new;
341  Int_t nCells = tCellArray->GetEntriesFast();
342  for (int icv = 0; icv < nCells; icv++) pv_new.push_back(-1);
343  bool stop_itter = true;
344  // for(int itt=0;itt<1000;itt++){ //should be infinite loop! due to small
345  // number of layers 1000 is close to infinity ;)
346  TStopwatch *timer_neighbors_itter = new TStopwatch();
347  for (int itt = 0; itt < niter;
348  itt++) { // should be infinite loop! due to small number of layers 1000
349  // is close to infinity ;)
350  int ncells_tmp = 0;
351  stop_itter = true;
352 
353  if (fVerbose > 0) timer_neighbors_itter->Start();
354  nCells = tCellArray->GetEntriesFast();
355  if (fVerbose > 0)
356  cout << " === ITTER === " << itt << " with " << nCells << " cells"
357  << endl;
358  for (int ic = 0; ic < nCells; ic++) {
359  PndSdsCell *cell0 = (PndSdsCell *)tCellArray->At(ic);
360  for (int jc = ic + 1; jc < nCells; jc++) {
361  PndSdsCell *cell1 = (PndSdsCell *)tCellArray->At(jc);
362  if ((cell0->GetHitUp()) != (cell1->GetHitDw())) continue;
363  bool isNeighbor = Neighbor(cell0, cell1);
364  // bool isNeighbor = Neighbor(ic,jc);
365  if (isNeighbor) {
366  // PndSdsCell *cell0 = (PndSdsCell*)tCellArray->At(ic);
367  // PndSdsCell *cell1 = (PndSdsCell*)tCellArray->At(jc);
368  if (itt > 0) {
369  if ((cell0->GetPV()) == (cell1->GetPV())) {
370  if ((cell1->GetPV()) < 0) pv_new[ic] = 0;
371  if ((cell1->GetPV()) > -1) pv_new[ic] = cell0->GetPV();
372  pv_new[jc] = cell1->GetPV() + 1;
373  stop_itter = false;
374  if (fVerbose > 2)
375  cout << "pv 0 = " << pv_new[ic] << " pv 1 = " << pv_new[jc]
376  << endl;
377  }
378  }
379  if (itt < 1) {
380  pv_new[ic] = 0;
381  pv_new[jc] = 0;
382  stop_itter = false;
383  }
384  }
385  }
386  }
387 
388  for (int icv = 0; icv < tCellArray->GetEntriesFast(); icv++) {
389  if (pv_new[icv] < 0) { // clean not used cells
390  tCellArray->RemoveAt(icv);
391  tCellArray->Compress();
392  pv_new.erase(pv_new.begin() + icv);
393  icv--;
394  } else {
395  PndSdsCell *cell = (PndSdsCell *)tCellArray->At(icv);
396  if (fVerbose > 2)
397  cout << "cell with hitDw = " << cell->GetHitDw()
398  << " and hitUp = " << cell->GetHitUp()
399  << " gets new PV = " << pv_new[icv] << endl;
400  cell->SetPV(pv_new[icv]);
401  ncells_tmp++;
402  }
403  }
404 
405  if (fVerbose > 0) {
406  cout << "One itter with " << nCells << " cells: " << endl;
407  timer_neighbors_itter->Stop();
408  timer_neighbors_itter->Print();
409  }
410  if (fVerbose > 0 && stop_itter)
411  cout << "-- CA made " << itt << " itterations --" << endl;
412  if (stop_itter) break;
413  }
414  delete timer_neighbors_itter;
416  // delete fCellArray_tmp;
417  return tCellArray;
418 }
int fVerbose
Definition: poormantracks.C:24
int GetPV()
Definition: PndSdsCell.h:36
bool Neighbor(int &icell0, int &icell1)
int GetHitDw()
Definition: PndSdsCell.h:35
int niter
Definition: poormantracks.C:20
int GetHitUp()
Definition: PndSdsCell.h:34
void SetPV(int &ipv)
Definition: PndSdsCell.h:33
Double_t PndLmdTrackFinderCATask::GetTrackCurvature ( PndMCTrack myTrack)
private

Definition at line 852 of file PndLmdTrackFinderCATask.cxx.

References PndMCTrack::GetMomentum(), p, and CAMath::Sqrt().

852  {
853  TVector3 p = myTrack->GetMomentum();
854  return (2 / TMath::Sqrt(p.Px() * p.Px() + p.Py() * p.Py()));
855 }
static T Sqrt(const T &x)
Definition: PndCAMath.h:37
TVector3 GetMomentum() const
Definition: PndMCTrack.h:78
Double_t p
Definition: anasim.C:58
Double_t PndLmdTrackFinderCATask::GetTrackDip ( PndMCTrack myTrack)
private

Definition at line 858 of file PndLmdTrackFinderCATask.cxx.

References PndMCTrack::GetMomentum(), p, and CAMath::Sqrt().

858  {
859  TVector3 p = myTrack->GetMomentum();
860  return (p.Mag() / TMath::Sqrt(p.Px() * p.Px() + p.Py() * p.Py()));
861 }
static T Sqrt(const T &x)
Definition: PndCAMath.h:37
TVector3 GetMomentum() const
Definition: PndMCTrack.h:78
Double_t p
Definition: anasim.C:58
InitStatus PndLmdTrackFinderCATask::Init ( )
virtual

Definition at line 241 of file PndLmdTrackFinderCATask.cxx.

References fCellArray, fHitBranchStrip, fStripHitArray, fTrackCandArray, and missPlAlgo.

241  {
242  FairRootManager *ioman = FairRootManager::Instance();
243 
244  if (!ioman) {
245  std::cout << "-E- PndLmdTrackFinderCATask::Init: "
246  << "RootManager not instantiated!" << std::endl;
247  return kFATAL;
248  }
249 
250  // Get input array
251  fStripHitArray = (TClonesArray *)ioman->GetObject(fHitBranchStrip);
252  if (!fStripHitArray) {
253  std::cout << "-W- PndLmdTrackFinderCATask::Init: "
254  << "No fStripHitArray!" << std::endl;
255  return kERROR;
256  }
257 
258  fTrackCandArray = new TClonesArray("PndTrackCand");
259  ioman->Register("LMDTrackCand", "PndLmd", fTrackCandArray, kTRUE);
260 
261  fCellArray = new TClonesArray("PndSdsCell");
262 
263  std::cout << "-I- PndLmdTrackFinderCATask: Initialisation successfull"
264  << std::endl;
265  if (missPlAlgo)
266  std::cout << "-I- PndLmdTrackFinderCATask: missing plane(s) algorithm will "
267  "be used"
268  << std::endl;
269  return kSUCCESS;
270 }
bool PndLmdTrackFinderCATask::Neighbor ( int &  icell0,
int &  icell1 
)
private

Definition at line 273 of file PndLmdTrackFinderCATask.cxx.

References fCellArray, fStripHitArray, PndSdsCell::GetHitDw(), PndSdsCell::GetHitUp(), and rule_max.

Referenced by Exec(), and ForwardEvolution().

273  {
274  PndSdsCell *cell0 = (PndSdsCell *)fCellArray->At(icell0);
275  PndSdsCell *cell1 = (PndSdsCell *)fCellArray->At(icell1);
276 
277  if ((cell0->GetHitUp()) != (cell1->GetHitDw())) return false;
278  // else{
279  // check if cells make straight line
280  PndSdsHit *hit00 = (PndSdsHit *)fStripHitArray->At(cell0->GetHitDw());
281  PndSdsHit *hit01 = (PndSdsHit *)fStripHitArray->At(cell0->GetHitUp());
282  // PndSdsHit *hit10 =(PndSdsHit*)fStripHitArray->At(cell1->GetHitDw());
283  PndSdsHit *hit11 = (PndSdsHit *)fStripHitArray->At(cell1->GetHitUp());
284  TVector3 A(hit01->GetX() - hit00->GetX(), hit01->GetY() - hit00->GetY(),
285  hit01->GetZ() - hit00->GetZ());
286  TVector3 B(hit11->GetX() - hit01->GetX(), hit11->GetY() - hit01->GetY(),
287  hit11->GetZ() - hit01->GetZ());
288  double ScalAB = A.Dot(B);
289  double cosPsi = ScalAB / (A.Mag() * B.Mag());
290  if ((1 - cosPsi) < rule_max) return true;
291  // else
292  return false;
293  // }
294 }
int GetHitDw()
Definition: PndSdsCell.h:35
int GetHitUp()
Definition: PndSdsCell.h:34
bool PndLmdTrackFinderCATask::Neighbor ( PndSdsCell cell0,
PndSdsCell cell1 
)
private

Definition at line 297 of file PndLmdTrackFinderCATask.cxx.

References fStripHitArray, PndSdsCell::GetHitDw(), PndSdsCell::GetHitUp(), and rule_max.

297  {
298  // //NOTE: it's assumed ((cell0->GetHitUp())==(cell1->GetHitDw())
299  // // if((cell0->GetHitUp())!=(cell1->GetHitDw())) return false;
300  // // else{
301  // //check if cells make straight line
302  PndSdsHit *hit00 = (PndSdsHit *)fStripHitArray->At(cell0->GetHitDw());
303  PndSdsHit *hit01 = (PndSdsHit *)fStripHitArray->At(cell0->GetHitUp());
304  PndSdsHit *hit11 = (PndSdsHit *)fStripHitArray->At(cell1->GetHitUp());
305  TVector3 A(hit01->GetX() - hit00->GetX(), hit01->GetY() - hit00->GetY(),
306  hit01->GetZ() - hit00->GetZ());
307  TVector3 B(hit11->GetX() - hit01->GetX(), hit11->GetY() - hit01->GetY(),
308  hit11->GetZ() - hit01->GetZ());
309  double cosPsi = (A.Dot(B)) / (A.Mag() * B.Mag());
310  if ((1 - cosPsi) < rule_max) return true;
311  return false;
312  // // else return false;
313  // // double cosPsi = 1 - (A.Dot(B))/(A.Mag()*B.Mag());
314  // // if(fabs(cosPsi-rule_max)<0.5*rule_max) return true;
315  // // else return false;
316  // return true;
317 }
int GetHitDw()
Definition: PndSdsCell.h:35
int GetHitUp()
Definition: PndSdsCell.h:34
void PndLmdTrackFinderCATask::ProduceHits ( )
private
void PndLmdTrackFinderCATask::Register ( )
private
InitStatus PndLmdTrackFinderCATask::ReInit ( )
virtual

Definition at line 69 of file PndLmdTrackFinderCATask.cxx.

69  {
70  InitStatus stat = kERROR;
71  return stat;
72 }
void PndLmdTrackFinderCATask::Reset ( )
private
void PndLmdTrackFinderCATask::SetInaccuracy ( Double_t  accu)
inline

Definition at line 44 of file PndLmdTrackFinderCATask.h.

References dXY.

44 { dXY = accu; };
void PndLmdTrackFinderCATask::SetParContainers ( )
virtual

Virtual method Init

Definition at line 67 of file PndLmdTrackFinderCATask.cxx.

67 {}
void PndLmdTrackFinderCATask::SetSensPixelFlag ( bool  fS)
inline

Definition at line 46 of file PndLmdTrackFinderCATask.h.

References flagPixelSens.

void PndLmdTrackFinderCATask::SetSensStripFlag ( bool  fS)
inline

Definition at line 45 of file PndLmdTrackFinderCATask.h.

References flagStipSens.

void PndLmdTrackFinderCATask::SetTrkCandCutsFlag ( bool  fS)
inline

Definition at line 47 of file PndLmdTrackFinderCATask.h.

References flagTrkCandCuts.

void PndLmdTrackFinderCATask::SetVerbose ( Int_t  verbose)
inline

Definition at line 43 of file PndLmdTrackFinderCATask.h.

References fVerbose, and verbose.

43 { fVerbose = verbose; };
int fVerbose
Definition: poormantracks.C:24
#define verbose
bool PndLmdTrackFinderCATask::SortHitsByDet ( std::vector< std::vector< std::pair< Int_t, bool > > > &  hitsd,
Int_t  nStripHits 
)
private

Definition at line 76 of file PndLmdTrackFinderCATask.cxx.

References fStripHitArray, fVerbose, PndSdsHit::GetSensorID(), nP, and nSensPP.

78  {
79  Int_t nPlanes = 0;
80 
81  // sort in plane's
82  for (Int_t iHit = 0; iHit < nStripHits; iHit++) {
83  PndSdsHit *myHit = (PndSdsHit *)(fStripHitArray->At(iHit));
84 
85  Int_t sensid = myHit->GetSensorID(); // Sensors: 1..32
86  Int_t planeid = floor(
87  (sensid) / (double)nSensPP); // nSensPP sensors/plane => Planes: 0..3
88  hitsd.at(planeid).push_back(make_pair(iHit, false));
89  }
90 
91  for (Int_t iPlane = 0; iPlane < nP; iPlane++) {
92  if (hitsd.at(iPlane).size() > 0) nPlanes++;
93  }
94 
95  // cout << "Hits: " << nStripHits << endl;
96  if (fVerbose > 2) {
97  cout << "Hits: " << nStripHits << " in " << nPlanes << " plane(s)." << endl;
98  for (Int_t idet = 0; idet < nP; idet++)
99  cout << "Plane: " << idet << " DiscHits: " << hitsd.at(idet).size()
100  << endl;
101  }
102 
103  if (nPlanes > 2) return true;
104  return false;
105 }
int fVerbose
Definition: poormantracks.C:24
Int_t GetSensorID() const
Definition: PndSdsHit.h:90
bool PndLmdTrackFinderCATask::SortHitsByDetSimple ( std::vector< std::vector< Int_t > > &  hitsd,
Int_t  nStripHits 
)
private

Definition at line 110 of file PndLmdTrackFinderCATask.cxx.

References fStripHitArray, fVerbose, PndSdsHit::GetSensorID(), nP, and nSensPP.

Referenced by Exec().

111  {
112  Int_t nPlanes = 0;
113 
114  // sort in plane's
115  for (Int_t iHit = 0; iHit < nStripHits; iHit++) {
116  PndSdsHit *myHit = (PndSdsHit *)(fStripHitArray->At(iHit));
117  Int_t sensid = myHit->GetSensorID(); // Sensors: 1..32
118  Int_t planeid = floor(
119  (sensid) / (double)nSensPP); // nSensPP sensors/plane => Planes: 0..3
120  hitsd.at(planeid).push_back(iHit);
121  }
122 
123  for (Int_t iPlane = 0; iPlane < nP; iPlane++) {
124  if (hitsd.at(iPlane).size() > 0) nPlanes++;
125  }
126 
127  if (fVerbose > 2) {
128  cout << "Hits: " << nStripHits << " in " << nPlanes << " plane(s)." << endl;
129  for (Int_t idet = 0; idet < nP; idet++)
130  cout << "Plane: " << idet << " DiscHits: " << hitsd.at(idet).size()
131  << endl;
132  }
133 
134  if (nPlanes > 2) return true;
135  return false;
136 }
int fVerbose
Definition: poormantracks.C:24
Int_t GetSensorID() const
Definition: PndSdsHit.h:90
bool PndLmdTrackFinderCATask::SortHitsByDetSimple2 ( std::vector< std::vector< Int_t > > &  hitsd,
Int_t  nStripHits 
)
private

Definition at line 141 of file PndLmdTrackFinderCATask.cxx.

References fStripHitArray, fVerbose, PndLmdGeometryHelper::getInstance(), PndSdsHit::GetSensorID(), PndLmdHitLocationInfo::module_side, nP, and PndLmdHitLocationInfo::plane.

Referenced by Exec().

142  {
143  Int_t nPlanes = 0;
144 
145  auto &lmd_helper(PndLmdGeometryHelper::getInstance());
146  // sort in plane's
147  for (Int_t iHit = 0; iHit < nStripHits; iHit++) {
148  PndSdsHit *myHit = (PndSdsHit *)(fStripHitArray->At(iHit));
149  Int_t sensid = myHit->GetSensorID(); // Sensors: 1..32
150 
151  const PndLmdHitLocationInfo &hit_info =
152  lmd_helper.getHitLocationInfo(sensid);
153 
154  int virtplane = hit_info.plane; // merged hits
155  if (nP > 4)
156  virtplane = 2 * hit_info.plane + hit_info.module_side; // single hits
157  hitsd.at(virtplane).push_back(iHit);
158  }
159 
160  for (Int_t iPlane = 0; iPlane < nP; iPlane++) {
161  if (hitsd.at(iPlane).size() > 0) nPlanes++;
162  }
163 
164  if (fVerbose > 2) {
165  cout << "Hits: " << nStripHits << " in " << nPlanes << " plane(s)." << endl;
166  for (Int_t idet = 0; idet < nP; idet++)
167  cout << "Plane: " << idet << " DiscHits: " << hitsd.at(idet).size()
168  << endl;
169  }
170 
171  if (nPlanes > 2) return true;
172  return false;
173 }
int fVerbose
Definition: poormantracks.C:24
static PndLmdGeometryHelper & getInstance()
Int_t GetSensorID() const
Definition: PndSdsHit.h:90
bool PndLmdTrackFinderCATask::SortHitsByZ ( std::vector< std::vector< std::pair< Int_t, bool > > > &  hitsd,
Int_t  nStripHits 
)
private

Definition at line 178 of file PndLmdTrackFinderCATask.cxx.

References Double_t, fabs(), fStripHitArray, fVerbose, i, pos, and z.

180  {
181  std::vector<Double_t> detZ;
182 
183  // find plane positions
184  for (Int_t iHit = 0; iHit < nStripHits; iHit++) {
185  Double_t tmp = ((PndSdsHit *)(fStripHitArray->At(iHit)))->GetZ();
186  bool newZ = true;
187  for (unsigned int idet = 0; idet < detZ.size(); idet++) {
188  if (fabs(tmp - detZ.at(idet)) <
189  9.) { // check if already found [for using with Dipole]
190  newZ = false;
191  }
192  }
193  if (newZ) {
194  detZ.push_back(tmp);
195 
196  // sort positions
197  Int_t pos = -1;
198  for (int idet = detZ.size() - 1; idet >= 0; idet--) {
199  if (tmp < detZ.at(idet)) pos = idet;
200  }
201  if (pos != -1) {
202  Double_t swap = detZ.at(pos);
203  detZ.at(pos) = tmp;
204  tmp = swap;
205  for (unsigned int i = pos + 1; i < detZ.size(); i++) {
206  swap = detZ.at(i);
207  detZ.at(i) = tmp;
208  tmp = swap;
209  }
210  }
211  }
212  }
213 
214  // sort in plane's
215  for (Int_t iHit = 0; iHit < nStripHits; iHit++) {
216  PndSdsHit *myHit = (PndSdsHit *)(fStripHitArray->At(iHit));
217 
218  Double_t z = myHit->GetZ();
219  for (unsigned int idet = 0; idet < detZ.size(); idet++) { // planes
220 
221  if (fabs(z - detZ.at(idet)) < 9.) { //[for using with Dipole]
222  hitsd.at(idet).push_back(make_pair(iHit, false));
223  }
224  }
225  }
226 
227  if (fVerbose > 2) {
228  cout << "Hits: " << nStripHits << " in " << detZ.size() << " plane(s)."
229  << endl;
230  for (unsigned int idet = 0; idet < detZ.size(); idet++)
231  cout << "Plane: " << idet << " DiscHits: " << hitsd.at(idet).size()
232  << endl;
233  }
234 
235  if (detZ.size() > 3) return true;
236  return false;
237 }
TVector3 pos
int fVerbose
Definition: poormantracks.C:24
Int_t i
Definition: run_full.C:25
Double_t
Double_t z
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47

Member Data Documentation

Double_t PndLmdTrackFinderCATask::dXY
private

Definition at line 51 of file PndLmdTrackFinderCATask.h.

Referenced by PndLmdTrackFinderCATask(), and SetInaccuracy().

TClonesArray* PndLmdTrackFinderCATask::fCellArray
private

Definition at line 83 of file PndLmdTrackFinderCATask.h.

Referenced by Exec(), FinishTask(), Init(), and Neighbor().

TString PndLmdTrackFinderCATask::fHitBranchStrip
private

Definition at line 72 of file PndLmdTrackFinderCATask.h.

Referenced by Init(), and PndLmdTrackFinderCATask().

bool PndLmdTrackFinderCATask::flagPixelSens
private

Definition at line 76 of file PndLmdTrackFinderCATask.h.

Referenced by Exec(), PndLmdTrackFinderCATask(), and SetSensPixelFlag().

bool PndLmdTrackFinderCATask::flagStipSens
private

Definition at line 75 of file PndLmdTrackFinderCATask.h.

Referenced by Exec(), PndLmdTrackFinderCATask(), and SetSensStripFlag().

bool PndLmdTrackFinderCATask::flagTrkCandCuts
private

Definition at line 77 of file PndLmdTrackFinderCATask.h.

Referenced by PndLmdTrackFinderCATask(), and SetTrkCandCutsFlag().

TClonesArray* PndLmdTrackFinderCATask::fStripHitArray
private

Input array of PndSdsDigis and PndSdsHits

Definition at line 79 of file PndLmdTrackFinderCATask.h.

Referenced by CookAllCells(), CookCells(), Exec(), Init(), Neighbor(), SortHitsByDet(), SortHitsByDetSimple(), SortHitsByDetSimple2(), and SortHitsByZ().

TClonesArray* PndLmdTrackFinderCATask::fTrackCandArray
private

Output array of Track-Cand

Definition at line 82 of file PndLmdTrackFinderCATask.h.

Referenced by Exec(), and Init().

bool PndLmdTrackFinderCATask::missPlAlgo
private

Definition at line 74 of file PndLmdTrackFinderCATask.h.

Referenced by CookAllCells(), Exec(), Init(), and PndLmdTrackFinderCATask().

int PndLmdTrackFinderCATask::nP
private
int PndLmdTrackFinderCATask::nSensPP
private
double PndLmdTrackFinderCATask::rule_max
private

Definition at line 52 of file PndLmdTrackFinderCATask.h.

Referenced by Neighbor(), and PndLmdTrackFinderCATask().


The documentation for this class was generated from the following files: