@@ -38,7 +38,7 @@ struct CentralityTableTask {
3838 Configurable<int > estCL1{" estCL1" , -1 , {" Produces centrality percentiles using CL1 multiplicity. -1: auto, 0: don't, 1: yes. Default: auto (-1)" }};
3939
4040 int mRunNumber ;
41- bool mV0MCallibrationStored ;
41+ bool mV0MCalibrationStored ;
4242 TH1* mhVtxAmpCorrV0A;
4343 TH1* mhVtxAmpCorrV0C;
4444 TH1* mhMultSelCalibV0M;
@@ -69,11 +69,11 @@ struct CentralityTableTask {
6969 enable (" CL1" , estCL1);
7070 }
7171 }
72- ccdb->setURL (" http://alice- ccdb.cern.ch" );
72+ ccdb->setURL (" http://ccdb-test .cern.ch:8080 " );
7373 ccdb->setCaching (true );
7474 ccdb->setLocalObjectValidityChecking ();
7575 mRunNumber = 0 ;
76- mV0MCallibrationStored = false ;
76+ mV0MCalibrationStored = false ;
7777 mhVtxAmpCorrV0A = nullptr ;
7878 mhVtxAmpCorrV0C = nullptr ;
7979 mhMultSelCalibV0M = nullptr ;
@@ -88,49 +88,41 @@ struct CentralityTableTask {
8888 TList* callst = ccdb->getForTimeStamp <TList>(" Users/v/victor/Centrality" , bc.timestamp ());
8989
9090 if (callst != nullptr ) {
91- auto zvtxcalib = [callst](const char * tpname, const char * hname) {
92- TProfile* tp = (TProfile*)callst->FindObject (tpname);
93- TH1* h = new TH1F (TString::Format (" %s" , hname), TString::Format (" %s;#it{z}_{vtx}" , hname),
94- tp->GetNbinsX (), tp->GetXaxis ()->GetBinLowEdge (1 ), tp->GetXaxis ()->GetBinUpEdge (tp->GetNbinsX ()));
95- TF1 one = TF1 (" one" , " 1" , tp->GetXaxis ()->GetBinLowEdge (1 ), tp->GetXaxis ()->GetBinUpEdge (tp->GetNbinsX ()));
96- h->Reset ();
97- h->Add (&one, tp->GetMean (2 ));
98- h->Divide (tp);
99- return h;
100- };
101- auto multcalib = [callst](const char * ccdbhname, const char * hname) {
91+ auto getccdb = [callst](const char * ccdbhname, const char * hname) {
10292 TH1* h = (TH1*)callst->FindObject (ccdbhname)->Clone (hname);
10393 return h;
10494 };
10595 if (estV0M == 1 ) {
106- mhVtxAmpCorrV0A = zvtxcalib ( " hVtx_fAmplitude_V0A " , " zvtxCalibV0A" );
107- mhVtxAmpCorrV0C = zvtxcalib ( " hVtx_fAmplitude_V0C " , " zvtxCalibV0C" );
108- mhMultSelCalibV0M = multcalib (" hMultSelCalib_V0M" , " MultSelCalibV0M" );
96+ mhVtxAmpCorrV0A = getccdb ( " hVtx_fAmplitude_V0A_Normalized " , " zvtxCalibV0A" );
97+ mhVtxAmpCorrV0C = getccdb ( " hVtx_fAmplitude_V0C_Normalized " , " zvtxCalibV0C" );
98+ mhMultSelCalibV0M = getccdb (" hMultSelCalib_V0M" , " MultSelCalibV0M" );
10999 if ((mhVtxAmpCorrV0A != nullptr ) and (mhVtxAmpCorrV0C != nullptr ) and (mhMultSelCalibV0M != nullptr )) {
110- mV0MCallibrationStored = true ;
100+ mV0MCalibrationStored = true ;
101+ } else {
102+ LOGF (fatal, " Calibration information from V0M for run %d corrupted" );
111103 }
112104 }
113105 if (estSPD == 1 ) {
114- LOGF (fatal, " Calibraltion information estimated from SPD tracklets still not available" );
106+ LOGF (fatal, " Calibration information estimated from SPD tracklets still not available" );
115107 }
116108 if (estCL0 == 1 ) {
117- LOGF (fatal, " Calibraltion information estimated from CL0 still not available" );
109+ LOGF (fatal, " Calibration information estimated from CL0 still not available" );
118110 }
119111 if (estCL1 == 1 ) {
120- LOGF (fatal, " Calibraltion information estimated from CL1 still not available" );
112+ LOGF (fatal, " Calibration information estimated from CL1 still not available" );
121113 }
122- if (mV0MCallibrationStored ) {
114+ if (mV0MCalibrationStored ) {
123115 mRunNumber = bc.runNumber ();
124116 }
125117 } else {
126118 /* we dont change the run number to keep trying */
127- mV0MCallibrationStored = false ;
128- LOGF (error , " Centrality calibration is not available in CCDB for run=%d at timestamp=%llu" , bc.runNumber (), bc.timestamp ());
119+ mV0MCalibrationStored = false ;
120+ LOGF (fatal , " Centrality calibration is not available in CCDB for run=%d at timestamp=%llu" , bc.runNumber (), bc.timestamp ());
129121 }
130122 }
131123 if (estV0M == 1 ) {
132124 float centV0M = 105 .0f ;
133- if (mV0MCallibrationStored ) {
125+ if (mV0MCalibrationStored ) {
134126 float v0m = collision.multV0A () * mhVtxAmpCorrV0A->GetBinContent (mhVtxAmpCorrV0A->FindFixBin (collision.posZ ())) +
135127 collision.multV0C () * mhVtxAmpCorrV0C->GetBinContent (mhVtxAmpCorrV0C->FindFixBin (collision.posZ ()));
136128 centV0M = mhMultSelCalibV0M->GetBinContent (mhMultSelCalibV0M->FindFixBin (v0m));
0 commit comments