]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Added some extra CF plots and changed binning for a few histograms (kathrin) anddded...
authorkaamodt <kaamodt@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 19 Jan 2010 14:26:50 +0000 (14:26 +0000)
committerkaamodt <kaamodt@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 19 Jan 2010 14:26:50 +0000 (14:26 +0000)
PWG4/GammaConv/AliAnalysisTaskGammaConversion.cxx
PWG4/GammaConv/AliAnalysisTaskGammaConversion.h
PWG4/GammaConv/AliGammaConversionBGHandler.cxx
PWG4/GammaConv/AliGammaConversionBGHandler.h
PWG4/GammaConv/AliV0Reader.cxx
PWG4/GammaConv/AliV0Reader.h
PWG4/macros/ConfigGammaConversion.C

index 0e809d15b921c353c883c14acbd2d0534236a51c..a44bf82d6b7b2e9cb68bf5a7b6c66b2bb7412093 100644 (file)
@@ -965,11 +965,11 @@ void AliAnalysisTaskGammaConversion::ProcessV0sNoCut(){
       if(TMath::Abs(negativeMC->GetPdgCode())!=11 || TMath::Abs(positiveMC->GetPdgCode())!=11){
        continue;
       }
-      if(negativeMC->GetPdgCode()==positiveMC->GetPdgCode()){
+      if(negativeMC->GetPdgCode() == positiveMC->GetPdgCode()){
        continue;
       }
 
-      if(negativeMC->GetUniqueID() != 5 || positiveMC->GetUniqueID() !=5){
+      if(negativeMC->GetUniqueID() != 5 || positiveMC->GetUniqueID() !=5){ // id 5 is conversion
        continue;
       }
                        
@@ -1156,6 +1156,14 @@ void AliAnalysisTaskGammaConversion::ProcessV0s(){
                        
       if(fV0Reader->GetMotherMCParticle()->GetPdgCode() == 22){
 
+       if(fDoCF){
+         Double_t containerInput[3];
+         containerInput[0] = fV0Reader->GetMotherCandidatePt();
+         containerInput[1] = fV0Reader->GetMotherCandidateEta();
+         containerInput[2] = fV0Reader->GetMotherCandidateMass();
+         fCFManager->GetParticleContainer()->Fill(containerInput,kStepTrueGamma); // for CF 
+       }
+
        fHistograms->FillHistogram("ESD_TrueConvGamma_Pt", fV0Reader->GetMotherCandidatePt());
        fHistograms->FillHistogram("ESD_TrueConvGamma_Energy", fV0Reader->GetMotherCandidateEnergy());
        fHistograms->FillHistogram("ESD_TrueConvGamma_Eta", fV0Reader->GetMotherCandidateEta());                                
index 64c1826a9955bfcea3a04c9b02220e9d2e154f9e..0111fe4fdb6da3d887370720c294d281ee9177c9 100644 (file)
@@ -132,18 +132,20 @@ class AliAnalysisTaskGammaConversion : public AliAnalysisTaskSE
     kStepLikeSign = 2,
     kStepTPCRefit = 3,
     kStepKinks = 4,
-    kStepGetOnFly = 5,
-    kStepNContributors = 6,
-    kStepTPCPID = 7,
-    kStepR = 8,
-    kStepLine = 9,
-    kStepZ = 10,
-    kStepNDF = 11,
-    kStepChi2 = 12,
-    kStepEta = 13,
-    kStepPt = 14
+    kStepdEdx = 5,
+    kStepGetOnFly = 6,
+    kStepNContributors = 7,
+    kStepTPCPID = 8,
+    kStepR = 9,
+    kStepLine = 10,
+    kStepZ = 11,
+    kStepNDF = 12,
+    kStepChi2 = 13,
+    kStepEta = 14,
+    kStepPt = 15,
+    kStepTrueGamma = 16
   };
-
+  
   AliV0Reader* fV0Reader; // The V0 reader object 
                
   AliStack * fStack; // pointer to the MC particle stack
@@ -223,7 +225,7 @@ class AliAnalysisTaskGammaConversion : public AliAnalysisTaskSE
                
   //  TClonesArray *fAODObjects;
                
-  ClassDef(AliAnalysisTaskGammaConversion, 5); // Analysis task for gamma conversions
+  ClassDef(AliAnalysisTaskGammaConversion, 6); // Analysis task for gamma conversions
 };
 
 #endif //ALIANALYSISTASKGAMMA_H
index 2b35c6af11b02cb0f2b3c25d868897efa67de740..f5af751026e6465c6b46b72d53cb209a017b0e85 100644 (file)
@@ -148,7 +148,7 @@ void AliGammaConversionBGHandler::AddEvent(TClonesArray * eventGammas, Double_t
   Int_t z = GetZBinIndex(zvalue);
   Int_t m = GetMultiplicityBinIndex(multiplicity);
 
-  if(fBGEventCounter[z][m] >= fNEvents -1){
+  if(fBGEventCounter[z][m] >= fNEvents){
     fBGEventCounter[z][m]=0;
   }
   Int_t eventCounter=fBGEventCounter[z][m];
@@ -165,6 +165,7 @@ void AliGammaConversionBGHandler::AddEvent(TClonesArray * eventGammas, Double_t
   //set the z and multiplicity numbers
   fBGEvents[z][m][eventCounter].fZVertexPosition = zvalue;
   fBGEvents[z][m][eventCounter].fChargedTrackMultiplicity = multiplicity;
+  fBGEventCounter[z][m]++;
 }
 
 AliGammaConversionKFVector* AliGammaConversionBGHandler::GetBGGoodV0s(Int_t event, Double_t zvalue, Int_t multiplicity){
@@ -174,3 +175,17 @@ AliGammaConversionKFVector* AliGammaConversionBGHandler::GetBGGoodV0s(Int_t even
 
   return &(fBGEvents[z][m][event].fReconstructedGammas);
 }
+
+void AliGammaConversionBGHandler::PrintBGArray(){
+  for(Int_t z=0;z<fNBinsZ;z++){
+    cout<<"Getting the data for z bin: "<<z<<endl;
+    for(Int_t multiplicity=0;multiplicity<fNBinsMultiplicity;multiplicity++){
+      cout<<"Getting the data for multiplicity bin: "<<multiplicity<<endl;
+      for(Int_t event=0;event<fNEvents;event++){
+       if(fBGEvents[z][multiplicity][event].fReconstructedGammas.size()>0){
+         cout<<"Event: "<<event<<" has: "<<fBGEvents[z][multiplicity][event].fReconstructedGammas.size()<<endl;
+       }
+      }
+    }
+  }
+}
index 974aff4d950de1da758b3341433e9119a761ad10..7aa7af68d8a17c4d17ae8678ca20e0e1993ae34a 100644 (file)
@@ -67,6 +67,8 @@ struct AliGammaConversionBGEvent
 
   AliGammaConversionKFVector* GetBGGoodV0s(Int_t event, Double_t zvalue, Int_t multiplicity);
 
+  void PrintBGArray();
+
  private:
 
   Int_t fNEvents;
index 0ea9158361d86a585b0f3cbce3baadb8bbf67693..240e7859dadee77105d650427461295acea691bb 100644 (file)
@@ -741,6 +741,7 @@ void AliV0Reader::UpdateEventByEventData(){
   }
   fCurrentEventGoodV0s->Delete();
   fCurrentV0IndexNumber=0;
+  //  fBGEventHandler->PrintBGArray(); // for debugging
 }
 
 
index b7bef5dddfac5d9a4fc10d6b9ddabfe5a9222a07..3ee16cd55d128324fecdba8f31f2d92276f2a75e 100644 (file)
@@ -54,20 +54,20 @@ class AliV0Reader : public TObject {
     kStepLikeSign = 2,
     kStepTPCRefit = 3,
     kStepKinks = 4,
-    kStepGetOnFly = 5,
-    kStepNContributors = 6,
-    kStepTPCPID = 7,
-    kStepR = 8,
-    kStepLine = 9,
-    kStepZ = 10,
-    kStepNDF = 11,
-    kStepChi2 = 12,
-    kStepEta = 13,
-    kStepPt = 14
+    kStepdEdx = 5,
+    kStepGetOnFly = 6,
+    kStepNContributors = 7,
+    kStepTPCPID = 8,
+    kStepR = 9,
+    kStepLine = 10,
+    kStepZ = 11,
+    kStepNDF = 12,
+    kStepChi2 = 13,
+    kStepEta = 14,
+    kStepPt = 15,
+    kStepTrueGamma = 16
   };
        
-       
-       
   AliV0Reader();                                        //constructor
   AliV0Reader(const AliV0Reader & g);                   //copy constructor
   AliV0Reader & operator = (const AliV0Reader & g);     //assignment operator
@@ -692,7 +692,7 @@ class AliV0Reader : public TObject {
   AliGammaConversionBGHandler *fBGEventHandler;
   Bool_t fBGEventInitialized;
        
-  ClassDef(AliV0Reader,8)
+  ClassDef(AliV0Reader,9)
 };
 #endif
 
index 6ffdab1d0d18aaaaf0c6c23593664a6638256d30..b9a6b62f16d816559e26e6916fb0450da6a798b0 100644 (file)
@@ -472,7 +472,7 @@ Double_t kGClastYBinAsymmetry = 1.;
 
 
 //Pt-plots
-Int_t kGCnXBinsPt = 200;
+Int_t kGCnXBinsPt = 500;
 Double_t kGCfirstXBinPt = 0.;
 Double_t kGClastXBinPt = 50.;
 
@@ -581,7 +581,7 @@ Double_t kGClastXBinGammaNDF = 10.;
 Int_t kGCnXBinsSpectra = 500;
 Double_t kGCfirstXBinSpectra = 0.;
 Double_t kGClastXBinSpectra = 1.;
-Int_t kGCnYBinsSpectra = 100;
+Int_t kGCnYBinsSpectra = 500;
 Double_t kGCfirstYBinSpectra = 0.;
 Double_t kGClastYBinSpectra = 50.;
 
@@ -917,7 +917,7 @@ AliAnalysisTaskGammaConversion* ConfigGammaConversion(TString arguments,AliAnaly
     UInt_t imass = 2;  
                
     //how many selection steps 
-    UInt_t nstep = 15;
+    UInt_t nstep = 17;
     const Int_t nvar = 3;
     const Int_t nbin0 = kGCnXBinsPt; 
     const Int_t nbin1 = kGCnXBinsEta;