]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
This is deprecated and is being removed.
authorszostak <szostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 29 May 2007 04:29:13 +0000 (04:29 +0000)
committerszostak <szostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 29 May 2007 04:29:13 +0000 (04:29 +0000)
HLT/MUON/macros/RunMicrodHLT.C [deleted file]

diff --git a/HLT/MUON/macros/RunMicrodHLT.C b/HLT/MUON/macros/RunMicrodHLT.C
deleted file mode 100644 (file)
index ddc6833..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Author: Artur Szostak
-// Email:  artur@alice.phy.uct.ac.za | artursz@iafrica.com
-//
-////////////////////////////////////////////////////////////////////////////////
-
-/* Sample macro indicating how to run the micro dHLT version.
- */
-
-void RunMicrodHLT(Bool_t rundebug = kFALSE)
-{
-       if (rundebug)
-               gSystem->Load("../lib/Linux-debug/libMUONHLT.so");
-       else
-               gSystem->Load("../lib/Linux/libMUONHLT.so");
-       
-       cout << "dHLT Version: " << AliMUONHLT::Version() << endl;
-
-       AliMUONDataInterface data;
-       data.SetFile();
-       
-       // Load the trigger data.
-       AliMUONHLT::TriggerSource ts;
-       ts.DataToUse(AliMUONHLT::TriggerSource::FromHits);
-       ts.FillFrom(&data);
-
-       // Load the cluster data.
-       AliMUONHLT::ClusterSource cs;
-       cs.DataToUse(AliMUONHLT::ClusterSource::FromHits);
-       cs.FillFrom(&data);
-
-       // Create a Track output object.
-       AliMUONHLT::TrackSink trackout;
-
-       // Create the dHLT process object and connect it to input and output.
-       AliMUONHLT::MicrodHLT dhlt;
-       dhlt.SetTriggerSource(&ts);
-       dhlt.SetClusterSource(&cs);
-       dhlt.SetTrackSink(&trackout);
-       
-       // run the dHLT
-       cout << "running..." << endl;
-       dhlt.Run();
-       
-       // Display the output:
-       if ( ! trackout.GetFirstEvent())
-               cout << "No tracks found." << endl;
-
-       while (trackout.MoreEvents())
-       {
-               cout << "================= Event: " << trackout.CurrentEvent() << " =================" << endl;
-               Int_t blocknum = 0;
-
-               if ( ! trackout.GetFirstBlock() )
-                       cout << "No track blocks found." << endl;
-               
-               while (trackout.MoreBlocks())
-               {
-                       cout << "Block: " << blocknum++ << endl;
-                       cout << "\tReal\tReal\tHLT\tHLT\tHLT\tL0\tL0" << endl;
-                       cout << "\tP\tPt\tSign\tP\tPt\tSign\tPt" << endl;
-
-                       if ( trackout.GetFirstTrack() == NULL )
-                               cout << "\tNo tracks found." << endl;
-
-                       while (trackout.MoreTracks())
-                       {
-                               AliMUONHLT::Track* track = trackout.GetTrack();
-
-                               // Find the corresponding trigger record.
-                               AliMUONHLT::TriggerRecord* trigrec = NULL;
-                               ts.GetEvent(trackout.CurrentEvent());
-                               
-                               if (ts.GetFirstBlock())
-                               {
-                                       do
-                                       {
-                                               trigrec = ts.GetTrigger( track->TriggerID() );
-                                               if (trigrec != NULL) break;
-                                       } while (ts.GetNextBlock());
-                               };
-                               if (trigrec == NULL)
-                               {
-                                       cerr << "Error: could not find corresponding trigger record!" << endl;
-                                       continue;
-                               };
-
-                               // Find the corresponding particle in Kine.
-                               // Note: track->fTriggerID happens to be the TreeH track number when
-                               // filling from Hit objects.
-                               data.GetEvent(trackout.CurrentEvent());
-                               AliMUONHit* hit = data.Hit(track->TriggerID(), 0);
-                               if (hit == NULL)
-                               {
-                                       cerr << "Warning: Could not find hit 0 for track number = "
-                                       << track->TriggerID() << endl;
-                                       continue;
-                               };
-
-                               // Need to decode the particle index.
-                               Int_t num_primaries = data.NumberOfTracks();
-                               Int_t num_tracks = data.NumberOfParticles();
-                               Int_t particleindex;
-                               if (hit->Track() < num_primaries)
-                                       particleindex = hit->Track() + num_tracks - num_primaries;
-                               else
-                                       particleindex =  hit->Track()- num_primaries;
-
-                               TParticle* p = data.Particle(particleindex);
-
-                               // All data found, now write output:
-                               cout << "\t" << p->P()
-                                       << "\t" << p->Pt()
-                                       << "\t" << track->ParticleSign()
-                                       << "\t" << track->P()
-                                       << "\t" << track->Pt()
-                                       << "\t" << trigrec->ParticleSign()
-                                       << "\t" << trigrec->Pt()
-                                       << endl;
-
-                               trackout.GetNextTrack();
-                       };
-                       trackout.GetNextBlock();
-               };
-               trackout.GetNextEvent();
-       };
-};