Macros to chack SDD online calibrations updated for 2011 run
authorprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 16 Feb 2011 11:31:48 +0000 (11:31 +0000)
committerprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 16 Feb 2011 11:31:48 +0000 (11:31 +0000)
ITS/macrosSDD/PlotCalibSDDVsTime.C
ITS/macrosSDD/PlotDriftSpeedSDDVsTime.C
ITS/macrosSDD/ShowCalibrationSDD.C
ITS/macrosSDD/ShowDriftSpeedSDD.C
ITS/macrosSDD/ShowResponseSDD.C
ITS/macrosSDD/TrendQAtrainSDD.C

index f54404d..3be9d72 100644 (file)
@@ -21,7 +21,7 @@
 // created from PEDESTAL and PULSER runs vs. Time
 // Origin: F. Prino (prino@to.infn.it)
 
-void PlotCalibSDDVsTime(Int_t year=2010, Int_t firstRun=77677, 
+void PlotCalibSDDVsTime(Int_t year=2011, Int_t firstRun=142600, 
                        Int_t lastRun=999999999){
 
   gStyle->SetOptTitle(0);
index 8ad7487..f0276c8 100644 (file)
@@ -29,7 +29,7 @@
 
 void FillErrors(Float_t errSpeed[260]);
 
-void PlotDriftSpeedSDDVsTime(Int_t year=2010, Int_t firstRun=62840, 
+void PlotDriftSpeedSDDVsTime(Int_t year=2011, Int_t firstRun=142600, 
                             Int_t lastRun=999999999,
                             Int_t anode=128){
   TGrid::Connect("alien:",0,0,"t");
@@ -60,6 +60,11 @@ void PlotDriftSpeedSDDVsTime(Int_t year=2010, Int_t firstRun=62840,
   }
   Float_t Edrift=(1800-45)/291/0.012;  
   Int_t nrun,nrun2,nv,ns;
+  Float_t timeZero;
+  if(year==2009) timeZero=1247762992;
+  else if(year==2010) timeZero=1262300400;
+  else timeZero=1293861600;
+
   while(!feof(listruns)){
     fscanf(listruns,"%s\n",filnam);
     Char_t directory[100];
@@ -115,9 +120,6 @@ void PlotDriftSpeedSDDVsTime(Int_t year=2010, Int_t firstRun=62840,
       
       UInt_t timest=vdriftarr->GetTimestamp(0);
       if(timest==0) continue;
-      Float_t timeZero;
-      if(year==2009) timeZero=1247762992;
-      else timeZero=1262300400;
       if(timest<timeZero) continue;
       timeday=float(timest-timeZero)/60./60./24.;
       Float_t mob=vdrift*1.E5/Edrift;  
@@ -187,9 +189,11 @@ void PlotDriftSpeedSDDVsTime(Int_t year=2010, Int_t firstRun=62840,
   gvdrvstime[mod1]->SetMaximum(6.75);
   Char_t title[100];
   if(year==2009){
-  sprintf(title,"Time (days since July 16th 2009)");
+    sprintf(title,"Time (days since July 16th 2009)");
   }else if (year==2010){
-  sprintf(title,"Time (days since January 1st 2010)");
+    sprintf(title,"Time (days since January 1st 2010)");
+  }else{
+    sprintf(title,"Time (days since January 1st 2011)");
   }
   gvdrvstime[mod1]->GetXaxis()->SetTitle(title);
   gvdrvstime[mod1]->GetYaxis()->SetTitle("Drift speed (#mum/ns)");
index 817cf5d..a5f1696 100644 (file)
@@ -444,7 +444,7 @@ void ShowCalibrationSDD(Char_t *filnam="$ALICE_ROOT/OCDB/ITS/Calib/CalibSDD/Run0
   gbad->GetYaxis()->SetTitle("Anode Status (1=OK, 0=bad)");
 }
 
-void ShowCalibrationSDD(Int_t nrun, Int_t year=2010, Int_t nmod=0){
+void ShowCalibrationSDD(Int_t nrun, Int_t year=2011, Int_t nmod=0){
   TGrid::Connect("alien:",0,0,"t");
   TString cmd=Form("gbbox find \"/alice/data/%d/OCDB/ITS/Calib/CalibSDD\" \"Run%d*.root\" > run.txt",year,nrun);
   gSystem->Exec(cmd.Data());
index 47c9c82..e4be238 100644 (file)
@@ -386,7 +386,7 @@ void ShowDriftSpeedSDD(Char_t filnam[150]="$ALICE_ROOT/ITS/Calib/DriftSpeedSDD/R
 
 
 
-void ShowDriftSpeedSDD(Int_t nrun, Int_t year=2010, Int_t nv=-1){
+void ShowDriftSpeedSDD(Int_t nrun, Int_t year=2011, Int_t nv=-1){
   TGrid::Connect("alien:",0,0,"t");
   TString cmd=Form("gbbox find \"/alice/data/%d/OCDB/ITS/Calib/DriftSpeedSDD\" \"Run%d*.root\" > run.txt",year,nrun);
   if(nv>0){
index 8601b40..f47aed7 100644 (file)
@@ -32,6 +32,8 @@ void ShowResponseSDD(TString filename="$ALICE_ROOT/OCDB/ITS/Calib/RespSDD/Run0_9
   TH1F* hTimeZero=new TH1F("hTimeZero","",260,239.5,499.5);
   TH1F* hVdriftCorrLeft=new TH1F("hVdriftCorrLeft","",260,239.5,499.5);
   TH1F* hVdriftCorrRight=new TH1F("hVdriftCorrRight","",260,239.5,499.5);
+  TH1F* hdistVdriftCorrLeft=new TH1F("hdistVdriftCorrLeft","",100,-0.2,0.2);
+  TH1F* hdistVdriftCorrRight=new TH1F("hdistVdriftCorrRight","",100,-0.2,0.2);
   TH1F* hADCtokeV=new TH1F("hADCtokeV","",260,239.5,499.5);
   Float_t averTz=0.;
   Float_t averCv0=0.;
@@ -42,9 +44,11 @@ void ShowResponseSDD(TString filename="$ALICE_ROOT/OCDB/ITS/Calib/RespSDD/Run0_9
     Float_t cv0=r->GetDeltaVDrift(iMod,kFALSE);
     Float_t cv1=r->GetDeltaVDrift(iMod,kTRUE);
     Float_t ak=r->GetADCtokeV(iMod);
-    hTimeZero->SetBinContent(iMod-240+1,tz);
+    hTimeZero->SetBinContent(iMod-240+1,tz);    
     hVdriftCorrLeft->SetBinContent(iMod-240+1,cv0);
     hVdriftCorrRight->SetBinContent(iMod-240+1,cv1);
+    hdistVdriftCorrLeft->Fill(cv0);
+    hdistVdriftCorrRight->Fill(cv1);
     hADCtokeV->SetBinContent(iMod-240+1,ak);
     averTz+=tz;
     averCv0+=cv0;
@@ -75,7 +79,7 @@ void ShowResponseSDD(TString filename="$ALICE_ROOT/OCDB/ITS/Calib/RespSDD/Run0_9
     hVdriftCorrLeft->SetMinimum(-1.2*scale);
   }
 
-  gStyle->SetOptStat(0);
+  //  gStyle->SetOptStat(0);
 
   printf("Charge vs. Time correction factor = %f\n",r->GetChargevsTime());
 
@@ -103,6 +107,13 @@ void ShowResponseSDD(TString filename="$ALICE_ROOT/OCDB/ITS/Calib/RespSDD/Run0_9
   tc1->Draw();
   c2->Modified();
 
+  TCanvas* c2b=new TCanvas("c2b","Vdrift Corr");
+  hdistVdriftCorrLeft->Draw(); 
+  hdistVdriftCorrRight->SetLineColor(2);
+  hdistVdriftCorrRight->Draw("SAMES");
+  hdistVdriftCorrLeft->GetXaxis()->SetTitle("Vdrift correction (#mum/ns)");
+  c2b->Modified();
+
   TCanvas* c3=new TCanvas("c3","ADC calib");
   hADCtokeV->Draw("P");
   hADCtokeV->GetXaxis()->SetTitle("Module Id");
index f8dbe0d..0f99a50 100644 (file)
@@ -39,6 +39,7 @@ void TrendQAtrainSDD(TString period,
   Int_t year=0;
   if(period.Contains("LHC09")) year=2009;
   else if(period.Contains("LHC10")) year=2010;
+  else if(period.Contains("LHC11")) year=2011;
 
   TString outFilNam=Form("TrendingSDD_%s_%s_%s.root",period.Data(),recoPass.Data(),qaTrain1.Data());