Adding histograms for gamma efficiency as a function of centrality and gamma efficien...
authorcnattras <cnattras@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 8 May 2013 14:49:14 +0000 (14:49 +0000)
committercnattras <cnattras@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 8 May 2013 14:49:14 +0000 (14:49 +0000)
PWGLF/totEt/AliAnalysisEtMonteCarlo.cxx
PWGLF/totEt/AliAnalysisEtMonteCarlo.h
PWGLF/totEt/AliAnalysisEtRecEffCorrection.cxx
PWGLF/totEt/AliAnalysisEtRecEffCorrection.h
PWGLF/totEt/AliAnalysisEtReconstructed.cxx
PWGLF/totEt/AliAnalysisEtReconstructed.h
PWGLF/totEt/AliAnalysisEtReconstructedEmcal.cxx
PWGLF/totEt/AliAnalysisEtReconstructedPhos.cxx
PWGLF/totEt/AliAnalysisEtSelectorPhos.cxx
PWGLF/totEt/AliAnalysisEtTrackMatchCorrections.cxx
PWGLF/totEt/AliAnalysisEtTrackMatchCorrections.h

index 553af27..32fa47f 100644 (file)
@@ -246,12 +246,15 @@ AliAnalysisEtMonteCarlo::AliAnalysisEtMonteCarlo():AliAnalysisEt()
                                                  ,fCalcTrackMatchVsMult(kFALSE)
                                                  ,fHistGammasFound(0)
                                                  ,fHistGammasGenerated(0)
+                                                 ,fHistGammasFoundMult(0)
+                                                 ,fHistGammasGeneratedMult(0)
                                                  ,fHistChargedTracksCut(0)
                                                  ,fHistChargedTracksAccepted(0)
                                                  ,fHistGammasCut(0)
                                                  ,fHistGammasAccepted(0)
                                                  ,fHistChargedTracksCutMult(0)
                                                  ,fHistChargedTracksAcceptedMult(0)
+                                                 ,fHistChargedTracksAcceptedLowPtMult(0)
                                                  ,fHistGammasCutMult(0)
                                                  ,fHistGammasAcceptedMult(0)
                                                  ,fHistBadTrackMatches(0)
@@ -274,6 +277,7 @@ AliAnalysisEtMonteCarlo::AliAnalysisEtMonteCarlo():AliAnalysisEt()
                                                  ,fHistHadronDepositsReco(0)
                                                  ,fHistHadronDepositsAllMult(0)
                                                  ,fHistHadronDepositsRecoMult(0)
+                                                 ,fHistHadronsAllMult(0)
                                                  ,fHistMultChVsSignalVsMult(0)
 {
 }
@@ -377,12 +381,15 @@ 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 fHistChargedTracksCut;
     delete fHistChargedTracksAccepted;
     delete fHistGammasCut;
     delete fHistGammasAccepted;
     delete fHistChargedTracksCutMult;
     delete fHistChargedTracksAcceptedMult;
+    delete fHistChargedTracksAcceptedLowPtMult;
     delete fHistGammasCutMult;
     delete fHistGammasAcceptedMult;
     delete fHistBadTrackMatches;
@@ -404,6 +411,7 @@ AliAnalysisEtMonteCarlo::~AliAnalysisEtMonteCarlo()
     delete fHistHadronDepositsReco;
     delete fHistHadronDepositsAllMult;
     delete fHistHadronDepositsRecoMult;
+    delete fHistHadronsAllMult;
     delete fHistMultChVsSignalVsMult;
 }
 
@@ -514,44 +522,44 @@ Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
                 Double_t et = part->Energy() * TMath::Sin(part->Theta()) + particleMassPart;
 
 
-                // Fill up total E_T counters for each particle species
-                if (code == fgProtonCode || code == fgAntiProtonCode)
-                {
-                }
-                if (code == fgPiPlusCode || code == fgPiMinusCode)
-                {
-                    if (code == fgPiPlusCode)
-                    {
-                    }
-                    else
-                    {
-                    }
-                }
-                if (code == fgGammaCode)
-                {
-                }
-                if (code == fgKPlusCode)
-                {
-                }
-                if(code == fgKMinusCode)
-                {
-                }
-                if (code == fgMuPlusCode || code == fgMuMinusCode)
-                {
-                }
-                if (code == fgEPlusCode || code == fgEMinusCode)
-                {
-                }
-                // some neutrals also
-                if (code == fgNeutronCode)
-                {
-                }
-                if (code == fgAntiNeutronCode)
-                {
-                }
-                if (code == fgGammaCode)
-                {
-                }
+//                 // Fill up total E_T counters for each particle species
+//                 if (code == fgProtonCode || code == fgAntiProtonCode)
+//                 {
+//                 }
+//                 if (code == fgPiPlusCode || code == fgPiMinusCode)
+//                 {
+//                     if (code == fgPiPlusCode)
+//                     {
+//                     }
+//                     else
+//                     {
+//                     }
+//                 }
+//                 if (code == fgGammaCode)
+//                 {
+//                 }
+//                 if (code == fgKPlusCode)
+//                 {
+//                 }
+//                 if(code == fgKMinusCode)
+//                 {
+//                 }
+//                 if (code == fgMuPlusCode || code == fgMuMinusCode)
+//                 {
+//                 }
+//                 if (code == fgEPlusCode || code == fgEMinusCode)
+//                 {
+//                 }
+//                 // some neutrals also
+//                 if (code == fgNeutronCode)
+//                 {
+//                 }
+//                 if (code == fgAntiNeutronCode)
+//                 {
+//                 }
+//                 if (code == fgGammaCode)
+//                 {
+//                 }
 
                 // Neutral particles
                 //if (TMath::Abs(pdg->Charge() - fCuts->GetMonteCarloNeutralParticle()) <1e-3 )
@@ -720,14 +728,19 @@ Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2)
    
        
        Bool_t nottrackmatched = kTRUE;//default to no track matched
+       Float_t matchedTrackp = 0.0;
+       Float_t matchedTrackpt = 0.0;
        nottrackmatched = fSelector->PassTrackMatchingCut(*caloCluster);
        //by default ALL matched tracks are accepted, whether or not the match is good.  So we check to see if the track is good.
        if(!nottrackmatched){
          Int_t trackMatchedIndex = caloCluster->GetTrackMatchedIndex();
          if(trackMatchedIndex < 0) nottrackmatched=kTRUE;
          AliESDtrack *track = realEvent->GetTrack(trackMatchedIndex);
+         matchedTrackp = track->P();
+         matchedTrackpt = track->Pt();
          //if this is a good track, accept track will return true.  The track matched is good, so not track matched is false
          nottrackmatched = !(fEsdtrackCutsTPC->AcceptTrack(track));
+         //if(!nottrackmatched) cout<<"Matched track p: "<<matchedTrackp<<" sim "<<part->P()<<endl;
        }
      
 
@@ -840,11 +853,11 @@ Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2)
                fHistChargedTracksCutMult->Fill(fDepositedEt,fClusterMult);
                if(fClusterMult<25){fHistChargedTracksCutPeripheral->Fill(fDepositedEt);}
              }
-             fHistMatchedTracksEvspTBkgd->Fill(part->P(),fReconstructedE);
+             fHistMatchedTracksEvspTBkgd->Fill(matchedTrackp,fReconstructedE);
              if(fCalcTrackMatchVsMult){
-               if(fClusterMult<25){fHistMatchedTracksEvspTBkgdPeripheral->Fill(part->P(),fReconstructedE);}
-               fHistMatchedTracksEvspTBkgdvsMult->Fill(part->P(),fReconstructedE,fClusterMult);
-               fHistMatchedTracksEvspTBkgdvsMultEffCorr->Fill(part->P(),clEt,fClusterMult);//Fill with the efficiency corrected energy
+               if(fClusterMult<25){fHistMatchedTracksEvspTBkgdPeripheral->Fill(matchedTrackp,fReconstructedEt);}
+               fHistMatchedTracksEvspTBkgdvsMult->Fill(matchedTrackp,fReconstructedEt,fClusterMult);
+               fHistMatchedTracksEvspTBkgdvsMultEffCorr->Fill(matchedTrackp,clEt,fClusterMult);//Fill with the efficiency corrected energy
              }
              Int_t trackindex = (caloCluster->GetLabelsArray())->At(1);
              if(caloCluster->GetLabel()!=trackindex){
@@ -878,6 +891,9 @@ Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2)
              fHistDxDzNonRemovedCharged->Fill(caloCluster->GetTrackDx(), caloCluster->GetTrackDz());
              fHistChargedTracksAccepted->Fill(fDepositedEt);
              if(fCalcTrackMatchVsMult){
+               if(matchedTrackpt<0.5){//if we could never have matched this because of its pt, how much energy did it deposit?
+                 fHistChargedTracksAcceptedLowPtMult->Fill(fDepositedEt,fClusterMult);
+               }
                fHistChargedTracksAcceptedMult->Fill(fDepositedEt,fClusterMult);
                if(fClusterMult<25){fHistChargedTracksAcceptedPeripheral->Fill(fDepositedEt);}
              }
@@ -905,11 +921,11 @@ Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2)
                fHistChargedTracksCutMult->Fill(fDepositedEt,fClusterMult);
                if(fClusterMult<25){fHistChargedTracksCutPeripheral->Fill(fDepositedEt);}
              }
-             fHistMatchedTracksEvspTBkgd->Fill(part->P(),fReconstructedE);
+             fHistMatchedTracksEvspTBkgd->Fill(matchedTrackp,fReconstructedE);
              if(fCalcTrackMatchVsMult){
-               if(fClusterMult<25){fHistMatchedTracksEvspTBkgdPeripheral->Fill(part->P(),fReconstructedE);}
-               fHistMatchedTracksEvspTBkgdvsMult->Fill(part->P(),fReconstructedE,fClusterMult);
-               fHistMatchedTracksEvspTBkgdvsMultEffCorr->Fill(part->P(),clEt,fClusterMult);//fill with the efficiency corrected energy
+               if(fClusterMult<25){fHistMatchedTracksEvspTBkgdPeripheral->Fill(matchedTrackp,fReconstructedEt);}
+               fHistMatchedTracksEvspTBkgdvsMult->Fill(matchedTrackp,fReconstructedEt,fClusterMult);
+               fHistMatchedTracksEvspTBkgdvsMultEffCorr->Fill(matchedTrackp,clEt,fClusterMult);//fill with the efficiency corrected energy
              }
            }
          }
@@ -948,11 +964,11 @@ Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2)
                fHistGammasCutMult->Fill(fDepositedEt,fClusterMult);
                if(fClusterMult<25){fHistGammasCutPeripheral->Fill(fDepositedEt);}
              }
-             fHistMatchedTracksEvspTSignal->Fill(part->P(),fReconstructedE);
+             fHistMatchedTracksEvspTSignal->Fill(matchedTrackp,fReconstructedE);
              if(fCalcTrackMatchVsMult){
-               if(fClusterMult<25){fHistMatchedTracksEvspTSignalPeripheral->Fill(part->P(),fReconstructedE);}
-               fHistMatchedTracksEvspTSignalvsMult->Fill(part->P(),fReconstructedE,fClusterMult);
-               fHistMatchedTracksEvspTSignalvsMultEffCorr->Fill(part->P(),clEt,fClusterMult);
+               if(fClusterMult<25){fHistMatchedTracksEvspTSignalPeripheral->Fill(matchedTrackp,fReconstructedEt);}
+               fHistMatchedTracksEvspTSignalvsMult->Fill(matchedTrackp,fReconstructedEt,fClusterMult);
+               fHistMatchedTracksEvspTSignalvsMultEffCorr->Fill(matchedTrackp,clEt,fClusterMult);
              }
            }
          }
@@ -992,11 +1008,17 @@ 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);
          if(std::binary_search(foundGammas.begin(),foundGammas.end(),iPart))
          {
            fHistGammasFound->Fill(part->Energy());
+           fHistGammasFoundMult->Fill(part->Energy(),fClusterMult);
          }
        }
+        if(pdg->PdgCode()==fgPiPlusCode || pdg->PdgCode()==fgPiMinusCode || pdg->PdgCode()==fgProtonCode || pdg->PdgCode()==fgAntiProtonCode){//section here for all hadrons generated
+         fHistHadronsAllMult->Fill(part->Pt(),fClusterMult);
+       }
+       
         
     }
     if(fCalcForKaonCorrection){
@@ -1409,6 +1431,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);
     fHistChargedTracksCut = new TH1F("fHistChargedTracksCut", "fHistChargedTracksCut",100, 0, 5);
     fHistChargedTracksAccepted = new TH1F("fHistChargedTracksAccepted", "fHistChargedTracksAccepted",100, 0, 5);
     fHistGammasCut = new TH1F("fHistGammasTracksCut", "fHistGammasTracksCut",100, 0, 5);
@@ -1417,6 +1441,7 @@ 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);
+      fHistChargedTracksAcceptedLowPtMult = new TH2F("fHistChargedTracksAcceptedLowPtMult", "fHistChargedTracksAcceptedLowPtMult",100, 0, 5,10,0,100);
       fHistGammasCutMult = new TH2F("fHistGammasTracksCutMult", "fHistGammasTracksCutMult",100, 0, 5,10,0,100);
       fHistGammasAcceptedMult = new TH2F("fHistGammasTracksAcceptedMult", "fHistGammasTracksAcceptedMult",100, 0, 5,10,0,100);
     }
@@ -1453,6 +1478,7 @@ void AliAnalysisEtMonteCarlo::CreateHistograms()
       fHistHadronDepositsAllMult = new TH2F("fHistHadronDepositsAllMult","All Hadrons which deposited energy in calorimeter",fgNumOfPtBins,fgPtAxis,nMult,nMultCuts);
       fHistHadronDepositsRecoMult = new TH2F("fHistHadronDepositsRecoMult","Reconstructed Hadrons which deposited energy in calorimeter",fgNumOfPtBins,fgPtAxis,nMult,nMultCuts);
 
+      fHistHadronsAllMult = new TH2F("fHistHadronsAllMult","All Hadrons vs cluster mult",fgNumOfPtBins,fgPtAxis,nMult,nMultCuts);
 
       fHistMultChVsSignalVsMult = new TH3F("fHistMultChVsSignalVsMult","Charged particle Multiplicity vs Signal particle multiplicity vs Cluster Mult",nMult,nMultCuts,nMult,nMultCuts,nMult,nMultCuts);
 }
@@ -1567,6 +1593,8 @@ void AliAnalysisEtMonteCarlo::FillOutputList(TList *list)
     
     list->Add(fHistGammasFound);
     list->Add(fHistGammasGenerated);
+    list->Add(fHistGammasFoundMult);
+    list->Add(fHistGammasGeneratedMult);
     list->Add(fHistChargedTracksCut);
     list->Add(fHistChargedTracksAccepted);
     list->Add(fHistGammasCut);
@@ -1574,6 +1602,7 @@ void AliAnalysisEtMonteCarlo::FillOutputList(TList *list)
     if(fCalcTrackMatchVsMult){
       list->Add(fHistChargedTracksCutMult);
       list->Add(fHistChargedTracksAcceptedMult);
+      list->Add(fHistChargedTracksAcceptedLowPtMult);
       list->Add(fHistGammasCutMult);
       list->Add(fHistGammasAcceptedMult);
     }
@@ -1598,6 +1627,7 @@ void AliAnalysisEtMonteCarlo::FillOutputList(TList *list)
     list->Add(fHistHadronDepositsReco);
     list->Add(fHistHadronDepositsAllMult);
     list->Add(fHistHadronDepositsRecoMult);
+    list->Add(fHistHadronsAllMult);
     list->Add(fHistMultChVsSignalVsMult);
 
 }
index b276248..8196731 100644 (file)
@@ -313,12 +313,15 @@ protected:
     Bool_t fCalcTrackMatchVsMult;
     TH1F *fHistGammasFound;
     TH1F *fHistGammasGenerated;
+    TH2F *fHistGammasFoundMult;
+    TH2F *fHistGammasGeneratedMult;
     TH1F *fHistChargedTracksCut;
     TH1F *fHistChargedTracksAccepted;
     TH1F *fHistGammasCut;
     TH1F *fHistGammasAccepted;
     TH2F *fHistChargedTracksCutMult;
     TH2F *fHistChargedTracksAcceptedMult;
+    TH2F *fHistChargedTracksAcceptedLowPtMult;
     TH2F *fHistGammasCutMult;
     TH2F *fHistGammasAcceptedMult;
     TH1F *fHistBadTrackMatches;
@@ -340,6 +343,7 @@ protected:
     TH1F *fHistHadronDepositsReco;
     TH2F *fHistHadronDepositsAllMult;
     TH2F *fHistHadronDepositsRecoMult;
+    TH2F *fHistHadronsAllMult;
     TH3F *fHistMultChVsSignalVsMult;
 
 
index e0b10fc..3be93e1 100644 (file)
@@ -12,19 +12,21 @@ ClassImp(AliAnalysisEtRecEffCorrection);
 
 AliAnalysisEtRecEffCorrection::AliAnalysisEtRecEffCorrection() : TNamed("RecEff","RecEff")
                                                               ,fEnergyCorrection(new TF1())//"ReCorr","1",0.01)
+                                                                        ,fRecoEff(0)
     ,fMaxEnergy(0)
 {
   fEnergyCorrection->SetName("ReCorr");
 }
 
-AliAnalysisEtRecEffCorrection::AliAnalysisEtRecEffCorrection(TString name, const TF1 &correction, const Double_t maxEnergy) : TNamed(name, name)
-    ,fEnergyCorrection(new TF1(correction))
+AliAnalysisEtRecEffCorrection::AliAnalysisEtRecEffCorrection(TString name, const TF1 &correction,const TH2F &recoEff, const Double_t maxEnergy) : TNamed(name, name)
+    ,fEnergyCorrection(new TF1(correction))                                                                                    ,fRecoEff(new TH2F(recoEff))
     ,fMaxEnergy(maxEnergy)
 {}
 
 //! Copy constructor
 AliAnalysisEtRecEffCorrection::AliAnalysisEtRecEffCorrection(const AliAnalysisEtRecEffCorrection &obj) : TNamed(obj)
     ,fEnergyCorrection(new TF1(*(obj.fEnergyCorrection)))
+    ,fRecoEff(new TH2F(*(obj.fRecoEff)))
     ,fMaxEnergy(obj.fMaxEnergy)
 {}
 
@@ -39,6 +41,7 @@ AliAnalysisEtRecEffCorrection& AliAnalysisEtRecEffCorrection::operator=(const Al
     if (this != &other)
     {
         fEnergyCorrection = other.fEnergyCorrection;
+       fRecoEff = other.fRecoEff;
         fMaxEnergy = other.fMaxEnergy;
     }
     return *this;
index a7ab5f2..a7c4775 100644 (file)
@@ -12,6 +12,7 @@
 #include "TArrayD.h"
 #include "TNamed.h"
 #include "TF1.h"
+#include "TH2F.h"
 
 class AliAnalysisEtRecEffCorrection : public TNamed
 {
@@ -22,7 +23,7 @@ public:
     AliAnalysisEtRecEffCorrection();
 
 //! Constructor
-    AliAnalysisEtRecEffCorrection(TString name, const TF1& correction, const Double_t maxEnergy);
+    AliAnalysisEtRecEffCorrection(TString name, const TF1& correction, const TH2F &recoEff, const Double_t maxEnergy);
 
 //! Copy constructor
     AliAnalysisEtRecEffCorrection(const AliAnalysisEtRecEffCorrection &obj);
@@ -63,6 +64,7 @@ private:
 
     // Energy correction function
     TF1 *fEnergyCorrection;
+    TH2F *fRecoEff;//Reconstruction efficiency, x axis = pT, y axis = multiplicity, z = efficiency
     
     
     
index 3b4c9d3..d239e39 100644 (file)
@@ -63,6 +63,10 @@ AliAnalysisEtReconstructed::AliAnalysisEtReconstructed() :
        ,fHistGammaEnergyAdded(0)
        ,fHistMatchedTracksEvspTvsMult(0)
        ,fHistMatchedTracksEvspTvsMultEffCorr(0)
+       ,fHistFoundHadronsvsCent(0)
+       ,fHistNotFoundHadronsvsCent(0)
+       ,fHistFoundHadronsEtvsCent(0)
+       ,fHistNotFoundHadronsEtvsCent(0)
        ,fHistNominalRawEt(0)
        ,fHistNominalNonLinHighEt(0)
        ,fHistNominalNonLinLowEt(0)
@@ -90,6 +94,10 @@ AliAnalysisEtReconstructed::~AliAnalysisEtReconstructed()
     delete fHistGammaEnergyAdded;
     delete fHistMatchedTracksEvspTvsMult;
     delete fHistMatchedTracksEvspTvsMultEffCorr;
+    delete fHistFoundHadronsvsCent;
+    delete fHistNotFoundHadronsvsCent;
+    delete fHistFoundHadronsEtvsCent;
+    delete fHistNotFoundHadronsEtvsCent;
     delete fHistNominalRawEt;
     delete fHistNominalNonLinHighEt;
     delete fHistNominalNonLinLowEt;
@@ -136,6 +144,11 @@ Int_t AliAnalysisEtReconstructed::AnalyseEvent(AliVEvent* ev)
     Float_t effHighRawEt = 0;
     Float_t effLowRawEt = 0;
 
+    Float_t nChargedHadronsMeasured = 0.0;
+    Float_t nChargedHadronsTotal = 0.0;
+    Float_t nChargedHadronsEtMeasured = 0.0;
+    Float_t nChargedHadronsEtTotal = 0.0;
+
 
     for (Int_t iCluster = 0; iCluster < event->GetNumberOfCaloClusters(); iCluster++)
     {
@@ -180,7 +193,12 @@ Int_t AliAnalysisEtReconstructed::AnalyseEvent(AliVEvent* ev)
                     AliError("Error: track does not exist");
                 }
                 else {
-                 fHistMatchedTracksEvspTvsMult->Fill(track->P(),cluster->E(),fClusterMult);
+                 nChargedHadronsMeasured++;
+                 nChargedHadronsTotal += 1/fTmCorrections->TrackMatchingEfficiency(track->Pt(),fClusterMult);
+                 Double_t effCorrEt = CorrectForReconstructionEfficiency(*cluster);
+                 nChargedHadronsEtMeasured+= TMath::Sin(cp.Theta())*effCorrEt;
+                 nChargedHadronsEtTotal+= 1/fTmCorrections->TrackMatchingEfficiency(track->Pt(),fClusterMult) *effCorrEt;
+                 fHistMatchedTracksEvspTvsMult->Fill(track->P(),TMath::Sin(cp.Theta())*cluster->E(),fClusterMult);
                  fHistMatchedTracksEvspTvsMultEffCorr->Fill(track->P(),CorrectForReconstructionEfficiency(*cluster),fClusterMult);
                     const Double_t *pidWeights = track->PID();
 
@@ -251,15 +269,14 @@ Int_t AliAnalysisEtReconstructed::AnalyseEvent(AliVEvent* ev)
             }
             //continue;
         } // distance
-        else
-         {//these are clusters which were not track matched
+        else{//these are clusters which were not track matched
          fCutFlow->Fill(x++);
          //std::cout << x++ << std::endl;
-
-            //if (cluster->E() >  fSingleCellEnergyCut && cluster->GetNCells() == fCuts->GetCommonSingleCell()) continue;
-            //if (cluster->E() < fClusterEnergyCut) continue;
-            cluster->GetPosition(pos);
-           
+         
+         //if (cluster->E() >  fSingleCellEnergyCut && cluster->GetNCells() == fCuts->GetCommonSingleCell()) continue;
+         //if (cluster->E() < fClusterEnergyCut) continue;
+         cluster->GetPosition(pos);
+         
            TVector3 p2(pos);
            
            fClusterPosition->Fill(p2.Phi(), p2.PseudoRapidity());
@@ -300,7 +317,17 @@ Int_t AliAnalysisEtReconstructed::AnalyseEvent(AliVEvent* ev)
     fHistNominalNonLinLowEt->Fill(nonlinLowRawEt,cent);
     fHistNominalEffHighEt->Fill(effHighRawEt,cent);
     fHistNominalEffLowEt->Fill(effLowRawEt,cent);
-
+    fHistFoundHadronsvsCent->Fill(nChargedHadronsMeasured,cent);
+    fHistNotFoundHadronsvsCent->Fill(nChargedHadronsTotal-nChargedHadronsMeasured,cent);
+    fHistFoundHadronsEtvsCent->Fill(nChargedHadronsEtMeasured,cent);
+    fHistNotFoundHadronsEtvsCent->Fill(nChargedHadronsEtTotal-nChargedHadronsEtMeasured,cent);
+//     cout<<"Number of hadrons measured:  "<<nChargedHadronsMeasured<<" Estimated total number of hadrons "<<nChargedHadronsTotal<<" ET in track matched hadrons "<<
+//       nChargedHadronsEtMeasured;
+//     if(nChargedHadronsMeasured>0)cout<<" ("<<nChargedHadronsEtMeasured/nChargedHadronsMeasured<<") ";
+//     cout<<" ET in all hadrons ";
+//     cout<<nChargedHadronsEtTotal;
+//     if(nChargedHadronsTotal>0) cout<<" ("<<nChargedHadronsEtTotal/nChargedHadronsTotal<<") ";
+//     cout<<endl;
     return 0;
 }
 
@@ -380,6 +407,10 @@ void AliAnalysisEtReconstructed::FillOutputList(TList* list)
     list->Add(fHistGammaEnergyAdded);
     list->Add(fHistMatchedTracksEvspTvsMult);
     list->Add(fHistMatchedTracksEvspTvsMultEffCorr);
+    list->Add(fHistFoundHadronsvsCent);
+    list->Add(fHistNotFoundHadronsvsCent);
+    list->Add(fHistFoundHadronsEtvsCent);
+    list->Add(fHistNotFoundHadronsEtvsCent);
     list->Add(fHistNominalRawEt);
     list->Add(fHistNominalNonLinHighEt);
     list->Add(fHistNominalNonLinLowEt);
@@ -459,6 +490,10 @@ void AliAnalysisEtReconstructed::CreateHistograms()
 
     fHistMatchedTracksEvspTvsMult = new TH3F("fHistMatchedTracksEvspTvsMult", "fHistMatchedTracksEvspTvsMult",100, 0, 3,100,0,3,10,0,100);
     fHistMatchedTracksEvspTvsMultEffCorr = new TH3F("fHistMatchedTracksEvspTvsMultEffCorr", "fHistMatchedTracksEvspTvsMultEffCorr",100, 0, 3,100,0,3,10,0,100);
+    fHistFoundHadronsvsCent = new TH2F("fHistFoundHadronsvsCent","fHistFoundHadronsvsCent",100,0,100,20,0,20);
+    fHistNotFoundHadronsvsCent = new TH2F("fHistNotFoundHadronsvsCent","fHistNotFoundHadronsvsCent",100,0,100,20,0,20);
+    fHistFoundHadronsEtvsCent = new TH2F("fHistFoundHadronsEtvsCent","fHistFoundHadronsEtvsCent",100,0,200,20,0,20);
+    fHistNotFoundHadronsEtvsCent = new TH2F("fHistNotFoundHadronsEtvsCent","fHistNotFoundHadronsEtvsCent",100,0,200,20,0,20);
     
     maxEt = 100;
     histname = "fHistNominalRawEt" + fHistogramNameSuffix;
index 3204c2f..c7ba426 100644 (file)
@@ -74,6 +74,10 @@ protected:
 
     TH3F *fHistMatchedTracksEvspTvsMult;   //For measuring hadron deposits
     TH3F *fHistMatchedTracksEvspTvsMultEffCorr;   //For measuring hadron deposits
+    TH2F *fHistFoundHadronsvsCent;   //For measuring hadron deposits
+    TH2F *fHistNotFoundHadronsvsCent;   //For measuring hadron deposits
+    TH2F *fHistFoundHadronsEtvsCent;   //For measuring hadron deposits
+    TH2F *fHistNotFoundHadronsEtvsCent;   //For measuring hadron deposits
     TH2D *fHistNominalRawEt;//Total ET from clusters with nominal reconstruction efficiency and nonlinearity correction vs centrality
     TH2D *fHistNominalNonLinHighEt;//Total ET from clusters with nominal reconstruction efficiency and high bound of nonlinearity correction vs centrality
     TH2D *fHistNominalNonLinLowEt;//Total ET from clusters with nominal reconstruction efficiency and low bound of nonlinearity correction vs centrality
index 3b61677..611bd36 100644 (file)
@@ -81,10 +81,10 @@ Double_t AliAnalysisEtReconstructedEmcal::GetCorrectionModification(const AliESD
   }
   if(effCorr!=0){
     if(effCorr==1){//high bound
-      factor *=1.05;
+      factor *=1.02;
     }
     else{//low bound
-      factor *=0.95;
+      factor *=0.98;
     }
   }
   //cout<<"Factor:  "<<factor<<endl;
index c067d2a..abed7b4 100644 (file)
@@ -116,10 +116,10 @@ Double_t AliAnalysisEtReconstructedPhos::GetCorrectionModification(const AliESDC
   }
   if(effCorr!=0){
     if(effCorr==1){//high bound
-      factor *=1.05;
+      factor *=1.005;
     }
     else{//low bound
-      factor *=0.95;
+      factor *=0.995;
     }
   }
   return factor;
index 2b6bf53..cf0b905 100644 (file)
@@ -221,7 +221,7 @@ Bool_t AliAnalysisEtSelectorPhos::PassTrackMatchingCut(const AliESDCaloCluster&
   }
   
   // cluster->GetTrackDx(), cluster->GetTrackDz(), event->GetTrack(trackMatchedIndex)->Pt(), event->GetTrack(trackMatchedIndex)->Charge(), ev
-  
+
   Int_t nTracksMatched = cluster.GetNTracksMatched();
   if(nTracksMatched == 0) return kTRUE;
   
index b806f83..c0a67ab 100644 (file)
@@ -9,22 +9,24 @@ AliAnalysisEtTrackMatchCorrections::AliAnalysisEtTrackMatchCorrections() : TName
     ,fNeutralContr(new TF1)
     ,fGammaContr(new TF1)
     ,fSecondaryContr(new TF1)
+                                                                        ,fRecoEff(0)
     ,fMeanCharged(0)
     ,fMeanNeutral(0)
     ,fMeanGamma(0)
     ,fMeanSecondary(0)
 {}
 
-AliAnalysisEtTrackMatchCorrections::AliAnalysisEtTrackMatchCorrections(const TString name, const TF1 &chargedContr, const TF1 &neutralContr, const TF1 &gammaContr, const TF1 &secondaryContr,
+AliAnalysisEtTrackMatchCorrections::AliAnalysisEtTrackMatchCorrections(const TString name, const TF1 &chargedContr, const TF1 &neutralContr, const TF1 &gammaContr, const TF1 &secondaryContr, const TH2F &recoEff,
                                                                       Double_t meanCharged, Double_t meanNeutral, Double_t meanGammas, Double_t meanSecondary) : TNamed(name,name)
-    ,fChargedContr(new TF1(chargedContr))
-    ,fNeutralContr(new TF1(neutralContr))
-    ,fGammaContr(new TF1(gammaContr))
-    ,fSecondaryContr(new TF1(secondaryContr))
-    ,fMeanCharged(meanCharged)
-    ,fMeanNeutral(meanNeutral)
-    ,fMeanGamma(meanGammas)
-    ,fMeanSecondary(meanSecondary)
+                                                                                                                                                               ,fChargedContr(new TF1(chargedContr))
+                                                                                                                                                               ,fNeutralContr(new TF1(neutralContr))
+                                                                                                                                                               ,fGammaContr(new TF1(gammaContr))
+                                                                                                                                                               ,fSecondaryContr(new TF1(secondaryContr))                                                                                       ,fRecoEff(new TH2F(recoEff))
+                                                                     //,fRecoEff(0)
+                                                                                                                                                               ,fMeanCharged(meanCharged)
+                                                                                                                                                               ,fMeanNeutral(meanNeutral)
+                                                                                                                                                               ,fMeanGamma(meanGammas)
+                                                                                                                                                               ,fMeanSecondary(meanSecondary)
 {}
 
 //! Copy constructor
@@ -33,6 +35,7 @@ AliAnalysisEtTrackMatchCorrections::AliAnalysisEtTrackMatchCorrections(const Ali
     ,fNeutralContr(new TF1(*(obj.fNeutralContr)))
     ,fGammaContr(new TF1(*(obj.fGammaContr)))
     ,fSecondaryContr(new TF1(*(obj.fSecondaryContr)))
+    ,fRecoEff(new TH2F(*(obj.fRecoEff)))
     ,fMeanCharged(obj.fMeanCharged)
     ,fMeanNeutral(obj.fMeanNeutral)
     ,fMeanGamma(obj.fMeanGamma)
@@ -42,7 +45,13 @@ AliAnalysisEtTrackMatchCorrections::AliAnalysisEtTrackMatchCorrections(const Ali
 
 //! Destructor
 AliAnalysisEtTrackMatchCorrections::~AliAnalysisEtTrackMatchCorrections()
-{}
+{
+//   delete fChargedContr;
+//   delete fNeutralContr;
+//   delete fGammaContr;
+//   delete fSecondaryContr;
+//   delete fRecoEff;
+}
 
 //! Assignment operator
 AliAnalysisEtTrackMatchCorrections& AliAnalysisEtTrackMatchCorrections::operator=(const AliAnalysisEtTrackMatchCorrections &other)
@@ -52,7 +61,7 @@ AliAnalysisEtTrackMatchCorrections& AliAnalysisEtTrackMatchCorrections::operator
         *fChargedContr = *(other.fChargedContr);
         *fNeutralContr = *(other.fNeutralContr);
         *fGammaContr = *(other.fGammaContr);
-        *fSecondaryContr = *(other.fSecondaryContr);
+       ;        *fSecondaryContr = *(other.fSecondaryContr);
        fMeanCharged = other.fMeanCharged;
        fMeanNeutral = other.fMeanNeutral;
        fMeanGamma = other.fMeanGamma;
@@ -62,3 +71,9 @@ AliAnalysisEtTrackMatchCorrections& AliAnalysisEtTrackMatchCorrections::operator
     return *this;
 }
 
+Double_t AliAnalysisEtTrackMatchCorrections::TrackMatchingEfficiency(float pT, int mult) const{
+  Double_t eff = 1.0;
+  if(fRecoEff) eff =  fRecoEff->GetBinContent(fRecoEff->GetXaxis()->FindBin(pT),fRecoEff->GetXaxis()->FindBin(mult));
+  //cout <<"eff "<<eff<<endl;
+  return eff;
+}
index 2cc5bf9..bbdb455 100644 (file)
@@ -4,6 +4,7 @@
 
 #include "TNamed.h"
 #include "TF1.h"
+#include "TH2F.h"
 
 class AliAnalysisEtTrackMatchCorrections : public TNamed
 {
@@ -14,7 +15,7 @@ public:
     AliAnalysisEtTrackMatchCorrections();
 
 //! Constructor
-    AliAnalysisEtTrackMatchCorrections(const TString name, const TF1 &chargedContr, const TF1 &neutralContr, const TF1 &gammaContr, const TF1 &secondaryContr, Double_t meanCharged, Double_t meanNeutral, Double_t meanGammas, Double_t meanSecondary);
+    AliAnalysisEtTrackMatchCorrections(const TString name, const TF1 &chargedContr, const TF1 &neutralContr, const TF1 &gammaContr, const TF1 &secondaryContr, const TH2F &recoEff, Double_t meanCharged, Double_t meanNeutral, Double_t meanGammas, Double_t meanSecondary);
 
 //! Copy constructor
     AliAnalysisEtTrackMatchCorrections(const AliAnalysisEtTrackMatchCorrections &obj);
@@ -42,6 +43,10 @@ public:
     TF1 SecondaryContr() const {
         return *fSecondaryContr;
     }
+
+    TH2F TrackMatchingEfficiency() const {
+      return *fRecoEff;
+    }
     
     Double_t ChargedContr(int mult) const {
         return fChargedContr->Eval(mult)*fMeanCharged;
@@ -59,6 +64,8 @@ public:
         return fSecondaryContr->Eval(mult)*fMeanSecondary;
     }
 
+    Double_t TrackMatchingEfficiency(float pT, int mult) const;
+
 
 // Setters
 
@@ -78,6 +85,10 @@ public:
         *fSecondaryContr = secondaryContr;
     }
 
+    void SetReconstructionEfficiency(const TH2F &recoEff) {
+        *fRecoEff = recoEff;
+    }
+
 
 private:
 
@@ -89,6 +100,8 @@ private:
     TF1 *fGammaContr;  
     // SecondaryContr
     TF1 *fSecondaryContr;
+
+    TH2F *fRecoEff;//Reconstruction efficiency, x axis = pT, y axis = multiplicity, z = efficiency
     
     // Mean deposited energy from charged particles
     Double_t fMeanCharged;