]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/createTriggerDescriptor_MUON.C
8e91c50719eaa99c56b62f70f1d743e423fe3f58
[u/mrichter/AliRoot.git] / STEER / createTriggerDescriptor_MUON.C
1 createTriggerDescriptor_MUON()
2 {
3   // create Trigger Descriptor for MUON standalone
4   // macro inspired from STEER/createTriggerDescriptor_*.C
5   // May 2006, Ch. Finck
6
7    AliTriggerDescriptor descrip( "MUON", "Standalone Trigger for MUON" );
8
9    // Define a Cluster Detector
10    descrip.AddDetectorCluster( "MUON" ); // only MUON
11
12    // 1
13    descrip.AddCondition( "MUON_SPlus_LPt_L0", 
14                          "MUON_SPlus_LPt_L0",    "Muon Plus Low Pt",
15                          (ULong64_t)0x1 );
16
17    // 10
18    descrip.AddCondition( "MUON_SPlus_HPt_L0", 
19                          "MUON_SPlus_HPt_L0",    "Muon Plus High Pt",
20                          (ULong64_t)0x1 << 1 );
21
22    // 100
23    descrip.AddCondition( "MUON_SPlus_All_L0", 
24                          "MUON_SPlus_All_L0",    "Muon Plus All Pt",
25                          (ULong64_t)0x1 << 2 );
26
27    // 1000
28    descrip.AddCondition( "MUON_SMinus_LPt_L0", 
29                          "MUON_SMinus_LPt_L0",    "Muon Minus Low Pt",
30                          (ULong64_t)0x1 << 3 );
31
32    // 10000
33    descrip.AddCondition( "MUON_SMinus_HPt_L0", 
34                          "MUON_SMinus_HPt_L0",    "Muon Minus High Pt",
35                          (ULong64_t)0x1 << 4 );
36
37    // 100000
38    descrip.AddCondition( "MUON_SMinus_All_L0", 
39                          "MUON_SMinus_All_L0",    "Muon Minus All Pt",
40                          (ULong64_t)0x1 << 5 );
41
42    // 1000000
43    descrip.AddCondition( "MUON_SUndef_LPt_L0", 
44                          "MUON_SUndef_LPt_L0",    "Muon Undefined sign Low Pt",
45                          (ULong64_t)0x1 << 6 );
46
47    // 10000000
48    descrip.AddCondition( "MUON_SUndef_HPt_L0", 
49                          "MUON_SUndef_HPt_L0",    "Muon Undefined sign High Pt",
50                          (ULong64_t)0x1 << 7 );
51
52    // 100000000
53    descrip.AddCondition( "MUON_SUndef_All_L0", 
54                          "MUON_SUndef_All_L0",    "Muon Undefined sign All Pt",
55                          (ULong64_t)0x1 << 8 );
56
57    // 1000000000
58    descrip.AddCondition( "MUON_Unlike_LPt_L0", 
59                          "MUON_Unlike_LPt_L0",    "Di Muon Unlike sign Low Pt",
60                          (ULong64_t)0x1 << 9 );
61
62    // 10000000000
63    descrip.AddCondition( "MUON_Unlike_HPt_L0", 
64                          "MUON_Unlike_HPt_L0",    "Di Muon Unlike sign High Pt",
65                          (ULong64_t)0x1 << 10 );
66
67    // 100000000000
68    descrip.AddCondition( "MUON_Unlike_All_L0", 
69                          "MUON_Unlike_All_L0",    "Di Muon Unlike sign All Pt",
70                          (ULong64_t)0x1 << 11 );
71
72    // 1000000000000
73    descrip.AddCondition( "MUON_Like_LPt_L0", 
74                          "MUON_Like_LPt_L0",    "Di Muon Like sign Low Pt",
75                          (ULong64_t)0x1 << 12 );
76
77    // 10000000000000
78    descrip.AddCondition( "MUON_Like_HPt_L0", 
79                          "MUON_Like_HPt_L0",    "Di Muon Like sign High Pt",
80                          (ULong64_t)0x1 << 13 );
81
82    // 100000000000000
83    descrip.AddCondition( "MUON_Like_All_L0", 
84                          "MUON_Like_All_L0",    "Di Muon Like sign All Pt",
85                          (ULong64_t)0x1 << 14 );
86    cout << endl << endl;
87
88    if( !descrip.CheckInputsConditions("Config.C") ) {
89       cerr << "\n ERROR: There are some problems on descriptor definition..." << endl;
90       return;
91    }
92
93    cout << endl << endl;
94
95    cout << "************************************************************" << endl;
96    cout << "New Trigger descriptor" << endl;
97    cout << "************************************************************" << endl;
98    descrip.Print();
99
100    // save the descriptor to file
101    descrip.WriteDescriptor();
102
103    cout << endl << endl << endl;
104    cout << "************************************************************" << endl;
105    cout << "Available Trigger descriptors" << endl;
106    cout << "************************************************************" << endl;
107
108    // Get and print all available descriptors
109    TObjArray* desc = AliTriggerDescriptor::GetAvailableDescriptors();
110
111    if( !desc || !desc->GetEntriesFast() ) {
112       cerr << "Not descriptors availables" << endl;
113       return;
114    }
115
116    Int_t ndesc = desc->GetEntriesFast();
117    for( Int_t j=0; j<ndesc; j++ ) {  
118       AliTriggerDescriptor* de = (AliTriggerDescriptor*)desc->At(j); 
119       de->Print();
120    }
121
122 }
123
124