]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/alice-macros/MUON_trigger_info.C
Fix aclic compilation.
[u/mrichter/AliRoot.git] / EVE / alice-macros / MUON_trigger_info.C
1 // $Id$
2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4 /**************************************************************************
5  * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
7  * full copyright notice.                                                 *
8  **************************************************************************/
9
10 #include <iomanip.h>
11
12 void MUON_trigger_info(Int_t label) {
13
14   AliRunLoader* rl = AliEveEventManager::AssertRunLoader();
15
16   TTree* tt = rl->GetTreeT("MUON", false);
17
18   TClonesArray *tracks = 0;
19   tt->SetBranchAddress("AliEveMUONTrack",&tracks);
20   tt->GetEntry(0);
21
22   Int_t ntracks = tracks->GetEntriesFast();
23
24   if (ntracks <= label) return;
25
26   AliMUONTrack *mt = tracks->At(label);
27
28   TTree* tr = rl->GetTreeR("MUON", false);
29
30   TClonesArray *lotrig = 0;
31   tr->SetBranchAddress("MUONLocalTrigger",&lotrig);
32   tr->GetEntry(0);
33
34   Int_t nlotrig = lotrig->GetEntriesFast();
35
36   cout << endl;
37   cout << ">>>>>#########################################################################################################################" << endl;
38   cout << endl;
39   cout << "                   TEveTrack number " << label << endl;
40   cout << endl;
41   AliMUONTrackParam *mtp = (AliMUONTrackParam*)mt->GetTrackParamAtVertex();
42   Float_t pt = TMath::Sqrt(mtp->Px()*mtp->Px()+mtp->Py()*mtp->Py());
43
44   cout << "   Pt = " <<
45     setw(8) << setprecision(3) <<
46     pt << "  GeV/c" << endl;
47
48   cout << endl;
49
50   if (mt->GetLoTrgNum() >= 0) {
51     AliMUONLocalTrigger *lo = (AliMUONLocalTrigger*)lotrig->At(mt->GetLoTrgNum());
52     cout << "   Local trigger information" << endl;
53     cout << "   -----------------------------------------------------" << endl;
54     cout << "   Circuit   " << lo->LoCircuit() << endl;
55     cout << "   StripX    " << lo->LoStripX()  << endl;
56     cout << "   StripY    " << lo->LoStripY()  << endl;
57     cout << "   Dev       " << lo->LoDev()     << endl;
58     cout << "   LoLpt     " << lo->LoLpt()     << endl;
59     cout << "   LoHpt     " << lo->LoHpt()     << endl;
60     cout << "   Pattern X:" << endl;
61     printf("   %016b \n",lo->GetX1Pattern());
62     printf("   %016b \n",lo->GetX2Pattern());
63     printf("   %016b \n",lo->GetX3Pattern());
64     printf("   %016b \n",lo->GetX4Pattern());
65     cout << "   Pattern Y:" << endl;
66     printf("   %016b \n",lo->GetY1Pattern());
67     printf("   %016b \n",lo->GetY2Pattern());
68     printf("   %016b \n",lo->GetY3Pattern());
69     printf("   %016b \n",lo->GetY4Pattern());
70     cout << "   Decision:" << endl;
71     printf("   %04b  \n",lo->GetLoDecision());
72   } else {
73     cout << "   The track has no trigger information!" << endl;
74   }
75   cout << endl;
76   cout << "#########################################################################################################################<<<<<" << endl;
77
78 }
79