Updates on gain and drift speed analysis for SDD (F. Prino)
authorprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 24 Sep 2008 12:37:47 +0000 (12:37 +0000)
committerprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 24 Sep 2008 12:37:47 +0000 (12:37 +0000)
ITS/AliITSOnlineSDDInjectors.cxx
ITS/AliITSOnlineSDDTP.cxx
ITS/AnalyzeSDDGainAllMod.C
ITS/AnalyzeSDDInjectorsAllMod.C
ITS/AnalyzeSDDNoiseAllMod.C

index 9a2a202..748b371 100644 (file)
@@ -369,10 +369,12 @@ void AliITSOnlineSDDInjectors::FindGoodInjectors(){
       for(Int_t jjj=fTbMin[jlin];jjj<fTbMax[jlin];jjj++){
        Float_t c1=fHisto->GetBinContent(jjj,ian+1);
        Float_t c2=fHisto->GetBinContent(jjj+1,ian+1);
-       Float_t c3=fHisto->GetBinContent(jjj+2,ian+1);
-       if(c1>fLowThreshold && c2>fHighThreshold && c3>fLowThreshold){ 
-         fGoodInj[jpad][jlin]=1;
-         break;
+       //      Float_t c3=fHisto->GetBinContent(jjj+2,ian+1);
+       if(c1>fLowThreshold && c2>fLowThreshold){ 
+         if(c1>fHighThreshold || c2>fHighThreshold){
+           fGoodInj[jpad][jlin]=1;
+           break;
+         }
        }
       }
     }
index 7b61639..d6a5816 100644 (file)
@@ -203,6 +203,8 @@ Bool_t AliITSOnlineSDDTP::WriteToROOT(TFile *fil){
   TH1F hcorn(hisnam,"",256,-0.5,255.5);
   sprintf(hisnam,"hgain%02dc%02ds%d",fDDL,fCarlos,fSide);
   TH1F hgain(hisnam,"",256,-0.5,255.5);
+  sprintf(hisnam,"htptb%02dc%02ds%d",fDDL,fCarlos,fSide);
+  TH1F htptb(hisnam,"",256,-0.5,255.5);
   for(Int_t ian=0;ian<fgkNAnodes;ian++){
     hgood.SetBinContent(ian+1,float(IsAnodeGood(ian)));
     hbase.SetBinContent(ian+1,GetAnodeBaseline(ian));
@@ -210,6 +212,7 @@ Bool_t AliITSOnlineSDDTP::WriteToROOT(TFile *fil){
     hcmn.SetBinContent(ian+1,GetAnodeCommonMode(ian));
     hcorn.SetBinContent(ian+1,GetAnodeCorrNoise(ian));
     hgain.SetBinContent(ian+1,GetChannelGain(ian));
+    htptb.SetBinContent(ian+1,GetTimeBinTPPeak(ian));
   }
   hgood.Write();
   hbase.Write();
@@ -217,6 +220,7 @@ Bool_t AliITSOnlineSDDTP::WriteToROOT(TFile *fil){
   hcmn.Write();
   hcorn.Write();
   hgain.Write();
+  htptb.Write();
   return kTRUE;
 }
 
index aac4f9d..f33c8b4 100644 (file)
@@ -220,10 +220,10 @@ void AnalyzeSDDGainAllMod(Char_t *datafil, Int_t nDDL, Int_t firstEv=10, Int_t l
 
 }
 
-void AnalyzeSDDGainAllMod(Int_t nrun, Int_t n2, Int_t nDDL=0, Int_t firstEv=10, Int_t lastEv=18, Float_t pascalDAC=100){
+void AnalyzeSDDGainAllMod(Int_t nrun, Int_t n2, Char_t* dir="LHC08d_SDD", Int_t nDDL=0, Int_t firstEv=15, Int_t lastEv=20, Float_t pascalDAC=100){
   TGrid::Connect("alien:",0,0,"t");
   Char_t filnam[200];
-  sprintf(filnam,"alien:///alice/data/2008/LHC08c_SDD/%09d/raw/08%09d%03d.10.root",nrun,nrun,n2);
+  sprintf(filnam,"alien:///alice/data/2008/%s/%09d/raw/08%09d%03d.10.root",dir,nrun,nrun,n2);
   printf("Open file %s\n",filnam);
   AnalyzeSDDGainAllMod(filnam,nDDL,firstEv,lastEv,pascalDAC);
 }
index 6101c4f..bca3667 100644 (file)
@@ -59,10 +59,11 @@ void AnalyzeSDDInjectorsAllMod(Char_t *datafil, Int_t nDDL, Int_t firstEv=10, In
   }
   TGraph *gvvsmod0=new TGraph(0);
   TGraph *gvvsmod1=new TGraph(0);
+  TH1F* hanst=new TH1F("hanst","",8,-0.5,7.5);
 
-  TCanvas* c0 = new TCanvas("c0","",900,900);
+  TCanvas* c0 = new TCanvas("c0","Event display",900,900);
   gStyle->SetPalette(1);
-  TCanvas* c1 = new TCanvas("c1","",900,900);
+  TCanvas* c1 = new TCanvas("c1","Drift Speed vs. anode",900,900);
   Char_t text[50];
 
   Int_t iev=firstEv;
@@ -114,11 +115,17 @@ void AnalyzeSDDInjectorsAllMod(Char_t *datafil, Int_t nDDL, Int_t firstEv=10, In
          anal[index]->AnalyzeEvent(histo[index]); 
          anal[index]->WriteToASCII(iev,timeSt,nWrittenEv[index]);
          nWrittenEv[index]++;
-         if(iev==firstEv && anal[index]->GetInjPadStatus(16)>=6){
-           Float_t vel=anal[index]->GetDriftSpeed(16);
-           Int_t iMod=dmap->GetModuleNumber(iddl,imod);
-           if(isid==0) gvvsmod0->SetPoint(gvvsmod0->GetN(),(Float_t)iMod,vel);
-           if(isid==1) gvvsmod1->SetPoint(gvvsmod1->GetN(),(Float_t)iMod,vel);
+         Int_t iMod=dmap->GetModuleNumber(iddl,imod);
+         if(iMod!=-1 && iev==firstEv){
+           for(Int_t ipad=0;ipad<33;ipad++){
+             Int_t st=anal[index]->GetInjPadStatus(ipad);
+             hanst->Fill(st);
+           }
+           if(anal[index]->GetInjPadStatus(16)>=6){
+             Float_t vel=anal[index]->GetDriftSpeed(16);
+             if(isid==0) gvvsmod0->SetPoint(gvvsmod0->GetN(),(Float_t)iMod,vel);
+             if(isid==1) gvvsmod1->SetPoint(gvvsmod1->GetN(),(Float_t)iMod,vel);
+           }
          }
          if(iddl==nDDL){
            Int_t index2=kSides*imod+isid;
@@ -159,7 +166,7 @@ void AnalyzeSDDInjectorsAllMod(Char_t *datafil, Int_t nDDL, Int_t firstEv=10, In
     printf(" --- OK\n");
   }while(rd->NextEvent()&&iev<=lastEv);
 
-  TCanvas* c8=new TCanvas("c8");
+  TCanvas* c8=new TCanvas("c8","Drift Speed vs. mod");
   gvvsmod0->SetTitle("");
   gvvsmod1->SetTitle("");
 
@@ -185,12 +192,17 @@ void AnalyzeSDDInjectorsAllMod(Char_t *datafil, Int_t nDDL, Int_t firstEv=10, In
   lin->SetLineColor(4);
   lin->Draw();
   c8->Update();
+
+  TCanvas* c9=new TCanvas("c9","Injector status");
+  hanst->Draw();
+  hanst->GetXaxis()->SetTitle("Injector pad status");
+  hanst->GetXaxis()->CenterTitle();
 }
 
-void AnalyzeSDDInjectorsAllMod(Int_t nrun, Int_t n2, Int_t nDDL=0, Int_t firstEv=10, Int_t lastEv=15){
+void AnalyzeSDDInjectorsAllMod(Int_t nrun, Int_t n2, Char_t* dir="LHC08d_SDD", Int_t nDDL=0, Int_t firstEv=15, Int_t lastEv=15){
   TGrid::Connect("alien:",0,0,"t");
   Char_t filnam[200];
-  sprintf(filnam,"alien:///alice/data/2008/LHC08c_SDD/%09d/raw/08%09d%03d.10.root",nrun,nrun,n2);
+  sprintf(filnam,"alien:///alice/data/2008/%s/%09d/raw/08%09d%03d.10.root",dir,nrun,nrun,n2);
   printf("Open file %s\n",filnam);
   AnalyzeSDDInjectorsAllMod(filnam,nDDL,firstEv,lastEv);
 }
index 78d64d3..3d4c605 100644 (file)
@@ -365,10 +365,10 @@ void AnalyzeSDDNoiseAllMod(Char_t *datafil, Int_t nDDL, Int_t firstEv=10, Int_t
 
 }
 
-void AnalyzeSDDNoiseAllMod(Int_t nrun, Int_t n2, Int_t nDDL=0, Int_t firstEv=10, Int_t lastEv=15){
+void AnalyzeSDDNoiseAllMod(Int_t nrun, Int_t n2, Char_t* dir="LHC08d_SDD",Int_t nDDL=0, Int_t firstEv=15, Int_t lastEv=18){
   TGrid::Connect("alien:",0,0,"t");
   Char_t filnam[200];
-  sprintf(filnam,"alien:///alice/data/2008/LHC08c_SDD/%09d/raw/08%09d%03d.10.root",nrun,nrun,n2);
+  sprintf(filnam,"alien:///alice/data/2008/%s/%09d/raw/08%09d%03d.10.root",dir,nrun,nrun,n2);
   printf("Open file %s\n",filnam);
   AnalyzeSDDNoiseAllMod(filnam,nDDL,firstEv,lastEv);
 }