Added methods for finding a given module in the DDL map (F. Prino)
[u/mrichter/AliRoot.git] / STEER / createTriggerDescriptor_pp.C
CommitLineData
20ea4dd1 1createTriggerDescriptor_pp()
2{
3 // create Trigger Descriptor for p-p interactions
4
5
6 AliTriggerDescriptor descrip( "p-p", "Default p-p Descriptor" );
7
8 // Define a Cluster Detector
9 //descrip.AddDetectorCluster( "ALL" );
b384f8a4 10 descrip.AddDetectorCluster( "ITS T0 VZERO MUON TOF" ); // no ACORDE yet
20ea4dd1 11
5acd586b 12 // standalong V0 inputs
20ea4dd1 13 descrip.AddCondition( "VZERO_LEFT", "VZERO_LEFT", "VZERO A (Left)", (ULong64_t)0x1 );
14 descrip.AddCondition( "VZERO_RIGHT", "VZERO_RIGHT", "VZERO C (Right)", (ULong64_t)0x1 << 1 );
15 descrip.AddCondition( "VZERO_BEAMGAS", "VZERO_BEAMGAS", "VZERO beam gas rejection", (ULong64_t)0x1 << 2 );
5acd586b 16
17 // standalong T0 inputs
20ea4dd1 18 descrip.AddCondition( "START_A_L0", "START_A_L0", "START A (Left)", (ULong64_t)0x1 << 3 );
19 descrip.AddCondition( "START_C_L0", "START_C_L0", "START C (Right)", (ULong64_t)0x1 << 4 );
5acd586b 20
21 // standalong ITS-SPD inputs
20ea4dd1 22 descrip.AddCondition( "ITS_SPD_GFO_L0", "ITS_SPD_GFO_L0", "SPD global fast-or", (ULong64_t)0x1 << 5 );
2ca17abd 23 descrip.AddCondition( "ITS_SPD_HMULT_L0","ITS_SPD_HMULT_L0","SPD high mult. 150 ", (ULong64_t)0x1 << 6 );
20ea4dd1 24
5acd586b 25 // standalong MUON inputs
a95f103a 26 descrip.AddCondition( "MUON_Single_LPt_L0",
27 "MUON_Single_LPt_L0", "Muon Plus Low Pt",
1c06c8d0 28 (ULong64_t)0x1 << 7 );
5acd586b 29 descrip.AddCondition( "MUON_Unlike_LPt_L0",
30 "MUON_Unlike_LPt_L0", "Di Muon Unlike sign Low Pt",
31 (ULong64_t)0x1 << 8 );
32 descrip.AddCondition( "MUON_Unlike_HPt_L0",
33 "MUON_Unlike_HPt_L0", "Di Muon Unlike sign High Pt",
34 (ULong64_t)0x1 << 9 );
35 descrip.AddCondition( "MUON_Like_LPt_L0",
36 "MUON_Like_LPt_L0", "Di Muon Like sign Low Pt",
37 (ULong64_t)0x1 << 10 );
38 descrip.AddCondition( "MUON_Like_HPt_L0",
39 "MUON_Like_HPt_L0", "Di Muon Like sign High Pt",
40 (ULong64_t)0x1 << 11 );
41
42 // combinations
43 descrip.AddCondition( "ITS_SPD_GFO_L0 & VZERO_AND",
44 "MB", "Minimum Bias",
45 (ULong64_t)0x1 << 12 );
46
1c06c8d0 47 descrip.AddCondition( "ITS_SPD_GFO_L0 & VZERO_AND | TOF_pp_MB_L0",
48 "MB-TOF",
49 "Minimum Bias with TOF",
5acd586b 50 (ULong64_t)0x1 << 13 );
51
a95f103a 52 descrip.AddCondition( "ITS_SPD_GFO_L0 & VZERO_AND & MUON_Single_LPt_L0",
5acd586b 53 "MUONSingle_MB", "Muon Single Low Pt Minimum Bias",
54 (ULong64_t)0x1 << 14 );
55 descrip.AddCondition( "ITS_SPD_GFO_L0 & VZERO_AND & MUON_Unlike_LPt_L0",
56 "MUONUnlikeLPt_MB", "Muon Unlike Low Pt Minimum Bias",
57 (ULong64_t)0x1 << 15 );
58 descrip.AddCondition( "ITS_SPD_GFO_L0 & VZERO_AND & MUON_Like_LPt_L0",
59 "MUONLikeLPt_MB", "Muon Like Low Pt Minimum Bias",
60 (ULong64_t)0x1 << 16 );
20ea4dd1 61
62 cout << endl << endl;
63
64 if( !descrip.CheckInputsConditions("Config.C") ) {
65 cerr << "\n ERROR: There are some problems on descriptor definition..." << endl;
66 return;
67 }
68
69 cout << endl << endl;
70
71 cout << "************************************************************" << endl;
72 cout << "New Trigger descriptor" << endl;
73 cout << "************************************************************" << endl;
74 descrip.Print();
75
76 // save the descriptor to file
77 descrip.WriteDescriptor();
78
79 cout << endl << endl << endl;
80 cout << "************************************************************" << endl;
81 cout << "Available Trigger descriptors" << endl;
82 cout << "************************************************************" << endl;
83
84 // Get and print all available descriptors
85 TObjArray* desc = AliTriggerDescriptor::GetAvailableDescriptors();
86
87 if( !desc || !desc->GetEntriesFast() ) {
88 cerr << "Not descriptors availables" << endl;
89 return;
90 }
91
92 Int_t ndesc = desc->GetEntriesFast();
93 for( Int_t j=0; j<ndesc; j++ ) {
94 AliTriggerDescriptor* de = (AliTriggerDescriptor*)desc->At(j);
95 de->Print();
96 }
97
98}
99