]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Further Coverity fixes, and V0 developments.
authorsma <sma@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 Feb 2011 14:12:33 +0000 (14:12 +0000)
committersma <sma@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 Feb 2011 14:12:33 +0000 (14:12 +0000)
Thanks a lot Ivana!!

PWG3/hfe/AliAnalysisTaskCheckV0tender.cxx
PWG3/hfe/AliAnalysisTaskCheckV0tenderII.cxx
PWG3/hfe/AliAnalysisTaskDisplacedElectrons.cxx
PWG3/hfe/AliHFEV0cuts.cxx
PWG3/hfe/AliHFEV0pid.cxx
PWG3/hfe/AliHFEV0pid.h
PWG3/hfe/AliHFEdisplacedElectrons.cxx
PWG3/hfe/AliHFEmcQA.cxx
PWG3/hfe/AliHFEmcQA.h
PWG3/hfe/AliHFEpidQA.cxx
PWG3/hfe/AliHFEsecVtx.cxx

index ffd8c4fb6478a26d12959e7706d084616caeb4c9..4f78ffc430934f53cfc684bb63443a239d2fdcd8 100644 (file)
@@ -209,8 +209,7 @@ void AliAnalysisTaskCheckV0tender::ProcessV0s(){
     if(!esdV0) continue;
     if(!esdV0->GetOnFlyStatus()) continue; // Take only V0s from the On-the-fly v0 finder
     Int_t pid = GetTenderPidV0(esdV0);
-    //if(pid < 0) continue;
-    pid = 2;
+    if(pid < 0) continue;
     fColl->Fill("h_NumberOf_V0s", pid);
     Float_t pT = esdV0->Pt();
     name = "h_" + type[pid] + "_pt";
index 35ab96bfe13a2da53b40fa77f875125b819d8376..53437a5ea89266eb1cad939d707ccb8254610617 100644 (file)
@@ -244,7 +244,7 @@ void AliAnalysisTaskCheckV0tenderII::ProcessV0s(){
     ResetPDGcodes();
 
     // New standalone V0 selection software
-    if( ! (fV0cuts->ProcessV0(esdV0, fpdgV0, fpdgP, fpdgN)) ) return;
+    if( ! (fV0cuts->ProcessV0(esdV0, fpdgV0, fpdgP, fpdgN)) ) continue;
     
     Int_t pid = PDGtoPIDv0(fpdgV0);
     //printf(" -D: pdg: %i, pid: %i\n", fpdgV0, pid);
index 6ec544de68ba3596aac764d174c3ea0928a17853..608ae64a3967b7d3ec4c6b4f5ab3122a9fc69a61 100644 (file)
@@ -196,7 +196,6 @@ AliAnalysisTaskDisplacedElectrons::~AliAnalysisTaskDisplacedElectrons(){
   if(fDePID) delete fDePID;
   if(fDeCFM) delete fDeCFM;
   if(fDisplacedElectrons) delete fDisplacedElectrons;  
-  return;
   if(fDeNEvents) delete fDeNEvents;
   if(fElectronsMcPt) delete fElectronsMcPt;
   if(fElectronsEsdPt) delete fElectronsEsdPt;
index e219cb66f90deff90c2b9943aec361b22ea25a5c..009953ae25e1fa3be5fb993129272d10b79b8f0f 100644 (file)
@@ -28,6 +28,7 @@
 #include "AliKFParticle.h"
 #include "AliKFVertex.h"
 #include "AliLog.h"
+#include "AliExternalTrackParam.h"
 
 #include "AliHFEcollection.h"
 
@@ -133,11 +134,11 @@ void AliHFEV0cuts::Init(const char* name){
   fQA->CreateTH1Fvector1(2, "h_cut_Gamma_DCA", "DCA between the gamma daughters; dca (cm); counts", 100, 0, 2);
   fQA->CreateTH1Fvector1(2, "h_cut_Gamma_VtxR_old", "*old* Radius of the gamma conversion vertex; r (cm); counts", 1000, 0, 100);
   fQA->CreateTH1Fvector1(2, "h_cut_Gamma_VtxR", "Radius of the gamma conversion vertex; r (cm); counts", 1000, 0, 100);
-  fQA->CreateTH1Fvector1(2, "h_cut_Gamma_OA", "opening angle of the gamma products; opening angle (rad); counts", 100, 0, 1);
   fQA->CreateTH1Fvector1(2, "h_cut_Gamma_PP", "gamma psi pair angle; psi pairangle (rad); counts", 100, 0, 2);
   fQA->CreateTH1Fvector1(2, "h_cut_Gamma_Chi2", "gamma Chi2/NDF; Chi2/NDF; counts", 100, 0, 50);
+  fQA->CreateTH1Fvector1(2, "h_cut_Gamma_Sep", "gamma separation dist at TPC inned wall", 100, 0, 50);
   fQA->CreateTH1Fvector1(7, "h_Gamma_Mass", "Invariant mass of gammas; mass (GeV/c^{2}); counts", 100, 0, 0.2);
-
+  
  
   // kaons
   fQA->CreateTH1Fvector1(2, "h_cut_K0_CosPoint", "K0 Cosine pointing angle; cos point. angle; counts", 100, 0, 0.1);
@@ -157,7 +158,7 @@ void AliHFEV0cuts::Init(const char* name){
   fQA->CreateTH2F("h_L_checks", "Lambda candidate check[0] -v- check[1]; check[0]; check[1]", 5, -0.75, 1.75, 6, -0.75, 1.75 );
   
   // electrons
-  fQA->CreateTH1Fvector1(9, "h_Electron_P", "Momenta of conversion electrons -cuts-; P (GeV/c); counts", 50, 0.1, 20, 0);
+  fQA->CreateTH1Fvector1(7, "h_Electron_P", "Momenta of conversion electrons -cuts-; P (GeV/c); counts", 50, 0.1, 20, 0);
 
   // K0 pions
   fQA->CreateTH1Fvector1(8, "h_PionK0_P", "Momenta of K0 pions -cuts-; P (GeV/c) counts;", 50, 0.1, 20, 0);
@@ -180,15 +181,7 @@ void AliHFEV0cuts::Init(const char* name){
   //
   // possibly new cuts
   //
-  
-  // Gamma
-  fQA->CreateTH2Fvector1(2, "h_cut_Gamma_OAvP", "open. ang. of the Gamma daughters versus Gamma mom; Gamma p (GeV/c); opening angle (pions) (rad)", 100, 0.1, 10, 200, 0., 0.2);
-  // K0
-  fQA->CreateTH2Fvector1(2, "h_cut_K0_OAvP", "open. ang. of the K0 daughters versus K0 momentum; K0 p (GeV/c); opening angle (pions) (rad)", 100, 0.1, 10, 100, 0, 3.5);
-  // Lambda
-  fQA->CreateTH2Fvector1(2, "h_cut_L_OAvP", "open. ang. of the L daughters versus L momentum; Lambda p (GeV/c); openeing angle pion-proton (rad)", 100, 0.1, 10, 100, 0, 3.5);
-  fQA->CreateTH2Fvector1(2, "h_cut_L_rdp_v_mp", "relative L daughter mom -v- mother mom; L mom (GeV/c); relative daughter mom p2/p1", 100, 0.1, 10, 100, 0, 1);
-
+ fQA->CreateTH2Fvector1(2, "h_cut_L_rdp_v_mp", "relative L daughter mom -v- mother mom; L mom (GeV/c); relative daughter mom p2/p1", 100, 0.1, 10, 100, 0, 1);
 
   // THnSparse histograms
   
@@ -229,27 +222,26 @@ void AliHFEV0cuts::Init(const char* name){
   fQAmc->CreateTH2Fvector1(2, "h_cut_Gamma_CosPoint_S", "S - Gamma Cosine pointing angle; mom (GeV/c); cos point. angle",  pN, pMin, pMax, 50, 0, 0.1, 0);
   fQAmc->CreateTH2Fvector1(2, "h_cut_Gamma_DCA_S", "S - DCA between the gamma daughters; mom (GeV/c); dca (cm)", pN, pMin, pMax, 50, 0, 2, 0);
   fQAmc->CreateTH2Fvector1(2, "h_cut_Gamma_VtxR_S", "S - Radius of the gamma conversion vertex; mom (GeV/c); r (cm)", pN, pMin, pMax, 100, 0, 100, 0);
-  fQAmc->CreateTH2Fvector1(2, "h_cut_Gamma_OA_S", "S - opening angle of the gamma products; mom (GeV/c); opening angle (rad)", pN, pMin, pMax, 50, 0, 0.3, 0);
   fQAmc->CreateTH2Fvector1(2, "h_cut_Gamma_PP_S", "S - gamma psi pair angle; mom (GeV/c); psi pairangle (rad)", pN, pMin, pMax, 50, 0, 0.5, 0);
   fQAmc->CreateTH2Fvector1(2, "h_cut_Gamma_Chi2_S", "S - gamma Chi2/NDF; mom (GeV/c); Chi2/NDF", pN, pMin, pMax, 50, 0, 100, 0);
+  fQAmc->CreateTH2Fvector1(2, "h_cut_Gamma_Sep_S", "S - gamma separation TPC-inner; mom (GeV/c); tracks separatin (cm)", pN, pMin, pMax, 100, 0, 50, 0);
 
-  fQAmc->CreateTH1Fvector1(8, "h_Gamma_Mass_S", "S - Invariant mass of gammas; mass (GeV/c^{2}); counts", 100, 0, 0.2);
+  fQAmc->CreateTH1Fvector1(9, "h_Gamma_Mass_S", "S - Invariant mass of gammas; mass (GeV/c^{2}); counts", 100, 0, 0.2);
   // gamma background
   fQAmc->CreateTH2Fvector1(2, "h_cut_Gamma_CosPoint_B", "B - Gamma Cosine pointing angle; mom (GeV/c); cos point. angle", pN, pMin, pMax, 50, 0, 0.1, 0);
   fQAmc->CreateTH2Fvector1(2, "h_cut_Gamma_DCA_B", "B - DCA between the gamma daughters; mom (GeV/c); dca (cm)", pN, pMin, pMax, 50, 0, 2, 0);
   fQAmc->CreateTH2Fvector1(2, "h_cut_Gamma_VtxR_B", "B - Radius of the gamma conversion vertex; mom (GeV/c); r (cm)", pN, pMin, pMax, 100, 0, 100, 0);
-  fQAmc->CreateTH2Fvector1(2, "h_cut_Gamma_OA_B", "B - opening angle of the gamma products; mom (GeV/c); opening angle (rad)", pN, pMin, pMax, 50, 0, 0.3, 0);
   fQAmc->CreateTH2Fvector1(2, "h_cut_Gamma_PP_B", "B - gamma psi pair angle; mom (GeV/c); psi pairangle (rad)", pN, pMin, pMax, 50, 0, 0.5, 0);
   fQAmc->CreateTH2Fvector1(2, "h_cut_Gamma_Chi2_B", "B - gamma Chi2/NDF; mom (GeV/c); Chi2/NDF", pN, pMin, pMax, 50, 0, 100, 0);
+  fQAmc->CreateTH2Fvector1(2, "h_cut_Gamma_Sep_B", "B - gamma separation TPC-inner; mom (GeV/c); tracks separatin (cm)", pN, pMin, pMax, 100, 0, 50, 0);
 
-  fQAmc->CreateTH1Fvector1(8, "h_Gamma_Mass_B", "B - Invariant mass of gammas; mass (GeV/c^{2}); counts", 100, 0, 0.2);  
+  fQAmc->CreateTH1Fvector1(9, "h_Gamma_Mass_B", "B - Invariant mass of gammas; mass (GeV/c^{2}); counts", 100, 0, 0.2);  
  
   // kaons signal
   fQAmc->CreateTH2Fvector1(2, "h_cut_K0_CosPoint_S", "S - K0 Cosine pointing angle; mom (GeV/c); cos point. angle", pN, pMin, pMax, 50, 0, 0.1, 0);
   fQAmc->CreateTH2Fvector1(2, "h_cut_K0_DCA_S", "S - DCA between the K0 daughters; mom (GeV/c); dca (cm)", pN, pMin, pMax, 50, 0, 2, 0);
   fQAmc->CreateTH2Fvector1(2, "h_cut_K0_VtxR_S", "S - Radius of the K0 decay vertex; mom (GeV/c); r (cm)", pN, pMin, pMax, 50, 0, 100, 0);
   fQAmc->CreateTH2Fvector1(2, "h_cut_K0_Chi2_S", "S - K0 Chi2/NDF; mom (GeV/c); Chi2/NDF", pN, pMin, pMax, 50, 0, 100, 0);
-  fQAmc->CreateTH2Fvector1(2, "h_cut_K0_OA_S", "S - opening angle of the K0 pions; mom (GeV/c); opening angle (rad)", pN, pMin, pMax, 100, 0, 1, 0);
 
   fQAmc->CreateTH1Fvector1(5, "h_K0_Mass_S", "S - Invariant mass of K0; mass (GeV/c^{2}); counts", 125, 0.45, 0.55);
   // kaons background
@@ -257,7 +249,6 @@ void AliHFEV0cuts::Init(const char* name){
   fQAmc->CreateTH2Fvector1(2, "h_cut_K0_DCA_B", "B - DCA between the K0 daughters; mom (GeV/c); dca (cm)", pN, pMin, pMax, 50, 0, 2, 0);
   fQAmc->CreateTH2Fvector1(2, "h_cut_K0_VtxR_B", "B - Radius of the K0 decay vertex; mom (GeV/c); r (cm)", pN, pMin, pMax, 50, 0, 100, 0);
   fQAmc->CreateTH2Fvector1(2, "h_cut_K0_Chi2_B", "B - K0 Chi2/NDF; mom (GeV/c); Chi2/NDF", pN, pMin, pMax, 50, 0, 100, 0);
-  fQAmc->CreateTH2Fvector1(2, "h_cut_K0_OA_B", "B - opening angle of the K0 pions; mom (GeV/c); opening angle (rad)", pN, pMin, pMax, 100, 0, 1, 0);
 
   fQAmc->CreateTH1Fvector1(5, "h_K0_Mass_B", "B - Invariant mass of K0; mass (GeV/c^{2}); counts", 125, 0.45, 0.55);
 
@@ -266,7 +257,6 @@ void AliHFEV0cuts::Init(const char* name){
   fQAmc->CreateTH2Fvector1(2, "h_cut_L_DCA_S", "S - DCA between the L daughters; mom (GeV/c); dca (cm)", pN, pMin, pMax, 50, 0, 2, 0);
   fQAmc->CreateTH2Fvector1(2, "h_cut_L_VtxR_S", "S - Radius of the L decay vertex; mom (GeV/c); r (cm)", pN, pMin, pMax, 50, 0, 100, 0);
   fQAmc->CreateTH2Fvector1(2, "h_cut_L_Chi2_S", "S - L Chi2/NDF; mom (GeV/c); Chi2/NDF", pN, pMin, pMax, 50, 0, 100, 0);
-  fQAmc->CreateTH2Fvector1(2, "h_cut_L_OA_S", "S - opening angle of the L p-p; mom (GeV/c); opening angle (rad)", pN, pMin, pMax, 100, 0, 1, 0);
 
   fQAmc->CreateTH1Fvector1(5, "h_L_Mass_S", "S - Invariant mass of L; mass (GeV/c^{2}); counts", 60, 1.1, 1.13);
   fQAmc->CreateTH1Fvector1(5, "h_AL_Mass_S", "S - Invariant mass of anti L; mass (GeV/c^{2}); counts", 60, 1.1, 1.13);
@@ -275,8 +265,6 @@ void AliHFEV0cuts::Init(const char* name){
   fQAmc->CreateTH2Fvector1(2, "h_cut_L_DCA_B", "B - DCA between the L daughters; mom (GeV/c); dca (cm)", pN, pMin, pMax, 50, 0, 2, 0);
   fQAmc->CreateTH2Fvector1(2, "h_cut_L_VtxR_B", "B - Radius of the L decay vertex; mom (GeV/c); r (cm)", pN, pMin, pMax, 50, 0, 100, 0);
   fQAmc->CreateTH2Fvector1(2, "h_cut_L_Chi2_B", "B - L Chi2/NDF; mom (GeV/c); Chi2/NDF", pN, pMin, pMax, 50, 0, 100, 0);
-  fQAmc->CreateTH2Fvector1(2, "h_cut_L_OA_B", "B - opening angle of the L p-p; mom (GeV/c); opening angle (rad)", pN, pMin, pMax, 100, 0, 1, 0);
-
   fQAmc->CreateTH2Fvector1(2, "h_cut_L_rdp_v_mp_S", "S - relative L daughter mom -v- mother mom; L mom (GeV/c); relative daughter mom p2/p1", 100, 0.1, 10, 100, 0, 1);
   fQAmc->CreateTH2Fvector1(2, "h_cut_L_rdp_v_mp_B", "B - relative L daughter mom -v- mother mom; L mom (GeV/c); relative daughter mom p2/p1", 100, 0.1, 10, 100, 0, 1);
   fQAmc->CreateTH1Fvector1(5, "h_LAL_Mass_B", "B - Invariant mass of anti L; mass (GeV/c^{2}); counts", 60, 1.1, 1.13);
@@ -346,7 +334,7 @@ Bool_t AliHFEV0cuts::TrackCutsCommon(AliESDtrack* track){
 
   // No. of TPC clusters
   fQA->Fill("h_ST_NclsTPC", track->GetTPCNcls());
-  if(track->GetTPCNcls() < 80) return kFALSE;   //
+  if(track->GetTPCNcls() < 1) return kFALSE;   //
 
   // TPC refit
   if((status & AliESDtrack::kTPCrefit)){
@@ -361,7 +349,7 @@ Bool_t AliHFEV0cuts::TrackCutsCommon(AliESDtrack* track){
   Int_t nTPCclusters = track->GetTPCclusters(0);
   Float_t chi2perTPCcluster = track->GetTPCchi2()/Float_t(nTPCclusters);
   fQA->Fill("h_ST_chi2TPCcls", chi2perTPCcluster);
-  if(chi2perTPCcluster > 3.5) return kFALSE;   // 4.0
+  if(chi2perTPCcluster > 4.0) return kFALSE;   // 4.0
 
   // TPC cluster ratio
   Float_t cRatioTPC = track->GetTPCNclsF() > 0. ? static_cast<Float_t>(track->GetTPCNcls())/static_cast<Float_t> (track->GetTPCNclsF()) : 1.;
@@ -374,7 +362,7 @@ Bool_t AliHFEV0cuts::TrackCutsCommon(AliESDtrack* track){
 
   // pt
   fQA->Fill("h_ST_pt",track->Pt());
-  if(track->Pt() < 0.1 || track->Pt() > 100) return kFALSE; //
+  //if(track->Pt() < 0.1 || track->Pt() > 100) return kFALSE; //
 
   // eta
   fQA->Fill("h_ST_eta", track->Eta());
@@ -450,14 +438,22 @@ Bool_t AliHFEV0cuts::GammaCuts(AliESDv0 *v0){
   Float_t p[2] = {d[0]->GetP(), d[1]->GetP()};
 
   // Cut values
-  const Double_t cutChi2NDF = 40.;              // ORG [7.]  
+  const Double_t cutChi2NDF = 10.;              // ORG [7.]  
   const Double_t cutCosPoint[2] = {0., 0.02};  // ORG [0., 0.03]
   const Double_t cutDCA[2] = {0., 0.25};       // ORG [0., 0.25]
-  const Double_t cutProdVtxR[2] = {8., 90.};   // ORG [6., 9999]
+  const Double_t cutProdVtxR[2] = {3., 90.};   // ORG [6., 9999]
   const Double_t cutPsiPair[2] = {0., 0.05};   // ORG [0. 0.05]
-  const Double_t cutOAngle[2] = {0, 0.1};      // ORG [0., 0.1]
   // mass cut
   const Double_t cutMass = 0.05;               // ORG [0.05]
+
+  //
+  // possible new cuts
+  //
+  // separation cut at the entrance to the TPC
+  const Double_t cutSeparation = 0.;          // ORG 3.0 cm
+
+
+
   // Values
    
   // cos pointing angle
@@ -478,17 +474,27 @@ Bool_t AliHFEV0cuts::GammaCuts(AliESDv0 *v0){
     r2 = TMath::Sqrt(xy[0]*xy[0] + xy[1]*xy[1]);
   }
 
-
-  // Opening angle
-  Double_t oAngle = OpenAngle(v0);
-
   // psi pair 
   Double_t psiPair = PsiPair(v0);
   
   // V0 chi2/ndf
   Double_t chi2ndf = kfMother->GetChi2()/kfMother->GetNDF();
-
   if(kfMother) delete kfMother; 
+
+  // Separation
+  AliExternalTrackParam const *param[2];
+  param[0] = d[0]->GetInnerParam();
+  param[1] = d[1]->GetInnerParam();
+  Double_t sep = 999.;
+  if(param[0] && param[1]){
+    TVector3 xyz[3];
+    xyz[0].SetXYZ(param[0]->GetX(), param[0]->GetY(), param[0]->GetZ());
+    xyz[1].SetXYZ(param[1]->GetX(), param[1]->GetY(), param[1]->GetZ());
+    xyz[2] = xyz[0] - xyz[1];
+    sep = xyz[2].Mag();
+  }
+
+
  
   //
   // Apply the cuts, produce QA plots (with mass cut)
@@ -511,11 +517,11 @@ Bool_t AliHFEV0cuts::GammaCuts(AliESDv0 *v0){
     fQA->Fill("h_cut_Gamma_DCA", 0, dca);
     fQA->Fill("h_cut_Gamma_VtxR_old", 0, r);
     fQA->Fill("h_cut_Gamma_VtxR", 0, r2);
-    fQA->Fill("h_cut_Gamma_OA", 0, oAngle);
     fQA->Fill("h_cut_Gamma_PP", 0, psiPair);
     fQA->Fill("h_cut_Gamma_Chi2", 0, chi2ndf);
     fQA->Fill("h_cut_Gamma_Chi2", 1, chi2ndf, iP);
-    fQA->Fill("h_cut_Gamma_OAvP", 0, iP, oAngle);      
+    fQA->Fill("h_cut_Gamma_Sep", 0, iP, sep);
+       
    
     if(fMCEvent){
       // MC signal
@@ -523,10 +529,10 @@ Bool_t AliHFEV0cuts::GammaCuts(AliESDv0 *v0){
        fQAmc->Fill("h_cut_Gamma_CosPoint_S", 0, iP, cosPoint);
        fQAmc->Fill("h_cut_Gamma_DCA_S", 0, iP, dca);
        fQAmc->Fill("h_cut_Gamma_VtxR_S", 0, iP, r2);
-       fQAmc->Fill("h_cut_Gamma_OA_S", 0, iP, oAngle);
        fQAmc->Fill("h_cut_Gamma_PP_S", 0, iP, psiPair);
        fQAmc->Fill("h_cut_Gamma_Chi2_S", 0, iP, chi2ndf);
        fQAmc->Fill("h_cut_Gamma_Chi2_S", 1, iP, chi2ndf);
+       fQAmc->Fill("h_cut_Gamma_Sep_S", 0, iP, sep);
        fQAmc->Fill("h_Electron_P_S", 0, p[0]);
        fQAmc->Fill("h_Electron_P_S", 0, p[1]);
       }
@@ -535,10 +541,10 @@ Bool_t AliHFEV0cuts::GammaCuts(AliESDv0 *v0){
        fQAmc->Fill("h_cut_Gamma_CosPoint_B", 0, iP, cosPoint);
        fQAmc->Fill("h_cut_Gamma_DCA_B", 0, iP, dca);
        fQAmc->Fill("h_cut_Gamma_VtxR_B", 0, iP, r2);
-       fQAmc->Fill("h_cut_Gamma_OA_B", 0, iP, oAngle);
        fQAmc->Fill("h_cut_Gamma_PP_B", 0, iP, psiPair);
        fQAmc->Fill("h_cut_Gamma_Chi2_B", 0, iP, chi2ndf);
        fQAmc->Fill("h_cut_Gamma_Chi2_B", 1, iP, chi2ndf);
+       fQAmc->Fill("h_cut_Gamma_Sep_B", 0, iP, sep);
        fQAmc->Fill("h_Electron_P_B", 0, p[0]);
        fQAmc->Fill("h_Electron_P_B", 0, p[1]); 
       }
@@ -665,8 +671,7 @@ Bool_t AliHFEV0cuts::GammaCuts(AliESDv0 *v0){
   if(psiPair < cutPsiPair[0] || psiPair > cutPsiPair[1]) return kFALSE;
   fQA->Fill("h_Gamma_Mass", 5, iMass);
   if(iMass < cutMass){
-    fQA->Fill("h_cut_Gamma_OA", 1, oAngle);
-    fQA->Fill("h_cut_Gamma_OAvP", 1, iP, oAngle);      
+    fQA->Fill("h_cut_Gamma_Sep", 1, iP, sep);
     fQA->Fill("h_Electron_P", 5, p[0]);
     fQA->Fill("h_Electron_P", 5, p[1]);
   }
@@ -676,22 +681,24 @@ Bool_t AliHFEV0cuts::GammaCuts(AliESDv0 *v0){
     
     if(iMass < cutMass){
       if(1 == fCurrentV0id){
-       fQAmc->Fill("h_cut_Gamma_OA_S", 1, iP, oAngle);
+       fQAmc->Fill("h_cut_Gamma_Sep_S", 1, iP, sep);
        fQAmc->Fill("h_Electron_P_S", 5, p[0]);
        fQAmc->Fill("h_Electron_P_S", 5, p[1]);
       }
       else if(-2 != fCurrentV0id){
-       fQAmc->Fill("h_cut_Gamma_OA_B", 1, iP, oAngle);
+       fQAmc->Fill("h_cut_Gamma_Sep_B", 1, iP, sep);
        fQAmc->Fill("h_Electron_P_B", 5, p[0]);
        fQAmc->Fill("h_Electron_P_B", 5, p[1]);
       }
     }
   }
 
+
+  // TESTING NEW CUT
   //
-  // Opening angle cut (obsolete?)
+  // distance of the tracks at the entrance of the TPC
   //
-  if(oAngle < cutOAngle[0] || oAngle > cutOAngle[1]) return kFALSE;
+  if(sep < cutSeparation) return kFALSE;
   fQA->Fill("h_Gamma_Mass", 6, iMass);
   if(iMass < cutMass){
     fQA->Fill("h_Electron_P", 6, p[0]);
@@ -699,7 +706,8 @@ Bool_t AliHFEV0cuts::GammaCuts(AliESDv0 *v0){
   }
   if(fMCEvent){
     if(1 == fCurrentV0id) fQAmc->Fill("h_Gamma_Mass_S", 6, iMass);
-    else if(-2 != fCurrentV0id) fQAmc->Fill("h_Gamma_Mass_B", 6, iMass);
+    else if(-2 != fCurrentV0id)fQAmc->Fill("h_Gamma_Mass_B", 6, iMass);
+    
     if(iMass < cutMass){
       if(1 == fCurrentV0id){
        fQAmc->Fill("h_Electron_P_S", 6, p[0]);
@@ -712,6 +720,8 @@ Bool_t AliHFEV0cuts::GammaCuts(AliESDv0 *v0){
     }
   }
   
+  // .. test
 
   if(iMass > cutMass) return kFALSE;
 
@@ -784,12 +794,11 @@ Bool_t AliHFEV0cuts::K0Cuts(AliESDv0 *v0){
   Double_t data[4] = {0., 0., 0., 0.};
 
   // Cut values
-  const Double_t cutChi2NDF = 40.;              // ORG [7.]
+  const Double_t cutChi2NDF = 10.;              // ORG [7.]
   const Double_t cutCosPoint[2] = {0., 0.02};  // ORG [0., 0.03]
   const Double_t cutDCA[2] = {0., 0.2};        // ORG [0., 0.1]
   const Double_t cutProdVtxR[2] = {2.0, 30.};   // ORG [0., 8.1]
-  const Double_t cutMass[2] = {0.49, 0.51};   // ORG [0.485, 0.51]
-  //const Double_t cutOAngleP = (1.0/(iP + 0.3) - 0.1); // momentum dependent min. OAngle ~ 1/x
+  const Double_t cutMass[2] = {0.486, 0.508};   // ORG [0.485, 0.51]
   // Values
 
   // cos pointing angle
@@ -810,9 +819,6 @@ Bool_t AliHFEV0cuts::K0Cuts(AliESDv0 *v0){
   
   if(kfMother) delete kfMother; 
 
-  // Opening angle
-  Double_t oAngle = OpenAngle(v0);
-  
   //
   // Apply the cuts, produce QA plots (with mass cut)
   //
@@ -846,7 +852,6 @@ Bool_t AliHFEV0cuts::K0Cuts(AliESDv0 *v0){
        fQAmc->Fill("h_cut_K0_VtxR_S", 0, iP, r);
        fQAmc->Fill("h_cut_K0_Chi2_S", 0, iP, chi2ndf);
        fQAmc->Fill("h_cut_K0_Chi2_S", 1, iP, chi2ndf);
-       fQAmc->Fill("h_cut_K0_OA_S", 0, iP, oAngle);
        fQAmc->Fill("h_PionK0_P_S", 0, p[0]);
        fQAmc->Fill("h_PionK0_P_S", 0, p[1]);
        }
@@ -856,7 +861,6 @@ Bool_t AliHFEV0cuts::K0Cuts(AliESDv0 *v0){
        fQAmc->Fill("h_cut_K0_VtxR_B", 0, iP, r);
        fQAmc->Fill("h_cut_K0_Chi2_B", 0, iP, chi2ndf);
        fQAmc->Fill("h_cut_K0_Chi2_B", 1, iP, chi2ndf);
-       fQAmc->Fill("h_cut_K0_OA_B", 0, iP, oAngle);
        fQAmc->Fill("h_PionK0_P_B", 0, p[0]);
        fQAmc->Fill("h_PionK0_P_B", 0, p[1]);
       }  
@@ -954,19 +958,16 @@ Bool_t AliHFEV0cuts::K0Cuts(AliESDv0 *v0){
   if(iMass > cutMass[0] && iMass < cutMass[1]){
     fQA->Fill("h_PionK0_P", 4, p[0]);
     fQA->Fill("h_PionK0_P", 4, p[1]);
-    fQA->Fill("h_cut_K0_OAvP", 1, iP, oAngle);
   }
   if(fMCEvent){
     if(2 == fCurrentV0id) fQAmc->Fill("h_K0_Mass_S", 4, iMass);
     else if(-2 != fCurrentV0id) fQAmc->Fill("h_K0_Mass_B", 4, iMass);
      if(iMass > cutMass[0] && iMass < cutMass[1]){
        if(2 == fCurrentV0id){
-        fQAmc->Fill("h_cut_K0_OA_S", 1, iP, oAngle);
         fQAmc->Fill("h_PionK0_P_S", 4, p[0]);
         fQAmc->Fill("h_PionK0_P_S", 4, p[1]);
        }
        else if(-2 != fCurrentV0id){
-        fQAmc->Fill("h_cut_K0_OA_B", 1, iP, oAngle);
         fQAmc->Fill("h_PionK0_P_B", 4, p[0]);
         fQAmc->Fill("h_PionK0_P_B", 4, p[1]);
        }
@@ -1092,14 +1093,12 @@ Bool_t AliHFEV0cuts::LambdaCuts(AliESDv0 *v0, Bool_t &isLambda ){
   Float_t iP = v0->P();
 
    // Cuts
-  const Double_t cutChi2NDF = 40.;              // ORG [5.]
+  const Double_t cutChi2NDF = 10.;              // ORG [5.]
   const Double_t cutCosPoint[2] = {0., 0.02};  // ORG [0., 0.03]
   const Double_t cutDCA[2] = {0., 0.2};        // ORG [0., 0.2]
   const Double_t cutProdVtxR[2] = {2., 40.};   // ORG [0., 24.]
   const Double_t cutMass[2] = {1.11, 1.12};   // ORG [1.11, 1.12]
   // cundidate cuts
-  // opening angle as a function of L momentum
-  //const Double_t cutOAngleP = 0.3 - 0.2*iP; // momentum dependent min. OAngle linear cut
   // relative daughter momentum versusu mother momentum
 
   // compute the cut values
@@ -1147,9 +1146,6 @@ Bool_t AliHFEV0cuts::LambdaCuts(AliESDv0 *v0, Bool_t &isLambda ){
   if(kfMother[0]) delete kfMother[0]; 
   if(kfMother[1]) delete kfMother[1]; 
 
-  // Opening angle
-  Double_t oAngle = OpenAngle(v0);
-
   // Relative daughter momentum
   Double_t rP = (0 == check[0]) ? p[1]/p[0] : p[0]/p[1];
   
@@ -1184,7 +1180,6 @@ Bool_t AliHFEV0cuts::LambdaCuts(AliESDv0 *v0, Bool_t &isLambda ){
     fQA->Fill("h_cut_L_CosPoint", 0, cosPoint);
     fQA->Fill("h_cut_L_DCA", 0, dca);
     fQA->Fill("h_cut_L_VtxR", 0, r);
-    fQA->Fill("h_cut_L_OAvP", 0, iP, oAngle);
     fQA->Fill("h_cut_L_rdp_v_mp", 0, iP, rP);
   }
   if(fMCEvent){
@@ -1195,7 +1190,6 @@ Bool_t AliHFEV0cuts::LambdaCuts(AliESDv0 *v0, Bool_t &isLambda ){
        fQAmc->Fill("h_cut_L_CosPoint_S", 0, iP, cosPoint);
        fQAmc->Fill("h_cut_L_DCA_S", 0, iP, dca);
        fQAmc->Fill("h_cut_L_VtxR_S", 0, iP, r);
-       fQAmc->Fill("h_cut_L_OA_S", 0, iP, oAngle);
        fQAmc->Fill("h_cut_L_rdp_v_mp_S", 0, iP, rP);   
        fQAmc->Fill("h_ProtonL_P_S", 0, p[ixMC[0]]);
        fQAmc->Fill("h_PionL_P_S", 0, p[ixMC[1]]);
@@ -1206,7 +1200,6 @@ Bool_t AliHFEV0cuts::LambdaCuts(AliESDv0 *v0, Bool_t &isLambda ){
        fQAmc->Fill("h_cut_L_CosPoint_B", 0, iP, cosPoint);
        fQAmc->Fill("h_cut_L_DCA_B", 0, iP, dca);
        fQAmc->Fill("h_cut_L_VtxR_B", 0, iP, r);
-       fQAmc->Fill("h_cut_L_OA_B", 0, iP, oAngle);
        fQAmc->Fill("h_cut_L_rdp_v_mp_B", 0, iP, rP);   
        fQAmc->Fill("h_ProtonL_P_B", 0, p[ixMC[0]]);
        fQAmc->Fill("h_PionL_P_B", 0, p[ixMC[1]]);
@@ -1303,7 +1296,6 @@ Bool_t AliHFEV0cuts::LambdaCuts(AliESDv0 *v0, Bool_t &isLambda ){
   if(r < cutProdVtxR[0] || r > cutProdVtxR[1]) return kFALSE;
   (type == 0) ?   fQA->Fill("h_L_Mass", 4, iMass) :  fQA->Fill("h_AL_Mass", 4, iMass);
   if(iMass > cutMass[0] && iMass < cutMass[1]){
-    fQA->Fill("h_cut_L_OAvP", 1, iP, oAngle);
     fQA->Fill("h_ProtonL_P", 4, p[ix[0]]);
     fQA->Fill("h_PionL_P", 4, p[ix[1]]);
   }
@@ -1313,12 +1305,10 @@ Bool_t AliHFEV0cuts::LambdaCuts(AliESDv0 *v0, Bool_t &isLambda ){
     else if(-2 != fCurrentV0id)  fQAmc->Fill("h_LAL_Mass_B", 4, iMass);
     if(iMass > cutMass[0] && iMass < cutMass[1]){
       if(4 == TMath::Abs(fCurrentV0id)){
-       fQAmc->Fill("h_cut_L_OA_S", 1, iP, oAngle);
        fQAmc->Fill("h_ProtonL_P_S", 4, p[ixMC[0]]);
        fQAmc->Fill("h_PionL_P_S", 4, p[ixMC[1]]);
       }
       else if(-2 != fCurrentV0id){
-       fQAmc->Fill("h_cut_L_OA_B", 1, iP, oAngle);
        fQAmc->Fill("h_ProtonL_P_B", 4, p[ixMC[0]]);
        fQAmc->Fill("h_PionL_P_B", 4, p[ixMC[1]]);
       }
index 7ffb92d6bf2acd5a8b503916330abc2cc48ec3f1..e1bee7b36b9417cb1005dc42be3bf7f55b69a2b3 100644 (file)
@@ -181,6 +181,8 @@ void AliHFEV0pid::Process(AliVEvent * const inputEvent){
   // store the pointers in the TObjArray
   //
   
+
+
   Int_t nGamma = 0, nK0s = 0, nLambda = 0, nPhi = 0;
   fInputEvent = inputEvent;
   fNtracks = fInputEvent->GetNumberOfTracks();
@@ -190,7 +192,13 @@ void AliHFEV0pid::Process(AliVEvent * const inputEvent){
   fV0cuts->SetInputEvent(fInputEvent);
   fV0cuts->SetPrimaryVertex(fPrimaryVertex);
   if(fMCEvent) fV0cuts->SetMCEvent(fMCEvent);
+  Int_t check[fNtracks];
+  memset(check, 0, sizeof(Int_t)*fNtracks);
   Int_t v0status = 0;
+
+  //BenchmarkV0finder();
+
+
   for(Int_t iv0 = 0; iv0 < fInputEvent->GetNumberOfV0s(); iv0++){
     if(!TString(fInputEvent->IsA()->GetName()).CompareTo("AliESDEvent")){
       // case ESD
@@ -216,7 +224,6 @@ void AliHFEV0pid::Process(AliVEvent * const inputEvent){
     };
   }
 
-
   AliDebug(1, Form("Number of gammas  : %d", nGamma));
   AliDebug(1, Form("Number of K0s     : %d", nK0s));
   AliDebug(1, Form("Number of Phis    : %d", nPhi));
@@ -247,6 +254,7 @@ Int_t AliHFEV0pid::ProcessV0(TObject *v0){
   if(fMCEvent != NULL) fMCon = kTRUE;
   //printf("-D: fMCEvent %x, fMCon: %i\n", fMCEvent, fMCon);
 
+
   Int_t dMC[2] = {-1, -1};
   Int_t idMC = AliHFEV0cuts::kUndef; 
 
@@ -704,6 +712,24 @@ Int_t AliHFEV0pid::IdentifyV0(TObject *esdV0, Int_t d[2]){
 
 }
 //____________________________________________________________
+void AliHFEV0pid::BenchmarkV0finder(){
+  //
+  // produce histograms for all findable V0s that are
+  // were selected byt the (oline) V0 finder and can
+  // be used to estimate the efficiency of teh V0 cuts
+  //
+
+  for(Int_t iv0 = 0; iv0 < fInputEvent->GetNumberOfV0s(); iv0++){
+    AliESDv0 *esdV0 = (static_cast<AliESDEvent *>(fInputEvent))->GetV0(iv0);
+    if(!esdV0) continue;
+    if(!esdV0->GetOnFlyStatus()) continue; // Take only V0s from the On-the-fly v0 finder
+    // indetify the V0 candidate
+    Int_t idV0 = AliHFEV0cuts::kUndef;
+    Int_t idD[2] = {-1, -1};
+    idV0 = IdentifyV0(esdV0, idD);
+  }
+}
+//____________________________________________________________
 void   AliHFEV0pid::ArmenterosPlotMC(AliESDv0 * const v0, Int_t idMC){
   //
   // Armenteros plots as a function of Mohter Momentum
index 188ec8ce330cbee66df935b5a8b33a59dac7fe34..a56638a3981c2f5787e4708bb44656d24576fc8f 100644 (file)
@@ -80,6 +80,8 @@ class AliHFEV0pid : public TObject{
 
     Int_t IdentifyV0(TObject *v0, Int_t d[2]);
 
+    void  BenchmarkV0finder();
+
  private:
     class AliHFEV0pidTrackIndex{
     public:
index f8160c3ef68bd257304f89397463e3ba7aa7b251..406347805021e734c94d60ee8ab2d0edff1e8f8f 100644 (file)
@@ -464,7 +464,7 @@ void AliHFEdisplacedElectrons::FillMcOutput(AliESDEvent *const fESD, AliMCEvent*
     var[7] = mcStatus;  // internal status
 
 
-    (dynamic_cast<THnSparseF *>(fDeOutputList->At(kMcElectron)))->Fill(var);
+    (static_cast<THnSparseF *>(fDeOutputList->At(kMcElectron)))->Fill(var);
 }
 
 
@@ -593,7 +593,7 @@ void AliHFEdisplacedElectrons::FillEsdOutput(AliESDEvent * const fESDEvent, AliE
   var[7] = mcR;
   var[8] = mcStatus;
   
-  (dynamic_cast<THnSparseF *>(fDeOutputList->At(kEsdElectron)))->Fill(var);
+  (static_cast<THnSparseF *>(fDeOutputList->At(kEsdElectron)))->Fill(var);
   
 }
 
@@ -684,7 +684,7 @@ void AliHFEdisplacedElectrons::FillDataOutput(AliESDEvent * const fESDEvent, Ali
   varData[4] = eta; //eta
   varData[5] = phi; // phi
   
-  (dynamic_cast<THnSparseF *>(fDeOutputList->At(kDataElectron)))->Fill(varData);
+  (static_cast<THnSparseF *>(fDeOutputList->At(kDataElectron)))->Fill(varData);
 
 }
 
index dab9e1d3fa19684b95e75307e837c5504f159d9c..a159fba10175f02924579f44d92cbd1788572690 100644 (file)
@@ -142,6 +142,26 @@ void AliHFEmcQA::CreatDefaultHistograms(TList * const qaList)
   CreateHistograms(AliHFEmcQA::kBeauty,5,"mcqa_secvtxcut_");    // create histograms for beauty
   CreateHistograms(AliHFEmcQA::kOthers,5,"mcqa_secvtxcut_");    // create histograms for beauty
  
+// check D spectra
+  TString kDspecies[7];
+  kDspecies[0]="411";
+  kDspecies[1]="421";
+  kDspecies[2]="431";
+  kDspecies[3]="4122";
+  kDspecies[4]="4132";
+  kDspecies[5]="4232";
+  kDspecies[6]="4332";
+
+  // bin size is chosen to consider ALICE D measurement
+  Double_t xbins[13]={0,0.5,1.0,2.0,3.0,4.0,5.0,6.0,8.0,12,16,20,50};
+  Double_t ybins[10]={-7.5,-1.0,-0.9,-0.8,-0.5,0.5,0.8,0.9,1.0,7.5};
+  TString hname;
+  for (Int_t iDmeson=0; iDmeson<7; iDmeson++){
+     hname = "Dmeson"+kDspecies[iDmeson];
+     fhD[iDmeson] = new TH2F(hname,hname+";p_{T} (GeV/c)",12,xbins,9,ybins);
+     if(fQAhistos) fQAhistos->Add(fhD[iDmeson]);
+  }
+
 }
   
 //__________________________________________
@@ -525,6 +545,7 @@ void AliHFEmcQA::GetHadronKine(TParticle* mcpart, const Int_t kquark)
               fHist[iq][kHadron][0].fY->Fill(AliHFEtools::GetRapidity(partCopy));
               fHist[iq][kHadron][0].fEta->Fill(partCopy->Eta());
 
+              if(iq==0) fhD[i]->Fill(partCopy->Pt(),AliHFEtools::GetRapidity(partCopy));
             }
          }
     } // end of if
@@ -653,12 +674,28 @@ void AliHFEmcQA::GetDecayedKine(TParticle* mcpart, const Int_t kquark, Int_t kde
          for (Int_t i=0; i<fNparents; i++){
             if (abs(maPdgcodeCopy)==fParentSelect[iq][i]){
 
+//mj weighting to consider measured spectra!!!
+              Double_t mpt=partMotherCopy->Pt();
+              Double_t wfactor=(703.681*mpt/TMath::Power((1+TMath::Power(mpt/1.73926,2)),2.34821))/(368.608*mpt/TMath::Power((1+TMath::Power(mpt/2.74868,2)),2.34225));
               // fill electron kinematics
-              fHist[iq][kElectron][icut].fPdgCode->Fill(mcpart->GetPdgCode());
-              fHist[iq][kElectron][icut].fPt->Fill(mcpart->Pt());
-              fHist[iq][kElectron][icut].fY->Fill(AliHFEtools::GetRapidity(mcpart));
-              fHist[iq][kElectron][icut].fEta->Fill(mcpart->Eta());  
-
+              if(iq==0){
+                fHist[iq][kElectron2nd][icut].fPdgCode->Fill(mcpart->GetPdgCode(),wfactor);
+                fHist[iq][kElectron2nd][icut].fPt->Fill(mcpart->Pt(),wfactor);
+                fHist[iq][kElectron2nd][icut].fY->Fill(AliHFEtools::GetRapidity(mcpart),wfactor);
+                fHist[iq][kElectron2nd][icut].fEta->Fill(mcpart->Eta(),wfactor);  
+
+                fHist[iq][kElectron][icut].fPdgCode->Fill(mcpart->GetPdgCode());
+                fHist[iq][kElectron][icut].fPt->Fill(mcpart->Pt());
+                fHist[iq][kElectron][icut].fY->Fill(AliHFEtools::GetRapidity(mcpart));
+                fHist[iq][kElectron][icut].fEta->Fill(mcpart->Eta());  
+              } 
+              else{
+                fHist[iq][kElectron][icut].fPdgCode->Fill(mcpart->GetPdgCode());
+                fHist[iq][kElectron][icut].fPt->Fill(mcpart->Pt());
+                fHist[iq][kElectron][icut].fY->Fill(AliHFEtools::GetRapidity(mcpart));
+                fHist[iq][kElectron][icut].fEta->Fill(mcpart->Eta());  
+              }
+//--------------
               // fill mother hadron kinematics
               fHist[iq][keHadron][icut].fPdgCode->Fill(maPdgcodeCopy); 
               fHist[iq][keHadron][icut].fPt->Fill(partMotherCopy->Pt());
index ff21196c8cb63bbc5ad46d5beaa98bbf5171e831..184b48973e050933bb8766ac3db6f5eb9b7b89fa 100644 (file)
@@ -157,6 +157,7 @@ class AliHFEmcQA: public TObject {
 
     AliHists fHist[3][7][6]; // struct of histograms to store kinematics of given particles
     AliHistsComm fHistComm[2][6]; // struct of additional histograms of given particles
+    TH2F *fhD[7]; // D meson pt,Y spectra
 
     TList *fQAhistos;           // Container for QA histos
     TParticle *fHeavyQuark[50]; //! store pointer of heavy flavour quark 
index abc27dc644d3b4526aaaa8bac29ea26195013ca1..100c6d6c7e0945cd5ba384eae770ededf689eeb1 100644 (file)
@@ -583,8 +583,8 @@ void AliHFEpidQA::FillElectronLikelihoods(const TObjArray * const particles, Int
       Bool_t detFlagSet = kFALSE;
       for(Int_t idet = 0; idet < 4; idet++){
         TString histname, histnameMC;
-       histname = "h" + detname[idet] = "_El_like_" + specname;
-       histnameMC = "h" + detname[idet] = "_El_like_MC_" + specname;
+       histname = "h" + detname[idet] + "_El_like_" + specname;
+       histnameMC = "h" + detname[idet] + "_El_like_MC_" + specname;
 
         switch(idet){
           case kITS:  esdTrack->GetITSpid(pidProbs);
@@ -727,7 +727,7 @@ void AliHFEpidQA::FillPIDresponse(const TObjArray * const particles, Int_t speci
        Double_t itsPID[5] = {-1, -1, -1, -1, -1};
        esdTrack->GetITSpid(itsPID);
        Int_t ix = GetMaxPID(itsPID);
-       hname = "hITS_PID_" + typeName[species];
+       hname = "hITS_PID_p_" + typeName[species];
        fOutput->Fill(hname, p, ix);
       }//.. kITSpid
       
index fdc5d2ffad20bc5fac88256be6089d7a15b595ca..b8607adcfd8f0f8e3924fcf0143a1cc6dba8e732 100644 (file)
@@ -1702,27 +1702,27 @@ void AliHFEsecVtx::FillHistos(Int_t step, const AliESDtrack *track){
 
     Int_t esource=fMCQA->GetElecSource(mcpart);
     if(esource==1) {
-      if(!(dynamic_cast<TH1F *>(fSecVtxList->At(step+1)))) return;
+      //if(!(dynamic_cast<TH1F *>(fSecVtxList->At(step+1)))) return;
       (dynamic_cast<TH1F *>(fSecVtxList->At(step+1)))->Fill(mcpart->Pt()); //charm
     }
     else if(esource==2 || esource==3) {
-      if(!(dynamic_cast<TH1F *>(fSecVtxList->At(step+2)))) return;
+      //if(!(dynamic_cast<TH1F *>(fSecVtxList->At(step+2)))) return;
       (dynamic_cast<TH1F *>(fSecVtxList->At(step+2)))->Fill(mcpart->Pt()); //beauty
     }
     else if(esource==4) {
-      if(!(dynamic_cast<TH1F *>(fSecVtxList->At(step+3)))) return;
+      //if(!(dynamic_cast<TH1F *>(fSecVtxList->At(step+3)))) return;
       (dynamic_cast<TH1F *>(fSecVtxList->At(step+3)))->Fill(mcpart->Pt()); //conversion
     }
     else if(esource==7) {
-      if(!(dynamic_cast<TH1F *>(fSecVtxList->At(step+5)))) return;
+      //if(!(dynamic_cast<TH1F *>(fSecVtxList->At(step+5)))) return;
       (dynamic_cast<TH1F *>(fSecVtxList->At(step+5)))->Fill(mcpart->Pt()); //contamination
     }
     else if(!(esource<0)) {
-      if(!(dynamic_cast<TH1F *>(fSecVtxList->At(step+4)))) return;
+      //if(!(dynamic_cast<TH1F *>(fSecVtxList->At(step+4)))) return;
       (dynamic_cast<TH1F *>(fSecVtxList->At(step+4)))->Fill(mcpart->Pt()); //e backgrounds
     }
     else {
-      if(!(dynamic_cast<TH1F *>(fSecVtxList->At(step+6)))) return;
+      //if(!(dynamic_cast<TH1F *>(fSecVtxList->At(step+6)))) return;
       (dynamic_cast<TH1F *>(fSecVtxList->At(step+6)))->Fill(mcpart->Pt()); //something else?
     }
   }