#include <MINFast.h>
Public Types | |
| FLS | |
| EMU | |
| LST | |
| NOMORE | |
| enum | DETTYPE { FLS, EMU, LST, NOMORE } |
| Job Control macro file. More... | |
Public Member Functions | |
| MINFast () | |
| MINFast (const char *name, const char *title, Bool_t display=kTRUE, const char *initialfile="") | |
| ~MINFast () | |
| virtual void | Browse (TBrowser *b) |
| virtual void | BuildDetectorGeometry () |
| virtual void | CleanParents () |
| virtual Int_t | DistancetoPrimitive (Int_t px, Int_t py) |
| virtual void | DumpPart (Int_t i) |
| virtual void | DumpPStack () |
| virtual void | FillTree () |
| virtual void | FinishEvent () |
| virtual void | FinishRun () |
| virtual void | FlagTrack (Int_t track) |
| virtual Int_t | GetAndShowEvent (Int_t ievent) |
| MINFDetector * | GetDetector (const char *name) |
| virtual Int_t | GetEvent (Int_t ievent) |
| virtual void | GetNextTrack (Int_t &mtrack, Int_t &ipart, Float_t *pmom, Float_t &e, Float_t *vpos, Float_t *polar, Float_t &tof) |
| Int_t | GetNtrack () const |
| virtual Int_t | GetPrimary (Int_t track) const |
| virtual void | Init () |
| Bool_t | IsFolder () const |
| virtual void | MakeTree (const Option_t *option="KH") |
| virtual void | OpenRerootFile () |
| virtual void | OpenRerootFile (const Char_t *filename) |
| virtual void | ProcessEvent () |
| virtual void | Reset (Int_t run, Int_t idevent) |
| virtual void | ResetDigits () |
| virtual void | ResetHits () |
| virtual void | ResetPoints () |
| virtual void | ResetStack () |
| virtual void | RunScript () |
| virtual void | SetDebug (const Int_t level=1) |
| virtual void | SetDisplay (MINFDisplay *display) |
| virtual void | SetJobControlScript (const Char_t *filename) |
| Int_t | GetDebug () |
| TGeometry * | GetGeometry () |
| MINFHeader * | GetHeader () |
| MINFDetGeom * | GetMINFDetGeom () |
| MINFile * | GetMINFile () |
| REROOT_Event * | GetREROOTEvent () |
| REROOT_Geom * | GetREROOTGeom () |
| TList * | Detectors () |
| MINFDisplay * | Display () |
| Bool_t | IsDisplayUnlocked () |
| void | SetDisplayUnlocked (Bool_t lul=kTRUE) |
| TClonesArray * | Particles () |
| TTree * | TreeD () |
| TTree * | TreeE () |
| TTree * | TreeH () |
| TTree * | TreeK () |
Private Attributes | |
| Int_t | fNtrack |
| Int_t | fHgwmk |
| Int_t | fDebug |
| MINFHeader | fHeader |
| TTree * | fTreeD |
| TTree * | fTreeK |
| TTree * | fTreeH |
| TTree * | fTreeE |
| TList * | fDetectors |
| TClonesArray * | fParticles |
| TGeometry * | fGeometry |
| MINFDisplay * | fDisplay |
| Bool_t | fDisplayUnlocked |
| TStopwatch | fTimer |
| MINFDetGeom * | fMINFDetGeom |
| MINFile * | fMINFile |
| REROOT_Event * | frevt |
| REROOT_Geom * | frgeo |
| Char_t | fJobControlScript [255] |
Definition at line 47 of file MINFast.h.
| enum MINFast::DETTYPE |
| MINFast::MINFast | ( | ) |
Definition at line 107 of file MINFast.cxx.
References header.
00107 : 00108 fDetectors(0) 00109 , fParticles(0) 00110 , fGeometry(0) 00111 , fDisplay(0) 00112 , fDisplayUnlocked(kFALSE) 00113 , fMINFDetGeom(0) 00114 , fMINFile(0) 00115 , frevt(0) 00116 , frgeo(0) 00117 { 00118 fTreeD = 0; 00119 fTreeK = 0; 00120 fTreeH = 0; 00121 fTreeE = 0; 00122 header = &fHeader; 00123 fParticles = new TClonesArray("GParticle",4000); 00124 00125 // Set fJobControlScript to null string. 00126 fJobControlScript[0] = '\0'; 00127 }
| MINFast::MINFast | ( | const char * | name, | |
| const char * | title, | |||
| Bool_t | display = kTRUE, |
|||
| const char * | initialfile = "" | |||
| ) |
Definition at line 130 of file MINFast.cxx.
References MINFAttParticle::DefinePDG(), EMU, fDetectors, fDisplay, fDisplayUnlocked, fHeader, fHgwmk, fJobControlScript, FLS, fMINFile, fNtrack, fParticles, fTreeD, fTreeE, fTreeH, fTreeK, GetAndShowEvent(), gMINFast, header, LST, MakeTree(), NOMORE, and MINFile::openREROOTFile().
00130 : 00131 TNamed(name,title) 00132 , fDetectors(0) 00133 , fParticles(0) 00134 , fGeometry(0) 00135 , fDisplay(0) 00136 , fDisplayUnlocked(kFALSE) 00137 , fMINFDetGeom(0) 00138 , fMINFile(0) 00139 , frevt(0) 00140 , frgeo(0) 00141 { 00142 00143 // Constructor for the main processor. 00144 // Creates the geometry 00145 // Creates the list of Detectors. 00146 // Creates the list of particles. 00147 00148 // define this before MakeTree() which sets a branch to it 00149 fParticles = new TClonesArray("GParticle",4000); 00150 00151 gMINFast = this; 00152 fTreeD = 0; 00153 fTreeK = 0; 00154 fTreeH = 0; 00155 fTreeE = 0; 00156 MakeTree("KHED"); 00157 00158 gROOT->GetListOfBrowsables()->Add(this,name); 00159 00160 // Set fJobControlScript to null string. 00161 fJobControlScript[0] = '\0'; 00162 00163 // Create Event Display object. 00164 if (!gROOT->IsBatch() && display) { 00165 fDisplay = new MINFDisplay(750); 00166 fDisplayUnlocked = kTRUE; 00167 } 00168 00169 // Create input data manager object. 00170 fMINFile = new MINFile(); 00171 00172 // Open input data file. 00173 if (!gROOT->IsBatch() && display) { // GUI mode 00174 TFile *afile = 0; 00175 if (strlen(initialfile) != 0) { 00176 afile = fMINFile->openREROOTFile(initialfile); 00177 if (!afile) 00178 printf("MINFast: Input REROOT file \"%s\" not opened\n",initialfile); 00179 } 00180 while (!afile) { 00181 afile = fMINFile->openREROOTFile(); 00182 if (!afile) 00183 printf("MINFast: Input REROOT file not opened. Try again.\n"); 00184 } 00185 } 00186 00187 // Create the support list for the various Detectors. 00188 fDetectors = new TList(); 00189 00190 // Create "standard" detectors and add them to the list of detectors 00191 // (in XDetector constructor). Note that the order in which detectors 00192 // are added to the list of detectors is important, because detectors 00193 // will be processed in this order. 00194 for (Int_t idet=0; idet!=NOMORE; idet++) { 00195 00196 switch (idet) { 00197 00198 case FLS: 00199 new MINFFLS("FLS"); 00200 break; 00201 00202 case EMU: 00203 new MINFEMU("EMU"); 00204 break; 00205 00206 case LST: 00207 new MINFLST("LST"); 00208 break; 00209 00210 default: 00211 break; 00212 } 00213 } 00214 00215 // Initialize MINFAttParticle object with PDG particle list. 00216 MINFAttParticle::DefinePDG(); 00217 00218 // Create particle array. 00219 fNtrack=0; 00220 fHgwmk=0; 00221 header=&fHeader; 00222 00223 // Get First Event. 00224 if (!gROOT->IsBatch() && display) { 00225 GetAndShowEvent(0); // Batch wait on file open 00226 } 00227 }
| MINFast::~MINFast | ( | ) |
Definition at line 230 of file MINFast.cxx.
References fDetectors, fDisplay, fMINFDetGeom, and fParticles.
00231 { 00232 delete fDisplay; 00233 delete fParticles; 00234 delete fMINFDetGeom; 00235 delete fDetectors; 00236 //gmi delete fMINFile; not sure why I can't do this 00237 }
| void MINFast::Browse | ( | TBrowser * | b | ) | [virtual] |
Definition at line 240 of file MINFast.cxx.
References fDetectors, fTreeD, fTreeE, fTreeH, and fTreeK.
00241 { 00242 00243 // Called when the item "Run" is clicked on the left pane 00244 // of the Root browser. It displays the Root Trees and all detectors. 00245 if (fTreeK) b->Add(fTreeK,fTreeK->GetName()); 00246 if (fTreeH) b->Add(fTreeH,fTreeH->GetName()); 00247 if (fTreeD) b->Add(fTreeD,fTreeD->GetName()); 00248 if (fTreeE) b->Add(fTreeE,fTreeE->GetName()); 00249 00250 TIter next(fDetectors); 00251 MINFDetector *detector; 00252 while((detector = (MINFDetector *) next())) { 00253 b->Add(detector,detector->GetName()); 00254 } 00255 }
| void MINFast::BuildDetectorGeometry | ( | ) | [virtual] |
Definition at line 258 of file MINFast.cxx.
References MINFDetGeom::BuildDetectorGeometry(), fGeometry, fMINFDetGeom, frgeo, and MINFDetGeom::GetGeometry().
Referenced by GetEvent().
00259 { 00260 00261 // MINFDetGeom object owns TGeometry object pointed to by fGeometry. 00262 delete fMINFDetGeom; 00263 fMINFDetGeom = new MINFDetGeom(); 00264 fMINFDetGeom->BuildDetectorGeometry(frgeo); 00265 fGeometry = fMINFDetGeom->GetGeometry(); 00266 }
| void MINFast::CleanParents | ( | ) | [virtual] |
Definition at line 269 of file MINFast.cxx.
References Children_Bit, fNtrack, gMINFast, Particles(), GParticle::SetFirstChild(), and GParticle::SetLastChild().
Referenced by FinishEvent().
00270 { 00271 00272 // Clean Particles stack. 00273 // Set parent/child relations 00274 TClonesArray &particles = *(gMINFast->Particles()); 00275 GParticle *part; 00276 int i; 00277 for (i=0; i<fNtrack; i++) { 00278 part = (GParticle *) particles.UncheckedAt(i); 00279 if (!part->TestBit(Children_Bit)) { 00280 part->SetFirstChild(-1); 00281 part->SetLastChild(-1); 00282 } 00283 } 00284 }
| TList* MINFast::Detectors | ( | ) | [inline] |
Definition at line 122 of file MINFast.h.
References fDetectors.
Referenced by MINFDetGeom::BuildDetectorGeometry(), MINFDisplay::DisableDetector(), MINFDisplay::DrawHits(), MINFDisplay::EnableDetector(), MINFDisplay::LoadPoints(), MINFDetector::MINFDetector(), MINFPoints::Propagate(), and MINFDetGeom::~MINFDetGeom().
00122 {return fDetectors;}
| MINFDisplay* MINFast::Display | ( | ) | [inline] |
Definition at line 123 of file MINFast.h.
References fDisplay.
Referenced by MINFScript::init(), MINFile::openREROOTFile(), MINFScript::SetScriptFileName(), MINFDisplayFrame::SetUnZoomPad(), and MINFControlFrame::ToggleZoomPickMode().
00123 {return fDisplay;}
| Int_t MINFast::DistancetoPrimitive | ( | Int_t | px, | |
| Int_t | py | |||
| ) | [virtual] |
| void MINFast::DumpPart | ( | Int_t | i | ) | [virtual] |
Definition at line 293 of file MINFast.cxx.
References fParticles.
00294 { 00295 TClonesArray &particles = *fParticles; 00296 ((GParticle *) particles[i])->Dump(); 00297 }
| void MINFast::DumpPStack | ( | ) | [virtual] |
Definition at line 300 of file MINFast.cxx.
References fNtrack, and fParticles.
00301 { 00302 TClonesArray &particles = *fParticles; 00303 printf("\n\n====================================================\n"); 00304 for (Int_t i=0; i<fNtrack; i++) { 00305 printf("-> %d ",i); ((GParticle*) particles[i])->Dump(); 00306 } 00307 printf("\n====================================================\n\n"); 00308 }
| void MINFast::FillTree | ( | ) | [virtual] |
| void MINFast::FinishEvent | ( | ) | [virtual] |
Definition at line 319 of file MINFast.cxx.
References CleanParents(), MINFHeader::Dump(), fHeader, fTreeD, fTreeE, fTreeH, fTreeK, MINFHeader::GetEvent(), ResetDigits(), and ResetStack().
00320 { 00321 00322 // Called at the end of the event. 00323 00324 // Write out the kinematics 00325 if (fTreeK) { 00326 CleanParents(); 00327 fTreeK->Fill(); 00328 } 00329 00330 // Write out the digits 00331 if (fTreeD) { 00332 fTreeD->Fill(); 00333 ResetDigits(); 00334 } 00335 00336 // Write out the event Header information 00337 if (fTreeE) fTreeE->Fill(); 00338 fHeader.Dump(); 00339 00340 // Reset stack info 00341 ResetStack(); 00342 00343 // Write Tree headers 00344 Int_t ievent = fHeader.GetEvent(); 00345 char hname[30]; 00346 sprintf(hname,"TreeK%d",ievent); 00347 if (fTreeK) fTreeK->Write(hname); 00348 sprintf(hname,"TreeH%d",ievent); 00349 if (fTreeH) fTreeH->Write(hname); 00350 sprintf(hname,"TreeD%d",ievent); 00351 if (fTreeD) fTreeD->Write(hname); 00352 }
| void MINFast::FinishRun | ( | ) | [virtual] |
Definition at line 355 of file MINFast.cxx.
References fDetectors, MINFDetector::FinishRun(), fTreeD, fTreeE, fTreeH, and fTreeK.
00356 { 00357 00358 // Called at the end of the run. 00359 TIter next(fDetectors); 00360 00361 // Clean detector information 00362 MINFDetector *detector; 00363 while ((detector = (MINFDetector *) next())) { 00364 detector->FinishRun(); 00365 } 00366 00367 // Clean tree information 00368 delete fTreeK; fTreeK = 0; 00369 delete fTreeH; fTreeH = 0; 00370 delete fTreeD; fTreeD = 0; 00371 00372 fTreeE->Write(); 00373 TFile *File = fTreeE->GetCurrentFile(); 00374 delete fTreeE; fTreeE = 0; 00375 00376 // Write MINFast info and all detectors parameters 00377 Write(); 00378 00379 // Close output file 00380 File->Write(); 00381 File->Close(); 00382 }
| void MINFast::FlagTrack | ( | Int_t | track | ) | [virtual] |
Definition at line 385 of file MINFast.cxx.
References fParticles, GParticle::GetParent(), and Keep_Bit.
00386 { 00387 00388 // Flag family tree 00389 int curr; 00390 GParticle *particle; 00391 00392 curr=track; 00393 while (1) { 00394 particle = (GParticle *) fParticles->UncheckedAt(curr); 00395 00396 // If particle is flagged the three from here upward is saved already 00397 if (particle->TestBit(Keep_Bit)) return; 00398 00399 // Save this particle 00400 particle->SetBit(Keep_Bit); 00401 00402 // Move to father if any 00403 if ((curr=particle->GetParent()) == -1) return; 00404 } 00405 }
| Int_t MINFast::GetAndShowEvent | ( | Int_t | ievent | ) | [virtual] |
Definition at line 408 of file MINFast.cxx.
References fDisplay, fJobControlScript, GetEvent(), IsDisplayUnlocked(), and MINFDisplay::ShowEvent().
Referenced by MINFast(), OpenRerootFile(), and MINFDisplay::ShowNextEvent().
00409 { 00410 Int_t ntracks = GetEvent(ievent); 00411 if (IsDisplayUnlocked() && fDisplay) fDisplay->ShowEvent(); 00412 00413 // Run JobControlScript if it has been registered. 00414 if (strlen(fJobControlScript)) gROOT->Macro(fJobControlScript); 00415 00416 return ntracks; 00417 }
| Int_t MINFast::GetDebug | ( | ) | [inline] |
| MINFDetector * MINFast::GetDetector | ( | const char * | name | ) |
Definition at line 420 of file MINFast.cxx.
References fDetectors.
00421 { 00422 00423 // Return pointer to detector with name 00424 return (MINFDetector*) fDetectors->FindObject(name); 00425 }
| Int_t MINFast::GetEvent | ( | Int_t | ievent | ) | [virtual] |
Definition at line 428 of file MINFast.cxx.
References BuildDetectorGeometry(), REROOT_SuperModule::DnSpace(), fDisplay, fHeader, fMINFile, fNtrack, frevt, frgeo, REROOT_Geom::geommiscs(), MINFile::Getievt(), MINFile::Getigeo(), REROOT_Event::idcurgeom(), REROOT_Geom::n_supermodules(), REROOT_GeomMisc::NearFar(), ProcessEvent(), MINFile::readREROOTEvent(), MINFile::readREROOTGeom(), ResetDigits(), ResetHits(), ResetStack(), MINFDisplay::SetCenter(), MINFHeader::SetEventRecord(), MINFDisplay::SetRange(), REROOT_Geom::supermodules(), REROOT_SuperModule::UpSpace(), REROOT_SuperModule::Zmax(), and REROOT_SuperModule::Zmin().
Referenced by GetAndShowEvent(), and IoRerootStreamItr::LoadRecords().
00429 { 00430 00431 // Connect the Trees (Kinematics and Hits for this event); 00432 00433 // Reset existing structures 00434 ResetStack(); 00435 ResetHits(); 00436 ResetDigits(); 00437 00438 // Read in requested event from REROOT file. 00439 frevt = fMINFile->readREROOTEvent(ievent); 00440 00441 // Set event record number. 00442 fHeader.SetEventRecord(fMINFile->Getievt()); 00443 00444 if (frevt->idcurgeom() != fMINFile->Getigeo()) { 00445 cout << "MINFast::GetEvent: " << 00446 "New REROOT_Event record " << ievent << 00447 " comes from REROOT_Geom record " << frevt->idcurgeom() << 00448 endl; 00449 00450 frgeo = fMINFile->readREROOTGeom(frevt->idcurgeom()); 00451 00452 // Create the geometry using a new MINFDetGeom manager object. 00453 BuildDetectorGeometry(); 00454 00455 if (fDisplay) { 00456 // Determine detector size and tell display to reset ranges 00457 const TClonesArray *geommiscs = frgeo->geommiscs(); 00458 REROOT_GeomMisc *geommisc = (REROOT_GeomMisc *) geommiscs->At(0); 00459 00460 const TClonesArray *supermodules = frgeo->supermodules(); 00461 REROOT_SuperModule *supermodule = 0; 00462 Double_t zmin = 9999.; 00463 Double_t zmax = -9999.; 00464 for (Int_t isupmdl=0; isupmdl<frgeo->n_supermodules(); isupmdl++) { 00465 supermodule = (REROOT_SuperModule *) supermodules->At(isupmdl); 00466 zmin = supermodule->Zmin()+supermodule->UpSpace(); 00467 if (zmin > 9999.) zmin = 9999.; 00468 zmax = supermodule->Zmax()-supermodule->DnSpace(); 00469 if (zmax < -9999.) zmax = -9999.; 00470 } 00471 00472 // values for far detector 00473 Double_t rrange = 280; 00474 Double_t zrange = 1200; 00475 Double_t z0 = 0; 00476 if (geommisc->NearFar() == 0) { 00477 // calib detector 00478 rrange = 100; 00479 zrange = 200; 00480 } else if (geommisc->NearFar() < 0) { 00481 // near detector 00482 rrange = 240; 00483 zrange = 650; 00484 } 00485 // odd things happen in the pad having to do with scaling 00486 // by sqrt(3) so that worst oriented rotation doesn't get 00487 // clipped ... this explains why some numbers aren't 00488 // quite what one expects and why even at maximum object 00489 // might not take up all the available pad drawing area. 00490 zrange = 0.5*(zmax-zmin); 00491 z0 = 0.5*(zmax+zmin); 00492 fDisplay->SetRange(rrange,zrange); 00493 fDisplay->SetCenter(0.,0.,z0); 00494 } 00495 00496 } 00497 00498 // Set up MINFast fTreeK, fTreeH and fTreeD from REROOT objects read in. 00499 ProcessEvent(); 00500 00501 return fNtrack; 00502 }
| TGeometry* MINFast::GetGeometry | ( | ) | [inline] |
Definition at line 115 of file MINFast.h.
References fGeometry.
Referenced by MINFDisplay::DrawView(), MINFDisplay::ToggleDetectorOutline(), and MINFDisplay::ToggleSteelEars().
00115 {return fGeometry;}
| MINFHeader* MINFast::GetHeader | ( | ) | [inline] |
Definition at line 116 of file MINFast.h.
References fHeader.
Referenced by MINFDisplay::DrawTitle(), RerootExodus::GetEventNo(), RerootExodus::GetEventRecord(), RerootExodus::GetRunNo(), and MINFDisplay::ShowNextEvent().
00116 {return &fHeader;}
| MINFDetGeom* MINFast::GetMINFDetGeom | ( | ) | [inline] |
| MINFile* MINFast::GetMINFile | ( | ) | [inline] |
Definition at line 118 of file MINFast.h.
References fMINFile.
Referenced by RerootExodus::GetRerootFileName(), IoRerootStreamItr::IsOpenFile(), and IoRerootStreamItr::OpenFile().
00118 {return fMINFile;}
| void MINFast::GetNextTrack | ( | Int_t & | mtrack, | |
| Int_t & | ipart, | |||
| Float_t * | pmom, | |||
| Float_t & | e, | |||
| Float_t * | vpos, | |||
| Float_t * | polar, | |||
| Float_t & | tof | |||
| ) | [virtual] |
Definition at line 505 of file MINFast.cxx.
References Done_Bit, fHeader, fNtrack, fParticles, fTimer, GParticle::GetEnergy(), GParticle::GetKF(), MINFHeader::GetNprimary(), GParticle::GetPolx(), GParticle::GetPoly(), GParticle::GetPolz(), GParticle::GetPx(), GParticle::GetPy(), GParticle::GetPz(), GParticle::GetTime(), GParticle::GetVx(), GParticle::GetVy(), GParticle::GetVz(), and GParticle::SetProcessTime().
00507 { 00508 // Return next track from stack of particles 00509 Int_t ncount=0; 00510 GParticle *track; 00511 for (Int_t i=fNtrack-1; i>=0; i--) { 00512 track=(GParticle *) fParticles->UncheckedAt(i); 00513 if (!track->TestBit(Done_Bit)) { 00514 ncount =i+1; 00515 ipart = track->GetKF(); 00516 pmom[0] = track->GetPx(); 00517 pmom[1] = track->GetPy(); 00518 pmom[2] = track->GetPz(); 00519 e = track->GetEnergy(); 00520 vpos[0] = track->GetVx(); 00521 vpos[1] = track->GetVy(); 00522 vpos[2] = track->GetVz(); 00523 polar[0] = track->GetPolx(); 00524 polar[1] = track->GetPoly(); 00525 polar[2] = track->GetPolz(); 00526 tof = track->GetTime(); 00527 track->SetBit(Done_Bit); 00528 break; 00529 } 00530 } 00531 mtrack=ncount; 00532 00533 // Stop and start timer when we start a primary track 00534 Int_t nprimaries = fHeader.GetNprimary(); 00535 if (ncount > nprimaries) return; 00536 if (ncount < nprimaries) { 00537 fTimer.Stop(); 00538 track=(GParticle *) fParticles->UncheckedAt(ncount); 00539 track->SetProcessTime(fTimer.CpuTime()); 00540 } 00541 fTimer.Start(); 00542 }
| Int_t MINFast::GetNtrack | ( | ) | const [inline] |
Definition at line 95 of file MINFast.h.
References fNtrack.
Referenced by MINFLST::BookHits(), MINFFLS::BookHits(), MINFEMU::BookHits(), MINFEMU::LoadPoints(), MINFDisplay::LoadPoints(), and MINFDetector::LoadPoints().
00095 {return fNtrack;}
| Int_t MINFast::GetPrimary | ( | Int_t | track | ) | const [virtual] |
Definition at line 545 of file MINFast.cxx.
References fParticles, and GParticle::GetParent().
Referenced by MINFHit::MINFHit().
00546 { 00547 00548 // Return number of primary for track 00549 int current, parent; 00550 GParticle *part; 00551 00552 parent=track; 00553 while (1) { 00554 current=parent; 00555 part = (GParticle *) fParticles->UncheckedAt(current); 00556 parent=part->GetParent(); 00557 if (parent<0) return current; 00558 } 00559 }
| REROOT_Event* MINFast::GetREROOTEvent | ( | ) | [inline] |
Definition at line 119 of file MINFast.h.
References frevt.
Referenced by UberDST::Ana(), FitTrackMSListModule::Ana(), DemoMCFilter::Ana(), MINFLST::DumpHit(), MINFFLS::DumpHit(), MINFEMU::DumpHit(), RerootExodus::GetFLSDigitList(), RerootExodus::GetFLSHitList(), RerootExodus::GetFluxInfoList(), RerootExodus::GetFluxWgtList(), RerootExodus::GetGminosCodeName(), RerootExodus::GetGminosHostName(), MINFLST::GetHitELOSS(), MINFFLS::GetHitELOSS(), MINFEMU::GetHitELOSS(), MINFLST::GetHitPartMom(), MINFFLS::GetHitPartMom(), MINFEMU::GetHitPartMom(), MINFLST::GetIPDG(), MINFFLS::GetIPDG(), MINFEMU::GetIPDG(), RerootExodus::GetLastEventHistoryTimeStamp(), RerootExodus::GetNeuKinList(), RerootExodus::GetNeuVtxList(), RerootExodus::GetStdHepHeadList(), RerootExodus::GetStdHepList(), MINFLST::InspectHit(), MINFFLS::InspectHit(), MINFEMU::InspectHit(), and RerootExodus::PEC_pack().
00119 {return frevt;}
| REROOT_Geom* MINFast::GetREROOTGeom | ( | ) | [inline] |
Definition at line 120 of file MINFast.h.
References frgeo.
Referenced by RerootExodus::ActvPlaneName(), UgliGeometryReroot::BuildShapes(), RerootExodus::GetCellPos(), RerootExodus::GetGeomMisc(), RerootExodus::GetPlanePos(), RerootExodus::GetPlaneSpec(), RerootExodus::GetRotm(), UgliGeometryReroot::MakeTempDbiPosInfo(), RerootExodus::NStripsNonZero(), RerootExodus::NumberOfPlanes(), RerootExodus::PasvPlaneName(), RerootExodus::PECAB2SEId(), RerootExodus::RerootPlaneNo(), RerootExodus::RerootPlaneToView(), RerootExodus::RerootPlaneXYZ0(), and RerootExodus::RerootPln2PlnId().
00120 {return frgeo;}
| void MINFast::Init | ( | ) | [virtual] |
Definition at line 562 of file MINFast.cxx.
References fDetectors, and MINFDetector::Init().
00563 { 00564 00565 // Initialize the MINFast setup 00566 TIter next(fDetectors); 00567 MINFDetector *detector; 00568 00569 while((detector = (MINFDetector *) next())) { 00570 00571 // Initialise detector 00572 detector->Init(); 00573 } 00574 }
| Bool_t MINFast::IsDisplayUnlocked | ( | ) | [inline] |
Definition at line 124 of file MINFast.h.
References fDisplayUnlocked.
Referenced by GetAndShowEvent().
00124 {return fDisplayUnlocked;}
| Bool_t MINFast::IsFolder | ( | ) | const [inline] |
| void MINFast::MakeTree | ( | const Option_t * | option = "KH" |
) | [virtual] |
Definition at line 577 of file MINFast.cxx.
References fDetectors, fParticles, fTreeD, fTreeE, fTreeH, fTreeK, header, and MINFDetector::MakeBranch().
Referenced by MINFast().
00578 { 00579 00580 // Create the ROOT trees 00581 // Loop on all detectors to create the Root branch (if any) 00582 00583 // Get the pointer to the header 00584 const char *K = strstr(option,"K"); 00585 const char *H = strstr(option,"H"); 00586 const char *E = strstr(option,"E"); 00587 const char *D = strstr(option,"D"); 00588 00589 if (K && !fTreeK) fTreeK = new TTree("TK","Kinematics"); 00590 if (H && !fTreeH) fTreeH = new TTree("TH","Hits"); 00591 if (D && !fTreeD) fTreeD = new TTree("TD","Digits"); 00592 if (E && !fTreeE) fTreeE = new TTree("TE","Header"); 00593 00594 // Create a branch for hits/digits for each detector 00595 // Each branch is a TClonesArray. Each data member of the Hits classes 00596 // will be in turn a subbranch of the detector master branch 00597 TIter next(fDetectors); 00598 MINFDetector *detector; 00599 while ((detector = (MINFDetector *) next())) { 00600 detector->MakeBranch(); 00601 } 00602 00603 // Create a branch for particles 00604 if (fTreeK) fTreeK->Branch("Particles",&fParticles,4000); 00605 00606 // Create a branch for Header 00607 if (fTreeE) fTreeE->Branch("Header","MINFHeader",&header,4000); 00608 }
| void MINFast::OpenRerootFile | ( | const Char_t * | filename | ) | [virtual] |
Definition at line 625 of file MINFast.cxx.
References fMINFile, GetAndShowEvent(), and MINFile::openREROOTFile().
00626 { 00627 00628 // Open input data file. 00629 if (!fMINFile->openREROOTFile(filename)) { 00630 printf("MINFast: Input REROOT file not opened.\n"); 00631 return; 00632 } 00633 00634 // Get First Event. 00635 GetAndShowEvent(0); 00636 }
| void MINFast::OpenRerootFile | ( | ) | [virtual] |
Definition at line 611 of file MINFast.cxx.
References fMINFile, GetAndShowEvent(), and MINFile::openREROOTFile().
Referenced by IoRerootStreamItr::OpenFile(), and MINFGUIPanel::ProcessMessage().
00612 { 00613 00614 // Open input data file. 00615 if (!fMINFile->openREROOTFile()) { 00616 printf("MINFast: Input REROOT file not opened.\n"); 00617 return; 00618 } 00619 00620 // Get First Event. 00621 GetAndShowEvent(0); 00622 }
| TClonesArray* MINFast::Particles | ( | ) | [inline] |
Definition at line 127 of file MINFast.h.
References fParticles.
Referenced by CleanParents(), MINFDisplay::DrawTitle(), MINFVecs::GetParticle(), MINFPoints::GetParticle(), and MINFHit::MINFHit().
00127 {return fParticles;};
| void MINFast::ProcessEvent | ( | ) | [virtual] |
Definition at line 639 of file MINFast.cxx.
References MINFDetector::BookHits(), REROOT_StdHep::E(), MuELoss::e, REROOT_GAFKey::EventNo(), fDetectors, fHeader, REROOT_StdHep::FirstChild(), REROOT_StdHep::FirstParent(), fNtrack, frevt, REROOT_Event::gafkeys(), MINFAttParticle::GetDecayWidth(), MINFAttParticle::GetParticle(), REROOT_StdHep::IdHEP(), REROOT_StdHep::IstHEP(), REROOT_StdHep::LastChild(), REROOT_StdHep::Mass(), REROOT_Event::n_stdheps(), REROOT_StdHep::Px(), REROOT_StdHep::Py(), REROOT_StdHep::Pz(), REROOT_GAFKey::RunNo(), MINFHeader::SetEvent(), MINFHeader::SetRun(), REROOT_Event::stdheps(), REROOT_StdHep::Tprod(), REROOT_StdHep::Xmm(), REROOT_StdHep::Ymm(), and REROOT_StdHep::Zmm().
Referenced by GetEvent().
00640 { 00641 00642 // Set runno and eventno in header. 00643 const TClonesArray *gafkeys = frevt->gafkeys(); 00644 REROOT_GAFKey *gafkey; 00645 gafkey = (REROOT_GAFKey *) gafkeys->UncheckedAt(0); 00646 fHeader.SetRun(gafkey->RunNo()); 00647 fHeader.SetEvent(gafkey->EventNo()); 00648 00649 // Loop over REROOT_StdHep and set up Particles array in ITrack order. 00650 const TClonesArray *stdheps = frevt->stdheps(); 00651 REROOT_StdHep *stdhep; 00652 for (Int_t ish=0; ish<frevt->n_stdheps(); ish++) { 00653 stdhep = (REROOT_StdHep *) stdheps->UncheckedAt(ish); 00654 MINFAttParticle *PDGPart = MINFAttParticle::GetParticle(stdhep->IdHEP()); 00655 00656 const Int_t KS = stdhep->IstHEP(); 00657 const Int_t KF = stdhep->IdHEP(); 00658 const Int_t parent = stdhep->FirstParent(); // Assumes 1 parent 00659 const Int_t firstchild = stdhep->FirstChild(); 00660 const Int_t lastchild = stdhep->LastChild(); 00661 const Float_t px = stdhep->Px(); 00662 const Float_t py = stdhep->Py(); 00663 const Float_t pz = stdhep->Pz(); 00664 const Float_t e = stdhep->E(); 00665 const Float_t mass = stdhep->Mass(); 00666 const Float_t vx = stdhep->Xmm(); 00667 const Float_t vy = stdhep->Ymm(); 00668 const Float_t vz = stdhep->Zmm(); 00669 const Float_t polar[3] = {0., 0., 0.}; 00670 const Float_t tprod = stdhep->Tprod(); 00671 00672 00673 // Really want actual proper lifetime, not PDG lifetime, here. 00674 // Give stable particle a lifetime > 10**7 seconds. 00675 const Float_t tlife = 6.582e-25 / 00676 TMath::Max(1.e-32,PDGPart->GetDecayWidth()); 00677 const Char_t *mecha = "Unknown"; 00678 00679 new((*fParticles)[fNtrack++]) 00680 GParticle(KS, KF, parent, firstchild, lastchild, 00681 px, py, pz, e, mass, vx, vy, vz, 00682 polar[0], polar[1], polar[2], tprod, tlife, mecha); 00683 } 00684 00685 // Loop over registered detectors and book the hits for this event. 00686 TIter next(fDetectors); 00687 MINFDetector *detector; 00688 00689 while ((detector = (MINFDetector *) next())) { 00690 detector->BookHits(frevt); 00691 } 00692 00693 }
| void MINFast::Reset | ( | Int_t | run, | |
| Int_t | idevent | |||
| ) | [virtual] |
Definition at line 696 of file MINFast.cxx.
References fHeader, fHgwmk, fNtrack, fTreeD, fTreeH, fTreeK, MINFHeader::Reset(), ResetDigits(), ResetHits(), and ResetStack().
00697 { 00698 00699 // Reset all Detectors & kinematics & trees 00700 fNtrack=0; 00701 fHgwmk=0; 00702 ResetStack(); 00703 ResetHits(); 00704 ResetDigits(); 00705 00706 // Initialise event header 00707 fHeader.Reset(run,idevent); 00708 00709 if (fTreeK) fTreeK->Reset(); 00710 if (fTreeH) fTreeH->Reset(); 00711 if (fTreeD) fTreeD->Reset(); 00712 }
| void MINFast::ResetDigits | ( | ) | [virtual] |
Definition at line 715 of file MINFast.cxx.
References fDetectors, and MINFDetector::ResetDigits().
Referenced by FinishEvent(), GetEvent(), and Reset().
00716 { 00717 00718 // Reset all Detectors digits 00719 TIter next(fDetectors); 00720 MINFDetector *detector; 00721 while ((detector = (MINFDetector *) next())) { 00722 detector->ResetDigits(); 00723 } 00724 }
| void MINFast::ResetHits | ( | ) | [virtual] |
Definition at line 727 of file MINFast.cxx.
References fDetectors, and MINFDetector::ResetHits().
Referenced by GetEvent(), and Reset().
00728 { 00729 00730 // Reset all Detectors hits 00731 TIter next(fDetectors); 00732 MINFDetector *detector; 00733 while ((detector = (MINFDetector *) next())) { 00734 detector->ResetHits(); 00735 } 00736 }
| void MINFast::ResetPoints | ( | ) | [virtual] |
Definition at line 739 of file MINFast.cxx.
References fDetectors, and MINFDetector::ResetPoints().
Referenced by MINFDisplay::LoadPoints().
00740 { 00741 00742 // Reset all Detectors points 00743 TIter next(fDetectors); 00744 MINFDetector *detector; 00745 while ((detector = (MINFDetector *) next())) { 00746 detector->ResetPoints(); 00747 } 00748 }
| virtual void MINFast::ResetStack | ( | ) | [inline, virtual] |
Definition at line 107 of file MINFast.h.
References fHgwmk, fNtrack, and fParticles.
Referenced by FinishEvent(), GetEvent(), and Reset().
00107 {fHgwmk=0;fNtrack=0;fParticles->Clear();}
| void MINFast::RunScript | ( | ) | [virtual] |
Definition at line 751 of file MINFast.cxx.
References MINFScript::RunScript(), and MINFScript::SetScriptFileName().
Referenced by MINFDisplay::RunScript().
00752 { 00753 00754 // Create a new script manager object. 00755 MINFScript fMINFScript; 00756 fMINFScript.SetScriptFileName(); 00757 fMINFScript.RunScript(); 00758 }
| virtual void MINFast::SetDebug | ( | const Int_t | level = 1 |
) | [inline, virtual] |
| virtual void MINFast::SetDisplay | ( | MINFDisplay * | display | ) | [inline, virtual] |
Definition at line 110 of file MINFast.h.
References fDisplay.
Referenced by MINFDisplay::MINFDisplay().
00110 {fDisplay = display;}
| void MINFast::SetDisplayUnlocked | ( | Bool_t | lul = kTRUE |
) | [inline] |
Definition at line 125 of file MINFast.h.
References fDisplayUnlocked.
00126 {fDisplayUnlocked = lul;}
| void MINFast::SetJobControlScript | ( | const Char_t * | filename | ) | [virtual] |
Definition at line 762 of file MINFast.cxx.
References fJobControlScript.
00763 { 00764 strcpy(fJobControlScript, filename); 00765 }
| TTree* MINFast::TreeD | ( | ) | [inline] |
Definition at line 129 of file MINFast.h.
References fTreeD.
Referenced by MINFDetector::SetTreeAddress().
00129 {return fTreeD;}
| TTree* MINFast::TreeE | ( | ) | [inline] |
| TTree* MINFast::TreeH | ( | ) | [inline] |
Definition at line 131 of file MINFast.h.
References fTreeH.
Referenced by MINFDetector::MakeBranch(), MINFDetector::SetTreeAddress(), and MINFDisplay::ShowNextEvent().
00131 {return fTreeH;}
| TTree* MINFast::TreeK | ( | ) | [inline] |
Int_t MINFast::fDebug [private] |
TList* MINFast::fDetectors [private] |
Definition at line 58 of file MINFast.h.
Referenced by Browse(), Detectors(), FinishRun(), GetDetector(), Init(), MakeTree(), MINFast(), ProcessEvent(), ResetDigits(), ResetHits(), ResetPoints(), and ~MINFast().
MINFDisplay* MINFast::fDisplay [private] |
Definition at line 61 of file MINFast.h.
Referenced by Display(), GetAndShowEvent(), GetEvent(), MINFast(), SetDisplay(), and ~MINFast().
Bool_t MINFast::fDisplayUnlocked [private] |
Definition at line 62 of file MINFast.h.
Referenced by IsDisplayUnlocked(), MINFast(), and SetDisplayUnlocked().
TGeometry* MINFast::fGeometry [private] |
MINFHeader MINFast::fHeader [private] |
Definition at line 53 of file MINFast.h.
Referenced by FinishEvent(), GetEvent(), GetHeader(), GetNextTrack(), MINFast(), ProcessEvent(), and Reset().
Int_t MINFast::fHgwmk [private] |
Char_t MINFast::fJobControlScript[255] [private] |
Definition at line 68 of file MINFast.h.
Referenced by GetAndShowEvent(), MINFast(), and SetJobControlScript().
MINFDetGeom* MINFast::fMINFDetGeom [private] |
Definition at line 64 of file MINFast.h.
Referenced by BuildDetectorGeometry(), GetMINFDetGeom(), and ~MINFast().
MINFile* MINFast::fMINFile [private] |
Definition at line 65 of file MINFast.h.
Referenced by GetEvent(), GetMINFile(), MINFast(), and OpenRerootFile().
Int_t MINFast::fNtrack [private] |
Definition at line 50 of file MINFast.h.
Referenced by CleanParents(), DumpPStack(), GetEvent(), GetNextTrack(), GetNtrack(), MINFast(), ProcessEvent(), Reset(), and ResetStack().
TClonesArray* MINFast::fParticles [private] |
Definition at line 59 of file MINFast.h.
Referenced by DumpPart(), DumpPStack(), FlagTrack(), GetNextTrack(), GetPrimary(), MakeTree(), MINFast(), Particles(), ResetStack(), and ~MINFast().
REROOT_Event* MINFast::frevt [private] |
Definition at line 66 of file MINFast.h.
Referenced by GetEvent(), GetREROOTEvent(), and ProcessEvent().
REROOT_Geom* MINFast::frgeo [private] |
Definition at line 67 of file MINFast.h.
Referenced by BuildDetectorGeometry(), GetEvent(), and GetREROOTGeom().
TStopwatch MINFast::fTimer [private] |
TTree* MINFast::fTreeD [private] |
Definition at line 54 of file MINFast.h.
Referenced by Browse(), FillTree(), FinishEvent(), FinishRun(), MakeTree(), MINFast(), Reset(), and TreeD().
TTree* MINFast::fTreeE [private] |
Definition at line 57 of file MINFast.h.
Referenced by Browse(), FinishEvent(), FinishRun(), MakeTree(), MINFast(), and TreeE().
TTree* MINFast::fTreeH [private] |
Definition at line 56 of file MINFast.h.
Referenced by Browse(), FillTree(), FinishEvent(), FinishRun(), MakeTree(), MINFast(), Reset(), and TreeH().
TTree* MINFast::fTreeK [private] |
Definition at line 55 of file MINFast.h.
Referenced by Browse(), FillTree(), FinishEvent(), FinishRun(), MakeTree(), MINFast(), Reset(), and TreeK().
1.4.7