]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Correct the setting of geometry matrices from ESDs
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 19 Nov 2010 20:10:25 +0000 (20:10 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 19 Nov 2010 20:10:25 +0000 (20:10 +0000)
Fill cell position histograms only when needed.
Change information print in the copy of the Event Statistics histogram

PWG4/PartCorrBase/AliAnalysisTaskParticleCorrelation.cxx
PWG4/PartCorrBase/AliCalorimeterUtils.cxx
PWG4/PartCorrDep/AliAnaCalorimeterQA.cxx

index 0edf9fa9dd5ce7ceb98e0e27418d442eb6215fd0..37fa7df52c9944df12b7cbd8220d70a9d40de30c 100755 (executable)
@@ -220,8 +220,8 @@ void AliAnalysisTaskParticleCorrelation::FinishTaskOutput(){
   TH2F *histStat = dynamic_cast<TH2F*>(inputH->GetStatistics()); 
   TH2F *histBin0 = dynamic_cast<TH2F*>(inputH->GetStatistics("BIN0"));
   
-  if(histStat)fOutputContainer->Add(histStat); else printf("Stat histogram not available\n");
-  if(histBin0)fOutputContainer->Add(histBin0); else printf("Bin0 histogram not available\n");
+  if(histStat)fOutputContainer->Add(histStat); else printf("AliAnalysisTaskParticleCorrelation::FinishTaskOutput() - Stat histogram not available check, \n if ESDs, that AliPhysicsSelection was on, \n if AODs, if EventStat_temp.root exists \n");
+  if(histBin0)fOutputContainer->Add(histBin0); 
   
 }
 
index 59b50791e74fb3a166a4ae40a64fbf795e2cc162..94585c7b82a7045153c557e41b25d8dde2e9aafe 100755 (executable)
@@ -28,7 +28,7 @@
 
 //---- ANALYSIS system ----
 #include "AliCalorimeterUtils.h"
-#include "AliVEvent.h"
+#include "AliESDEvent.h"
 #include "AliMCEvent.h"
 #include "AliStack.h"
 #include "AliAODPWG4Particle.h"
@@ -569,7 +569,7 @@ Float_t AliCalorimeterUtils::RecalibrateClusterEnergy(AliVCluster * cluster, Ali
 void AliCalorimeterUtils::SetGeometryTransformationMatrices(AliVEvent* inputEvent) 
 {
   //Set the calorimeters transformation matrices
-       
+
   //Get the EMCAL transformation geometry matrices from ESD 
   if(!fEMCALGeoMatrixSet && fEMCALGeo){
     if(fLoadEMCALMatrices){
@@ -585,13 +585,14 @@ void AliCalorimeterUtils::SetGeometryTransformationMatrices(AliVEvent* inputEven
       
     }//Load matrices
     else if (!gGeoManager) { 
+
       if(fDebug > 1) 
         printf(" AliCalorimeterUtils::SetGeometryTransformationMatrices() - Load EMCAL misalignment matrices. \n");
       if(!strcmp(inputEvent->GetName(),"AliESDEvent"))  {
         for(Int_t mod=0; mod < (fEMCALGeo->GetEMCGeometry())->GetNumberOfSuperModules(); mod++){ 
-          if(inputEvent->GetEMCALMatrix(mod)) {
-            //printf("EMCAL: mod %d, matrix %p\n",mod, ((AliESDEvent*)inputEvent)->GetEMCALMatrix(mod));
-            fEMCALGeo->SetMisalMatrix(inputEvent->GetEMCALMatrix(mod),mod) ;
+          //printf("Load matrix %d, %p\n",mod,((AliESDEvent*)inputEvent)->GetEMCALMatrix(mod));
+          if(((AliESDEvent*)inputEvent)->GetEMCALMatrix(mod)) {
+            fEMCALGeo->SetMisalMatrix(((AliESDEvent*)inputEvent)->GetEMCALMatrix(mod),mod) ;
           }
         }// loop over super modules    
         fEMCALGeoMatrixSet = kTRUE;//At least one, so good
@@ -622,9 +623,9 @@ void AliCalorimeterUtils::SetGeometryTransformationMatrices(AliVEvent* inputEven
         printf(" AliCalorimeterUtils::SetGeometryTransformationMatrices() - Load PHOS misalignment matrices. \n");
                        if(!strcmp(inputEvent->GetName(),"AliESDEvent"))  {
                                for(Int_t mod=0; mod < 5; mod++){ 
-                                       if(inputEvent->GetPHOSMatrix(mod)) {
+                                       if( ((AliESDEvent*)inputEvent)->GetPHOSMatrix(mod)) {
                                                //printf("PHOS: mod %d, matrix %p\n",mod, ((AliESDEvent*)inputEvent)->GetPHOSMatrix(mod));
-                                               fPHOSGeo->SetMisalMatrix(inputEvent->GetPHOSMatrix(mod),mod) ;
+                                               fPHOSGeo->SetMisalMatrix( ((AliESDEvent*)inputEvent)->GetPHOSMatrix(mod),mod) ;
                                        }
                                }// loop over modules
         fPHOSGeoMatrixSet  = kTRUE; //At least one so good
index 186f5898ff286fac7bc714a569391684220bae9a..d72d3e430c761fb3250e90c9a171ad10ad08c1b9 100755 (executable)
@@ -1726,12 +1726,13 @@ void  AliAnaCalorimeterQA::MakeAnalysisFillHistograms()
     }//nmodules
     
     //Get Eta-Phi position of Cell
-    //if(fFillAllPosHisto)
+    if(fFillAllPosHisto)
     {
       if(fCalorimeter=="EMCAL" && GetCaloUtils()->IsEMCALGeoMatrixSet()){
         Float_t celleta = 0.;
         Float_t cellphi = 0.;
         GetEMCALGeometry()->EtaPhiFromIndex(id, celleta, cellphi); 
+
         fhEtaPhiAmp->Fill(celleta,cellphi,amp);
         Double_t cellpos[] = {0, 0, 0};
         GetEMCALGeometry()->GetGlobal(id, cellpos);
@@ -1819,7 +1820,7 @@ void AliAnaCalorimeterQA::ClusterHistograms(const TLorentzVector mom, const Doub
   fhNCellsPerClusterMIP->Fill(e, nCaloCellsPerCluster,eta);
   
   //Position
-  //if(fFillAllPosHisto)
+  if(fFillAllPosHisto)
   {
     fhXE     ->Fill(pos[0],e);
     fhYE     ->Fill(pos[1],e);
@@ -3180,7 +3181,7 @@ void  AliAnaCalorimeterQA::Terminate(TList* outputList)
   Int_t rbX = 1;
   Int_t rbY = 1;
   Int_t rbZ = 1;
-  //if(fFillAllPosHisto)
+  if(fFillAllPosHisto)
   {
     snprintf(cname,buffersize,"%s_QA_ClusterXY",fCalorimeter.Data());
     TCanvas  * cxyz = new TCanvas(cname, "Cluster XY distributions", 1200, 400) ;