@@ -93,6 +93,9 @@ struct qVectorsTable {
9393 Configurable<float > cfgMaxPtOnTPC{" cfgMaxPtOnTPC" , 5 ., " maximum transverse momentum selection for TPC tracks participating in Q-vector reconstruction" };
9494 Configurable<int > cfgnMod{" cfgnMod" , 2 , " Modulation of interest" };
9595
96+ Configurable<std::string> cfgGainEqPath{" cfgGainEqPath" , " Users/j/junlee/Qvector/GainEq/FT0" , " CCDB path for gain equalization constants" };
97+ Configurable<std::string> cfgQvecCalibPath{" cfgQvecCalibPath" , " Analysis/EventPlane/QVecCorrections" , " CCDB pasth for Q-vecteor calibration constants" };
98+
9699 ConfigurableAxis cfgaxisFITamp{" cfgaxisFITamp" , {1000 , 0 , 5000 }, " " };
97100
98101 // Table.
@@ -155,9 +158,12 @@ struct qVectorsTable {
155158 LOGF (fatal, " Could not get the alignment parameters for FV0." );
156159 }
157160
161+ std::string fullPath;
158162 if (cfgCCDBConst == 1 ) {
159- if (!(ccdb->getForTimeStamp <std::vector<float >>(" Analysis/EventPlane/QVecCorrections/FT0C" , cfgCcdbParam.nolaterthan .value ))->empty ()) {
160- cfgCorr.push_back (*(ccdb->getForTimeStamp <std::vector<float >>(" Analysis/EventPlane/QVecCorrections/FT0C" , cfgCcdbParam.nolaterthan .value )));
163+ fullPath = cfgQvecCalibPath;
164+ fullPath += " /FT0C" ;
165+ if (!(ccdb->getForTimeStamp <std::vector<float >>(fullPath, cfgCcdbParam.nolaterthan .value ))->empty ()) {
166+ cfgCorr.push_back (*(ccdb->getForTimeStamp <std::vector<float >>(fullPath, cfgCcdbParam.nolaterthan .value )));
161167 } else {
162168 if (cfgFT0CCorr->size () < 48 ) {
163169 LOGF (fatal, " No proper correction factor assigned for FT0C" );
@@ -166,8 +172,10 @@ struct qVectorsTable {
166172 }
167173 }
168174
169- if (!(ccdb->getForTimeStamp <std::vector<float >>(" Analysis/EventPlane/QVecCorrections/FT0A" , cfgCcdbParam.nolaterthan .value ))->empty ()) {
170- cfgCorr.push_back (*(ccdb->getForTimeStamp <std::vector<float >>(" Analysis/EventPlane/QVecCorrections/FT0A" , cfgCcdbParam.nolaterthan .value )));
175+ fullPath = cfgQvecCalibPath;
176+ fullPath += " /FT0A" ;
177+ if (!(ccdb->getForTimeStamp <std::vector<float >>(fullPath, cfgCcdbParam.nolaterthan .value ))->empty ()) {
178+ cfgCorr.push_back (*(ccdb->getForTimeStamp <std::vector<float >>(fullPath, cfgCcdbParam.nolaterthan .value )));
171179 } else {
172180 if (cfgFT0ACorr->size () < 48 ) {
173181 LOGF (fatal, " No proper correction factor assigned for FT0A" );
@@ -176,8 +184,10 @@ struct qVectorsTable {
176184 }
177185 }
178186
179- if (!(ccdb->getForTimeStamp <std::vector<float >>(" Analysis/EventPlane/QVecCorrections/FT0M" , cfgCcdbParam.nolaterthan .value ))->empty ()) {
180- cfgCorr.push_back (*(ccdb->getForTimeStamp <std::vector<float >>(" Analysis/EventPlane/QVecCorrections/FT0M" , cfgCcdbParam.nolaterthan .value )));
187+ fullPath = cfgQvecCalibPath;
188+ fullPath += " /FT0M" ;
189+ if (!(ccdb->getForTimeStamp <std::vector<float >>(fullPath, cfgCcdbParam.nolaterthan .value ))->empty ()) {
190+ cfgCorr.push_back (*(ccdb->getForTimeStamp <std::vector<float >>(fullPath, cfgCcdbParam.nolaterthan .value )));
181191 } else {
182192 if (cfgFT0MCorr->size () < 48 ) {
183193 LOGF (fatal, " No proper correction factor assigned for FT0M" );
@@ -186,8 +196,10 @@ struct qVectorsTable {
186196 }
187197 }
188198
189- if (!(ccdb->getForTimeStamp <std::vector<float >>(" Analysis/EventPlane/QVecCorrections/FT0C" , cfgCcdbParam.nolaterthan .value ))->empty ()) {
190- cfgCorr.push_back (*(ccdb->getForTimeStamp <std::vector<float >>(" Analysis/EventPlane/QVecCorrections/FT0C" , cfgCcdbParam.nolaterthan .value )));
199+ fullPath = cfgQvecCalibPath;
200+ fullPath += " /FT0C" ; // no FV0A, will be adapted.
201+ if (!(ccdb->getForTimeStamp <std::vector<float >>(fullPath, cfgCcdbParam.nolaterthan .value ))->empty ()) {
202+ cfgCorr.push_back (*(ccdb->getForTimeStamp <std::vector<float >>(fullPath, cfgCcdbParam.nolaterthan .value )));
191203 } else {
192204 if (cfgFV0ACorr->size () < 48 ) {
193205 LOGF (fatal, " No proper correction factor assigned for FV0A" );
@@ -196,8 +208,10 @@ struct qVectorsTable {
196208 }
197209 } // no FV0A
198210
199- if (!(ccdb->getForTimeStamp <std::vector<float >>(" Analysis/EventPlane/QVecCorrections/BPos" , cfgCcdbParam.nolaterthan .value ))->empty ()) {
200- cfgCorr.push_back (*(ccdb->getForTimeStamp <std::vector<float >>(" Analysis/EventPlane/QVecCorrections/BPos" , cfgCcdbParam.nolaterthan .value )));
211+ fullPath = cfgQvecCalibPath;
212+ fullPath += " /BPos" ;
213+ if (!(ccdb->getForTimeStamp <std::vector<float >>(fullPath, cfgCcdbParam.nolaterthan .value ))->empty ()) {
214+ cfgCorr.push_back (*(ccdb->getForTimeStamp <std::vector<float >>(fullPath, cfgCcdbParam.nolaterthan .value )));
201215 } else {
202216 if (cfgBPosCorr->size () < 48 ) {
203217 LOGF (fatal, " No proper correction factor assigned for BPos" );
@@ -206,8 +220,10 @@ struct qVectorsTable {
206220 }
207221 }
208222
209- if (!(ccdb->getForTimeStamp <std::vector<float >>(" Analysis/EventPlane/QVecCorrections/BNeg" , cfgCcdbParam.nolaterthan .value ))->empty ()) {
210- cfgCorr.push_back (*(ccdb->getForTimeStamp <std::vector<float >>(" Analysis/EventPlane/QVecCorrections/BNeg" , cfgCcdbParam.nolaterthan .value )));
223+ fullPath = cfgQvecCalibPath;
224+ fullPath += " /BNeg" ;
225+ if (!(ccdb->getForTimeStamp <std::vector<float >>(fullPath, cfgCcdbParam.nolaterthan .value ))->empty ()) {
226+ cfgCorr.push_back (*(ccdb->getForTimeStamp <std::vector<float >>(fullPath, cfgCcdbParam.nolaterthan .value )));
211227 } else {
212228 if (cfgBNegCorr->size () < 48 ) {
213229 LOGF (fatal, " No proper correction factor assigned for BNeg" );
@@ -248,8 +264,8 @@ struct qVectorsTable {
248264 RelGainConst.push_back (1 .);
249265 }
250266 } else if (cfgGainCor == 1 ) {
251- if (!(ccdb->getForTimeStamp <std::vector<float >>(" Users/j/junlee/Qvector/GainEq/FT0 " , cfgCcdbParam.nolaterthan .value ))->empty ()) {
252- RelGainConst = *(ccdb->getForTimeStamp <std::vector<float >>(" Users/j/junlee/Qvector/GainEq/FT0 " , cfgCcdbParam.nolaterthan .value ));
267+ if (!(ccdb->getForTimeStamp <std::vector<float >>(cfgGainEqPath , cfgCcdbParam.nolaterthan .value ))->empty ()) {
268+ RelGainConst = *(ccdb->getForTimeStamp <std::vector<float >>(cfgGainEqPath , cfgCcdbParam.nolaterthan .value ));
253269 } else {
254270 for (int i = 0 ; i < cfgFT0RelGain->size (); i++) {
255271 RelGainConst.push_back (1 .);
0 commit comments