]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSOnlineSDDCMN.cxx
Add class to access simulation parameters, AliEMCALSimParam, to be set in configurati...
[u/mrichter/AliRoot.git] / ITS / AliITSOnlineSDDCMN.cxx
index 83450fd13879f62b9a4ca06d321c76669958e2c9..cb24f9e3deb123ccacb5d67aa06aa78dff09f25a 100644 (file)
@@ -106,10 +106,8 @@ void  AliITSOnlineSDDCMN::ValidateAnodes(){
 }
 
 //______________________________________________________________________
-void AliITSOnlineSDDCMN::AddEvent(TH2F* hrawd){
+TH2F* AliITSOnlineSDDCMN::GetCleanEvent(TH2F* hrawd) const {
   // 
-  fNEvents++;
-  const Int_t kTimeBins=fLastGoodTB+1;
   TH2F* hcorrd=new TH2F("hcorrd","",hrawd->GetNbinsX(),hrawd->GetXaxis()->GetXmin(),hrawd->GetXaxis()->GetXmax(),hrawd->GetNbinsY(),hrawd->GetYaxis()->GetXmin(),hrawd->GetYaxis()->GetXmax());
   for(Int_t itb=fFirstGoodTB;itb<=fLastGoodTB;itb++){
     Float_t sumEven=0., sumOdd=0.;
@@ -133,14 +131,24 @@ void AliITSOnlineSDDCMN::AddEvent(TH2F* hrawd){
       hcorrd->SetBinContent(itb+1,ian+1,cntCorr);
     }
   }
+  return hcorrd;
+}
+//______________________________________________________________________
+void AliITSOnlineSDDCMN::AddEvent(TH2F* hrawd){
+  // 
+  fNEvents++;
+  TH2F* hcorrd=GetCleanEvent(hrawd);
 
   for(Int_t ian=0;ian<fgkNAnodes;ian++){
     if(!fGoodAnode[ian]) continue;
     Float_t sumQ=0.;
+    Int_t cnt=0;
     for(Int_t itb=fFirstGoodTB;itb<=fLastGoodTB;itb++){
-      sumQ+=TMath::Power(hcorrd->GetBinContent(itb+1,ian+1)-fBaseline[ian],2);      
+      Float_t cntdiff=hcorrd->GetBinContent(itb+1,ian+1)-fBaseline[ian];
+      sumQ+=cntdiff*cntdiff;
+      cnt++;    
     }
-    fSumCorrNoise[ian]+=TMath::Sqrt(sumQ/(Float_t)kTimeBins);
+    fSumCorrNoise[ian]+=TMath::Sqrt(sumQ/(Float_t)cnt);
   }
   delete hcorrd;
 }
@@ -175,7 +183,7 @@ void AliITSOnlineSDDCMN::WriteToASCII(){
 TH1F* AliITSOnlineSDDCMN::GetBaselineAnodeHisto() const {
   //
   Char_t hisnam[20];  
-  sprintf(hisnam,"hbd%02dc%02ds%d",fDDL,fCarlos,fSide);
+  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));
@@ -186,7 +194,7 @@ TH1F* AliITSOnlineSDDCMN::GetBaselineAnodeHisto() const {
 TH1F* AliITSOnlineSDDCMN::GetRawNoiseAnodeHisto() const {
   //
   Char_t hisnam[20];  
-  sprintf(hisnam,"hnd%02dc%02ds%d",fDDL,fCarlos,fSide);
+  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));
@@ -197,7 +205,7 @@ TH1F* AliITSOnlineSDDCMN::GetRawNoiseAnodeHisto() const {
 TH1F* AliITSOnlineSDDCMN::GetCorrNoiseAnodeHisto() const {
   //
   Char_t hisnam[20];  
-  sprintf(hisnam,"hcd%02dc%02ds%d",fDDL,fCarlos,fSide);
+  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));
@@ -205,6 +213,28 @@ TH1F* AliITSOnlineSDDCMN::GetCorrNoiseAnodeHisto() const {
   return h;
 }
 //______________________________________________________________________
+TH1F* AliITSOnlineSDDCMN::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* AliITSOnlineSDDCMN::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* AliITSOnlineSDDCMN::GetBaselineHisto() const {
   //
   Char_t hisnam[20];