]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSOnlineSDDTP.cxx
New task for ITS tracking check
[u/mrichter/AliRoot.git] / ITS / AliITSOnlineSDDTP.cxx
index 7b61639879c2b5b3d814e4b7b09ed89b777cc6ef..a4efc2766b5bdf37b9f949215237c05fb3e7dfe3 100644 (file)
@@ -152,8 +152,9 @@ void AliITSOnlineSDDTP::StatGain(Float_t &mean, Float_t  &rms){
   for(Int_t ian=0;ian<fgkNAnodes;ian++){
     if(!fGoodAnode[ian]) continue;
     if(fNEvents[ian]==0) continue;
-    sum+=GetChannelGain(ian);
-    sumq+=TMath::Power(GetChannelGain(ian),2);
+    Float_t chgain=GetChannelGain(ian);
+    sum+=chgain;
+    sumq+=chgain*chgain;
     cnt++;
   }
   if(cnt>0){ 
@@ -183,6 +184,72 @@ void AliITSOnlineSDDTP::WriteToASCII(){
   fclose(outf);  
 }
 //______________________________________________________________________
+TH1F* AliITSOnlineSDDTP::GetBaselineAnodeHisto() const {
+  //
+  Char_t hisnam[20];  
+  sprintf(hisnam,"hbase%02dc%02ds%d",fDDL,fCarlos,fSide);
+  TH1F* h=new TH1F(hisnam,"",256,-0.5,255.5);
+  for(Int_t ian=0;ian<fgkNAnodes;ian++){
+    h->SetBinContent(ian+1,GetAnodeBaseline(ian));
+  }
+  return h;
+}
+//______________________________________________________________________
+TH1F* AliITSOnlineSDDTP::GetRawNoiseAnodeHisto() const {
+  //
+  Char_t hisnam[20];  
+  sprintf(hisnam,"hnois%02dc%02ds%d",fDDL,fCarlos,fSide);
+  TH1F* h=new TH1F(hisnam,"",256,-0.5,255.5);
+  for(Int_t ian=0;ian<fgkNAnodes;ian++){
+    h->SetBinContent(ian+1,GetAnodeRawNoise(ian));
+  }
+  return h;
+}
+//______________________________________________________________________
+TH1F* AliITSOnlineSDDTP::GetCorrNoiseAnodeHisto() const {
+  //
+  Char_t hisnam[20];  
+  sprintf(hisnam,"hcorn%02dc%02ds%d",fDDL,fCarlos,fSide);
+  TH1F* h=new TH1F(hisnam,"",256,-0.5,255.5);
+  for(Int_t ian=0;ian<fgkNAnodes;ian++){
+    h->SetBinContent(ian+1,GetAnodeCorrNoise(ian));
+  }
+  return h;
+}
+//______________________________________________________________________
+TH1F* AliITSOnlineSDDTP::GetCMNCoefAnodeHisto() const {
+//
+  Char_t hisnam[20];  
+  sprintf(hisnam,"hcmn%02dc%02ds%d",fDDL,fCarlos,fSide);
+  TH1F* h=new TH1F(hisnam,"",256,-0.5,255.5);
+  for(Int_t ian=0;ian<fgkNAnodes;ian++){
+    h->SetBinContent(ian+1,GetAnodeCommonMode(ian));
+  }
+  return h;
+}
+//______________________________________________________________________
+TH1F* AliITSOnlineSDDTP::GetStatusAnodeHisto() const {
+//
+  Char_t hisnam[20];  
+  sprintf(hisnam,"hgood%02dc%02ds%d",fDDL,fCarlos,fSide);
+  TH1F* h=new TH1F(hisnam,"",256,-0.5,255.5);
+  for(Int_t ian=0;ian<fgkNAnodes;ian++){
+    h->SetBinContent(ian+1,float(IsAnodeGood(ian)));
+  }
+  return h;
+}
+//______________________________________________________________________
+TH1F* AliITSOnlineSDDTP::GetGainAnodeHisto() const {
+//
+  Char_t hisnam[20];  
+  sprintf(hisnam,"hgain%02dc%02ds%d",fDDL,fCarlos,fSide);
+  TH1F* h=new TH1F(hisnam,"",256,-0.5,255.5);
+  for(Int_t ian=0;ian<fgkNAnodes;ian++){
+    h->SetBinContent(ian+1,GetChannelGain(ian));
+  }
+  return h;
+}
+//______________________________________________________________________
 Bool_t AliITSOnlineSDDTP::WriteToROOT(TFile *fil){
   //
   if(fil==0){ 
@@ -203,6 +270,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 +279,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 +287,7 @@ Bool_t AliITSOnlineSDDTP::WriteToROOT(TFile *fil){
   hcmn.Write();
   hcorn.Write();
   hgain.Write();
+  htptb.Write();
   return kTRUE;
 }