]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSPlaneEffSDD.cxx
Fix for
[u/mrichter/AliRoot.git] / ITS / AliITSPlaneEffSDD.cxx
index 45e9af9b7f244a45566e197667b095fb86d77b9f..530dc9cbe96020e48d6e5c991e6a03adf93d81f8 100644 (file)
@@ -23,7 +23,7 @@
 //
 ///////////////////////////////////////////////////////////////////////////
 
-/* $Id:$ */
+/* $Id$ */
 
 #include <TMath.h>
 #include <TH1F.h>
@@ -768,6 +768,9 @@ void AliITSPlaneEffSDD::InitHistos() {
   TString histnameClusErrX="HistClusErrX_mod_";
   TString histnameClusErrZ="HistClusErrZ_mod_";
 //
+
+  TH1::AddDirectory(kFALSE);
+
   fHisResX=new TH1F*[kNHisto];
   fHisResZ=new TH1F*[kNHisto];
   fHisResXZ=new TH2F*[kNHisto];
@@ -787,19 +790,19 @@ void AliITSPlaneEffSDD::InitHistos() {
   for (Int_t nhist=0;nhist<kNHisto;nhist++){
     aux=histnameResX;
     aux+=nhist;
-    fHisResX[nhist]=new TH1F("histname","histname",1500,-0.30,0.30); // +- 3000 micron; 1 bin=4 micron
+    fHisResX[nhist]=new TH1F("histname","histname",2000,-0.40,0.40); // +- 4000 micron; 1 bin=4 micron
     fHisResX[nhist]->SetName(aux.Data());
     fHisResX[nhist]->SetTitle(aux.Data());
 
     aux=histnameResZ;
     aux+=nhist;
-    fHisResZ[nhist]=new TH1F("histname","histname",500,-0.15,0.15); // +-1500 micron; 1 bin=6 micron
+    fHisResZ[nhist]=new TH1F("histname","histname",1000,-0.30,0.30); // +-3000 micron; 1 bin=6 micron
     fHisResZ[nhist]->SetName(aux.Data());
     fHisResZ[nhist]->SetTitle(aux.Data());
 
     aux=histnameResXZ;
     aux+=nhist;
-    fHisResXZ[nhist]=new TH2F("histname","histname",50,-0.2,0.2,30,-0.12,0.12); // binning:
+    fHisResXZ[nhist]=new TH2F("histname","histname",100,-0.4,0.4,60,-0.24,0.24); // binning:
                                                                                    // 80 micron in x; 
                                                                                    // 80 micron in z; 
     fHisResXZ[nhist]->SetName(aux.Data());
@@ -832,7 +835,7 @@ void AliITSPlaneEffSDD::InitHistos() {
       aux+=nhist;
       aux+="_clu_";
       aux+=clu+1; // clu=0 --> cluster size 1
-      fHisResZclu[nhist][clu]=new TH1F("histname","histname",500,-0.15,0.15); // +-1500 micron; 1 bin=6 micron
+      fHisResZclu[nhist][clu]=new TH1F("histname","histname",1000,-0.30,0.30); // +-3000 micron; 1 bin=6 micron
       fHisResZclu[nhist][clu]->SetName(aux.Data());
       fHisResZclu[nhist][clu]->SetTitle(aux.Data());
     }
@@ -863,7 +866,7 @@ void AliITSPlaneEffSDD::InitHistos() {
 
     aux=histnameTrackErrX;
     aux+=nhist;
-    fHisTrackErrX[nhist]=new TH1F("histname","histname",200,0.,0.16); // 0-1600 micron; 1 bin=8 micron
+    fHisTrackErrX[nhist]=new TH1F("histname","histname",500,0.,0.50); // 0-5000 micron; 1 bin=10 micron
     fHisTrackErrX[nhist]->SetName(aux.Data());
     fHisTrackErrX[nhist]->SetTitle(aux.Data());
 
@@ -875,17 +878,20 @@ void AliITSPlaneEffSDD::InitHistos() {
 
     aux=histnameClusErrX;
     aux+=nhist;
-    fHisClusErrX[nhist]=new TH1F("histname","histname",200,0.,0.04); //  0-400 micron; 1 bin=2 micron
+    fHisClusErrX[nhist]=new TH1F("histname","histname",400,0.,0.24); //  0-2400 micron; 1 bin=6 micron
     fHisClusErrX[nhist]->SetName(aux.Data());
     fHisClusErrX[nhist]->SetTitle(aux.Data());
 
     aux=histnameClusErrZ;
     aux+=nhist;
-    fHisClusErrZ[nhist]=new TH1F("histname","histname",200,0.,0.16); //  0-1600 micron; 1 bin=8 micron
+    fHisClusErrZ[nhist]=new TH1F("histname","histname",400,0.,0.32); //  0-3200 micron; 1 bin=8 micron
     fHisClusErrZ[nhist]->SetName(aux.Data());
     fHisClusErrZ[nhist]->SetTitle(aux.Data());
 
   }
+
+  TH1::AddDirectory(kTRUE);
+
 return;
 }
 //__________________________________________________________
@@ -1012,7 +1018,7 @@ Bool_t AliITSPlaneEffSDD::WriteHistosToFile(TString filename, Option_t* option)
   // Saves the histograms into a tree and saves the trees into a file
   //
   if (!fHis) return kFALSE;
-  if (filename.Data()=="") {
+  if (filename.IsNull() || filename.IsWhitespace()) {
      AliWarning("WriteHistosToFile: null output filename!");
      return kFALSE;
   }
@@ -1099,7 +1105,7 @@ Bool_t AliITSPlaneEffSDD::ReadHistosFromFile(TString filename) {
   // Read histograms from an already existing file 
   //
   if (!fHis) return kFALSE;
-  if (filename.Data()=="") {
+  if (filename.IsNull() || filename.IsWhitespace()) {
      AliWarning("ReadHistosFromFile: incorrect output filename!");
      return kFALSE;
   }
@@ -1306,4 +1312,3 @@ Bool_t AliITSPlaneEffSDD::ReadHistosFromFile(TString filename) {
   }
 return kTRUE;
 }
-