]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Recommiting these
authorslindal <slindal@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 21 Feb 2010 11:11:28 +0000 (11:11 +0000)
committerslindal <slindal@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 21 Feb 2010 11:11:28 +0000 (11:11 +0000)
HLT/BASE/util/AliHLTCaloClusterDataStruct.h
HLT/global/physics/AliHLTCaloHistoClusterEnergy.cxx
HLT/global/physics/AliHLTCaloHistoClusterEnergy.h
HLT/global/physics/AliHLTCaloHistoInvMass.cxx
HLT/global/physics/AliHLTCaloHistoInvMass.h
HLT/global/physics/AliHLTCaloHistoMatchedTracks.cxx
HLT/global/physics/AliHLTCaloHistoMatchedTracks.h

index bf7d5512e4ceec455df9c2f4740bbb1aaacb14f6..729e34b9cc615a4e24e2777669c7b4ccaa5508eb 100644 (file)
@@ -231,6 +231,11 @@ struct AliHLTCaloClusterDataStruct
     return 10;
   }
 
     return 10;
   }
 
+  Int_t GetNCells() const
+  {
+    return ( Int_t ) (fNCells);
+  }
+
   /** Number of cells in the cluster */
   UInt_t fNCells;                                //COMMENT
 
   /** Number of cells in the cluster */
   UInt_t fNCells;                                //COMMENT
 
index bf05cc31f9a7849b73ad3b48009e5d3c2f7ae694..baba871adb014a3a43d4bda740c15e5622ad4f22 100644 (file)
@@ -71,8 +71,7 @@ Int_t AliHLTCaloHistoClusterEnergy::FillHistograms(Int_t nc, TRefArray * cluster
   //See header file for documentation
   for(int ic = 0; ic < nc; ic++) {
     AliESDCaloCluster * cluster = static_cast<AliESDCaloCluster*>(clusterArray->At(ic));
   //See header file for documentation
   for(int ic = 0; ic < nc; ic++) {
     AliESDCaloCluster * cluster = static_cast<AliESDCaloCluster*>(clusterArray->At(ic));
-    fHistClusterEnergy->Fill(cluster->E());
-    fHistClusterEnergyVsNCells->Fill(cluster->GetNCells(), cluster->E());
+    return FillClusterEnergyHistos(cluster);
   }
   return 0;
 }
   }
   return 0;
 }
@@ -81,8 +80,15 @@ Int_t AliHLTCaloHistoClusterEnergy::FillHistograms(Int_t nc, vector<AliHLTCaloCl
   HLTInfo("histo");
   for(int ic = 0; ic < nc; ic++) {
     AliHLTCaloClusterDataStruct * cluster = cVec.at(ic);
   HLTInfo("histo");
   for(int ic = 0; ic < nc; ic++) {
     AliHLTCaloClusterDataStruct * cluster = cVec.at(ic);
-    fHistClusterEnergy->Fill(cluster->E());
-    fHistClusterEnergyVsNCells->Fill(cluster->fNCells, cluster->E());
+    return FillClusterEnergyHistos(cluster);
   }
   return 0;
 }
   }
   return 0;
 }
+
+template <class T>
+Int_t AliHLTCaloHistoClusterEnergy::FillClusterEnergyHistos(T* cluster) {
+  fHistClusterEnergy->Fill(cluster->E());
+  fHistClusterEnergyVsNCells->Fill(cluster->GetNCells(), cluster->E());
+
+  return 0;
+}
index f1ff7bcd7985a8652fee73ce99ebf4948f28b898..298ba5e97e9a68228959b638ff272e495f4f6592 100644 (file)
@@ -68,6 +68,9 @@ public:
   Int_t FillHistograms(Int_t nc, TRefArray * clusterArray );
   Int_t FillHistograms(Int_t nc, vector<AliHLTCaloClusterDataStruct*> &cVec);
 
   Int_t FillHistograms(Int_t nc, TRefArray * clusterArray );
   Int_t FillHistograms(Int_t nc, vector<AliHLTCaloClusterDataStruct*> &cVec);
 
+  template <class T>
+  Int_t FillClusterEnergyHistos(T*);
+
  private:
 
   /** Default constructor prohibited*/
  private:
 
   /** Default constructor prohibited*/
index d7af8a51f7c76581326e79553c4f18a526c91bbe..47a2d017dd6623baa9f64395092085be0a116f81 100644 (file)
@@ -108,74 +108,6 @@ Int_t AliHLTCaloHistoInvMass::FillHistograms(Int_t nc, TRefArray * clusterArray)
     }
   }
 
     }
   }
 
+
   return 0;
 }
   return 0;
 }
-
-
-// Int_t AliHLTCaloHistoInvMass::FillHistograms(Int_t nc, TRefArray * clustersArray) {
-//   //See header file for documentation
-  
-//   Float_t cPos[nc][3];
-//   Float_t cEnergy[nc];
-
-//   for(int ic = 0; ic < nc; ic++) {
-//     AliESDCaloCluster * cluster = static_cast<AliESDCaloCluster*>(clustersArray->At(ic));
-//     cluster->GetPosition(cPos[ic]);
-//     cEnergy[ic] = cluster->E();
-//   }
-
-//   for(Int_t ipho = 0; ipho<(nc-1); ipho++) { 
-//     for(Int_t jpho = ipho+1; jpho<nc; jpho++) { 
-//       // Calculate the theta angle between two photons
-//       Double_t theta = (2* asin(0.5*TMath::Sqrt((cPos[ipho][0]-cPos[jpho][0])*(cPos[ipho][0]-cPos[jpho][0]) +(cPos[ipho][1]-cPos[jpho][1])*(cPos[ipho][1]-cPos[jpho][1]))/460));
-      
-//       // Calculate the mass m of the pion candidate
-//       Double_t m =(TMath::Sqrt(2 * cEnergy[ipho]* cEnergy[jpho]*(1-TMath::Cos(theta))));
-      
-//       fHistTwoClusterInvMass->Fill(m);
-//     }
-//   }
-
-//   return 0;
-// }
-
-
-
-// Int_t AliHLTCaloHistoInvMass::DoEvent(AliHLTCaloClusterHeaderStruct* cHeader) {   
-  
-//   fClusterReader->SetMemory(cHeader);
-  
-//   int ncls = cHeader->fNClusters;
-//   Float_t* cPos[ncls];
-//   Float_t cEnergy[ncls];
-  
-//   AliHLTCaloClusterDataStruct* cluster;
-//   Int_t icls = 0;
-//   while ( ( cluster = fClusterReader->NextCluster() ) ) {
-    
-//     cPos[icls] = cluster->fGlobalPos;
-//     cEnergy[icls] = cluster->fEnergy; 
-    
-//     icls++;
-//   }  
-  
-//   for(Int_t ipho = 0; ipho<(ncls-1); ipho++) { 
-//     for(Int_t jpho = ipho+1 ; jpho<ncls ; jpho++) { 
-//       // Calcul of the theta angle between two photons
-//       Double_t theta = (2* asin(0.5*TMath::Sqrt((cPos[ipho][0]-cPos[jpho][0])*(cPos[ipho][0]-cPos[jpho][0]) +(cPos[ipho][1]-cPos[jpho][1])*(cPos[ipho][1]-cPos[jpho][1]))/460));
-      
-//       // Calcul of the mass m of the pion 
-//       Double_t m =(TMath::Sqrt(2 * cEnergy[ipho]* cEnergy[jpho]*(1-TMath::Cos(theta))));
-      
-
-//       //BALLE
-//       // fHistTwoClusterInvMass->Fill(m);
-//     }
-//   }
-  
-//   return 0;
-// }
-  
-
index 783c656b3e26c3dcf8fc8a4b7321e0ff13c08946..214b9543ec2880d1a89d4f96a79eacd448ff80c2 100644 (file)
@@ -88,32 +88,4 @@ private:
 
 };
 
 
 };
 
-// template <class T>
-// Int_t AliHLTCaloHistoInvMass::FillHistograms(Int_t nc, vector<T*> &cVec) {
-//   //See header file for documentation
-  
-//   Float_t cPos[nc][3];
-//   Float_t cEnergy[nc];
-
-//   for(int ic = 0; ic < nc; ic++) {
-//     T * cluster = cVec.at(ic);
-//     cluster->GetPosition(cPos[ic]);
-//     cEnergy[ic] = cluster->E();
-//   }
-
-//   for(Int_t ipho = 0; ipho<(nc-1); ipho++) { 
-//     for(Int_t jpho = ipho+1; jpho<nc; jpho++) { 
-//       // Calculate the theta angle between two photons
-//       Double_t theta = (2* asin(0.5*TMath::Sqrt((cPos[ipho][0]-cPos[jpho][0])*(cPos[ipho][0]-cPos[jpho][0]) +(cPos[ipho][1]-cPos[jpho][1])*(cPos[ipho][1]-cPos[jpho][1]))/460));
-      
-//       // Calculate the mass m of the pion candidate
-//       Double_t m =(TMath::Sqrt(2 * cEnergy[ipho]* cEnergy[jpho]*(1-TMath::Cos(theta))));
-      
-//       fHistTwoClusterInvMass->Fill(m);
-//     }
-//   }
-
-//   return 0;
-// }
 #endif
 #endif
index 8f3c29a2b1cf4735dd2d0a923fd8c9d76c04d780..5bf8af68a95409aa63148427022c510f28fa30f9 100644 (file)
 #include "AliHLTCaloHistoMatchedTracks.h"
 #include "AliESDCaloCluster.h"
 #include "AliHLTCaloClusterDataStruct.h"
 #include "AliHLTCaloHistoMatchedTracks.h"
 #include "AliESDCaloCluster.h"
 #include "AliHLTCaloClusterDataStruct.h"
-#include "AliHLTCaloClusterReader.h"
 #include "TObjArray.h"
 #include "TH1F.h"
 #include "TObjArray.h"
 #include "TH1F.h"
+#include "TH2F.h"
 #include "TObjArray.h"
 #include "TRefArray.h"
 #include "TString.h"
 
 AliHLTCaloHistoMatchedTracks::AliHLTCaloHistoMatchedTracks(TString det) :
   fHistMatchDistance(NULL),
 #include "TObjArray.h"
 #include "TRefArray.h"
 #include "TString.h"
 
 AliHLTCaloHistoMatchedTracks::AliHLTCaloHistoMatchedTracks(TString det) :
   fHistMatchDistance(NULL),
+  fHistDyxDz(NULL),
   fHistMatchedEnergy(NULL),
   fHistUnMatchedEnergy(NULL)
 {
   fHistMatchedEnergy(NULL),
   fHistUnMatchedEnergy(NULL)
 {
@@ -60,26 +61,35 @@ AliHLTCaloHistoMatchedTracks::AliHLTCaloHistoMatchedTracks(TString det) :
   fHistUnMatchedEnergy->GetYaxis()->SetTitle("Number of clusters");
   fHistUnMatchedEnergy->SetMarkerStyle(21);
   fHistArray->AddLast(fHistUnMatchedEnergy);
   fHistUnMatchedEnergy->GetYaxis()->SetTitle("Number of clusters");
   fHistUnMatchedEnergy->SetMarkerStyle(21);
   fHistArray->AddLast(fHistUnMatchedEnergy);
+
+
+  fHistDyxDz = new TH2F( Form("%s fHist dXY dZ", det.Data()), Form("%s dXY - dZ distribution of track - cluster residuals", det.Data()), 50, 0, 50, 50, 0, 50);
+  fHistDyxDz->GetXaxis()->SetTitle("sqrt(dx^2 + dy^2)  (cm)");
+  fHistDyxDz->GetYaxis()->SetTitle("dz (cm)");
+  //fHistDyxDz->SetMarkerStyle(21);
+  fHistArray->AddLast(fHistDyxDz);
+
 }
 
 
 AliHLTCaloHistoMatchedTracks::~AliHLTCaloHistoMatchedTracks()
 {
 
 }
 
 
 AliHLTCaloHistoMatchedTracks::~AliHLTCaloHistoMatchedTracks()
 {
 
-  if(fHistMatchDistance){
+  if(fHistMatchDistance)
     delete fHistMatchDistance;
     delete fHistMatchDistance;
-    fHistMatchDistance = NULL;
-  }
+  fHistMatchDistance = NULL;
 
 
-  if(fHistMatchedEnergy) {
+  if(fHistMatchedEnergy) 
     delete fHistMatchedEnergy;
     delete fHistMatchedEnergy;
-    fHistMatchedEnergy = NULL;
-  }
+  fHistMatchedEnergy = NULL;
 
 
-  if(fHistUnMatchedEnergy) {
+  if(fHistUnMatchedEnergy) 
     delete fHistUnMatchedEnergy;
     delete fHistUnMatchedEnergy;
-    fHistUnMatchedEnergy = NULL;
-  }
+  fHistUnMatchedEnergy = NULL;
+
+  if (fHistDyxDz) 
+    delete fHistDyxDz;
+  fHistDyxDz = NULL;
 
 }
   
 
 }
   
index 1321598b3f19e2ae848a937a386c012e94001e8b..088bee89b5499318028c8ffd0488f63789050f0f 100644 (file)
@@ -37,7 +37,7 @@
 class TRefArray;
 class TObjArray;
 class TH1F;
 class TRefArray;
 class TObjArray;
 class TH1F;
-
+class TH2F;
 
 /** 
  * @class AliHLTCaloHistoMatchedTracks
 
 /** 
  * @class AliHLTCaloHistoMatchedTracks
@@ -50,7 +50,6 @@ class TH1F;
 
 
 
 
 
 
-//class AliHLTCaloHistoMatchedTracks : public AliHLTPHOSBase
 class AliHLTCaloHistoMatchedTracks : public AliHLTCaloHistoProducer {
 
  public:
 class AliHLTCaloHistoMatchedTracks : public AliHLTCaloHistoProducer {
 
  public:
@@ -80,12 +79,15 @@ class AliHLTCaloHistoMatchedTracks : public AliHLTCaloHistoProducer {
   /** Assignment operator */
   AliHLTCaloHistoMatchedTracks & operator= (const AliHLTCaloHistoMatchedTracks);
 
   /** Assignment operator */
   AliHLTCaloHistoMatchedTracks & operator= (const AliHLTCaloHistoMatchedTracks);
 
-  /** Histogram of the 2 cluster invariant mass */
+  /** Histograms of the track - cluster residuals */
   TH1F *fHistMatchDistance;                  //!transient
   TH1F *fHistMatchDistance;                  //!transient
+  TH2F *fHistDyxDz;                           //!transient
   
   /** Histograms of the energy distribution of mached and unmatched clusters */
   TH1F *fHistMatchedEnergy;                 //!transient
   TH1F *fHistUnMatchedEnergy;               //!transient
   
   /** Histograms of the energy distribution of mached and unmatched clusters */
   TH1F *fHistMatchedEnergy;                 //!transient
   TH1F *fHistUnMatchedEnergy;               //!transient
+  
 
   ClassDef(AliHLTCaloHistoMatchedTracks, 0);
 
 
   ClassDef(AliHLTCaloHistoMatchedTracks, 0);