]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/createTriggerDescriptor_pp.C
Use default errors in case the vertexer didn't find any
[u/mrichter/AliRoot.git] / STEER / createTriggerDescriptor_pp.C
1 createTriggerDescriptor_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" );
10    descrip.AddDetectorCluster( "ITS START VZERO MUON TOF" ); // no CRT yet
11
12    // standalong V0 inputs
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 );
16
17    // standalong T0 inputs
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 );
20
21    // standalong ITS-SPD inputs
22    descrip.AddCondition( "ITS_SPD_GFO_L0",  "ITS_SPD_GFO_L0",  "SPD global fast-or",        (ULong64_t)0x1 << 5 );
23    descrip.AddCondition( "ITS_SPD_HMULT_L0","ITS_SPD_HMULT_L0","SPD high mult. 100 ",       (ULong64_t)0x1 << 6 );
24
25    // standalong MUON inputs
26    descrip.AddCondition( "MUON_SPlus_LPt_L0",
27                          "MUON_SPlus_LPt_L0",           "Muon Plus Low Pt",
28                          (ULong64_t)0x1 << 7 );
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
47    descrip.AddCondition( "ITS_SPD_GFO_L0 & VZERO_AND | TOF_pp_MB_L0",
48                          "MB-TOF",
49                          "Minimum Bias with TOF",
50                          (ULong64_t)0x1 << 13 );
51
52    descrip.AddCondition( "ITS_SPD_GFO_L0 & VZERO_AND & MUON_SPlus_LPt_L0",
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 );
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