// run as: root short.cc 4058 -s 300 -n 1000 { gROOT->Reset(); gSystem.Load("libBlast.so"); int arc=gApplication->Argc(); char** arv=gApplication->Argv(); Setup(arc, arv); // Setup(); // take either version // Setup() creats: // TOpt* gOpt = new TOpt(argc, argv); // TBLGeometry* gGeom = new TBLGeometry // TBLMagField* gField = new TBLMagField; // TBLSimTrack* gSim = new TBLSimTrack; // TBLFitTrack* gFit = new TBLFitTrack(gSim); // TBLNewtDer* gDer = new TBLNewDer(gFit); // TBLLazy* gLazy = new TBLLazy(gStubs, gDet); // TBLRecon* gRecon = new TBLRecon; // sets: // TBLRaw* gRaw = gRecon->fRaw; // TBLWc1Time2Distance* gT2D = gRecon->ft2d; // TBLWc1WireCal* gWire = gRecon->fWire; // TBLWc1HitContainer* gHits = gRecon->fHits; // TBLWc1ClusterContainer* gClusters = gRecon->fClusters; // TBLWc1StubContainer* gStubs = gRecon->fStubs; // TBLWc1SegmentContainer* gSegs = gRecon->fSegs; // TBLWc1TrackContainer* gLinks = gRecon->fLinks; // TBLDetRecon* gDet = gRecon->fDet; // TBLPidRecon* gPid = gRecon->fPid; // all thest "g" pointers are global so can be access anywhere in the the program // See TOpt.h/cc for detail TBLRaw* raw = gRecon->fRaw; TBLDetRecon* detrecon = gRecon.fDet; for (int il = 0; ilnList(); ++il) { // gOpt->nList(): number of runs passed to program gRecon->Open(il); // opens the coda file for il'th run in the run list gRecon->fRaw->Goto(gOpt->StartAtEvent()-1); // go to the event specified by "-s" option: while (!gRecon->ReadNext() && gRecon->GetNEvent()StopAtEvent()) { gRecon->ReadOuterHits(); gDet->dumphits(); // or gRecon->fDet->dumphits(); gRecon->LinkWcHits(); // do WC hits linking gRecon->ImportWcTracks(); // import fast tracks into newton fitters gRecon->FitTracks(); // fit gRecon->TraceBack(); // trace back to vertex gRecon->LinkOuterHits(); // link WC tracks to TOF/CC/NC... gRecon->ParticleID(); // compute mass of tracks and ID particles gRecon->FitDump(); } } }