]>
Commit | Line | Data |
---|---|---|
c9537879 | 1 | /************************************************************************** |
2 | * This file is property of and copyright by the ALICE HLT Project * | |
3 | * All rights reserved. * | |
4 | * * | |
5 | * Primary Authors: * | |
6 | * Artur Szostak <artursz@iafrica.com> * | |
7 | * * | |
8 | * Permission to use, copy, modify and distribute this software and its * | |
9 | * documentation strictly for non-commercial purposes is hereby granted * | |
10 | * without fee, provided that the above copyright notice appears in all * | |
11 | * copies and that both the copyright notice and this permission notice * | |
12 | * appear in the supporting documentation. The authors make no claims * | |
13 | * about the suitability of this software for any purpose. It is * | |
14 | * provided "as is" without express or implied warranty. * | |
15 | **************************************************************************/ | |
16 | ||
1d8ae082 | 17 | // $Id: $ |
c9537879 | 18 | |
19 | /** | |
20 | * \ingroup macros | |
21 | * \file CreateDefaultCDBEntries.C | |
22 | * \brief Macro for generating default CDB entries for dHLT. | |
23 | * | |
24 | * This macro is used to generate some default CDB entries for the dHLT. | |
25 | * It is an experts macro so make sure you know what you are doing. | |
26 | * | |
27 | * The simplest way to run this macro with defaults is to copy "rootlogon.C" from | |
28 | * $ALICE_ROOT/HLT/MUON/macros into your current working directory, then from | |
29 | * the shell command prompt run the following command: | |
30 | * \code | |
1d8ae082 | 31 | * > aliroot -b -q -l $ALICE_ROOT/HLT/MUON/macros/CreateDefaultCDBEntries.C |
c9537879 | 32 | * \endcode |
33 | * | |
34 | * \author Artur Szostak <artursz@iafrica.com> | |
35 | */ | |
36 | ||
37 | #if !defined(__CINT__) || defined(__MAKECINT__) | |
38 | #include "AliCDBManager.h" | |
39 | #include "AliCDBStorage.h" | |
40 | #include "AliCDBEntry.h" | |
41 | #include "AliHLTMUONConstants.h" | |
42 | #include "TMap.h" | |
43 | #include "TObjString.h" | |
44 | #include "TString.h" | |
45 | #include <iostream> | |
46 | using std::cerr; | |
47 | using std::endl; | |
48 | #endif | |
49 | ||
50 | /** | |
51 | * Generates default CDB entries in the given CDB storage (local by default) | |
52 | * \param cdbPath The path to the local storage. | |
bc5cb6d6 | 53 | * \param version The version of the CDB entry. |
54 | * \param firstRun = The first run number for which the CDB entry is valid. | |
55 | * \param lastRun = The last run number for which the CDB entry is valid. | |
1d8ae082 | 56 | * \param zmiddle The middle of the dipole field (cm) used by AliHLTMUONTriggerReconstructorComponent and AliHLTMUONMansoTrackerFSMComponent. |
57 | * \param bfieldintegral The dipole magnetic field integral (T.m) used by AliHLTMUONTriggerReconstructorComponent and AliHLTMUONMansoTrackerFSMComponent. | |
58 | * \param dccut DC cut applied to channels by AliHLTMUONHitReconstructorComponent. | |
59 | * \param roiParamAchamber7 Region of interest parameter A for chamber 7 used by AliHLTMUONMansoTrackerFSMComponent. | |
60 | * \param roiParamBchamber7 Region of interest parameter B for chamber 7 used by AliHLTMUONMansoTrackerFSMComponent. | |
61 | * \param roiParamAchamber8 Region of interest parameter A for chamber 8 used by AliHLTMUONMansoTrackerFSMComponent. | |
62 | * \param roiParamBchamber8 Region of interest parameter B for chamber 8 used by AliHLTMUONMansoTrackerFSMComponent. | |
63 | * \param roiParamAchamber9 Region of interest parameter A for chamber 9 used by AliHLTMUONMansoTrackerFSMComponent. | |
64 | * \param roiParamBchamber9 Region of interest parameter B for chamber 9 used by AliHLTMUONMansoTrackerFSMComponent. | |
65 | * \param roiParamAchamber10 Region of interest parameter A for chamber 10 used by AliHLTMUONMansoTrackerFSMComponent. | |
66 | * \param roiParamBchamber10 Region of interest parameter B for chamber 10 used by AliHLTMUONMansoTrackerFSMComponent. | |
67 | * \param lowptcut The low pT cut applied to tracks (GeV/c) used by the AliHLTMUONDecisionComponent. | |
68 | * \param highptcut The hight pT cut applied to tracks (GeV/c) used by the AliHLTMUONDecisionComponent. | |
69 | * \param lowmasscut The low invariant mass cut applied to track pairs (GeV/c^2) used by the AliHLTMUONDecisionComponent. | |
70 | * \param highmasscut The hight invariant mass cut applied to track pairs (GeV/c^2) used by the AliHLTMUONDecisionComponent. | |
71 | * \param chamber7postion Nominal position for chamber 7 used by AliHLTMUONMansoTrackerFSMComponent. | |
72 | * \param chamber8postion Nominal position for chamber 8 used by AliHLTMUONMansoTrackerFSMComponent. | |
73 | * \param chamber9postion Nominal position for chamber 9 used by AliHLTMUONMansoTrackerFSMComponent. | |
74 | * \param chamber10postion Nominal position for chamber 10 used by AliHLTMUONMansoTrackerFSMComponent. | |
75 | * \param chamber11postion Nominal position for chamber 11 used by AliHLTMUONMansoTrackerFSMComponent. | |
76 | * \param chamber13postion Nominal position for chamber 13 used by AliHLTMUONMansoTrackerFSMComponent. | |
c9537879 | 77 | */ |
3da1c6d7 | 78 | void CreateDefaultCDBEntries( |
79 | const char* cdbPath = "local://$ALICE_ROOT/OCDB", | |
1d8ae082 | 80 | Int_t version = 0, |
81 | Int_t firstRun = 0, | |
82 | Int_t lastRun = AliCDBRunRange::Infinity(), | |
3da1c6d7 | 83 | float zmiddle = -975., |
84 | float bfieldintegral = -3., | |
85 | int dccut = 50, | |
86 | float roiParamAchamber7 = 0.020, | |
87 | float roiParamBchamber7 = 2.2, | |
88 | float roiParamAchamber8 = 0.023, | |
89 | float roiParamBchamber8 = 2.3, | |
90 | float roiParamAchamber9 = 0.049, | |
91 | float roiParamBchamber9 = 4.8, | |
92 | float roiParamAchamber10 = 0.045, | |
93 | float roiParamBchamber10 = 4.2, | |
94 | float lowptcut = 0.779, | |
95 | float highptcut = 1.755, | |
96 | float lowmasscut = 1.5, | |
97 | float highmasscut = 6., | |
98 | float chamber7postion = -1276.5, | |
99 | float chamber8postion = -1307.5, | |
100 | float chamber9postion = -1406.6, | |
101 | float chamber10postion = -1437.6, | |
102 | float chamber11postion = -1603.5, | |
103 | float chamber13postion = -1703.5 | |
104 | ) | |
c9537879 | 105 | { |
106 | // Setup the CDB default storage and run number. | |
107 | AliCDBManager* cdbManager = AliCDBManager::Instance(); | |
108 | if (cdbManager == NULL) | |
109 | { | |
110 | cerr << "ERROR: Global CDB manager object does not exist." << endl; | |
111 | return; | |
112 | } | |
113 | ||
114 | AliCDBStorage* storage = cdbManager->GetStorage(cdbPath); | |
115 | if (storage == NULL) | |
116 | { | |
117 | cerr << "ERROR: Could not get storage for: " << cdbPath << endl; | |
118 | return; | |
119 | } | |
120 | ||
ffc1a6f6 | 121 | const char* path = NULL; |
122 | AliCDBMetaData* metaData = NULL; | |
123 | TMap* params = NULL; | |
124 | AliCDBId id; | |
125 | ||
2b7af22a | 126 | // Create and store the configuration parameters for the trigger reconstructor. |
127 | params = new TMap; | |
128 | params->SetOwner(kTRUE); | |
3da1c6d7 | 129 | char valstr[1024]; |
130 | sprintf(valstr, "%8.8f", zmiddle); | |
131 | params->Add(new TObjString("zmiddle"), new TObjString(valstr)); | |
132 | sprintf(valstr, "%8.8f", bfieldintegral); | |
133 | params->Add(new TObjString("bfieldintegral"), new TObjString(valstr)); | |
2b7af22a | 134 | |
135 | path = AliHLTMUONConstants::TriggerReconstructorCDBPath(); | |
3da1c6d7 | 136 | id = AliCDBId(path, firstRun, lastRun, version); |
2b7af22a | 137 | metaData = new AliCDBMetaData(); |
138 | metaData->SetResponsible("dimuon HLT"); | |
139 | metaData->SetComment("Trigger reconstructor configuration parameters for dimuon HLT."); | |
140 | storage->Put(params, id, metaData); | |
141 | ||
ffc1a6f6 | 142 | // Create and store the configuration parameters for the hit reconstructor. |
143 | params = new TMap; | |
144 | params->SetOwner(kTRUE); | |
3da1c6d7 | 145 | sprintf(valstr, "%d", dccut); |
146 | params->Add(new TObjString("dccut"), new TObjString(valstr)); | |
ffc1a6f6 | 147 | |
148 | path = AliHLTMUONConstants::HitReconstructorCDBPath(); | |
3da1c6d7 | 149 | id = AliCDBId(path, firstRun, lastRun, version); |
ffc1a6f6 | 150 | metaData = new AliCDBMetaData(); |
151 | metaData->SetResponsible("dimuon HLT"); | |
152 | metaData->SetComment("Hit reconstructor DC cut parameter for dimuon HLT."); | |
153 | storage->Put(params, id, metaData); | |
154 | ||
2b7af22a | 155 | // Create and store the configuration parameters for the Manso tracker. |
156 | params = new TMap; | |
157 | params->SetOwner(kTRUE); | |
3da1c6d7 | 158 | sprintf(valstr, "%8.8f", zmiddle); |
159 | params->Add(new TObjString("zmiddle"), new TObjString(valstr)); | |
160 | sprintf(valstr, "%8.8f", bfieldintegral); | |
161 | params->Add(new TObjString("bfieldintegral"), new TObjString(valstr)); | |
162 | sprintf(valstr, "%8.8f", roiParamAchamber7); | |
051e616e | 163 | params->Add(new TObjString("roi_paramA_chamber7"), new TObjString(valstr)); |
3da1c6d7 | 164 | sprintf(valstr, "%8.8f", roiParamBchamber7); |
051e616e | 165 | params->Add(new TObjString("roi_paramB_chamber7"), new TObjString(valstr)); |
3da1c6d7 | 166 | sprintf(valstr, "%8.8f", roiParamAchamber8); |
051e616e | 167 | params->Add(new TObjString("roi_paramA_chamber8"), new TObjString(valstr)); |
3da1c6d7 | 168 | sprintf(valstr, "%8.8f", roiParamBchamber8); |
051e616e | 169 | params->Add(new TObjString("roi_paramB_chamber8"), new TObjString(valstr)); |
3da1c6d7 | 170 | sprintf(valstr, "%8.8f", roiParamAchamber9); |
051e616e | 171 | params->Add(new TObjString("roi_paramA_chamber9"), new TObjString(valstr)); |
3da1c6d7 | 172 | sprintf(valstr, "%8.8f", roiParamBchamber9); |
051e616e | 173 | params->Add(new TObjString("roi_paramB_chamber9"), new TObjString(valstr)); |
3da1c6d7 | 174 | sprintf(valstr, "%8.8f", roiParamAchamber10); |
051e616e | 175 | params->Add(new TObjString("roi_paramA_chamber10"), new TObjString(valstr)); |
3da1c6d7 | 176 | sprintf(valstr, "%8.8f", roiParamBchamber10); |
051e616e | 177 | params->Add(new TObjString("roi_paramB_chamber10"), new TObjString(valstr)); |
3da1c6d7 | 178 | sprintf(valstr, "%8.8f", chamber7postion); |
179 | params->Add(new TObjString("chamber7postion"), new TObjString(valstr)); | |
180 | sprintf(valstr, "%8.8f", chamber8postion); | |
181 | params->Add(new TObjString("chamber8postion"), new TObjString(valstr)); | |
182 | sprintf(valstr, "%8.8f", chamber9postion); | |
183 | params->Add(new TObjString("chamber9postion"), new TObjString(valstr)); | |
184 | sprintf(valstr, "%8.8f", chamber10postion); | |
185 | params->Add(new TObjString("chamber10postion"), new TObjString(valstr)); | |
186 | sprintf(valstr, "%8.8f", chamber11postion); | |
187 | params->Add(new TObjString("chamber11postion"), new TObjString(valstr)); | |
188 | sprintf(valstr, "%8.8f", chamber13postion); | |
189 | params->Add(new TObjString("chamber13postion"), new TObjString(valstr)); | |
2b7af22a | 190 | |
191 | path = AliHLTMUONConstants::MansoTrackerFSMCDBPath(); | |
3da1c6d7 | 192 | id = AliCDBId(path, firstRun, lastRun, version); |
2b7af22a | 193 | metaData = new AliCDBMetaData(); |
194 | metaData->SetResponsible("dimuon HLT"); | |
195 | metaData->SetComment("Manso tracker FSM component configuration parameters for dimuon HLT."); | |
196 | storage->Put(params, id, metaData); | |
197 | ||
c9537879 | 198 | // Create and store the configuration parameters for the trigger decision cuts. |
ffc1a6f6 | 199 | params = new TMap; |
200 | params->SetOwner(kTRUE); | |
3da1c6d7 | 201 | sprintf(valstr, "%8.8f", lowptcut); |
202 | params->Add(new TObjString("lowptcut"), new TObjString(valstr)); | |
203 | sprintf(valstr, "%8.8f", highptcut); | |
204 | params->Add(new TObjString("highptcut"), new TObjString(valstr)); | |
205 | sprintf(valstr, "%8.8f", lowmasscut); | |
206 | params->Add(new TObjString("lowmasscut"), new TObjString(valstr)); | |
207 | sprintf(valstr, "%8.8f", highmasscut); | |
208 | params->Add(new TObjString("highmasscut"), new TObjString(valstr)); | |
c9537879 | 209 | |
ffc1a6f6 | 210 | path = AliHLTMUONConstants::DecisionComponentCDBPath(); |
3da1c6d7 | 211 | id = AliCDBId(path, firstRun, lastRun, version); |
ffc1a6f6 | 212 | metaData = new AliCDBMetaData(); |
c9537879 | 213 | metaData->SetResponsible("dimuon HLT"); |
214 | metaData->SetComment("Trigger decision cuts for dimuon HLT."); | |
ffc1a6f6 | 215 | storage->Put(params, id, metaData); |
c9537879 | 216 | } |