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