]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/alice-macros/MUON_trigger_info.C
Put all classes in Alieve/ sub-module out of the Alieve namespace and
[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 #include <iomanip.h>
10
11 void MUON_trigger_info(Int_t label) {
12
13   AliRunLoader* rl = AliEveEventManager::AssertRunLoader();
14
15   TTree* tt = rl->GetTreeT("MUON", false);
16   
17   TClonesArray *tracks = 0;
18   tt->SetBranchAddress("AliEveMUONTrack",&tracks);
19   tt->GetEntry(0);
20
21   Int_t ntracks = tracks->GetEntriesFast();
22   
23   if (ntracks <= label) return;
24
25   AliMUONTrack *mt = tracks->At(label);  
26
27   TTree* tr = rl->GetTreeR("MUON", false);
28   
29   TClonesArray *lotrig = 0;
30   tr->SetBranchAddress("MUONLocalTrigger",&lotrig);
31   tr->GetEntry(0);
32
33   Int_t nlotrig = lotrig->GetEntriesFast();
34
35   cout << endl;
36   cout << ">>>>>#########################################################################################################################" << endl;
37   cout << endl;
38   cout << "                   TEveTrack number " << label << endl;
39   cout << endl;
40   AliMUONTrackParam *mtp = (AliMUONTrackParam*)mt->GetTrackParamAtVertex();
41   Float_t pt = TMath::Sqrt(mtp->Px()*mtp->Px()+mtp->Py()*mtp->Py());
42
43   cout << "   Pt = " << 
44     setw(8) << setprecision(3) <<
45     pt << "  GeV/c" << endl;
46   
47   cout << endl;
48
49   if (mt->GetLoTrgNum() >= 0) {
50     AliMUONLocalTrigger *lo = (AliMUONLocalTrigger*)lotrig->At(mt->GetLoTrgNum());
51     cout << "   Local trigger information" << endl;
52     cout << "   -----------------------------------------------------" << endl;
53     cout << "   Circuit   " << lo->LoCircuit() << endl;
54     cout << "   StripX    " << lo->LoStripX()  << endl;
55     cout << "   StripY    " << lo->LoStripY()  << endl;
56     cout << "   Dev       " << lo->LoDev()     << endl;
57     cout << "   LoLpt     " << lo->LoLpt()     << endl;
58     cout << "   LoHpt     " << lo->LoHpt()     << endl;
59     cout << "   Pattern X:" << endl;
60     printf("   %016b \n",lo->GetX1Pattern());
61     printf("   %016b \n",lo->GetX2Pattern());
62     printf("   %016b \n",lo->GetX3Pattern());
63     printf("   %016b \n",lo->GetX4Pattern());
64     cout << "   Pattern Y:" << endl;
65     printf("   %016b \n",lo->GetY1Pattern());
66     printf("   %016b \n",lo->GetY2Pattern());
67     printf("   %016b \n",lo->GetY3Pattern());
68     printf("   %016b \n",lo->GetY4Pattern());
69     cout << "   Decision:" << endl;
70     printf("   %04b  \n",lo->GetLoDecision());
71   } else {
72     cout << "   The track has no trigger information!" << endl;
73   }
74   cout << endl;
75   cout << "#########################################################################################################################<<<<<" << endl;
76   
77 }
78