remove warnings during reloading the TRD track list in the prompt
authorabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 12 Dec 2008 18:35:28 +0000 (18:35 +0000)
committerabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 12 Dec 2008 18:35:28 +0000 (18:35 +0000)
reconstruction

TRD/qaRec/AliTRDcheckDetector.cxx
TRD/qaRec/AliTRDpidChecker.cxx

index f0b3825..3ae5592 100644 (file)
@@ -311,21 +311,63 @@ TObjArray *AliTRDcheckDetector::Histos(){
   
   fContainer = new TObjArray(25);
   // Register Histograms
-  fContainer->AddAt(new TH1F("hNtrks", "Number of Tracks per event", 100, 0, 100), kNTracksEventHist);
-  fContainer->AddAt(new TH1F("hEventsTriggerTracks", "Trigger Class (Tracks)", 100, 0, 100), kNEventsTriggerTracks);
-  fContainer->AddAt(new TH1F("hNcls", "Nr. of clusters per track", 181, -0.5, 180.5), kNclustersHist);
-  fContainer->AddAt(new TH1F("hNtls", "Nr. tracklets per track", 7, -0.5, 6.5), kNtrackletsHist);
-  fContainer->AddAt(new TH1F("hNtlsFindable", "Ratio of found/findable Tracklets" , 101, -0.005, 1.005), kNTrackletsVsFindable);
-  fContainer->AddAt(new TH1F("hNclTls","Mean Number of clusters per tracklet", 31, -0.5, 30.5), kNclusterTrackletHist);
-  fContainer->AddAt(new TH1F("hChi2", "Chi2", 200, 0, 20), kChi2);
-  fContainer->AddAt(new TH1F("hChi2n", "Norm. Chi2 (tracklets)", 50, 0, 5), kChi2Normalized);
-  fContainer->AddAt(new TH1F("hSM", "Track Counts in Supermodule", 18, -0.5, 17.5), kNTracksSectorHist);
-  // Detector signal on Detector-by-Detector basis
-  fContainer->AddAt(new TProfile("hPHdetector", "Average PH", 31, -0.5, 30.5), kPulseHeight);
-  fContainer->AddAt(new TProfile("hPHdistance", "Average PH", 31, -0.08, 4.88), kPulseHeightDistance);
-  fContainer->AddAt(new TH1F("hQclDetector", "Cluster charge", 200, 0, 1200), kClusterCharge);
-  fContainer->AddAt(new TH1F("hQTdetector", "Total Charge Deposit", 6000, 0, 6000), kChargeDeposit);
-  fContainer->AddAt(new TH1F("hEventsTrigger", "Trigger Class", 100, 0, 100), kNEventsTrigger);
+  TH1 * histptr = 0x0;
+  if(!(histptr = (TH1F *)gROOT->FindObject("hNtrks")))
+    histptr = new TH1F("hNtrks", "Number of Tracks per event", 100, 0, 100);
+  else histptr->Reset();
+  fContainer->AddAt(histptr, kNTracksEventHist);
+  if(!(histptr = (TH1F *)gROOT->FindObject("hEventsTriggerTracks")))
+    histptr = new TH1F("hEventsTriggerTracks", "Trigger Class (Tracks)", 100, 0, 100);
+  else histptr->Reset();
+  fContainer->AddAt(histptr, kNEventsTriggerTracks);
+  if(!(histptr = (TH1F *)gROOT->FindObject("hNcls")))
+    histptr = new TH1F("hNcls", "Nr. of clusters per track", 181, -0.5, 180.5);
+  else histptr->Reset();
+  fContainer->AddAt(histptr, kNclustersHist);
+  if(!(histptr = (TH1F *)gROOT->FindObject("hNtls")))
+    histptr = new TH1F("hNtls", "Nr. tracklets per track", 7, -0.5, 6.5);
+  else histptr->Reset();
+  fContainer->AddAt(histptr, kNtrackletsHist);
+  if(!(histptr = (TH1F *)gROOT->FindObject("hNtlsFindable")))
+    histptr = new TH1F("hNtlsFindable", "Ratio of found/findable Tracklets" , 101, -0.005, 1.005);
+  else histptr->Reset();
+  fContainer->AddAt(histptr, kNTrackletsVsFindable);
+  if(!(histptr = (TH1F *)gROOT->FindObject("hNclTls")))
+    histptr = new TH1F("hNclTls","Mean Number of clusters per tracklet", 31, -0.5, 30.5);
+  else histptr->Reset();
+  fContainer->AddAt(histptr, kNclusterTrackletHist);
+  if(!(histptr = (TH1F *)gROOT->FindObject("hChi2")))
+    histptr = new TH1F("hChi2", "Chi2", 200, 0, 20);
+  else histptr->Reset();
+  fContainer->AddAt(histptr, kChi2);
+  if(!(histptr = (TH1F *)gROOT->FindObject("hChi2n")))
+    histptr = new TH1F("hChi2n", "Norm. Chi2 (tracklets)", 50, 0, 5);
+  else histptr->Reset();
+  fContainer->AddAt(histptr, kChi2Normalized);
+  if(!(histptr = (TH1F *)gROOT->FindObject("hChi2n")))
+    histptr = new TH1F("hSM", "Track Counts in Supermodule", 18, -0.5, 17.5);
+  else histptr->Reset();
+  fContainer->AddAt(histptr, kNTracksSectorHist);
+  if(!(histptr = (TH1F *)gROOT->FindObject("hPHdetector")))
+    histptr = new TProfile("hPHdetector", "Average PH", 31, -0.5, 30.5);
+  else histptr->Reset();
+  fContainer->AddAt(histptr, kPulseHeight);
+  if(!(histptr = (TH1F *)gROOT->FindObject("hPHdistance")))
+    histptr = new TProfile("hPHdistance", "Average PH", 31, -0.08, 4.88);
+  else histptr->Reset();
+  fContainer->AddAt(histptr, kPulseHeightDistance);
+  if(!(histptr = (TH1F *)gROOT->FindObject("hQclDetector")))
+    histptr = new TH1F("hQclDetector", "Cluster charge", 200, 0, 1200);
+  else histptr->Reset();
+  fContainer->AddAt(histptr, kClusterCharge);
+  if(!(histptr = (TH1F *)gROOT->FindObject("hQTdetector")))
+    histptr = new TH1F("hQTdetector", "Total Charge Deposit", 6000, 0, 6000);
+  else histptr->Reset();
+  fContainer->AddAt(histptr, kChargeDeposit);
+  if(!(histptr = (TH1F *)gROOT->FindObject("hEventsTrigger")))
+    histptr = new TH1F("hEventsTrigger", "Trigger Class", 100, 0, 100);
+  else histptr->Reset();
+  fContainer->AddAt(histptr, kNEventsTrigger);
 
   return fContainer;
 }
@@ -693,7 +735,7 @@ TH1 *AliTRDcheckDetector::PlotPHSdistance(const AliTRDtrackV1 *track){
     AliWarning("No Histogram defined.");
     return 0x0;
   }
-  Int_t offset = AliTRDSimParam::Instance()->GetAnodeWireOffset();
+  Float_t offset = .5*AliTRDgeometry::CamHght();
   AliTRDseedV1 *tracklet = 0x0;
   AliTRDcluster *c = 0x0;
   Double_t distance = 0;
index cc2f989..2ce8601 100644 (file)
@@ -1,3 +1,4 @@
+#include "TROOT.h"
 #include "TPDGCode.h"
 #include "TCanvas.h"
 #include "TF1.h"
@@ -92,58 +93,73 @@ TObjArray * AliTRDpidChecker::Histos(){
   // histos of the electron probability of all 5 particle species and 11 momenta for the 2-dim LQ method 
   fEfficiency = new TObjArray(); fEfficiency->Expand(3);
   fContainer->AddAt(fEfficiency, kEfficiency);
-  fEfficiency->AddAt(new TH2F("PID_LQ", "", 
-      xBins, -0.5, xBins - 0.5,
-      AliTRDpidUtil::kBins, 0.-epsilon, 1.+epsilon)
-  ,kLQ);
-
+  
+  TH1 *h = 0x0;
+  if(!(h = (TH2F*)gROOT->FindObject("PID_LQ"))){
+    h = new TH2F("PID_LQ", "", xBins, -0.5, xBins - 0.5,
+      AliTRDpidUtil::kBins, 0.-epsilon, 1.+epsilon);
+  } else h->Reset();
+  fEfficiency->AddAt(h, kLQ);
 
   // histos of the electron probability of all 5 particle species and 11 momenta for the neural network method
-  fEfficiency->AddAt(
-    new TH2F("PID_NN", "", 
+  if(!(h = (TH2F*)gROOT->FindObject("PID_NN"))){
+    h = new TH2F("PID_NN", "", 
       xBins, -0.5, xBins - 0.5,
-      AliTRDpidUtil::kBins, 0.-epsilon, 1.+epsilon)
-  ,kNN);
+      AliTRDpidUtil::kBins, 0.-epsilon, 1.+epsilon);
+  } else h->Reset();
+  fEfficiency->AddAt(h, kNN);
 
   // histos of the electron probability of all 5 particle species and 11 momenta for the ESD output
-  fEfficiency->AddAt(
-    new TH2F("PID_ESD", "", 
+  if(!(h = (TH2F*)gROOT->FindObject("PID_ESD"))){
+    h = new TH2F("PID_ESD", "", 
       xBins, -0.5, xBins - 0.5,
-      AliTRDpidUtil::kBins, 0.-epsilon, 1.+epsilon)
-  ,kESD);
+      AliTRDpidUtil::kBins, 0.-epsilon, 1.+epsilon);
+  } else h->Reset();
+  fEfficiency->AddAt(h, kESD);
 
   // histos of the dE/dx distribution for all 5 particle species and 11 momenta 
-  fContainer->AddAt(
-    new TH2F("dEdx", "", 
+  if(!(h = (TH2F*)gROOT->FindObject("dEdx"))){
+    h = new TH2F("dEdx", "", 
       xBins, -0.5, xBins - 0.5,
-      200, 0, 10000)
-    ,kdEdx);
+      200, 0, 10000);
+  } else h->Reset();
+  fContainer->AddAt(h, kdEdx);
 
   // histos of the dE/dx slices for all 5 particle species and 11 momenta 
-  fContainer->AddAt(
-    new TH2F("dEdxSlice", "", 
+  if(!(h = (TH2F*)gROOT->FindObject("dEdxSlice"))){
+    h = new TH2F("dEdxSlice", "", 
       xBins*AliTRDReconstructor::kLQslices, -0.5, xBins*AliTRDReconstructor::kLQslices - 0.5,
-      200, 0, 5000)
-    ,kdEdxSlice);
+      200, 0, 5000);
+  } else h->Reset();
+  fContainer->AddAt(h, kdEdxSlice);
 
   // histos of the pulse height distribution for all 5 particle species and 11 momenta 
-  fContainer->AddAt(
-    new TProfile2D("PH", "", 
+  if(!(h = (TH2F*)gROOT->FindObject("PH"))){
+    h = new TProfile2D("PH", "", 
       xBins, -0.5, xBins - 0.5,
-      AliTRDtrackerV1::GetNTimeBins(), -0.5, AliTRDtrackerV1::GetNTimeBins() - 0.5)
-    ,kPH);
+      AliTRDtrackerV1::GetNTimeBins(), -0.5, AliTRDtrackerV1::GetNTimeBins() - 0.5);
+  } else h->Reset();
+  fContainer->AddAt(h, kPH);
 
   // histos of the number of clusters distribution for all 5 particle species and 11 momenta 
-  fContainer->AddAt(
-    new TH2F("NClus", "", 
+  if(!(h = (TH2F*)gROOT->FindObject("NClus"))){
+    h = new TH2F("NClus", "", 
       xBins, -0.5, xBins - 0.5,
-      AliTRDtrackerV1::GetNTimeBins(), -0.5, AliTRDtrackerV1::GetNTimeBins() - 0.5)
-    ,kNClus);
+      AliTRDtrackerV1::GetNTimeBins(), -0.5, AliTRDtrackerV1::GetNTimeBins() - 0.5);
+  } else h->Reset();
+  fContainer->AddAt(h, kNClus);
 
 
   // momentum distributions - absolute and in momentum bins
-  fContainer->AddAt(new TH1F("hMom", "momentum distribution", 100, 0., 12.),kMomentum);
-  fContainer->AddAt(new TH1F("hMomBin", "momentum distribution in momentum bins", AliTRDCalPID::kNMom, 0.5, 11.5),kMomentumBin);
+  if(!(h = (TH1F*)gROOT->FindObject("hMom"))){
+    h = new TH1F("hMom", "momentum distribution", 100, 0., 12.);
+  } else h->Reset();
+  fContainer->AddAt(h, kMomentum);
+  
+  if(!(h = (TH1F*)gROOT->FindObject("hMomBin"))){
+    h = new TH1F("hMomBin", "momentum distribution in momentum bins", AliTRDCalPID::kNMom, 0.5, 11.5);
+  } else h->Reset();
+  fContainer->AddAt(h, kMomentumBin);
 
 
   return fContainer;