From: gconesab Date: Fri, 19 Nov 2010 20:10:25 +0000 (+0000) Subject: Correct the setting of geometry matrices from ESDs X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=4b892846b66433ddbb93e339e9803ac857381a89;p=u%2Fmrichter%2FAliRoot.git Correct the setting of geometry matrices from ESDs Fill cell position histograms only when needed. Change information print in the copy of the Event Statistics histogram --- diff --git a/PWG4/PartCorrBase/AliAnalysisTaskParticleCorrelation.cxx b/PWG4/PartCorrBase/AliAnalysisTaskParticleCorrelation.cxx index 0edf9fa9dd5..37fa7df52c9 100755 --- a/PWG4/PartCorrBase/AliAnalysisTaskParticleCorrelation.cxx +++ b/PWG4/PartCorrBase/AliAnalysisTaskParticleCorrelation.cxx @@ -220,8 +220,8 @@ void AliAnalysisTaskParticleCorrelation::FinishTaskOutput(){ TH2F *histStat = dynamic_cast(inputH->GetStatistics()); TH2F *histBin0 = dynamic_cast(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); } diff --git a/PWG4/PartCorrBase/AliCalorimeterUtils.cxx b/PWG4/PartCorrBase/AliCalorimeterUtils.cxx index 59b50791e74..94585c7b82a 100755 --- a/PWG4/PartCorrBase/AliCalorimeterUtils.cxx +++ b/PWG4/PartCorrBase/AliCalorimeterUtils.cxx @@ -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 diff --git a/PWG4/PartCorrDep/AliAnaCalorimeterQA.cxx b/PWG4/PartCorrDep/AliAnaCalorimeterQA.cxx index 186f5898ff2..d72d3e430c7 100755 --- a/PWG4/PartCorrDep/AliAnaCalorimeterQA.cxx +++ b/PWG4/PartCorrDep/AliAnaCalorimeterQA.cxx @@ -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) ;