AliRoot Core  v5-06-15 (45dab64)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliTPCCmpNG.C
Go to the documentation of this file.
1 
99 #if !defined(__CINT__) || defined(__MAKECINT__)
100 #include "iostream.h"
101 #include <stdio.h>
102 #include <string.h>
103 #include "Rtypes.h"
104 #include "TFile.h"
105 #include "TTree.h"
106 #include "TString.h"
107 #include "TBenchmark.h"
108 #include "TStopwatch.h"
109 #include "TParticle.h"
110 #include "AliRun.h"
111 #include "AliStack.h"
112 #include "AliTPCtrack.h"
113 #include "AliSimDigits.h"
114 #include "AliTPCParam.h"
115 #include "TParticle.h"
116 #include "AliTPC.h"
117 #include "AliDetector.h"
118 #include "AliTrackReference.h"
119 #include "TSystem.h"
120 #include "TTimer.h"
121 // #include "AliConst.h"
122 #endif
123 
124 #include "AliTPCTracking.C"
125 
126 // include ML.C:
128 //
129 // name: ML.C (Macro Library - collection of functions used in diff macros
130 // date: 08.05.2002
131 // last update: 08.05.2002
132 // author: Jiri Chudoba
133 // version: 1.0
134 // description:
135 //
136 // History:
137 //
138 // 08.05.02 - first version
139 //
141 
142 #if !defined(__CINT__) || defined(__MAKECINT__)
143 #include "iostream.h"
144 #include "Rtypes.h"
145 #include "TSystem.h"
146 #include "TTimer.h"
147 #include "Getline.h"
148 #include "TChain.h"
149 #include "TString.h"
150 #include "TFile.h"
151 #include "AliRun.h"
152 
153 void WaitForReturn();
154 Bool_t ImportgAlice(TFile *file);
155 TFile* OpenAliceFile(char *fn, Bool_t importgAlice = kFALSE, char *mode = "read");
156 Int_t Chain(TString baseDir, TString subDirNameMask, TString fn, TChain& chain);
157 
158 #endif
159 
162 {
164 
165  char *input;
166  Bool_t done = kFALSE;
167  TTimer *timer = new TTimer("gSystem->ProcessEvents();", 50, kFALSE);
168 
169  do {
170  timer->TurnOn();
171  timer->Reset();
172  // Now let's read the input, we can use here any
173  // stdio or iostream reading methods. like std::cin >> myinputl;
174  input = Getline("Type <return> to continue: ");
175  timer->TurnOff();
176  if (input) done = kTRUE;
177  } while (!done);
178 }
179 
181 
182 Int_t Chain(TString baseDir, TString subDirNameMask, TString fn, TChain& chain) {
185 
186 // open baseDir, loop over subdirs
187 
188  void *dirp = gSystem->OpenDirectory(baseDir);
189  if (!dirp) {
190  cerr<<"Could not open base directory "<<baseDir.Data()<<endl;
191  return 0;
192  }
193  const char *afile;
194  Long_t id, size, flag, modTime;
195  Int_t rc = 0;
196  char relName[100];
197  while((afile = gSystem->GetDirEntry(dirp))) {
198 // printf("file: %s\n",afile);
199  if (strstr(afile,subDirNameMask.Data())) {
200  sprintf(relName,"%s/%s/%s",baseDir.Data(),afile,fn.Data());
201 // cerr<<"relName = "<<relName<<endl;
202  if(!gSystem->GetPathInfo(relName, &id, &size, &flag, &modTime)) {
203  rc += chain.Add(relName);
204  }
205  }
206  }
207  gSystem->FreeDirectory(dirp);
208 // cerr<<"rc = "<<rc<<endl;
209  return rc;
210 }
212 Bool_t ImportgAlice(TFile *file) {
214 
215  gAlice = (AliRun*)file->Get("gAlice");
216  if (!gAlice) return kFALSE;
217  return kTRUE;
218 }
220 TFile* OpenAliceFile(char *fn, Bool_t importgAlice, char *mode) {
221  TFile *file = TFile::Open(fn,mode);
222  if (!file->IsOpen()) {
223  cerr<<"OpenAliceFile: cannot open file "<<fn<<" in mode "
224  <<mode<<endl;
225  return 0;
226  }
227  if (!importgAlice) return file;
228  if (ImportgAlice(file)) return file;
229  return 0;
230 }
232 
233 
235 //
236 // Start of implementation of the class TPCGenInfo
237 //
239 class TPCGenInfo: public TObject {
240 
241 public:
242  TPCGenInfo();
243  AliTrackReference *fTrackRef;
244  TParticle *fParticle;
245  Int_t fLabel;
246 
251 
252  ClassDef(TPCGenInfo,1) // container for
253 };
257 {
258  fTrackRef = 0;
259  fParticle = 0;
260 }
262 
264 //
265 // End of implementation of the class TPCGenInfo
266 //
268 
269 
270 
272 //
273 // Start of implementation of the class digitRow
274 //
276 const Int_t kgRowBytes = 32;
277 
278 class digitRow: public TObject {
279 
280 public:
281  digitRow();
282 // digitRow(){;}
283  virtual ~digitRow(){;}
284  void SetRow(Int_t row);
285  Bool_t TestRow(Int_t row);
286  digitRow & operator=(const digitRow &digOld);
287  Int_t RowsOn(Int_t upto=8*kgRowBytes);
288  Int_t Last();
289  Int_t First();
290  void Reset();
291 
292 //private:
293  UChar_t fDig[kgRowBytes];
294 
295  ClassDef(digitRow,1) // container for digit pattern
296 };
300 {
301  Reset();
302 }
305 {
306  for (Int_t i = 0; i<kgRowBytes; i++) fDig[i] = digOld.fDig[i];
307  return (*this);
308 }
310 void digitRow::SetRow(Int_t row)
311 {
312  if (row >= 8*kgRowBytes) {
313  cerr<<"digitRow::SetRow: index "<<row<<" out of bounds."<<endl;
314  return;
315  }
316  Int_t iC = row/8;
317  Int_t iB = row%8;
318  SETBIT(fDig[iC],iB);
319 }
320 
322 Bool_t digitRow::TestRow(Int_t row)
323 {
325 
326  Int_t iC = row/8;
327  Int_t iB = row%8;
328  return TESTBIT(fDig[iC],iB);
329 }
331 Int_t digitRow::RowsOn(Int_t upto)
332 {
335 
336  Int_t total = 0;
337  for (Int_t i = 0; i<kgRowBytes; i++) {
338  for (Int_t j = 0; j < 8; j++) {
339  if (i*8+j > upto) return total;
340  if (TESTBIT(fDig[i],j)) total++;
341  }
342  }
343  return total;
344 }
347 {
349 
350  for (Int_t i = 0; i<kgRowBytes; i++) {
351  fDig[i] <<= 8;
352  }
353 }
356 {
359 
360  for (Int_t i = kgRowBytes-1; i>=0; i--) {
361  for (Int_t j = 7; j >= 0; j--) {
362  if TESTBIT(fDig[i],j) return i*8+j;
363  }
364  }
365  return -1;
366 }
369 {
372 
373  for (Int_t i = 0; i<kgRowBytes; i++) {
374  for (Int_t j = 0; j < 8; j++) {
375  if (TESTBIT(fDig[i],j)) return i*8+j;
376  }
377  }
378  return -1;
379 }
380 
382 //
383 // end of implementation of a class digitRow
384 //
387 //
388 // Start of implementation of the class TPCFindGenTracks
389 //
391 
393 
394 public:
396  TPCFindGenTracks(char* fnHits,
397  char* fnDigits ="tpc.digits.root",
398  char* fnRes ="genTracks.root",
399  Int_t nEvents=1, Int_t firstEvent=0);
400  virtual ~TPCFindGenTracks();
401  void Reset();
402  Int_t Exec();
403  Int_t Exec(Int_t nEvents, Int_t firstEventNr);
404  void CreateTreeGenTracks();
405  void CloseOutputFile();
406  Int_t TreeKLoop();
407  Int_t TreeTRLoop();
408  Int_t TreeDLoop();
409  void SetFirstEventNr(Int_t i) {fFirstEventNr = i;}
410  void SetNEvents(Int_t i) {fNEvents = i;}
411  void SetDebug(Int_t level) {fDebug = level;}
412 
413  Float_t TR2LocalX(AliTrackReference *trackRef,
414  AliTPCParam *paramTPC);
415 
416 public:
417  Int_t fDebug;
418  Int_t fEventNr;
419  Int_t fLabel;
420  Int_t fNEvents;
422  Int_t fNParticles;
423  TTree *fTreeGenTracks;
424  char *fFnRes;
425  char *fFnHits;
426  char *fFnDigits;
427  TFile *fFileGenTracks;
428  TFile *fFileHits;
429  TFile *fFileTreeD;
432  AliTrackReference *fTrackRef;
433  AliTrackReference *fContainerTR;
434  Int_t *fIndexTR;
435  Int_t fLastIndexTR;
436 
438 
439  Double_t fVPrim[3];
440  Double_t fVDist[4];
441  // the fVDist[3] contains size of the 3-vector
442  TParticle *fParticle;
443 
448 
449 private:
450 
451 // some constants for the original non-pareller tracking (by Y.Belikov)
452  static const Int_t seedRow11 = 158;
453  static const Int_t seedRow12 = 139;
454  static const Int_t seedRow21 = 149;
455  static const Int_t seedRow22 = 130;
456  static const Double_t kRaddeg = 180./TMath::Pi();
457 
458  static const Int_t fgMaxIndexTR = 50000;
459  static const Int_t fgMaxParticles = 2000000;
460  static const Double_t fgPtCut = .001;
461  static const Float_t fgTrackRefLocalXMax = 82.95;
462  static const Float_t fgTrackRefLocalXMaxDelta = 500.;
463 
464  ClassDef(TPCFindGenTracks,1) // class which creates and fills tree with TPCGenTrack objects
465 };
467 
470 {
471  Reset();
472 }
473 
475 TPCFindGenTracks::TPCFindGenTracks(char* fnHits, char* fnDigits,
476  char* fnRes,
477  Int_t nEvents, Int_t firstEvent)
478 {
479  Reset();
480  fFirstEventNr = firstEvent;
481  fEventNr = firstEvent;
482  fNEvents = nEvents;
483  fFnRes = fnRes;
484  fFnHits = fnHits;
485  fFnDigits = fnDigits;
486 }
489 {
490  fDigitRow = 0;
491  fEventNr = 0;
492  fNEvents = 0;
493  fTreeGenTracks = 0;
494  fFnRes = "genTracks.root";
495  fFnHits = "rfio:galice.root";
496  fFnDigits = "rfio:its.tpc.trd.digits.root";
497  fFileGenTracks = 0;
498  fFileHits =0;
499  fFileTreeD =0;
500  fContainerDigitRow = 0;
501  fContainerTR = 0;
502  fIndexTR = 0;
503  fLastIndexTR = -1;
504  fParticle = 0;
505  fTrackRef = 0;
506  fDebug = 0;
507  fVPrim[0] = -1000.;
508  fVPrim[1] = -1000.;
509  fVPrim[2] = -1000.;
510  fParamTPC = 0;
511 
512 }
515 {
516  ;
517 }
519 Int_t TPCFindGenTracks::Exec(Int_t nEvents, Int_t firstEventNr)
520 {
521  fNEvents = nEvents;
522  fFirstEventNr = firstEventNr;
523  return Exec();
524 }
525 
528 {
529  TStopwatch timer;
530  timer.Start();
531 
532  fDigitRow = new digitRow();
534  if (!fTreeGenTracks) return 1;
535  fFileHits = OpenAliceFile(fFnHits,kTRUE,"read"); //gAlice is read here
536  if (!fFileHits) return 1;
537  fFileHits->cd();
538  SetFieldFactor();
539 
540  fFileTreeD = TFile::Open(fFnDigits,"read");
541  if (!fFileTreeD->IsOpen()) {
542  cerr<<"Cannot open file "<<fFnDigits<<endl;
543  return 1;
544  }
545 
546  fParamTPC = LoadTPCParam(fFileTreeD);
547  if (!fParamTPC) {
548  cerr<<"TPC parameters not found and could not be created"<<endl;
549  return 1;
550  }
551 
553  fEventNr++) {
554  fNParticles = gAlice->GetEvent(fEventNr);
556  fContainerTR = new AliTrackReference[fgMaxIndexTR];
557  fIndexTR = new Int_t[fNParticles];
558  for (Int_t i = 0; i<fNParticles; i++) {
559  fIndexTR[i] = -1;
560  }
561 
562  cout<<"Start to process event "<<fEventNr<<endl;
563  cout<<"\tfNParticles = "<<fNParticles<<endl;
564  if (fDebug>2) cout<<"\tStart loop over TreeD"<<endl;
565  if (TreeDLoop()>0) return 1;
566  if (fDebug>2) cout<<"\tStart loop over TreeTR"<<endl;
567  if (TreeTRLoop()>0) return 1;
568  if (fDebug>2) cout<<"\tStart loop over TreeK"<<endl;
569  if (TreeKLoop()>0) return 1;
570  if (fDebug>2) cout<<"\tEnd loop over TreeK"<<endl;
571 
572  delete [] fContainerDigitRow;
573  delete [] fContainerTR;
574  delete [] fIndexTR;
575  }
576 
577  CloseOutputFile();
578 
579  cerr<<"Exec finished"<<endl;
580  fFileHits->cd();
581  delete gAlice;
582  fFileHits->Close();
583  delete fFileHits;
584 
585  timer.Stop();
586  timer.Print();
587  return 0;
588 }
591 {
592  fFileGenTracks = TFile::Open(fFnRes,"RECREATE");
593  if (!fFileGenTracks) {
594  cerr<<"Error in CreateTreeGenTracks: cannot open file "<<fFnRes<<endl;
595  return;
596  }
597  fTreeGenTracks = new TTree("genTracksTree","genTracksTree");
598  TBranch *branchBits = fTreeGenTracks->Branch("bitsBranch", "digitRow", &fDigitRow, 4000, 0);
599  if (!branchBits) {
600  cerr<<"Error in CreateTreeGenTracks: cannot create branch."<<endl;
601  return;
602  }
603  fTreeGenTracks->Branch("fEventNr",&fEventNr,"fEventNr/I");
604  fTreeGenTracks->Branch("fLabel",&fLabel,"fLabel/I");
605  fTreeGenTracks->Branch("fRowsWithDigitsInn",&fRowsWithDigitsInn,"fRowsWithDigitsInn/I");
606  fTreeGenTracks->Branch("fRowsWithDigits",&fRowsWithDigits,"fRowsWithDigits/I");
607  fTreeGenTracks->Branch("fRowsTrackLength",&fRowsTrackLength,"fRowsTrackLength/I");
608  fTreeGenTracks->Branch("fDigitsInSeed",&fDigitsInSeed,"fDigitsInSeed/I");
609 
610  fTreeGenTracks->Branch("Particle","TParticle",&fParticle);
611  fTreeGenTracks->Branch("fVDist",&fVDist,"fVDist[4]/D");
612  fTreeGenTracks->Branch("TR","AliTrackReference",&fTrackRef);
613 
614  fTreeGenTracks->AutoSave();
615 }
618 {
619  if (!fFileGenTracks) {
620  cerr<<"File "<<fFnRes<<" not found as an open file."<<endl;
621  return;
622  }
623  fFileGenTracks->cd();
624  fTreeGenTracks->Write();
625  delete fTreeGenTracks;
626  fFileGenTracks->Close();
627  delete fFileGenTracks;
628  return;
629 }
630 
633 {
636 
637  fFileHits->cd();
638  if (fDebug > 0) {
639  cout<<"There are "<<fNParticles<<" primary and secondary particles in event "
640  <<fEventNr<<endl;
641  }
642  AliStack * stack = gAlice->Stack();
643  if (!stack) {cerr<<"Stack was not found!\n"; return 1;}
644 
645 // not all generators give primary vertex position. Take the vertex
646 // of the particle 0 as primary vertex.
647  fParticle = stack->ParticleFromTreeK(0);
648  fVPrim[0] = fParticle->Vx();
649  fVPrim[1] = fParticle->Vy();
650  fVPrim[2] = fParticle->Vz();
651 
652  for (Int_t iParticle = 0; iParticle < fNParticles; iParticle++) {
653 // for (Int_t iParticle = 0; iParticle < fDebug; iParticle++) {
654 
655 // load only particles with TR
656  if (fIndexTR[iParticle] < 0) continue;
657  fParticle = stack->ParticleFromTreeK(iParticle);
658  if (fDebug > 3 && iParticle < 10) {
659  cout<<"processing particle "<<iParticle<<" ";
660  fParticle->Print();
661  }
662 
663 // fill the tree
664 
665  fLabel = iParticle;
666  fVDist[0] = fParticle->Vx()-fVPrim[0];
667  fVDist[1] = fParticle->Vy()-fVPrim[1];
668  fVDist[2] = fParticle->Vz()-fVPrim[2];
669  fVDist[3] = TMath::Sqrt(fVDist[0]*fVDist[0]+fVDist[1]*fVDist[1]+fVDist[2]*fVDist[2]);
670  fDigitRow = &(fContainerDigitRow[iParticle]);
671  fRowsWithDigitsInn = fDigitRow->RowsOn(63); // 63 = number of inner rows
674  if (fDebug > 2 && iParticle < 10) {
675  cerr<<"Fill track with a label "<<iParticle<<endl;
676  }
677  fDigitsInSeed = 0;
679  fDigitsInSeed = 1;
681  fDigitsInSeed += 10;
682 
683  if (fIndexTR[iParticle] >= 0) {
684  fTrackRef = &(fContainerTR[fIndexTR[iParticle]]);
685 // cerr<<"Debug: fTrackRef->X() = "<<fTrackRef->X()<<endl;
686  } else {
687  fTrackRef->SetTrack(-1);
688  }
689 
690  fTreeGenTracks->Fill();
691 
692  }
693  fTreeGenTracks->AutoSave();
694 // delete gAlice; gAlice = 0;
695 // fFileHits->Close();
696 
697  if (fDebug > 2) cerr<<"end of TreeKLoop"<<endl;
698 
699  return 0;
700 }
703 {
706 
707 
708 // Int_t nrow_up=fParamTPC->GetNRowUp();
709 // Int_t nrows=fParamTPC->GetNRowLow()+nrow_up;
710  Int_t nInnerSector = fParamTPC->GetNInnerSector();
711  Int_t rowShift = 0;
712  Int_t zero=fParamTPC->GetZeroSup();
713 // Int_t gap=Int_t(0.125*nrows), shift=Int_t(0.5*gap);
714 
715  char treeDName[100];
716  sprintf(treeDName,"TreeD_75x40_100x60_150x60_%d",fEventNr);
717  TTree *treeD=(TTree*)fFileTreeD->Get(treeDName);
718  AliSimDigits digitsAddress, *digits=&digitsAddress;
719  treeD->GetBranch("Segment")->SetAddress(&digits);
720 
721  Int_t sectorsByRows=(Int_t)treeD->GetEntries();
722  if (fDebug > 1) cout<<"\tsectorsByRows = "<<sectorsByRows<<endl;
723  for (Int_t i=0; i<sectorsByRows; i++) {
724 // for (Int_t i=5720; i<sectorsByRows; i++) {
725  if (!treeD->GetEvent(i)) continue;
726  Int_t sec,row;
727  fParamTPC->AdjustSectorRow(digits->GetID(),sec,row);
728  if (fDebug > 1) cout<<sec<<' '<<row<<" \r";
729 // cerr<<sec<<' '<<row<<endl;
730 
731 // here I expect that upper sectors follow lower sectors
732  if (sec > nInnerSector) rowShift = fParamTPC->GetNRowLow();
733  digits->First();
734  do {
735  Int_t iRow=digits->CurrentRow();
736  Int_t iColumn=digits->CurrentColumn();
737  Short_t digitValue = digits->CurrentDigit();
738 // cout<<"Inner loop: sector, iRow, iColumn "
739 // <<sec<<" "<<iRow<<" "<<iColumn<<endl;
740  if (digitValue >= zero) {
741  Int_t label;
742  for (Int_t j = 0; j<3; j++) {
743  label = digits->GetTrackID(iRow,iColumn,j);
744  if (label >= fNParticles) {
745  cerr<<"particle label too big: fNParticles, label "
746  <<fNParticles<<" "<<label<<endl;
747  }
748  if (label >= 0 && label <= fNParticles) {
749 // if (label >= 0 && label <= fDebug) {
750  if (fDebug > 6 ) {
751  cout<<"Inner loop: sector, iRow, iColumn, label, value, row "
752  <<sec<<" "
753  <<iRow<<" "<<iColumn<<" "<<label<<" "<<digitValue
754  <<" "<<row<<endl;
755  }
756  fContainerDigitRow[label].SetRow(row+rowShift);
757  }
758  }
759  }
760  } while (digits->Next());
761  }
762 
763  if (fDebug > 2) cerr<<"end of TreeDLoop"<<endl;
764 
765  return 0;
766 }
767 
770 {
772 
773  TTree *treeTR=gAlice->TreeTR();
774  if (!treeTR) {
775  cerr<<"TreeTR not found"<<endl;
776  return 1;
777  }
778  Int_t nPrimaries = (Int_t) treeTR->GetEntries();
779  if (fDebug > 1) cout<<"There are "<<nPrimaries<<" entries in TreeTR"<<endl;
780  TBranch *TPCBranchTR = treeTR->GetBranch("TPC");
781  if (!TPCBranchTR) {
782  cerr<<"TPC branch in TR not found"<<endl;
783  return 1;
784  }
785  TClonesArray* TPCArrayTR = new TClonesArray("AliTrackReference");
786  TPCBranchTR->SetAddress(&TPCArrayTR);
787  for (Int_t iPrimPart = 0; iPrimPart<nPrimaries; iPrimPart++) {
788  TPCBranchTR->GetEntry(iPrimPart);
789  for (Int_t iTrackRef = 0; iTrackRef < TPCArrayTR->GetEntriesFast(); iTrackRef++) {
790  AliTrackReference *trackRef = (AliTrackReference*)TPCArrayTR->At(iTrackRef);
791  Int_t label = trackRef->GetTrack();
792 
793 // save info in the fContainerTR
794  if (label<0 || label > fNParticles) {
795  cerr<<"Wrong label: "<<label<<endl;
796  continue;
797 // return 1;
798  }
799 
800 // store only if we do not have any track reference yet for this label
801  if (fIndexTR[label] >= 0) continue;
802 
803 // store only references with localX < fgTrackRefLocalXMax +- fgTrackRefLocalXMaxDelta
804 // and the pT > fgPtCut
805  Float_t localX = TR2LocalX(trackRef,fParamTPC);
806  if (TMath::Abs(localX-fgTrackRefLocalXMax)>fgTrackRefLocalXMaxDelta) continue;
807  if (trackRef->Pt() < fgPtCut) continue;
808 
809 
810 // cout<<"label, xg "<<label<<" "<<xg<<endl;
811  if (fLastIndexTR >= fgMaxIndexTR-1) {
812  cerr<<"Too many tracks with track reference. Increase the constant"
813  <<" fgMaxIndexTR"<<endl;
814  return 1;
815  }
816  fIndexTR[label] = ++fLastIndexTR;
817 
818 // someone was lazy to implement copy ctor in AliTrackReference, so we have to do
819 // it here "manually"
820  fContainerTR[fIndexTR[label]].SetPosition(trackRef->X(),trackRef->Y(),trackRef->Z());
821 
822  fContainerTR[fIndexTR[label]].SetMomentum(trackRef->Px(),trackRef->Py(),trackRef->Pz());
823  fContainerTR[fIndexTR[label]].SetTrack(trackRef->GetTrack());
824  fContainerTR[fIndexTR[label]].SetLength(trackRef->GetLength());
825 // cerr<<"Debug: trackRef->X(), stored: "<<trackRef->X()<<" "
826 // << fContainerTR[fIndexTR[label]].X()<<endl;
827 
828  }
829  }
830  return 0;
831 }
833 Float_t TPCFindGenTracks::TR2LocalX(AliTrackReference *trackRef,
834  AliTPCParam *paramTPC) {
835 
836  Float_t x[3] = { trackRef->X(),trackRef->Y(),trackRef->Z()};
837  Int_t index[4];
838  paramTPC->Transform0to1(x,index);
839  paramTPC->Transform1to2(x,index);
840  return x[0];
841 }
843 
844 
845 
847 //
848 // Start of implementation of the class TPCCmpTr
849 //
851 
852 class TPCCmpTr {
853 
854 public:
855  TPCCmpTr();
856  TPCCmpTr(char* fnRecTracks,
857  char* fnGenTracks ="genTracks.root",
858  char* fnCmpRes ="cmpTracks.root",
859  char* fnGalice ="galice.root",
860  Int_t nEvents=1, Int_t firstEvent=0);
861  virtual ~TPCCmpTr();
862  void Reset();
863  Int_t Exec();
864  Int_t Exec(Int_t nEvents, Int_t firstEventNr);
865  void CreateTreeCmp();
866  void CloseOutputFile();
867  Bool_t ConnectGenTree();
868  Int_t TreeGenLoop(Int_t eventNr);
869  Int_t TreeTLoop(Int_t eventNr);
870  void SetFirstEventNr(Int_t i) {fFirstEventNr = i;}
871  void SetNEvents(Int_t i) {fNEvents = i;}
872  void SetDebug(Int_t level) {fDebug = level;}
873 
874 // tmp method, should go to TrackReferenceTPC
875  Float_t TR2LocalX(AliTrackReference *trackRef,
876  AliTPCParam *paramTPC);
877 
878 private:
880  Int_t fEventNr;
881  Int_t fLabel;
882  Int_t fNEvents;
884 
885  char *fFnCmp;
886  TFile *fFileCmp;
887  TTree *fTreeCmp;
888 
889  char *fFnGenTracks;
892 
893  char *fFnHits;
894  TFile *fFileHits;
895 
896  char *fFnRecTracks;
897  TFile *fFileRecTracks;
898  TTree *fTreeRecTracks;
899 
900  AliTPCtrack *fTPCTrack;
902 
907  TParticle *fParticle;
908  Double_t fVDist[4];
909  // the fVDist[3] contains size of the 3-vector
910  AliTrackReference *fTrackRef;
913 
914  Int_t fNParticles;
915  Int_t fDebug;
916 
919 
920  Double_t fRecPhi;
921  Double_t fLambda;
922  Double_t fRecPt_1;
923  Float_t fdEdx;
924 
925 
926  ClassDef(TPCCmpTr,1) // class which creates and fills tree with TPCGenTrack objects
927 };
931 
934 {
935  Reset();
936 }
937 
939 TPCCmpTr::TPCCmpTr(char* fnRecTracks,
940  char* fnGenTracks,
941  char* fnCmp,
942  char* fnGalice,
943  Int_t nEvents, Int_t firstEvent)
944 {
945  Reset();
946  fFnRecTracks = fnRecTracks;
947  fFnGenTracks = fnGenTracks;
948  fFnCmp = fnCmp;
949  fFnHits = fnGalice;
950  fFirstEventNr = firstEvent;
951  fEventNr = firstEvent;
952  fNEvents = nEvents;
953 }
956 {
957  fDigitRow = 0;
958  fEventNr = 0;
959  fNEvents = 0;
960  fTreeCmp = 0;
961  fFnCmp = "cmpTracks.root";
962  fFnHits = "galice.root";
963  fFileGenTracks = 0;
964  fFileHits =0;
965  fParticle = 0;
966  fTrackRef = 0;
967 
968  fRowsWithDigitsInn = 0;
969  fRowsWithDigits = 0;
970  fRowsTrackLength = 0;
971  fDigitsInSeed = 0;
972 
973  fDebug = 0;
974 
975  fParamTPC = 0;
976  fFnRecTracks = "tpc.tracks.root";
977  fTreeRecTracks = 0;
978  fFileRecTracks = 0;
979  fTPCTrack = 0;
980  fGenInfo = 0;
981 }
984 {
985  ;
986 }
988 Int_t TPCCmpTr::Exec(Int_t nEvents, Int_t firstEventNr)
989 {
990  fNEvents = nEvents;
991  fFirstEventNr = firstEventNr;
992  return Exec();
993 }
994 
997 {
998  TStopwatch timer;
999  timer.Start();
1000 
1001  fDigitRow = new digitRow();
1002  CreateTreeCmp();
1003  if (!fTreeCmp) {
1004  cerr<<"output tree not created"<<endl;
1005  return 1;
1006  }
1007  fFileHits = OpenAliceFile(fFnHits,kTRUE,"read"); //gAlice is read here
1008  if (!fFileHits) {
1009  cerr<<"Cannot open file with gAlice object "<<fFnHits<<endl;
1010  return 1;
1011  }
1012  fFileHits->cd();
1013  SetFieldFactor();
1014 
1015  fParamTPC = LoadTPCParam(fFileHits);
1016  if (!fParamTPC) {
1017  cerr<<"TPC parameters not found and could not be created"<<endl;
1018  return 1;
1019  }
1020 
1021  if (!ConnectGenTree()) {
1022  cerr<<"Cannot connect tree with generated tracks"<<endl;
1023  return 1;
1024  }
1025  fFileHits->cd();
1027  cerr<<"fFirstEventNr, fNEvents: "<<fFirstEventNr<<" "<<fNEvents<<endl;
1028  for (Int_t eventNr = fFirstEventNr; eventNr < fFirstEventNr+fNEvents;
1029  eventNr++) {
1030  fNParticles = gAlice->GetEvent(fEventNr);
1031  fIndexRecTracks = new Int_t[fNParticles];
1032  for (Int_t i = 0; i<fNParticles; i++) {
1033  fIndexRecTracks[i] = -1;
1034  }
1035 
1036  cout<<"Start to process event "<<fEventNr<<endl;
1037  cout<<"\tfNParticles = "<<fNParticles<<endl;
1038  if (fDebug>2) cout<<"\tStart loop over TreeT"<<endl;
1039  if (TreeTLoop(eventNr)>0) return 1;
1040 
1041  if (fDebug>2) cout<<"\tStart loop over tree genTracks"<<endl;
1042  if (TreeGenLoop(eventNr)>0) return 1;
1043  if (fDebug>2) cout<<"\tEnd loop over tree genTracks"<<endl;
1044 
1045  delete fTreeRecTracks;
1046 
1047  delete [] fIndexRecTracks;
1048  }
1049 
1050  CloseOutputFile();
1051 
1052  cerr<<"Exec finished"<<endl;
1053  fFileHits->cd();
1054  delete gAlice;
1055  fFileHits->Close();
1056  delete fFileHits;
1057 
1058  timer.Stop();
1059  timer.Print();
1060  return 0;
1061 }
1064 {
1067 
1068  fFileGenTracks = TFile::Open(fFnGenTracks,"READ");
1069  if (!fFileGenTracks) {
1070  cerr<<"Error in ConnectGenTree: cannot open file "<<fFnGenTracks<<endl;
1071  return kFALSE;
1072  }
1073  fTreeGenTracks = (TTree*)fFileGenTracks->Get("genTracksTree");
1074  if (!fTreeGenTracks) {
1075  cerr<<"Error in ConnectGenTree: cannot find genTracksTree in the file "
1076  <<fFnGenTracks<<endl;
1077  return kFALSE;
1078  }
1079  fTreeGenTracks->SetBranchAddress("fEventNr",&fEventNr);
1080  fTreeGenTracks->SetBranchAddress("fLabel",&fLabel);
1081  fTreeGenTracks->SetBranchAddress("fRowsWithDigitsInn",&fRowsWithDigitsInn);
1082  fTreeGenTracks->SetBranchAddress("fRowsWithDigits",&fRowsWithDigits);
1083  fTreeGenTracks->SetBranchAddress("fRowsTrackLength",&fRowsTrackLength);
1084  fTreeGenTracks->SetBranchAddress("fDigitsInSeed",&fDigitsInSeed);
1085  fTreeGenTracks->SetBranchAddress("Particle",&fParticle);
1086  fTreeGenTracks->SetBranchAddress("fVDist",fVDist);
1087  fTreeGenTracks->SetBranchAddress("TR",&fTrackRef);
1088 
1089  if (fDebug > 1) {
1090  cout<<"Number of gen. tracks with TR: "<<fTreeGenTracks->GetEntries()<<endl;
1091  }
1092  return kTRUE;
1093 }
1094 
1095 
1098 {
1099  fFileCmp = TFile::Open(fFnCmp,"RECREATE");
1100  if (!fFileCmp) {
1101  cerr<<"Error in CreateTreeCmp: cannot open file "<<fFnCmp<<endl;
1102  return;
1103  }
1104  fTreeCmp = new TTree("TPCcmpTracks","TPCcmpTracks");
1105  TBranch *branchBits = fTreeCmp->Branch("bitsBranch", "digitRow", &fDigitRow, 4000, 0);
1106  if (!branchBits) {
1107  cerr<<"Error in CreateTreeCmp: cannot create branch."<<endl;
1108  return;
1109  }
1110  fTreeCmp->Branch("fEventNr",&fEventNr,"fEventNr/I");
1111  fTreeCmp->Branch("fLabel",&fLabel,"fLabel/I");
1112  fTreeCmp->Branch("fRowsWithDigitsInn",&fRowsWithDigitsInn,"fRowsWithDigitsInn/I");
1113  fTreeCmp->Branch("fRowsWithDigits",&fRowsWithDigits,"fRowsWithDigits/I");
1114  fTreeCmp->Branch("fRowsTrackLength",&fRowsTrackLength,"fRowsTrackLength/I");
1115  fTreeCmp->Branch("fDigitsInSeed",&fDigitsInSeed,"fDigitsInSeed/I");
1116 
1117  fTreeCmp->Branch("fReconstructed",&fReconstructed,"fReconstructed/I");
1118  fTreeCmp->Branch("fTPCTrack","AliTPCtrack",&fTPCTrack);
1119 
1120  fTreeCmp->Branch("Particle","TParticle",&fParticle);
1121  fTreeCmp->Branch("fVDist",&fVDist,"fVDist[4]/D");
1122  fTreeCmp->Branch("TR","AliTrackReference",&fTrackRef);
1123 
1124  fTreeCmp->AutoSave();
1125 }
1128 {
1129  if (!fFileCmp) {
1130  cerr<<"File "<<fFnCmp<<" not found as an open file."<<endl;
1131  return;
1132  }
1133  fFileCmp->cd();
1134  fTreeCmp->Write();
1135  delete fTreeCmp;
1136  fFileCmp->Close();
1137  delete fFileCmp;
1138  return;
1139 }
1141 
1142 Float_t TPCCmpTr::TR2LocalX(AliTrackReference *trackRef,
1143  AliTPCParam *paramTPC) {
1144 
1145  Float_t x[3] = { trackRef->X(),trackRef->Y(),trackRef->Z()};
1146  Int_t index[4];
1147  paramTPC->Transform0to1(x,index);
1148  paramTPC->Transform1to2(x,index);
1149  return x[0];
1150 }
1152 
1153 Int_t TPCCmpTr::TreeTLoop(Int_t eventNr)
1154 {
1156 
1157 
1158  if (!fFileRecTracks) fFileRecTracks = TFile::Open(fFnRecTracks,"read");
1159  if (!fFileRecTracks->IsOpen()) {
1160  cerr<<"Cannot open file "<<fFnRecTracks<<endl;
1161  return 1;
1162  }
1163 
1164  char treeNameBase[11] = "TreeT_TPC_";
1165  char treeName[20];
1166  sprintf(treeName,"%s%d",treeNameBase,eventNr);
1167 
1168  fTreeRecTracks=(TTree*)fFileRecTracks->Get(treeName);
1169  if (!fTreeRecTracks) {
1170  cerr<<"Can't get a tree with TPC rec. tracks named "<<treeName<<endl;
1171  return 1;
1172  }
1173 
1174  Int_t nEntries = (Int_t) fTreeRecTracks->GetEntries();
1175  if (fDebug > 2) cout<<"Event, rec. tracks: "<<eventNr<<" "
1176  <<nEntries<<endl;
1177  TBranch * br= fTreeRecTracks->GetBranch("tracks");
1178  br->SetAddress(&fTPCTrack);
1179 
1180  for (Int_t iEntry=0; iEntry<nEntries;iEntry++){
1181  br->GetEntry(iEntry);
1182  Int_t label = fTPCTrack->GetLabel();
1183  fIndexRecTracks[label] = iEntry;
1184  }
1185 
1186  if (fDebug > 2) cerr<<"end of TreeTLoop"<<endl;
1187 
1188  return 0;
1189 }
1191 Int_t TPCCmpTr::TreeGenLoop(Int_t eventNr)
1192 {
1195 
1196  fFileGenTracks->cd();
1197  Int_t entry = fNextTreeGenEntryToRead;
1198  Double_t nParticlesTR = fTreeGenTracks->GetEntriesFast();
1199  cerr<<"fNParticles, nParticlesTR, fNextTreeGenEntryToRead: "<<fNParticles<<" "
1200  <<nParticlesTR<<" "<<fNextTreeGenEntryToRead<<endl;
1201  while (entry < nParticlesTR) {
1202  fTreeGenTracks->GetEntry(entry);
1203  entry++;
1204  if (fEventNr < eventNr) continue;
1205  if (fEventNr > eventNr) break;
1206  fNextTreeGenEntryToRead = entry-1;
1207  if (fDebug > 2 && fLabel < 10) {
1208  cerr<<"Fill track with a label "<<fLabel<<endl;
1209  }
1210 
1211  fReconstructed = 0;
1212  fdEdx = 0.;
1213  fRecPhi = fLambda = fRecPt_1 = 0.;
1214 
1215  if (fDebug > 2) {
1216  cerr<<"fLabel, fIndexRecTracks[fLabel] "<<fLabel<<" "<<fIndexRecTracks[fLabel]<<endl;
1217  }
1218  if (fIndexRecTracks[fLabel] >= 0) {
1219  Int_t nBytes = fTreeRecTracks->GetEvent(fIndexRecTracks[fLabel]);
1220  if (nBytes > 0) {
1221  fReconstructed = 1;
1222  fdEdx = fTPCTrack->GetdEdx();
1223  Double_t Localx = TR2LocalX(fTrackRef,fParamTPC);
1224  if (fDebug > 3) {
1225  cerr<<"Track local X before prolongation: "<<fTPCTrack->GetX()<<endl;
1226  }
1227  fTPCTrack->PropagateTo(Localx);
1228  Double_t par[5];
1229  if (fDebug > 3) {
1230  cerr<<"Track local X after prolongation: "<<fTPCTrack->GetX()<<endl;
1231  }
1232  fTPCTrack->GetExternalParameters(Localx,par);
1233  fRecPhi=TMath::ASin(par[2]) + fTPCTrack->GetAlpha();
1234  if (fRecPhi<0) fRecPhi+=2*TMath::Pi();
1235  if (fRecPhi>=2*TMath::Pi()) fRecPhi-=2*TMath::Pi();
1236 // fRecPhi = (fRecPhi)*kRaddeg;
1237  fLambda = TMath::ATan(par[3]);
1238  fRecPt_1 = TMath::Abs(par[4]);
1239  }
1240  }
1241 
1242 
1243  fTreeCmp->Fill();
1244 
1245  }
1246  fTreeCmp->AutoSave();
1247 // delete gAlice; gAlice = 0;
1248 // fFileHits->Close();
1249 
1250  if (fDebug > 2) cerr<<"end of TreeKLoop"<<endl;
1251 
1252  return 0;
1253 }
Double_t fRecPhi
reconstructed phi angle (0;2*kPI)
Definition: AliTPCCmpNG.C:920
Int_t fEventNr
current event number
Definition: AliTPCCmpNG.C:880
Int_t GetZeroSup() const
Definition: AliTPCParam.h:357
Int_t fRowsWithDigitsInn
number of rows with digits in the inner sectors
Definition: AliTPCCmpNG.C:247
Int_t fRowsWithDigits
number of rows with digits in the outer sectors
Definition: AliTPCCmpNG.C:904
void CreateTreeGenTracks()
Definition: AliTPCCmpNG.C:590
Int_t fEventNr
current event number
Definition: AliTPCCmpNG.C:418
Int_t Transform0to1(Float_t *xyz, Int_t *index) const
TFile * fFileHits
input file with hits
Definition: AliTPCCmpNG.C:428
AliTrackReference * fTrackRef
track reference saved in the output tree
Definition: AliTPCCmpNG.C:910
char * fFnGenTracks
input file name with gen tracks
Definition: AliTPCCmpNG.C:889
AliTrackReference * fTrackRef
track reference saved in the output tree
Definition: AliTPCCmpNG.C:243
TFile * fFileRecTracks
input file with reconstructed tracks
Definition: AliTPCCmpNG.C:897
Int_t CurrentDigit()
Definition: AliDigits.h:42
TTree * fTreeCmp
output tree with cmp tracks
Definition: AliTPCCmpNG.C:887
Int_t CurrentRow()
Definition: AliDigits.h:40
AliTrackReference * fTrackRef
track reference saved in the output tree
Definition: AliTPCCmpNG.C:432
static const Int_t fgMaxParticles
maximum number of generated particles
Definition: AliTPCCmpNG.C:459
digitRow * fDigitRow
pointer to the object saved in Branch
Definition: AliTPCCmpNG.C:879
TFile * OpenAliceFile(char *fn, Bool_t importgAlice=kFALSE, char *mode="read")
Definition: AliTPCCmpNG.C:220
void WaitForReturn()
Definition: AliTPCCmpNG.C:161
Manager and of geomety classes for set: TPC.
Definition: AliTPCParam.h:18
void CloseOutputFile()
Definition: AliTPCCmpNG.C:617
Int_t fDebug
debug flag
Definition: AliTPCCmpNG.C:915
Int_t fLastIndexTR
last used index in fIndexTR
Definition: AliTPCCmpNG.C:435
Int_t fRowsTrackLength
last - first row with digit
Definition: AliTPCCmpNG.C:249
char * fFnDigits
input file name with digits
Definition: AliTPCCmpNG.C:426
AliTPCtrack * fTPCTrack
pointer to TPC track to connect branch
Definition: AliTPCCmpNG.C:900
Double_t fVDist[4]
distance of the particle vertex from primary vertex
Definition: AliTPCCmpNG.C:908
Int_t Chain(TString baseDir, TString subDirNameMask, TString fn, TChain &chain)
Definition: AliTPCCmpNG.C:182
TChain * chain
void Reset()
Definition: AliTPCCmpNG.C:955
static const Double_t fgPtCut
do not store particles with generated pT less than this
Definition: AliTPCCmpNG.C:460
static const Double_t kRaddeg
Definition: AliTPCCmpNG.C:456
virtual ~TPCFindGenTracks()
Definition: AliTPCCmpNG.C:514
virtual Bool_t Next()
Definition: AliDigits.cxx:280
virtual Int_t GetTrackID(Int_t row, Int_t column, Int_t level)
Int_t First()
Definition: AliTPCCmpNG.C:368
TFile * fFileGenTracks
output file with stored fTreeGenTracks
Definition: AliTPCCmpNG.C:427
virtual Bool_t First()
Definition: AliDigits.cxx:271
digitRow & operator=(const digitRow &digOld)
Definition: AliTPCCmpNG.C:304
AliTPCParam * fParamTPC
AliTPCParam.
Definition: AliTPCCmpNG.C:912
Bool_t ImportgAlice(TFile *file)
Definition: AliTPCCmpNG.C:212
void SetFirstEventNr(Int_t i)
Definition: AliTPCCmpNG.C:409
TFile * fFileCmp
output file with cmp tracks
Definition: AliTPCCmpNG.C:886
Int_t Exec()
Definition: AliTPCCmpNG.C:996
Int_t fFirstEventNr
first event to process
Definition: AliTPCCmpNG.C:883
UChar_t fDig[kgRowBytes]
Definition: AliTPCCmpNG.C:293
static const Int_t seedRow12
nRowUp - 1 - (Int_t) 0.125*nRowUp
Definition: AliTPCCmpNG.C:453
TFile * fFileHits
input file with gAlice
Definition: AliTPCCmpNG.C:894
ClassImp(TPCGenInfo)
Definition: AliTPCCmpNG.C:254
static const Float_t fgTrackRefLocalXMaxDelta
Definition: AliTPCCmpNG.C:462
char * fFnCmp
output file name with cmp tracks
Definition: AliTPCCmpNG.C:885
Int_t fLabel
track label
Definition: AliTPCCmpNG.C:881
char * fFnRes
output file name with stored tracks
Definition: AliTPCCmpNG.C:424
TTree * fTreeGenTracks
output tree with generated tracks
Definition: AliTPCCmpNG.C:423
Double_t fLambda
reconstructed
Definition: AliTPCCmpNG.C:921
TTree * fTreeRecTracks
tree with reconstructed tracks
Definition: AliTPCCmpNG.C:898
AliTrackReference * fContainerTR
big container for partial information
Definition: AliTPCCmpNG.C:433
AliTPCParam * fParamTPC
AliTPCParam.
Definition: AliTPCCmpNG.C:437
Int_t fRowsWithDigitsInn
number of rows with digits in the inner sectors
Definition: AliTPCCmpNG.C:903
TParticle * fParticle
generated particle
Definition: AliTPCCmpNG.C:907
Float_t fdEdx
reconstructed dEdx
Definition: AliTPCCmpNG.C:923
Int_t fRowsTrackLength
last - first row with digit
Definition: AliTPCCmpNG.C:905
static const Int_t seedRow11
nRowUp - 1
Definition: AliTPCCmpNG.C:452
Int_t TreeTRLoop()
Definition: AliTPCCmpNG.C:769
void Reset()
Definition: AliTPCCmpNG.C:346
Int_t TreeTLoop(Int_t eventNr)
Definition: AliTPCCmpNG.C:1153
Int_t fNEvents
number of events to process
Definition: AliTPCCmpNG.C:420
virtual ~TPCCmpTr()
Definition: AliTPCCmpNG.C:983
Bool_t TestRow(Int_t row)
Definition: AliTPCCmpNG.C:322
Int_t GetID()
Definition: AliSegmentID.h:19
Int_t fLabel
track label
Definition: AliTPCCmpNG.C:419
char * fFnHits
input file name with hits
Definition: AliTPCCmpNG.C:425
static const Int_t fgMaxIndexTR
maximum number of tracks with a track ref
Definition: AliTPCCmpNG.C:458
TFile * fFileTreeD
input file with digits
Definition: AliTPCCmpNG.C:429
AliRun * gAlice
char * fFnHits
input file name with gAlice object (needed for B)
Definition: AliTPCCmpNG.C:893
TString baseDir
Definition: UnitTest.C:38
const Int_t kgRowBytes
Definition: AliTPCCmpNG.C:276
Double_t fVPrim[3]
primary vertex position
Definition: AliTPCCmpNG.C:439
void SetDebug(Int_t level)
Definition: AliTPCCmpNG.C:411
Bool_t AdjustSectorRow(Int_t index, Int_t &sector, Int_t &row) const
digitRow * fContainerDigitRow
big container for partial information
Definition: AliTPCCmpNG.C:431
static const Int_t seedRow21
seedRow11 - shift
Definition: AliTPCCmpNG.C:454
Double_t fVDist[4]
distance of the particle vertex from primary vertex
Definition: AliTPCCmpNG.C:440
Int_t CurrentColumn()
Definition: AliDigits.h:41
Double_t fRecPt_1
reconstructed
Definition: AliTPCCmpNG.C:922
Int_t fDigitsInSeed
digits in the default seed rows
Definition: AliTPCCmpNG.C:906
Int_t fNParticles
number of particles in the input tree genTracks
Definition: AliTPCCmpNG.C:914
TParticle * fParticle
generated particle
Definition: AliTPCCmpNG.C:244
Int_t * fIndexRecTracks
index of particle label in the TreeT_TPC
Definition: AliTPCCmpNG.C:901
Int_t RowsOn(Int_t upto=8 *kgRowBytes)
Definition: AliTPCCmpNG.C:331
char * fFnRecTracks
input file name with tpc rec. tracks
Definition: AliTPCCmpNG.C:896
Int_t fReconstructed
flag if track was reconstructed
Definition: AliTPCCmpNG.C:911
Int_t fDebug
debug flag
Definition: AliTPCCmpNG.C:417
TTree * fTreeGenTracks
Definition: AliTPCCmpNG.C:891
void SetFirstEventNr(Int_t i)
Definition: AliTPCCmpNG.C:870
Int_t TreeGenLoop(Int_t eventNr)
Definition: AliTPCCmpNG.C:1191
Int_t Last()
Definition: AliTPCCmpNG.C:355
Int_t fNextTreeGenEntryToRead
last entry already read from genTracks tree
Definition: AliTPCCmpNG.C:917
TFile * fFileGenTracks
Definition: AliTPCCmpNG.C:890
TPCGenInfo * fGenInfo
container for all the details
Definition: AliTPCCmpNG.C:918
Int_t fRowsTrackLength
last - first row with digit
Definition: AliTPCCmpNG.C:446
void SetNEvents(Int_t i)
Definition: AliTPCCmpNG.C:410
Int_t fRowsWithDigits
number of rows with digits in the outer sectors
Definition: AliTPCCmpNG.C:445
void SetRow(Int_t row)
Definition: AliTPCCmpNG.C:310
static const Float_t fgTrackRefLocalXMax
Definition: AliTPCCmpNG.C:461
void CreateTreeCmp()
Definition: AliTPCCmpNG.C:1097
void SetDebug(Int_t level)
Definition: AliTPCCmpNG.C:872
Int_t fRowsWithDigits
number of rows with digits in the outer sectors
Definition: AliTPCCmpNG.C:248
Int_t fFirstEventNr
first event to process
Definition: AliTPCCmpNG.C:421
Int_t fLabel
track label
Definition: AliTPCCmpNG.C:245
Int_t fRowsWithDigitsInn
number of rows with digits in the inner sectors
Definition: AliTPCCmpNG.C:444
digitRow * fDigitRow
pointer to the object saved in Branch
Definition: AliTPCCmpNG.C:430
Int_t * fIndexTR
index of particle label in the fContainerTR
Definition: AliTPCCmpNG.C:434
Int_t fNEvents
number of events to process
Definition: AliTPCCmpNG.C:882
void SetNEvents(Int_t i)
Definition: AliTPCCmpNG.C:871
Float_t TR2LocalX(AliTrackReference *trackRef, AliTPCParam *paramTPC)
Definition: AliTPCCmpNG.C:1142
void CloseOutputFile()
Definition: AliTPCCmpNG.C:1127
void Transform1to2(Float_t *xyz, Int_t *index) const
Definition: AliTPCParam.h:605
Float_t TR2LocalX(AliTrackReference *trackRef, AliTPCParam *paramTPC)
Definition: AliTPCCmpNG.C:833
Bool_t ConnectGenTree()
Definition: AliTPCCmpNG.C:1063
Int_t fDigitsInSeed
digits in the default seed rows
Definition: AliTPCCmpNG.C:447
Int_t fDigitsInSeed
digits in the default seed rows
Definition: AliTPCCmpNG.C:250
Int_t GetNInnerSector() const
Definition: AliTPCParam.h:257
TParticle * fParticle
generated particle
Definition: AliTPCCmpNG.C:442
Int_t GetNRowLow() const
static const Int_t seedRow22
seedRow12 - shift
Definition: AliTPCCmpNG.C:455
virtual ~digitRow()
Definition: AliTPCCmpNG.C:283
Int_t fNParticles
number of particles in TreeK
Definition: AliTPCCmpNG.C:422