]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fixing bug in gamma efficiency and adding histograms to make efficiency cross check...
authorcnattras <saccharomyces.cerevisae@gmail.com>
Thu, 10 Jul 2014 20:29:23 +0000 (16:29 -0400)
committercnattras <saccharomyces.cerevisae@gmail.com>
Thu, 10 Jul 2014 20:29:23 +0000 (16:29 -0400)
PWGLF/totEt/AliAnalysisEtMonteCarlo.cxx
PWGLF/totEt/AliAnalysisEtMonteCarlo.h

index 0e1bc503ff39f015b064ff3aa4f355ee09d84f45..e903d62a56862f34d89d45d5afbdb71328f8c6ee 100644 (file)
@@ -258,7 +258,9 @@ AliAnalysisEtMonteCarlo::AliAnalysisEtMonteCarlo():AliAnalysisEt()
                                                  ,fHistGammasFoundOutOfAccAltCent(0)
                                                  ,fHistGammasGeneratedCent(0)
                                                  ,fHistGammasFoundRecoEnergyCent(0)
+                                                 ,fHistAllGammasFoundRecoEnergyCent(0)
                                                  ,fHistGammasFoundOutOfAccRecoEnergyCent(0)
+                                                 ,fHistAllGammasFoundOutOfAccRecoEnergyCent(0)
                                                  ,fHistChargedTracksCut(0)
                                                  ,fHistChargedTracksAccepted(0)
                                                  ,fHistGammasCut(0)
@@ -507,7 +509,9 @@ AliAnalysisEtMonteCarlo::~AliAnalysisEtMonteCarlo()
     delete fHistGammasFoundAltCent; // enter comment here
     delete fHistGammasGeneratedCent; // enter comment here
     delete fHistGammasFoundRecoEnergyCent;
+    delete fHistAllGammasFoundRecoEnergyCent;
     delete fHistGammasFoundOutOfAccRecoEnergyCent;
+    delete fHistAllGammasFoundOutOfAccRecoEnergyCent;
     delete fHistChargedTracksCut;
     delete fHistChargedTracksAccepted;
     delete fHistGammasCut;
@@ -743,7 +747,10 @@ Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev)
             {
                 //Printf("Particle with eta: %f, pid: %d", part->Eta(), code);
                 // calculate E_T
-                if (
+         
+             //fHistGammasFoundRecoEnergyCent->Fill(fReconstructedE,fCentClass);      
+             //cout<<"Messed up filling would have filled with "<<fReconstructedE<<" cent "<<fCentClass<<endl;
+                 if (
                     TMath::Abs(code) == fgProtonCode ||
                     TMath::Abs(code) == fgNeutronCode ||
                     TMath::Abs(code) == fgLambdaCode ||
@@ -1449,6 +1456,18 @@ Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2)
          if(!written && (fDepositedCode==fgGammaCode || fDepositedCode==fgEMinusCode || fDepositedCode ==fgEPlusCode)){//if the particle hitting the calorimeter is gamma, electron and not from a kaon
 //         cout<<"Signal ";
 //         PrintFamilyTreeShort(iPart, stack);
+//efficiencies without cutting track matched gammas
+           if(containsGamma){
+             if(!fSelector->CutGeometricalAcceptance(*primPart)){
+               fHistAllGammasFoundOutOfAccRecoEnergyCent->Fill(fReconstructedE,fCentClass);
+             }
+             else{
+               fHistAllGammasFoundRecoEnergyCent->Fill(fReconstructedE,fCentClass);
+             }
+             //cout<<"contains gamma"<<endl;
+           }
+           //else{cout<<"does not contain gamma"<<endl;}
+
 
            fClusterMultGammas++;
            written = kTRUE;
@@ -1477,6 +1496,7 @@ Int_t AliAnalysisEtMonteCarlo::AnalyseEvent(AliVEvent* ev,AliVEvent* ev2)
                  fHistGammasFoundOutOfAccRecoEnergyCent->Fill(fReconstructedE,fCentClass);
                }
                else{
+                 //cout<<"filling reference histogram"<<endl;
                  if(gammaEnergy>0) fHistGammaEnergyCrossCheckAlt->Fill(gammaEnergy,(fReconstructedEt-gammaEnergy)/fReconstructedEt);
                  fHistGammasFoundRecoEnergyCent->Fill(fReconstructedE,fCentClass);
                  etGammaCrossCheckAlt += clEt;
@@ -2165,7 +2185,9 @@ void AliAnalysisEtMonteCarlo::CreateHistograms()
     fHistGammasFoundCent = new TH2F("fHistGammasFoundCent", "fHistGammasFoundCent",200, 0, 10,20,-0.5,19.5);
     fHistGammasFoundOutOfAccAltCent = new TH2F("fHistGammasFoundOutOfAccAltCent", "fHistGammasFoundOutOfAccCent",200, 0, 10,20,-0.5,19.5);
     fHistGammasFoundRecoEnergyCent = new TH2F("fHistGammasFoundRecoEnergyCent", "fHistGammasFoundRecoEnergyCent",200, 0, 10,20,-0.5,19.5);
+    fHistAllGammasFoundRecoEnergyCent = new TH2F("fHistAllGammasFoundRecoEnergyCent", "fHistAllGammasFoundRecoEnergyCent",200, 0, 10,20,-0.5,19.5);
     fHistGammasFoundOutOfAccRecoEnergyCent = new TH2F("fHistGammasFoundOutOfAccRecoEnergyCent", "fHistGammasFoundOutOfAccRecoEnergyCent",200, 0, 10,20,-0.5,19.5);
+    fHistAllGammasFoundOutOfAccRecoEnergyCent = new TH2F("fHistAllGammasFoundOutOfAccRecoEnergyCent", "fHistAllGammasFoundOutOfAccRecoEnergyCent",200, 0, 10,20,-0.5,19.5);
     fHistGammasFoundAltCent = new TH2F("fHistGammasFoundAltCent", "fHistGammasFoundAltCent",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);
@@ -2489,7 +2511,9 @@ void AliAnalysisEtMonteCarlo::FillOutputList(TList *list)
     list->Add(fHistGammasFoundAltCent);
     list->Add(fHistGammasGeneratedCent);
     list->Add(fHistGammasFoundRecoEnergyCent);
+    list->Add(fHistAllGammasFoundRecoEnergyCent);
     list->Add(fHistGammasFoundOutOfAccRecoEnergyCent);
+    list->Add(fHistAllGammasFoundOutOfAccRecoEnergyCent);
     list->Add(fHistChargedTracksCut);
     list->Add(fHistChargedTracksAccepted);
     list->Add(fHistGammasCut);
index 557558e66910edb19225d2c066a2370fee0aaeb6..e88544d0b39d6787ed73e1286c758edc2ef4b3b1 100644 (file)
@@ -340,7 +340,9 @@ protected:
     TH2F *fHistGammasFoundOutOfAccAltCent;//!
     TH2F *fHistGammasGeneratedCent;//!
     TH2F *fHistGammasFoundRecoEnergyCent;//!
+    TH2F *fHistAllGammasFoundRecoEnergyCent;//!
     TH2F *fHistGammasFoundOutOfAccRecoEnergyCent;//!
+    TH2F *fHistAllGammasFoundOutOfAccRecoEnergyCent;//!
     TH1F *fHistChargedTracksCut;//!
     TH1F *fHistChargedTracksAccepted;//!
     TH1F *fHistGammasCut;//!