]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Adding 500 MeV cross check, changing multiplicity dependent cuts to centrality depend...
authorcnattras <cnattras@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 10 Jun 2013 21:29:02 +0000 (21:29 +0000)
committercnattras <cnattras@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 10 Jun 2013 21:29:02 +0000 (21:29 +0000)
PWGLF/totEt/AliAnalysisEtMonteCarlo.cxx
PWGLF/totEt/AliAnalysisEtMonteCarlo.h
PWGLF/totEt/AliAnalysisEtReconstructed.cxx
PWGLF/totEt/AliAnalysisEtReconstructed.h

index 3526c7fe51672c39109bc691ffd94f8f1221c00a..609a9d55edd4de416b291d15d6f8b937f17e1f3e 100644 (file)
@@ -246,8 +246,8 @@ AliAnalysisEtMonteCarlo::AliAnalysisEtMonteCarlo():AliAnalysisEt()
                                                  ,fCalcTrackMatchVsMult(kFALSE)
                                                  ,fHistGammasFound(0)
                                                  ,fHistGammasGenerated(0)
-                                                 ,fHistGammasFoundMult(0)
-                                                 ,fHistGammasGeneratedMult(0)
+                                                 ,fHistGammasFoundCent(0)
+                                                 ,fHistGammasGeneratedCent(0)
                                                  ,fHistChargedTracksCut(0)
                                                  ,fHistChargedTracksAccepted(0)
                                                  ,fHistGammasCut(0)
@@ -255,6 +255,7 @@ AliAnalysisEtMonteCarlo::AliAnalysisEtMonteCarlo():AliAnalysisEt()
                                                  ,fHistChargedTracksCutMult(0)
                                                  ,fHistChargedTracksAcceptedMult(0)
                                                  ,fHistChargedTracksAcceptedLowPtCent(0)
+                                                 ,fHistChargedTracksAcceptedLowPtCent500MeV(0)
                                                  ,fHistChargedTracksAcceptedLowPtCentNoAntiProtons(0)
                                                  ,fHistChargedTracksAcceptedLowPtCentAntiProtons(0)
                                                  ,fHistGammasCutMult(0)
@@ -278,6 +279,7 @@ AliAnalysisEtMonteCarlo::AliAnalysisEtMonteCarlo():AliAnalysisEt()
                                                  ,fHistHadronDepositsAll(0)
                                                  ,fHistHadronDepositsReco(0)
                                                  ,fHistHadronDepositsAllCent(0)
+                                                 ,fHistHadronDepositsAllCent500MeV(0)
                                                  ,fHistHadronDepositsRecoCent(0)
                                                  ,fHistHadronsAllCent(0)
                                                  ,fHistMultChVsSignalVsMult(0)
@@ -383,8 +385,8 @@ AliAnalysisEtMonteCarlo::~AliAnalysisEtMonteCarlo()
     delete fHistPiZeroMultAcc; // enter comment here
     delete fHistGammasFound; // enter comment here
     delete fHistGammasGenerated; // enter comment here
-    delete fHistGammasFoundMult; // enter comment here
-    delete fHistGammasGeneratedMult; // enter comment here
+    delete fHistGammasFoundCent; // enter comment here
+    delete fHistGammasGeneratedCent; // enter comment here
     delete fHistChargedTracksCut;
     delete fHistChargedTracksAccepted;
     delete fHistGammasCut;
@@ -392,6 +394,7 @@ AliAnalysisEtMonteCarlo::~AliAnalysisEtMonteCarlo()
     delete fHistChargedTracksCutMult;
     delete fHistChargedTracksAcceptedMult;
     delete fHistChargedTracksAcceptedLowPtCent;
+    delete fHistChargedTracksAcceptedLowPtCent500MeV;
     delete fHistChargedTracksAcceptedLowPtCentNoAntiProtons;
     delete fHistChargedTracksAcceptedLowPtCentAntiProtons;
     delete fHistGammasCutMult;
@@ -414,6 +417,7 @@ AliAnalysisEtMonteCarlo::~AliAnalysisEtMonteCarlo()
     delete fHistHadronDepositsAll;
     delete fHistHadronDepositsReco;
     delete fHistHadronDepositsAllCent;
+    delete fHistHadronDepositsAllCent500MeV;
     delete fHistHadronDepositsRecoCent;
     delete fHistHadronsAllCent;
     delete fHistMultChVsSignalVsMult;
@@ -687,6 +691,7 @@ Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2)
         Int_t cf = 0;
         AliESDCaloCluster* caloCluster = ( AliESDCaloCluster* )caloClusters->At( iCluster );
         //Float_t caloE = caloCluster->E()
+        if (!fSelector->CutGeometricalAcceptance(*caloCluster)) continue;
         fNClusters++;
         const UInt_t iPart = (UInt_t)TMath::Abs(caloCluster->GetLabel());
         TParticle *part  =  stack->Particle(iPart);
@@ -751,6 +756,7 @@ Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2)
        for(UInt_t i = 0; i < caloCluster->GetNLabels(); i++)
        {
          Int_t pIdx = caloCluster->GetLabelAt(i);
+
          //TParticle *p = stack->Particle(pIdx);
          
          if(!stack->IsPhysicalPrimary(pIdx))
@@ -770,7 +776,7 @@ Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2)
        }
        fCutFlow->Fill(cf++);
         if(!fSelector->PassDistanceToBadChannelCut(*caloCluster)) continue;
-        Double_t clEt = CorrectForReconstructionEfficiency(*caloCluster,fClusterMult);
+        Double_t clEt = CorrectForReconstructionEfficiency(*caloCluster,fCentClass);
 //     if(code == fgK0SCode) std::cout << "K0 energy: " << caloCluster->E() << std::endl;
         if(!fSelector->PassMinEnergyCut(*caloCluster)) continue;
 
@@ -889,6 +895,7 @@ Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2)
            if(nottrackmatched){//not removed but should be
              fHistHadronDepositsAll->Fill(part->Pt());
              fHistHadronDepositsAllCent->Fill(part->Pt(), fCentClass);
+             if(fReconstructedEt>0.5) fHistHadronDepositsAllCent500MeV->Fill(part->Pt(), fCentClass);
              fChargedNotRemoved++;
              fEnergyChargedNotRemoved += clEt;
              fHistRemovedOrNot->Fill(2.0, fCentClass);
@@ -897,6 +904,7 @@ Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2)
              if(fCalcTrackMatchVsMult){
                if(matchedTrackpt<0.5){//if we could never have matched this because of its pt, how much energy did it deposit?
                  fHistChargedTracksAcceptedLowPtCent->Fill(fDepositedEt, fCentClass);
+                 if(fDepositedEt>=0.5) fHistChargedTracksAcceptedLowPtCent500MeV->Fill(fDepositedEt, fCentClass);
                  if(pdg->PdgCode()!=fgAntiProtonCode){
                    fHistChargedTracksAcceptedLowPtCentNoAntiProtons->Fill(fDepositedEt, fCentClass);
                  }
@@ -914,6 +922,7 @@ Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2)
              fHistHadronDepositsRecoCent->Fill(part->Pt(), fCentClass);
              fHistHadronDepositsAll->Fill(part->Pt());
              fHistHadronDepositsAllCent->Fill(part->Pt(), fCentClass);
+             if(fReconstructedEt>0.5) fHistHadronDepositsAllCent500MeV->Fill(part->Pt(), fCentClass);
              if(caloCluster->GetLabel()!=trackindex){
                fHistBadTrackMatches->Fill(part->Pt(),fReconstructedE);
                fHistBadTrackMatchesdPhidEta->Fill(caloCluster->GetTrackDx(),caloCluster->GetTrackDz());
@@ -1018,11 +1027,11 @@ Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2)
         if(pdg->PdgCode()==fgGammaCode && fSelector->CutGeometricalAcceptance(*part))// TMath::Abs(part->Eta()) < 0.12)
        {
          fHistGammasGenerated->Fill(part->Energy());
-         fHistGammasGeneratedMult->Fill(part->Energy(),fClusterMult);
+         fHistGammasGeneratedCent->Fill(part->Energy(),fCentClass);
          if(std::binary_search(foundGammas.begin(),foundGammas.end(),iPart))
          {
            fHistGammasFound->Fill(part->Energy());
-           fHistGammasFoundMult->Fill(part->Energy(),fClusterMult);
+           fHistGammasFoundCent->Fill(part->Energy(),fCentClass);
          }
        }
         if(pdg->PdgCode()==fgPiPlusCode || pdg->PdgCode()==fgPiMinusCode || pdg->PdgCode()==fgProtonCode || pdg->PdgCode()==fgAntiProtonCode){//section here for all hadrons generated
@@ -1073,7 +1082,8 @@ Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2)
          Float_t totalClusterEts[11] = {0.0,0.0,0.0,0.0,0.0, 0.0,0.0,0.0,0.0,0.0,  0.0};
          for (int iCluster = 0; iCluster < nCluster; iCluster++ ){//if this cluster is from any of the decay daughters of any kaon...  but there is no easy way to look at this so we loop over clusters...
            AliESDCaloCluster* caloCluster = ( AliESDCaloCluster* )caloClusters->At( iCluster );
-           const UInt_t myPart = (UInt_t)TMath::Abs(caloCluster->GetLabel());
+           if (!fSelector->CutGeometricalAcceptance(*caloCluster)) continue;
+           const Int_t myPart = TMath::Abs(caloCluster->GetLabel());
            //identify the primary particle which created this cluster
            int primIdx = myPart;
            if (!stack->IsPhysicalPrimary(myPart)){
@@ -1094,7 +1104,7 @@ Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2)
              caloCluster->GetPosition(pos);
              TVector3 cp(pos);
              Double_t clEt = caloCluster->E()*TMath::Sin(cp.Theta());
-             Double_t clEtCorr = CorrectForReconstructionEfficiency(*caloCluster,fClusterMult);
+             Double_t clEtCorr = CorrectForReconstructionEfficiency(*caloCluster,fCentClass);
              for(int l=0;l<nEtCuts;l++){//loop over cut values
                if(clEt>=etCuts[l]){
                  //cout<<", "<<clEt<<">="<<etCuts[l];
@@ -1449,8 +1459,8 @@ void AliAnalysisEtMonteCarlo::CreateHistograms()
 
     fHistGammasFound = new TH1F("fHistGammasFound", "fHistGammasFound",200, 0, 10);
     fHistGammasGenerated = new TH1F("fHistGammasGenerated", "fHistGammasGenerated",200, 0, 10);
-    fHistGammasFoundMult = new TH2F("fHistGammasFoundMult", "fHistGammasFoundMult",200, 0, 10,10,0,100);
-    fHistGammasGeneratedMult = new TH2F("fHistGammasGeneratedMult", "fHistGammasGeneratedMult",200, 0, 10,10,0,100);
+    fHistGammasFoundCent = new TH2F("fHistGammasFoundCent", "fHistGammasFoundCent",200, 0, 10,20,-0.5,19.5);
+    fHistGammasGeneratedCent = new TH2F("fHistGammasGeneratedCent", "fHistGammasGeneratedCent",200, 0, 10,20,-0.5,19.5);
     fHistChargedTracksCut = new TH1F("fHistChargedTracksCut", "fHistChargedTracksCut",100, 0, 5);
     fHistChargedTracksAccepted = new TH1F("fHistChargedTracksAccepted", "fHistChargedTracksAccepted",100, 0, 5);
     fHistGammasCut = new TH1F("fHistGammasTracksCut", "fHistGammasTracksCut",100, 0, 5);
@@ -1459,9 +1469,10 @@ void AliAnalysisEtMonteCarlo::CreateHistograms()
     if(fCalcTrackMatchVsMult){
       fHistChargedTracksCutMult = new TH2F("fHistChargedTracksCutMult", "fHistChargedTracksCutMult",100, 0, 5,10,0,100);
       fHistChargedTracksAcceptedMult = new TH2F("fHistChargedTracksAcceptedMult", "fHistChargedTracksAcceptedMult",100, 0, 5,10,0,100);
-      fHistChargedTracksAcceptedLowPtCent = new TH2F("fHistChargedTracksAcceptedLowPtCent", "fHistChargedTracksAcceptedLowPtCent",100, 0, 5,20,0,20);
-      fHistChargedTracksAcceptedLowPtCentNoAntiProtons = new TH2F("fHistChargedTracksAcceptedLowPtCentNoAntiProtons", "fHistChargedTracksAcceptedLowPtCentNoAntiProtons",100, 0, 5,20,0,20);
-      fHistChargedTracksAcceptedLowPtCentAntiProtons = new TH2F("fHistChargedTracksAcceptedLowPtCentAntiProtons", "fHistChargedTracksAcceptedLowPtCentAntiProtons",100, 0, 5,20,0,20);
+      fHistChargedTracksAcceptedLowPtCent = new TH2F("fHistChargedTracksAcceptedLowPtCent", "fHistChargedTracksAcceptedLowPtCent",100, 0, 5,20,-0.5,19.5);
+      fHistChargedTracksAcceptedLowPtCent500MeV = new TH2F("fHistChargedTracksAcceptedLowPtCent500MeV", "fHistChargedTracksAcceptedLowPtCent500MeV",100, 0, 5,20,-0.5,19.5);
+      fHistChargedTracksAcceptedLowPtCentNoAntiProtons = new TH2F("fHistChargedTracksAcceptedLowPtCentNoAntiProtons", "fHistChargedTracksAcceptedLowPtCentNoAntiProtons",100, 0, 5,20,-0.5,19.5);
+      fHistChargedTracksAcceptedLowPtCentAntiProtons = new TH2F("fHistChargedTracksAcceptedLowPtCentAntiProtons", "fHistChargedTracksAcceptedLowPtCentAntiProtons",100, 0, 5,20,-0.5,19.5);
       fHistGammasCutMult = new TH2F("fHistGammasTracksCutMult", "fHistGammasTracksCutMult",100, 0, 5,10,0,100);
       fHistGammasAcceptedMult = new TH2F("fHistGammasTracksAcceptedMult", "fHistGammasTracksAcceptedMult",100, 0, 5,10,0,100);
     }
@@ -1473,10 +1484,10 @@ void AliAnalysisEtMonteCarlo::CreateHistograms()
       fHistMatchedTracksEvspTBkgdPeripheral = new TH2F("fHistMatchedTracksEvspTBkgdPeripheral", "fHistMatchedTracksEvspTBkgd",100, 0, 3,100,0,3);
       fHistMatchedTracksEvspTSignalPeripheral = new TH2F("fHistMatchedTracksEvspTSignalPeripheral", "fHistMatchedTracksEvspTSignal",100, 0, 3,100,0,3);
 
-      fHistMatchedTracksEvspTBkgdvsCent = new TH3F("fHistMatchedTracksEvspTBkgdvsCent", "fHistMatchedTracksEvspTBkgdvsCent",100, 0, 3,100,0,3,20,0,20);
-      fHistMatchedTracksEvspTSignalvsCent = new TH3F("fHistMatchedTracksEvspTSignalvsCent", "fHistMatchedTracksEvspTSignalvsCent",100, 0, 3,100,0,3,20,0,20);
-      fHistMatchedTracksEvspTBkgdvsCentEffCorr = new TH3F("fHistMatchedTracksEvspTBkgdvsCentEffCorr", "fHistMatchedTracksEvspTBkgdvsCent",100, 0, 3,100,0,3,20,0,20);
-      fHistMatchedTracksEvspTSignalvsCentEffCorr = new TH3F("fHistMatchedTracksEvspTSignalvsCentEffCorr", "fHistMatchedTracksEvspTSignalvsCent",100, 0, 3,100,0,3,20,0,20);
+      fHistMatchedTracksEvspTBkgdvsCent = new TH3F("fHistMatchedTracksEvspTBkgdvsCent", "fHistMatchedTracksEvspTBkgdvsCent",100, 0, 3,100,0,3,20,-0.5,19.5);
+      fHistMatchedTracksEvspTSignalvsCent = new TH3F("fHistMatchedTracksEvspTSignalvsCent", "fHistMatchedTracksEvspTSignalvsCent",100, 0, 3,100,0,3,20,-0.5,19.5);
+      fHistMatchedTracksEvspTBkgdvsCentEffCorr = new TH3F("fHistMatchedTracksEvspTBkgdvsCentEffCorr", "fHistMatchedTracksEvspTBkgdvsCent",100, 0, 3,100,0,3,20,-0.5,19.5);
+      fHistMatchedTracksEvspTSignalvsCentEffCorr = new TH3F("fHistMatchedTracksEvspTSignalvsCentEffCorr", "fHistMatchedTracksEvspTSignalvsCent",100, 0, 3,100,0,3,20,-0.5,19.5);
     
 
       fHistChargedTracksCutPeripheral = new TH1F("fHistChargedTracksCutPeripheral", "fHistChargedTracksCut",100, 0, 5);
@@ -1498,6 +1509,7 @@ void AliAnalysisEtMonteCarlo::CreateHistograms()
       Float_t nCentCuts[21] = { 0, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20};
 
       fHistHadronDepositsAllCent = new TH2F("fHistHadronDepositsAllCent","All Hadrons which deposited energy in calorimeter",fgNumOfPtBins,fgPtAxis,nCent,nCentCuts);
+      fHistHadronDepositsAllCent500MeV = new TH2F("fHistHadronDepositsAllCent500MeV","All Hadrons which deposited energy in calorimeter pT>500MeV",fgNumOfPtBins,fgPtAxis,nCent,nCentCuts);
       fHistHadronDepositsRecoCent = new TH2F("fHistHadronDepositsRecoCent","Reconstructed Hadrons which deposited energy in calorimeter",fgNumOfPtBins,fgPtAxis,nCent,nCentCuts);
 
       fHistHadronsAllCent = new TH2F("fHistHadronsAllCent","All Hadrons vs cluster mult",fgNumOfPtBins,fgPtAxis,nCent,nCentCuts);
@@ -1615,8 +1627,8 @@ void AliAnalysisEtMonteCarlo::FillOutputList(TList *list)
     
     list->Add(fHistGammasFound);
     list->Add(fHistGammasGenerated);
-    list->Add(fHistGammasFoundMult);
-    list->Add(fHistGammasGeneratedMult);
+    list->Add(fHistGammasFoundCent);
+    list->Add(fHistGammasGeneratedCent);
     list->Add(fHistChargedTracksCut);
     list->Add(fHistChargedTracksAccepted);
     list->Add(fHistGammasCut);
@@ -1625,6 +1637,7 @@ void AliAnalysisEtMonteCarlo::FillOutputList(TList *list)
       list->Add(fHistChargedTracksCutMult);
       list->Add(fHistChargedTracksAcceptedMult);
       list->Add(fHistChargedTracksAcceptedLowPtCent);
+      list->Add(fHistChargedTracksAcceptedLowPtCent500MeV);
       list->Add(fHistChargedTracksAcceptedLowPtCentNoAntiProtons);
       list->Add(fHistChargedTracksAcceptedLowPtCentAntiProtons);
       list->Add(fHistGammasCutMult);
@@ -1650,6 +1663,7 @@ void AliAnalysisEtMonteCarlo::FillOutputList(TList *list)
     list->Add(fHistHadronDepositsAll);
     list->Add(fHistHadronDepositsReco);
     list->Add(fHistHadronDepositsAllCent);
+    list->Add(fHistHadronDepositsAllCent500MeV);
     list->Add(fHistHadronDepositsRecoCent);
     list->Add(fHistHadronsAllCent);
     list->Add(fHistMultChVsSignalVsMult);
index fd50d28d6bb2fee33bd90cceeeeb1542746d4145..f842ad7a7288c96724b69a725c336e19f73d2de3 100644 (file)
@@ -313,8 +313,8 @@ protected:
     Bool_t fCalcTrackMatchVsMult;
     TH1F *fHistGammasFound;
     TH1F *fHistGammasGenerated;
-    TH2F *fHistGammasFoundMult;
-    TH2F *fHistGammasGeneratedMult;
+    TH2F *fHistGammasFoundCent;
+    TH2F *fHistGammasGeneratedCent;
     TH1F *fHistChargedTracksCut;
     TH1F *fHistChargedTracksAccepted;
     TH1F *fHistGammasCut;
@@ -322,6 +322,7 @@ protected:
     TH2F *fHistChargedTracksCutMult;
     TH2F *fHistChargedTracksAcceptedMult;
     TH2F *fHistChargedTracksAcceptedLowPtCent;
+    TH2F *fHistChargedTracksAcceptedLowPtCent500MeV;
     TH2F *fHistChargedTracksAcceptedLowPtCentNoAntiProtons;
     TH2F *fHistChargedTracksAcceptedLowPtCentAntiProtons;
     TH2F *fHistGammasCutMult;
@@ -344,6 +345,7 @@ protected:
     TH1F *fHistHadronDepositsAll;
     TH1F *fHistHadronDepositsReco;
     TH2F *fHistHadronDepositsAllCent;
+    TH2F *fHistHadronDepositsAllCent500MeV;
     TH2F *fHistHadronDepositsRecoCent;
     TH2F *fHistHadronsAllCent;
     TH3F *fHistMultChVsSignalVsMult;
index 937e7c86265741ce0678785b5eb4827f6224f93a..d951839c0763802f7f2003ae3254e597d48cb9ba 100644 (file)
@@ -64,6 +64,7 @@ AliAnalysisEtReconstructed::AliAnalysisEtReconstructed() :
        ,fHistMatchedTracksEvspTvsCent(0)
        ,fHistMatchedTracksEvspTvsCentEffCorr(0)
        ,fHistMatchedTracksEvspTvsCentEffTMCorr(0)
+       ,fHistMatchedTracksEvspTvsCentEffTMCorr500MeV(0)
        ,fHistFoundHadronsvsCent(0)
        ,fHistNotFoundHadronsvsCent(0)
        ,fHistFoundHadronsEtvsCent(0)
@@ -74,6 +75,7 @@ AliAnalysisEtReconstructed::AliAnalysisEtReconstructed() :
        ,fHistNominalEffHighEt(0)
        ,fHistNominalEffLowEt(0)
        ,fHistTotRawEt(0)
+       ,fHistTotRawEt500MeV(0)
 {
 
 }
@@ -97,6 +99,7 @@ AliAnalysisEtReconstructed::~AliAnalysisEtReconstructed()
     delete fHistMatchedTracksEvspTvsCent;
     delete fHistMatchedTracksEvspTvsCentEffCorr;
     delete fHistMatchedTracksEvspTvsCentEffTMCorr;
+    delete fHistMatchedTracksEvspTvsCentEffTMCorr500MeV;
     delete fHistFoundHadronsvsCent;
     delete fHistNotFoundHadronsvsCent;
     delete fHistFoundHadronsEtvsCent;
@@ -107,6 +110,7 @@ AliAnalysisEtReconstructed::~AliAnalysisEtReconstructed()
     delete fHistNominalEffHighEt;
     delete fHistNominalEffLowEt;
     delete fHistTotRawEt;
+    delete fHistTotRawEt500MeV;
 }
 
 Int_t AliAnalysisEtReconstructed::AnalyseEvent(AliVEvent* ev)
@@ -139,10 +143,11 @@ Int_t AliAnalysisEtReconstructed::AnalyseEvent(AliVEvent* ev)
         fCentClass = fCentrality->GetCentralityClass5("V0M");
     }
 
-    TRefArray *caloClusters = fSelector->GetClusters();
-    Float_t fClusterMult = caloClusters->GetEntries();
+    //TRefArray *caloClusters = fSelector->GetClusters();//just gets the correct set of clusters - does not apply any cuts
+    //Float_t fClusterMult = caloClusters->GetEntries();
 
     Float_t nominalRawEt = 0;
+    Float_t totEt500MeV = 0;
     Float_t nonlinHighRawEt = 0;
     Float_t nonlinLowRawEt = 0;
     Float_t effHighRawEt = 0;
@@ -171,12 +176,15 @@ Int_t AliAnalysisEtReconstructed::AnalyseEvent(AliVEvent* ev)
        fCutFlow->Fill(x++);
         if (!fSelector->PassDistanceToBadChannelCut(*cluster)) continue;
        fCutFlow->Fill(x++);
-
+        if (!fSelector->CutGeometricalAcceptance(*cluster)) continue;
+       //fCutFlow->Fill(x++);
         Float_t pos[3];
 
         cluster->GetPosition(pos);
         TVector3 cp(pos);
 
+       //if(TMath::Abs(cp.Eta())> fCuts->fCuts->GetGeometryEmcalEtaAccCut() || cp.Phi() >  fCuts->GetGeometryEmcalPhiAccMaxCut()*TMath::Pi()/180. ||  cp.Phi() >  fCuts->GetGeometryEmcalPhiAccMinCut()*TMath::Pi()/180.) continue;//Do not accept if cluster is not in the acceptance
+
         Bool_t matched = kTRUE;//default to no track matched
        Int_t trackMatchedIndex = cluster->GetTrackMatchedIndex();//find the index of the matched track
        matched = !(fSelector->PassTrackMatchingCut(*cluster));//PassTrackMatchingCut is false if there is a matched track
@@ -200,19 +208,23 @@ Int_t AliAnalysisEtReconstructed::AnalyseEvent(AliVEvent* ev)
                     AliError("Error: track does not exist");
                 }
                 else {
-                 float eff = fTmCorrections->TrackMatchingEfficiency(track->Pt(),fClusterMult);
+                 float eff = fTmCorrections->TrackMatchingEfficiency(track->Pt(),cent);
                  if(TMath::Abs(eff)<1e-5) eff = 1.0;
                  //cout<<"pt "<<track->Pt()<<" eff "<<eff<<endl;
                  nChargedHadronsMeasured++;
                  nChargedHadronsTotal += 1/eff;
-                 Double_t effCorrEt = CorrectForReconstructionEfficiency(*cluster,fClusterMult);
+                 Double_t effCorrEt = CorrectForReconstructionEfficiency(*cluster,cent);
                  nChargedHadronsEtMeasured+= TMath::Sin(cp.Theta())*effCorrEt;
                  //One efficiency is the gamma efficiency and the other is the track matching efficiency.
                  nChargedHadronsEtTotal+= 1/eff *effCorrEt;
                  fHistMatchedTracksEvspTvsCent->Fill(track->P(),TMath::Sin(cp.Theta())*cluster->E(),cent);
-                 fHistMatchedTracksEvspTvsCentEffCorr->Fill(track->P(),CorrectForReconstructionEfficiency(*cluster,fClusterMult),cent);
+                 fHistMatchedTracksEvspTvsCentEffCorr->Fill(track->P(),effCorrEt,cent);
                  //Weighed by the number of tracks we didn't find
                  fHistMatchedTracksEvspTvsCentEffTMCorr->Fill(track->P(), effCorrEt,cent, (1/eff-1) );
+                 cluster->GetPosition(pos);      
+                 TVector3 p2(pos);
+                 uncorrEt += TMath::Sin(p2.Theta())*cluster->E();
+                 if(uncorrEt>=0.5) fHistMatchedTracksEvspTvsCentEffTMCorr500MeV->Fill(track->P(), effCorrEt,cent, (1/eff-1) );
                     const Double_t *pidWeights = track->PID();
 
                     Double_t maxpidweight = 0;
@@ -296,15 +308,23 @@ Int_t AliAnalysisEtReconstructed::AnalyseEvent(AliVEvent* ev)
            fClusterEnergy->Fill(cluster->E());
            fClusterEt->Fill(TMath::Sin(p2.Theta())*cluster->E());
            uncorrEt += TMath::Sin(p2.Theta())*cluster->E();
+           float myuncorrEt = TMath::Sin(p2.Theta())*cluster->E();
 
-           Double_t effCorrEt = CorrectForReconstructionEfficiency(*cluster,fClusterMult);
+           Double_t effCorrEt = CorrectForReconstructionEfficiency(*cluster,cent);
            //cout<<"cluster energy "<<cluster->E()<<" eff corr Et "<<effCorrEt<<endl;
            fTotNeutralEt += effCorrEt;
            nominalRawEt += effCorrEt;
-           nonlinHighRawEt += effCorrEt*GetCorrectionModification(*cluster,1,0,fClusterMult);
-           nonlinLowRawEt += effCorrEt*GetCorrectionModification(*cluster,-1,0,fClusterMult);
-           effHighRawEt += effCorrEt*GetCorrectionModification(*cluster,0,1,fClusterMult);
-           effLowRawEt += effCorrEt*GetCorrectionModification(*cluster,0,-1,fClusterMult);
+           if(myuncorrEt>=0.5){
+             totEt500MeV += effCorrEt;
+             //cout<<"test "<<myuncorrEt<<"> 0.5"<<endl;
+           }
+           else{
+             //cout<<"test "<<myuncorrEt<<"< 0.5"<<endl;
+           }
+           nonlinHighRawEt += effCorrEt*GetCorrectionModification(*cluster,1,0,cent);
+           nonlinLowRawEt += effCorrEt*GetCorrectionModification(*cluster,-1,0,cent);
+           effHighRawEt += effCorrEt*GetCorrectionModification(*cluster,0,1,cent);
+           effLowRawEt += effCorrEt*GetCorrectionModification(*cluster,0,-1,cent);
             fNeutralMultiplicity++;
         }
         fMultiplicity++;
@@ -332,6 +352,7 @@ Int_t AliAnalysisEtReconstructed::AnalyseEvent(AliVEvent* ev)
     //std::cout << "fTotNeutralEt: " << fTotNeutralEt << ", Contribution from non-removed charged: " << GetChargedContribution(fNeutralMultiplicity) << ", neutral: " << GetNeutralContribution(fNeutralMultiplicity) << ", gammas: " << GetGammaContribution(fNeutralMultiplicity) << ", multiplicity: " << fNeutralMultiplicity<< std::endl;
     //cout<<"cent "<<cent<<" cluster mult "<<fClusterMult<<" fTotNeutralEt "<<fTotNeutralEt<<" nominalRawEt "<<nominalRawEt<<endl;
     fHistNominalRawEt->Fill(nominalRawEt,cent);
+    fHistTotRawEt500MeV->Fill(totEt500MeV,cent);
     fHistNominalNonLinHighEt->Fill(nonlinHighRawEt,cent);
     fHistNominalNonLinLowEt->Fill(nonlinLowRawEt,cent);
     fHistNominalEffHighEt->Fill(effHighRawEt,cent);
@@ -426,11 +447,13 @@ void AliAnalysisEtReconstructed::FillOutputList(TList* list)
     list->Add(fHistMatchedTracksEvspTvsCent);
     list->Add(fHistMatchedTracksEvspTvsCentEffCorr);
     list->Add(fHistMatchedTracksEvspTvsCentEffTMCorr);
+    list->Add(fHistMatchedTracksEvspTvsCentEffTMCorr500MeV);
     list->Add(fHistFoundHadronsvsCent);
     list->Add(fHistNotFoundHadronsvsCent);
     list->Add(fHistFoundHadronsEtvsCent);
     list->Add(fHistNotFoundHadronsEtvsCent);
     list->Add(fHistNominalRawEt);
+    list->Add(fHistTotRawEt500MeV);
     list->Add(fHistNominalNonLinHighEt);
     list->Add(fHistNominalNonLinLowEt);
     list->Add(fHistNominalEffHighEt);
@@ -485,7 +508,7 @@ void AliAnalysisEtReconstructed::CreateHistograms()
     //fHistMuonEnergyDeposit->SetYTitle("Energy of track");
 
     histname = "fClusterPosition" + fHistogramNameSuffix;
-    fClusterPosition = new TH2D(histname.Data(), "Position of accepted neutral clusters",300, 0,2*TMath::Pi(), 100, -0.7 , 0.7);
+    fClusterPosition = new TH2D(histname.Data(), "Position of accepted neutral clusters",300, -TMath::Pi(),TMath::Pi(), 100, -0.7 , 0.7);
     fClusterPosition->SetXTitle("#phi");
     fClusterPosition->SetYTitle("#eta");
 
@@ -508,15 +531,17 @@ void AliAnalysisEtReconstructed::CreateHistograms()
     histname = "fHistGammaEnergyAdded" + fHistogramNameSuffix;
     fHistGammaEnergyAdded = new TH2D(histname.Data(), histname.Data(), 1000, .0, 30, 100, -0.5 , 99.5);
 
-    fHistMatchedTracksEvspTvsCent = new TH3F("fHistMatchedTracksEvspTvsCent", "fHistMatchedTracksEvspTvsCent",100, 0, 3,100,0,3,20,0,20);
-    fHistMatchedTracksEvspTvsCentEffCorr = new TH3F("fHistMatchedTracksEvspTvsCentEffCorr", "fHistMatchedTracksEvspTvsCentEffCorr",100, 0, 3,100,0,3,20,0,20);
-    fHistMatchedTracksEvspTvsCentEffTMCorr = new TH3F("fHistMatchedTracksEvspTvsCentEffTMCorr", "fHistMatchedTracksEvspTvsCentEffTMCorr",100, 0, 3,100,0,3,20,0,20);
-    fHistFoundHadronsvsCent = new TH2F("fHistFoundHadronsvsCent","fHistFoundHadronsvsCent",100,0,100,20,0,20);
-    fHistNotFoundHadronsvsCent = new TH2F("fHistNotFoundHadronsvsCent","fHistNotFoundHadronsvsCent",100,0,200,20,0,20);
-    fHistFoundHadronsEtvsCent = new TH2F("fHistFoundHadronsEtvsCent","fHistFoundHadronsEtvsCent",100,0,200,20,0,20);
-    fHistNotFoundHadronsEtvsCent = new TH2F("fHistNotFoundHadronsEtvsCent","fHistNotFoundHadronsEtvsCent",100,0,300,20,0,20);
-
-    fHistTotRawEt = new TH2F("fHistTotRawEt","fHistTotRawEt",200,0,400,20,0,20);
+    fHistMatchedTracksEvspTvsCent = new TH3F("fHistMatchedTracksEvspTvsCent", "fHistMatchedTracksEvspTvsCent",100, 0, 3,100,0,3,20,-0.5,19.5);
+    fHistMatchedTracksEvspTvsCentEffCorr = new TH3F("fHistMatchedTracksEvspTvsCentEffCorr", "fHistMatchedTracksEvspTvsCentEffCorr",100, 0, 3,100,0,3,20,-0.5,19.5);
+    fHistMatchedTracksEvspTvsCentEffTMCorr = new TH3F("fHistMatchedTracksEvspTvsCentEffTMCorr", "fHistMatchedTracksEvspTvsCentEffTMCorr",100, 0, 3,100,0,3,20,-0.5,19.5);
+    fHistMatchedTracksEvspTvsCentEffTMCorr500MeV = new TH3F("fHistMatchedTracksEvspTvsCentEffTMCorr500MeV", "fHistMatchedTracksEvspTvsCentEffTMCorr500MeV",100, 0, 3,100,0,3,20,-0.5,19.5);
+    fHistFoundHadronsvsCent = new TH2F("fHistFoundHadronsvsCent","fHistFoundHadronsvsCent",100,0,100,20,-0.5,19.5);
+    fHistNotFoundHadronsvsCent = new TH2F("fHistNotFoundHadronsvsCent","fHistNotFoundHadronsvsCent",100,0,200,20,-0.5,19.5);
+    fHistFoundHadronsEtvsCent = new TH2F("fHistFoundHadronsEtvsCent","fHistFoundHadronsEtvsCent",100,0,200,20,-0.5,19.5);
+    fHistNotFoundHadronsEtvsCent = new TH2F("fHistNotFoundHadronsEtvsCent","fHistNotFoundHadronsEtvsCent",100,0,300,20,-0.5,19.5);
+
+    fHistTotRawEt = new TH2F("fHistTotRawEt","fHistTotRawEt",250,0,250,20,-0.5,19.5);
+    fHistTotRawEt500MeV = new TH2F("fHistTotRawEt500MeV","fHistTotRawEt500MeV",250,0,250,20,-0.5,19.5);
     
     maxEt = 500;
     histname = "fHistNominalRawEt" + fHistogramNameSuffix;
@@ -531,25 +556,25 @@ void AliAnalysisEtReconstructed::CreateHistograms()
     fHistNominalEffLowEt = new TH2D(histname.Data(), histname.Data(),nbinsEt,minEt,maxEt,20,-0.5,19.5);
 
 }
-Double_t AliAnalysisEtReconstructed::ApplyModifiedCorrections(const AliESDCaloCluster& cluster,Int_t nonLinCorr, Int_t effCorr, Int_t mult)
+Double_t AliAnalysisEtReconstructed::ApplyModifiedCorrections(const AliESDCaloCluster& cluster,Int_t nonLinCorr, Int_t effCorr, Int_t cent)
 {
   Float_t pos[3];
   cluster.GetPosition(pos);
   TVector3 cp(pos);
-  Double_t corrEnergy = fReCorrections->CorrectedEnergy(cluster.E(),mult);
+  Double_t corrEnergy = fReCorrections->CorrectedEnergy(cluster.E(),cent);
   
-  Double_t factorNonLin = GetCorrectionModification(cluster, nonLinCorr,effCorr,mult);
+  Double_t factorNonLin = GetCorrectionModification(cluster, nonLinCorr,effCorr,cent);
 
   //std::cout << "Original energy: " << cluster.E() << ", corrected energy: " << corrEnergy << std::endl;
   return TMath::Sin(cp.Theta())*corrEnergy*factorNonLin;
 }
 
-Double_t AliAnalysisEtReconstructed::GetCorrectionModification(const AliESDCaloCluster& cluster,Int_t nonLinCorr, Int_t effCorr, Int_t mult){//nonLinCorr 0 = nominal 1 = high -1 = low, effCorr  0 = nominal 1 = high -1 = low
+Double_t AliAnalysisEtReconstructed::GetCorrectionModification(const AliESDCaloCluster& cluster,Int_t nonLinCorr, Int_t effCorr, Int_t cent){//nonLinCorr 0 = nominal 1 = high -1 = low, effCorr  0 = nominal 1 = high -1 = low
   if(nonLinCorr==0){
     cout<<"Warning:  This function should not get called!"<<endl;//this statement is basically here to avoid a compilation warning
   }
   if(effCorr==0){
     cout<<"Warning:  This function should not get called!"<<endl;//this statement is basically here to avoid a compilation warning
   }
-  return cluster.E()*mult;
+  return cluster.E()*cent;
 }
index 9e3b393f7c2d34a57bf46a051d3928e8092ab476..712a935a414dc29ecd1b45de34c1b7db52c1f7f9 100644 (file)
@@ -45,7 +45,7 @@ protected:
     bool CheckGoodVertex(AliVParticle *track);
     virtual bool TrackHitsCalorimeter(AliVParticle *track, Double_t magField);
 
-    virtual Double_t GetCorrectionModification(const AliESDCaloCluster& cluster,Int_t nonLinCorr, Int_t effCorr, Int_t mult);//nonLinCorr 0 = nominal 1 = high -1 = low, effCorr  0 = nominal 1 = high -1 = low
+    virtual Double_t GetCorrectionModification(const AliESDCaloCluster& cluster,Int_t nonLinCorr, Int_t effCorr, Int_t cent);//nonLinCorr 0 = nominal 1 = high -1 = low, effCorr  0 = nominal 1 = high -1 = low
 
     AliAnalysisHadEtCorrections *fCorrections;//corrections needed for hadronic et
 
@@ -75,6 +75,7 @@ protected:
     TH3F *fHistMatchedTracksEvspTvsCent;   //For measuring hadron deposits
     TH3F *fHistMatchedTracksEvspTvsCentEffCorr;   //For measuring hadron deposits
     TH3F *fHistMatchedTracksEvspTvsCentEffTMCorr;   //For measuring hadron deposits
+    TH3F *fHistMatchedTracksEvspTvsCentEffTMCorr500MeV;   //For measuring hadron deposits
     TH2F *fHistFoundHadronsvsCent;   //For measuring hadron deposits
     TH2F *fHistNotFoundHadronsvsCent;   //For measuring hadron deposits
     TH2F *fHistFoundHadronsEtvsCent;   //For measuring hadron deposits
@@ -86,7 +87,8 @@ protected:
     TH2D *fHistNominalEffLowEt;//Total ET from clusters with low bound on reconstruction efficiency and nominal nonlinearity correction vs centrality
 
     TH2F *fHistTotRawEt; // gamma energy added
-    Double_t ApplyModifiedCorrections(const AliESDCaloCluster& cluster,Int_t nonLinCorr, Int_t effCorr, Int_t mult);//nonLinCorr 0 = nominal 1 = high -1 = low, effCorr  0 = nominal 1 = high -1 = low
+    TH2F *fHistTotRawEt500MeV;//Total ET from clusters with nominal reconstruction efficiency and nonlinearity correction vs centrality
+    Double_t ApplyModifiedCorrections(const AliESDCaloCluster& cluster,Int_t nonLinCorr, Int_t effCorr, Int_t cent);//nonLinCorr 0 = nominal 1 = high -1 = low, effCorr  0 = nominal 1 = high -1 = low
 
 private: