- update user tasks
authorjbook <jbook@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 11 Feb 2013 14:57:13 +0000 (14:57 +0000)
committerjbook <jbook@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 11 Feb 2013 14:57:13 +0000 (14:57 +0000)
- unification of putput file

PWGDQ/dielectron/macrosJPSI/AddTask_ffionda_BJPsi.C
PWGDQ/dielectron/macrosJPSI/AddTask_jbook_JPsi.C
PWGDQ/dielectron/macrosJPSI/AddTask_jpsi_JPsiME.C
PWGDQ/dielectron/macrosJPSI/AddTask_jpsi_JPsiQA.C
PWGDQ/dielectron/macrosJPSI/AddTask_mfigueredo_JPsi.C
PWGDQ/dielectron/macrosJPSI/AddTask_mwinn_JPsi.C
PWGDQ/dielectron/macrosJPSI/ConfigJpsiME_jpsi_PbPb.C
PWGDQ/dielectron/macrosJPSI/ConfigJpsiQA_jpsi_PbPb.C
PWGDQ/dielectron/macrosJPSI/ConfigJpsi_jb_PbPb.C
PWGDQ/dielectron/macrosJPSI/ConfigJpsi_mw_pPb.C

index 24fd3c1..eb50983 100644 (file)
@@ -48,29 +48,30 @@ AliAnalysisTask *AddTask_ffionda_BJPsi(Bool_t isMC=kFALSE){
 
   
   //create output container
+  TString containerName = "JPSI.root";
   AliAnalysisDataContainer *coutput1 =
-    mgr->CreateContainer("Analysis_tree",
+    mgr->CreateContainer("ffionda_tree",
                          TTree::Class(),
                          AliAnalysisManager::kExchangeContainer,
-                         "Analysis_default");
+                        containerName.Data());
   
   AliAnalysisDataContainer *cOutputHist1 =
-    mgr->CreateContainer("Analysis_QA",
+    mgr->CreateContainer("ffionda_QA",
                          TList::Class(),
                          AliAnalysisManager::kOutputContainer,
-                         "AnalysisResults.root");
+                        containerName.Data());
 
   AliAnalysisDataContainer *cOutputHist2 =
-    mgr->CreateContainer("Analysis_CF",
+    mgr->CreateContainer("ffionda_CF",
                          TList::Class(),
                          AliAnalysisManager::kOutputContainer,
-                         "AnalysisResults.root");
+                        containerName.Data());
   
   AliAnalysisDataContainer *cOutputHist3 =
-    mgr->CreateContainer("Analysis_EventStat",
+    mgr->CreateContainer("ffionda_EventStat",
                          TH1D::Class(),
                          AliAnalysisManager::kOutputContainer,
-                         "AnalysisResults.root");
+                        containerName.Data());
 
   mgr->ConnectInput(task,  0, mgr->GetCommonInputContainer());
   mgr->ConnectOutput(task, 0, coutput1 );
index a33f0c5..04b9abe 100644 (file)
@@ -87,23 +87,24 @@ AliAnalysisTask *AddTask_jbook_JPsi(TString prod="",
   }
 
   //create output container
+  TString containerName = "JPSI.root";
   AliAnalysisDataContainer *cOutputHist1 =
     mgr->CreateContainer(Form("jbook_QA_%s",triggerNames[j]),
                         TList::Class(),
                         AliAnalysisManager::kOutputContainer,
-                        Form("jbook_%s.root",triggerNames[j]));
+                        containerName.Data());
 
   AliAnalysisDataContainer *cOutputHist2 =
     mgr->CreateContainer(Form("jbook_CF_%s",triggerNames[j]),
                         TList::Class(),
                         AliAnalysisManager::kOutputContainer,
-                        Form("jbook_%s.root",triggerNames[j]));
+                        containerName.Data());
 
   AliAnalysisDataContainer *cOutputHist3 =
     mgr->CreateContainer(Form("jbook_EventStat_%s",triggerNames[j]),
                         TH1D::Class(),
                         AliAnalysisManager::kOutputContainer,
-                        Form("jbook_%s.root",triggerNames[j]));
+                        containerName.Data());
 
   mgr->ConnectInput(task,  0, mgr->GetCommonInputContainer());
   //  mgr->ConnectOutput(task, 0, coutput1 );
index ed6e473..f84c5ef 100644 (file)
@@ -84,23 +84,24 @@ AliAnalysisTask *AddTask_jpsi_JPsiME(TString prod="",
   }
 
   //create output container
+  TString containerName = "JPSI.root";
   AliAnalysisDataContainer *cOutputHist1 =
     mgr->CreateContainer(Form("jpsiME_QA_%s",triggerNames[j]),
                         TList::Class(),
                         AliAnalysisManager::kOutputContainer,
-                        Form("jpsiME_%s.root",triggerNames[j]));
+                        containerName.Data());
 
   AliAnalysisDataContainer *cOutputHist2 =
     mgr->CreateContainer(Form("jpsiME_CF_%s",triggerNames[j]),
                         TList::Class(),
                         AliAnalysisManager::kOutputContainer,
-                        Form("jpsiME_%s.root",triggerNames[j]));
+                        containerName.Data());
 
   AliAnalysisDataContainer *cOutputHist3 =
     mgr->CreateContainer(Form("jpsiME_EventStat_%s",triggerNames[j]),
                         TH1D::Class(),
                         AliAnalysisManager::kOutputContainer,
-                        Form("jpsiME_%s.root",triggerNames[j]));
+                        containerName.Data());
 
   mgr->ConnectInput(task,  0, mgr->GetCommonInputContainer());
   //  mgr->ConnectOutput(task, 0, coutput1 );
index c0788d3..c0008a4 100644 (file)
@@ -85,23 +85,24 @@ AliAnalysisTask *AddTask_jpsi_JPsiQA(TString prod="",
   }
 
   //create output container
+  TString containerName = "JPSI.root";
   AliAnalysisDataContainer *cOutputHist1 =
-    mgr->CreateContainer(Form("jpsi_QA_%s",triggerNames[j]),
+    mgr->CreateContainer(Form("jpsiQA_QA_%s",triggerNames[j]),
                         TList::Class(),
                         AliAnalysisManager::kOutputContainer,
-                        Form("jpsi_%s.root",triggerNames[j]));
+                        containerName.Data());
 
   AliAnalysisDataContainer *cOutputHist2 =
-    mgr->CreateContainer(Form("jpsi_CF_%s",triggerNames[j]),
+    mgr->CreateContainer(Form("jpsiQA_CF_%s",triggerNames[j]),
                         TList::Class(),
                         AliAnalysisManager::kOutputContainer,
-                        Form("jpsi_%s.root",triggerNames[j]));
+                        containerName.Data());//                        Form("jpsi_%s.root",triggerNames[j]));
 
   AliAnalysisDataContainer *cOutputHist3 =
-    mgr->CreateContainer(Form("jpsi_EventStat_%s",triggerNames[j]),
+    mgr->CreateContainer(Form("jpsiQA_EventStat_%s",triggerNames[j]),
                         TH1D::Class(),
                         AliAnalysisManager::kOutputContainer,
-                        Form("jpsi_%s.root",triggerNames[j]));
+                        containerName.Data());//                        Form("jpsi_%s.root",triggerNames[j]));
 
   mgr->ConnectInput(task,  0, mgr->GetCommonInputContainer());
   //  mgr->ConnectOutput(task, 0, coutput1 );
index e25a01f..fc0ebfb 100644 (file)
@@ -83,29 +83,26 @@ AliAnalysisTask *AddTask_mfigueredo_JPsi(TString prod="",ULong64_t triggers=AliV
   //----------------------
   //create data containers
   //----------------------
-  
-  TString containerName = mgr->GetCommonFileName();
-  containerName += ":PWGDQ_dielectron";
-    
+
   //create output container
-    //create output container
+  TString containerName = "JPSI.root";
   AliAnalysisDataContainer *cOutputHist1 =
     mgr->CreateContainer(Form("mfigueredo_QA_%s",triggerNames[j]),
                         TList::Class(),
                         AliAnalysisManager::kOutputContainer,
-                        Form("mfig_%s.root",triggerNames[j]));
+                        containerName.Data());
 
   AliAnalysisDataContainer *cOutputHist2 =
     mgr->CreateContainer(Form("mfigueredo_CF_%s",triggerNames[j]),
                         TList::Class(),
                         AliAnalysisManager::kOutputContainer,
-                        Form("mfig_%s.root",triggerNames[j]));
+                        containerName.Data());
 
   AliAnalysisDataContainer *cOutputHist3 =
     mgr->CreateContainer(Form("mfigueredo_EventStat_%s",triggerNames[j]),
                         TH1D::Class(),
                         AliAnalysisManager::kOutputContainer,
-                        Form("mfig_%s.root",triggerNames[j]));
+                        containerName.Data());
   
  
   mgr->ConnectInput(task,  0, mgr->GetCommonInputContainer());
index c6cb589..344d6cc 100644 (file)
@@ -63,29 +63,30 @@ AliAnalysisTask *AddTask_mwinn_JPsi(){
   if ( trainConfig=="pp" ) task->SetRejectPileup();
   
   //create output container
+  TString containerName = "JPSI.root";
   AliAnalysisDataContainer *coutput1 =
-    mgr->CreateContainer("jpsi_mwinn_tree",
+    mgr->CreateContainer("mwinn_tree",
                          TTree::Class(),
                          AliAnalysisManager::kExchangeContainer,
-                         "jpsi_mwinn_default");
+                        containerName.Data());
   
   AliAnalysisDataContainer *cOutputHist1 =
-    mgr->CreateContainer("jpsi_mwinn_QA",
+    mgr->CreateContainer("mwinn_QA",
                          TList::Class(),
                          AliAnalysisManager::kOutputContainer,
-                         "jpsi_mwinn.root");
+                        containerName.Data());
 
   AliAnalysisDataContainer *cOutputHist2 =
-    mgr->CreateContainer("jpsi_mwinn_CF",
+    mgr->CreateContainer("mwinn_CF",
                          TList::Class(),
                          AliAnalysisManager::kOutputContainer,
-                         "jpsi_mwinn.root");
+                        containerName.Data());
   
   AliAnalysisDataContainer *cOutputHist3 =
-    mgr->CreateContainer("jpsi_mwinn_EventStat",
+    mgr->CreateContainer("mwinn_EventStat",
                          TH1D::Class(),
                          AliAnalysisManager::kOutputContainer,
-                         "jpsi_mwinn.root");
+                        containerName.Data());
   
   mgr->ConnectInput(task,  0, mgr->GetCommonInputContainer());
   mgr->ConnectOutput(task, 0, coutput1 );
index 4b38c21..b1baa67 100644 (file)
@@ -7,8 +7,8 @@ void SetupPairCuts( AliDielectron *die,  Int_t cutDefinition);
 void ConfigEvtPlane(AliDielectron *die,  Int_t cutDefinition);
 void ConfigBgrd(    AliDielectron *die,  Int_t cutDefinition);
 
-TString names=("NoBins;Zvtx;ZvtxCent;ZvtxNcontr;ZvtxNcontrPE;ZvtxNcontrPEepTPC;ZvtxNcontrPEepTPCmag");
-enum { kNoBins=0, kZvtx, kZvtxCent, kZvtxNcontr, kZvtxNcontrPE, kZvtxNcontrPEepTPC, kZvtxNcontrPEepTPCmag};
+TString names=("NoBins;Zvtx;ZvtxNoKF;ZvtxCent;ZvtxNcontr;ZvtxNcontrPE;ZvtxNcontrPEepTPC;ZvtxNcontrPEepTPCmag");
+enum { kNoBins=0, kZvtx, kZvtxNoKF, kZvtxCent, kZvtxNcontr, kZvtxNcontrPE, kZvtxNcontrPEepTPC, kZvtxNcontrPEepTPCmag};
 
 TObjArray *arrNames=names.Tokenize(";");
 const Int_t nDie=arrNames->GetEntries();
@@ -64,6 +64,9 @@ AliDielectron* ConfigJpsiME_jpsi_PbPb(Int_t cutDefinition, TString prod="", ULon
   //die->SetPreFilterAllSigns();
   //die->SetNoPairing();
 
+  // KF usgae
+  if(cutDefinition==kZvtxNoKF) die->SetUseKF(kFALSE);
+
   return die;
 }
 
@@ -212,6 +215,7 @@ void ConfigBgrd(AliDielectron *die, Int_t cutDefinition)
   switch(cutDefinition) {
   case kNoBins: /* */ break;
   case kZvtx:
+  case kZvtxNoKF:
     mix->AddVariable(AliDielectronVarManager::kZvPrim, "-10.,-5.,-4.,-3.,-2.,-1.,0.,1.,2.,3.,4.,5.,10.");
     break;
   case kZvtxCent:
@@ -286,6 +290,7 @@ void InitHistograms(AliDielectron *die, Int_t cutDefinition)
   case kZvtxNcontr:
     histos->UserHistogram("Event","","", 200,  0., 4000.,    AliDielectronVarManager::kNVtxContrib);
   case kZvtx:
+  case kZvtxNoKF:
     histos->UserHistogram("Event","","", 200,-10.,   10.,    AliDielectronVarManager::kZvPrim);
     break;
   }
@@ -299,7 +304,11 @@ void InitHistograms(AliDielectron *die, Int_t cutDefinition)
   histos->AddClass(Form("Pair_%s",AliDielectron::PairClassName(4)));
 
   ///// add histograms to Pair classes /////
-  histos->UserHistogram("Pair","","",  300,.0,300*0.04, AliDielectronVarManager::kM); // 40MeV bins, 12GeV/c2
+  histos->UserHistogram("Pair","","",  300,.0,300*0.04, 80,0.,80.,
+                       AliDielectronVarManager::kM, AliDielectronVarManager::kCentrality); // 40MeV bins, 12GeV/c2
+  histos->UserHistogram("Pair","","",  300,.0,300*0.04, 20,0.,20.,
+                       AliDielectronVarManager::kM, AliDielectronVarManager::kPt); // 40MeV bins, 12GeV/c2
+
   histos->UserHistogram("Pair","","",  100,-1.,1.,      AliDielectronVarManager::kY);
   histos->UserHistogram("Pair","","",  400,0,20.,       AliDielectronVarManager::kPt);
 
index 5150d8e..b0de3e3 100644 (file)
@@ -94,8 +94,8 @@ AliDielectron* ConfigJpsiQA_jpsi_PbPb(Int_t cutDefinition, TString prod="", ULon
   */
 
   // prefilter settings
-  die->SetNoPairing();
-  //die->SetPreFilterUnlikeOnly();
+  //  die->SetNoPairing();
+  die->SetPreFilterUnlikeOnly();
   //die->SetPreFilterAllSigns();
 
   // setup eta correction
@@ -270,9 +270,9 @@ void SetupPairCuts(AliDielectron *die, Int_t cutDefinition)
   die->GetPairPreFilter().AddCuts(gammaCuts);
 
   // rapidity selection
-  //  AliDielectronVarCuts *rapCut=new AliDielectronVarCuts("|Y|<.9","|Y|<.9");
-  // rapCut->AddCut(AliDielectronVarManager::kY,-0.9,0.9);
-  // die->GetPairFilter().AddCuts(rapCut);
+  //AliDielectronVarCuts *rapCut=new AliDielectronVarCuts("|Y|<.9","|Y|<.9");
+  //rapCut->AddCut(AliDielectronVarManager::kY,-0.9,0.9);
+  //die->GetPairFilter().AddCuts(rapCut);
 
   // minv cut (for better jpsi candidate to mc comparison) 
   AliDielectronVarCuts *minvCut=new AliDielectronVarCuts("PairCut","PairCut");
@@ -306,6 +306,10 @@ void InitHistograms(AliDielectron *die, Int_t cutDefinition)
 
     //add histograms to event class
     histos->AddClass("Event");
+    Int_t bins[]={125,100,100,55}; Double_t min[]={0.,0.,0.,0.}; Double_t max[]={25000.,20000.,4000.,1.1}; 
+    UInt_t var[]={AliDielectronVarManager::kMultV0,AliDielectronVarManager::kNTrk,AliDielectronVarManager::kNacc,AliDielectronVarManager::kMatchEffITSTPC};
+    histos->UserSparse("Event", 4, bins, min, max, var);
+    //histos->UserHistogram("Event", 3, bins, min, max, var);
     histos->UserHistogram("Event","","", 80,0.,80., AliDielectronVarManager::kCentrality);
     histos->UserHistogram("Event","","", GetRunNumbers(), AliDielectronVarManager::kRunNumber);
     histos->UserHistogram("Event","","", GetRunNumbers(), AliDielectronHelper::MakeLinBinning(80,0.,80.),
index 3e94253..5e491b2 100644 (file)
@@ -158,7 +158,7 @@ void SetupEventCuts(AliDielectron *die, ULong64_t triggers, Int_t cutDefinition)
   eventCuts->SetMinVtxContributors(1);
   eventCuts->SetVertexZ(-10.,+10.);
   eventCuts->SetCentralityRange(minCent,maxCent);
-  eventCuts->SetCutOnV0MultipicityNTrks(fMean, fSigma, 4.0);
+  //  eventCuts->SetCutOnV0MultipicityNTrks(fMean, fSigma, 4.0);
   eventCuts->Print();
   die->GetEventFilter().AddCuts(eventCuts);
 
index 77d8eb1..a82f29d 100644 (file)
@@ -3,9 +3,8 @@ void SetupPairCutsDieleData(AliDielectron *diele, Int_t cutDefinition, Bool_t is
 void InitHistogramsDieleData(AliDielectron *diele, Int_t cutDefinition, Bool_t isAOD);
 void InitCFDieleData(AliDielectron *diele, Int_t cutDefinition, Bool_t isAOD);
 
-//AliESDtrackCuts *SetupESDtrackCutsDieleData(Int_t cutDefinition);
 
-TString namesDieleData=("basicQ+SPDfirst+pt>1+PID; basicQ+SPDany+pt>1+PID; basicQ+ITS012+pt>1+PID; basiQ+SPDany+pt>1+p>1.2+TPCsignalfrom70to110");
+TString namesDieleData=("basicQ+SPDfirst+pt>1+PID; basicQ+SPDany+pt>1+PID; basicQ+ITS012+pt>1+PID; basicQ+SPDany+pt>1+noexclPIDforcontrolpurpose");//; basicQ+SPDany+pt>1+p>1.2+PIDrequirementsHFEnoexclPIDforcontrolpurpose; basicQ+SPDany+pt>1+p>1.2+PIDrequirementsHFE+PID; basicQ+SPDany+p>1.+PID");
 //TString namesDieleData=("basicQ+SPDfirst+pt>1+PID");
 
 TObjArray *arrNamesDieleData=namesDieleData.Tokenize("; ");
@@ -42,14 +41,21 @@ AliDielectron* ConfigJpsi_mw_pPb(Int_t cutDefinition, Bool_t isAOD=kFALSE/*must
   InitHistogramsDieleData(diele, cutDefinition, isAOD);
   
   // the last definition uses no cuts and only the QA histograms should be filled!, now for all cuts
-  if(cutDefinition == 0 || cutDefinition == 1 || cutDefinition == 2 || cutDefinition == 3) InitCFDieleData(diele, cutDefinition, isAOD);
+  if(cutDefinition == 2 || cutDefinition == 3 || cutDefinition == 4 || cutDefinition == 5|| cutDefinition == 6) InitCFDieleData(diele, cutDefinition, isAOD);//first 2 cut sets in 3rd included
 
   AliDielectronTrackRotator *rot=new AliDielectronTrackRotator;
-  if(cutDefinition == 0 || cutDefinition == 1 || cutDefinition == 2 || cutDefinition == 3) rot->SetConeAnglePhi(TMath::Pi());
+  if(cutDefinition == 0 || cutDefinition == 1 || cutDefinition == 2 || cutDefinition == 3 || cutDefinition == 4 || cutDefinition == 5|| cutDefinition == 6) rot->SetConeAnglePhi(TMath::Pi());
   //else if(cutDefinition == 2) rot->SetConeAnglePhi(TMath::Pi()/180.*135.);
   //rot->SetIterations(10);
   rot->SetIterations(20);
   diele->SetTrackRotator(rot);
+
+  /*  AliDielectronMixingHandler *mix = new AliDielectronMixingHandler;
+  mix->SetMixType(AliDielectronMixingHandler::kAll);
+  mix->AddVariable(AliDielectronVarManager::kZvPrim,"-10., -7.5, -5., -2.5 , 0., 2.5, 5., 7.5 , 10.");
+  //NOTE: other mixing classes probably needed!!!
+  mix->SetDepth(10);
+  diele->SetMixingHandler(mix);*/
  
   
   return diele;
@@ -62,27 +68,17 @@ void SetupTrackCutsDieleData(AliDielectron *diele, Int_t cutDefinition, Bool_t i
   // Setup the track cuts
   //
   
-  if (!isAOD) {
+  //if (!isAOD) {//NOTE: seems to work, see AliDielectronTrackCuts method IsSelected at the beginning, to be checked with AODs
     //exclude conversion electrons selected by the tender
     AliDielectronTrackCuts *noconv=new AliDielectronTrackCuts("noConv","noConv");
     noconv->SetV0DaughterCut(AliPID::kElectron,kTRUE);
     diele->GetTrackFilter().AddCuts(noconv);
-    }/* else {
-    //this is only for AODs
-    AliDielectronTrackCuts *trackCuts=new AliDielectronTrackCuts("trackCuts","trackCuts");
-    if (cutDefinition==0)
-      trackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kFirst);
-    else if ((cutDefinition==1)||(cutDefinition ==3))
-      trackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
-      trackCuts->SetRequireTPCRefit(kTRUE);
-      trackCuts->SetRequireITSRefit(kTRUE);
-      diele->GetTrackFilter().AddCuts(trackCuts);
-      }*/
+    // }
     AliDielectronTrackCuts *trackCuts=new AliDielectronTrackCuts("ITSandgeneral_trackCuts","ITSandgeneral_trackCuts");
     //ITS related cuts
     if (cutDefinition==0)
       trackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kFirst);
-    else if ((cutDefinition==1)||(cutDefinition ==3))
+    else if ((cutDefinition==1)||(cutDefinition ==3)||(cutDefinition ==4)||(cutDefinition ==5)||(cutDefinition ==6))
       trackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
       trackCuts->SetRequireTPCRefit(kTRUE);
       trackCuts->SetRequireITSRefit(kTRUE);
@@ -90,7 +86,9 @@ void SetupTrackCutsDieleData(AliDielectron *diele, Int_t cutDefinition, Bool_t i
   
   //Pt cut ----------------------------------------------------------
   AliDielectronVarCuts *pt = new AliDielectronVarCuts("trackkineandTPCQ","trackkine_and_TPCQ");
-  pt->AddCut(AliDielectronVarManager::kPt,1.,1e30);
+  if ((cutDefinition==0)||(cutDefinition==1)||(cutDefinition ==3)||(cutDefinition ==4)||(cutDefinition ==5))
+    pt->AddCut(AliDielectronVarManager::kPt,1.,1e30);
+  else if (cutDefinition==6) pt->AddCut(AliDielectronVarManager::kP,1.,1e30);
   pt->AddCut(AliDielectronVarManager::kKinkIndex0,0.);
   // ITS 0 1 2 : only for third variant
   if (cutDefinition==2) pt->AddCut(AliDielectronVarManager::kITSLayerFirstCls,0.,2.5);
@@ -98,7 +96,7 @@ void SetupTrackCutsDieleData(AliDielectron *diele, Int_t cutDefinition, Bool_t i
   //
   // TPC #clusteres cut
   pt->AddCut(AliDielectronVarManager::kNclsTPC,70.,160.);
-  //chi square cut TOC missing...
+  if((cutDefinition==4)||(cutDefinition==5))  pt->AddCut(AliDielectronVarManager::kNclsTPC,120.,160.);
   pt->AddCut(AliDielectronVarManager::kTPCchi2Cl,0.,4.);
   pt->AddCut(AliDielectronVarManager::kEta,-0.9,0.9);
   //TODO: DCA cuts to be investigated!!! NOTE: why?? (mwinn, 15.01.2013)
@@ -108,7 +106,7 @@ void SetupTrackCutsDieleData(AliDielectron *diele, Int_t cutDefinition, Bool_t i
   diele->GetTrackFilter().AddCuts(pt);
     
   // PID cuts --------------------------------------------------------
-  if(cutDefinition ==0 || cutDefinition ==1 ||cutDefinition ==2){
+  if(cutDefinition ==0 || cutDefinition ==1 ||cutDefinition ==2||cutDefinition ==6){
     AliDielectronPID *pid = new AliDielectronPID("PID10","TPC nSigma |e|<3 + |Pi|>3.5 + P>3");
     pid->AddCut(AliDielectronPID::kTPC,AliPID::kElectron,-3.,3.);
     pid->AddCut(AliDielectronPID::kTPC,AliPID::kPion,-3.5,3.5,0.,0.,kTRUE);
@@ -116,10 +114,29 @@ void SetupTrackCutsDieleData(AliDielectron *diele, Int_t cutDefinition, Bool_t i
     diele->GetTrackFilter().AddCuts(pid);
   }
   if(cutDefinition ==3){
+    AliDielectronPID *pid = new AliDielectronPID("PID10","TPC nSigma |e|<3");
+    pid->AddCut(AliDielectronPID::kTPC,AliPID::kElectron,-3.,3.);
+    diele->GetTrackFilter().AddCuts(pid);
+    /* //taken out at the 04.02.2013 in order to have some feeling for PID cuts in QAplots...
     AliDielectronVarCuts *pidsubs = new AliDielectronVarCuts("pidSubs","pidsubs cut");
      pidsubs->AddCut(AliDielectronVarManager::kP,1.2,1e30);
      pidsubs->AddCut(AliDielectronVarManager::kTPCsignal,70.,110.);
-     diele->GetTrackFilter().AddCuts(pidsubs);
+     diele->GetTrackFilter().AddCuts(pidsubs);*/
+  }
+  if(cutDefinition ==4||cutDefinition ==5){
+    
+    AliDielectronPID *pid = new AliDielectronPID("PID10","TPC nSigma |e|<3");
+    pid->AddCut(AliDielectronPID::kTPC,AliPID::kElectron,-3.,3.);
+    diele->GetTrackFilter().AddCuts(pid);
+    AliDielectronVarCuts *hfe = new AliDielectronVarCuts("hfeTPCQ","hfeTPCQ");
+    hfe->AddCut(AliDielectronVarManager::kTPCsignalN,80.,160.);//TPC PID Cluster
+    diele->GetTrackFilter().AddCuts(hfe);
+    if(cutDefinition ==5){
+      AliDielectronPID *pidexclusion = new AliDielectronPID("PIDhfe","TPC nSigma |Pi|>3.5 + P>3");
+      pidexclusion->AddCut(AliDielectronPID::kTPC,AliPID::kPion,-3.5,3.5,0.,0.,kTRUE);
+      pidexclusion->AddCut(AliDielectronPID::kTPC,AliPID::kProton,-20.,3.,0.,0.,kTRUE);
+      diele->GetTrackFilter().AddCuts(pidexclusion);
+    }
   }
 }
 
@@ -145,42 +162,9 @@ void SetupPairCutsDieleData(AliDielectron *diele, Int_t cutDefinition, Bool_t is
   pairCut->AddCut(AliDielectronVarManager::kY,-0.9,0.9);
   diele->GetPairFilter().AddCuts(pairCut);
 }
-/*
 //______________________________________________________________________________________
-AliESDtrackCuts *SetupESDtrackCutsDieleData(Int_t cutDefinition)
-{
-  //
-  // Setup default AliESDtrackCuts
-  //
-  AliESDtrackCuts *esdTrackCuts = new AliESDtrackCuts;
-
-  // basic track quality cuts  (basicQ)
- //done esdTrackCuts->SetMaxDCAToVertexZ(3.0);
- //done esdTrackCuts->SetMaxDCAToVertexXY(1.0);
-
-//done  esdTrackCuts->SetEtaRange( -0.9 , 0.9 );
 
-//done esdTrackCuts->SetAcceptKinkDaughters(kFALSE);
-//done  esdTrackCuts->SetRequireITSRefit(kTRUE);
-//done esdTrackCuts->SetRequireTPCRefit(kTRUE);
 
-//done  esdTrackCuts->SetPtRange(1.,1e30);
-
-
-//done  esdTrackCuts->SetMinNClustersTPC(70);
-
-//done  esdTrackCuts->SetMaxChi2PerClusterTPC(4);
-   // default SPD any
-  if ((cutDefinition==1)||(cutDefinition==3)) esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
-
-  if (cutDefinition==0)
-    esdTrackCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kFirst);
-
-  return esdTrackCuts;
-}
-*/
-
-//______________________________________________________________________________________
 void InitHistogramsDieleData(AliDielectron *diele, Int_t cutDefinition, Bool_t isAOD)
 {
   //
@@ -201,7 +185,7 @@ void InitHistogramsDieleData(AliDielectron *diele, Int_t cutDefinition, Bool_t i
   
   //Pair classes
   // to fill also mixed event histograms loop until 10
-  for (Int_t i=0; i<3; ++i){
+  for (Int_t i=0; i<3/*for mixing until 10*/; ++i){
     histos->AddClass(Form("Pair_%s",AliDielectron::PairClassName(i)));
   }
   
@@ -213,6 +197,8 @@ void InitHistogramsDieleData(AliDielectron *diele, Int_t cutDefinition, Bool_t i
    //track rotation
    histos->AddClass(Form("Pair_%s",PairClassName(AliDielectron::kEv1PMRot)));
    histos->AddClass(Form("Track_Legs_%s",PairClassName(AliDielectron::kEv1PMRot)));
+
+
   
   
   //add histograms to event class
@@ -241,8 +227,10 @@ void InitHistogramsDieleData(AliDielectron *diele, Int_t cutDefinition, Bool_t i
   
   //add histograms to Track classes
   histos->UserHistogram("Track","Pt","Pt;Pt [GeV];#tracks",400,0,20.,AliDielectronVarManager::kPt);
+  histos->UserHistogram("Track","TOFPIDBit","TOFPIDBit;TOFPIDBit;#tracks",2,-0.5,1.5,AliDielectronVarManager::kTOFPIDBit);
   histos->UserHistogram("Track","TPCnCls","Number of Clusters TPC;TPC number clusteres;#tracks",160,-0.5,159.5,AliDielectronVarManager::kNclsTPC);
-  
+  histos->UserHistogram("Track","TPCsignalN","Number of PID Clusters TPC;TPC PID number clusteres;#tracks",160,-0.5,159.5,AliDielectronVarManager::kTPCsignalN);
+  histos->UserHistogram("Track","nClsoverfindablecluster","Number of found Clusters TPC over findably ;TPC number cluster over findable;#tracks",160,0.0,1.1,AliDielectronVarManager::kNFclsTPCrFrac);
   histos->UserHistogram("Track","dXY","dXY;dXY [cm];#tracks",500,-1.,1.,AliDielectronVarManager::kImpactParXY);
   histos->UserHistogram("Track","dZ","dZ;dZ [cm];#tracks",600,-3.,3.,AliDielectronVarManager::kImpactParZ);
   histos->UserHistogram("Track","Eta_Phi","Eta Phi Map; Eta; Phi;#tracks",
@@ -252,14 +240,49 @@ void InitHistogramsDieleData(AliDielectron *diele, Int_t cutDefinition, Bool_t i
                         200,0.2,20.,100,0.,200.,AliDielectronVarManager::kPIn,AliDielectronVarManager::kTPCsignal,kTRUE);
   histos->UserHistogram("Track","TPCnSigmaEle_P","TPC number of sigmas Electrons;P [GeV];TPC number of sigmas Electrons;#tracks",
                         200,0.2,20.,100,-10.,10.,AliDielectronVarManager::kPIn,AliDielectronVarManager::kTPCnSigmaEle,kTRUE);
+  histos->UserHistogram("Track","TPCnSigmaPi_P","TPC number of sigmas Kaons;PIN [GeV];TPC number of sigmas Pions;#tracks",
+                        200,0.2,20.,100,-10.,10.,AliDielectronVarManager::kPIn,AliDielectronVarManager::kTPCnSigmaPio,kTRUE);
+  histos->UserHistogram("Track","TPCnSigmaPro_P","TPC number of sigmas Protons;PIN [GeV];TPC number of sigmas Protons;#tracks",
+                        200,0.2,20.,100,-10.,10.,AliDielectronVarManager::kPIn,AliDielectronVarManager::kTPCnSigmaPro,kTRUE);
+  histos->UserHistogram("Track","TPCnSigmaKao_P","TPC number of sigmas Kaons;PIN [GeV];TPC number of sigmas Kaons;#tracks",
+                        200,0.2,20.,100,-10.,10.,AliDielectronVarManager::kPIn,AliDielectronVarManager::kTPCnSigmaKao,kTRUE);
+  histos->UserHistogram("Track","TOFbeta_P","TOF beta;P [GeV];TOF beta;#tracks",
+                        200,0.2,20.,100,0.,1.,AliDielectronVarManager::kP,AliDielectronVarManager::kTOFnSigmaEle,kTRUE);
+  histos->UserHistogram("Track","TOFnSigmaEle_P","TOF number of sigmas Electrons;P [GeV];TOF number of sigmas Electrons;#tracks",
+                        200,0.2,20.,200,-20.,20.,AliDielectronVarManager::kP,AliDielectronVarManager::kTOFnSigmaEle,kTRUE);
+  histos->UserHistogram("Track","TRDnCls","Number of Clusters TRD;TRD number clusters;#tracks",160,-0.5,159.5,AliDielectronVarManager::kNclsTRD);
+  histos->UserHistogram("Track","TRDntracklets","Number of tracklets TRD;TRD number tracklets;#tracks",7,-0.5,6.5,AliDielectronVarManager::kTRDntracklets);
+  histos->UserHistogram("Track","TRDprobEle_P","TRD electron prob.;P [GeV];TRD electron prob.;#tracks",
+                        200,0.2,20.,100,.0,1.,AliDielectronVarManager::kP,AliDielectronVarManager::kTRDprobEle,kTRUE);
+  histos->UserHistogram("Track","TRDprobEle2D_P","TRD electron prob. 2D;P [GeV];TRD electron prob. 2D;#tracks",
+                        200,0.2,20.,100,.0,1.,AliDielectronVarManager::kP,AliDielectronVarManager::kTRDprob2DEle,kTRUE);
+
+  
+
+
       
   //add histograms to Pair classes
   histos->UserHistogram("Pair","InvMass","Inv.Mass;Inv. Mass [GeV];#pairs",
                         125,0.,125*.04,AliDielectronVarManager::kM);
   histos->UserHistogram("Pair","Rapidity","Rapidity;Rapidity;#pairs",
                         100,-1.,1.,AliDielectronVarManager::kY);
+  histos->UserHistogram("Pair","Pt","Pt;Pt;#pairs",
+                        200,0.,20.,AliDielectronVarManager::kPt);
   histos->UserHistogram("Pair","OpeningAngle","Opening angle;angle",
                         100,0.,3.15,AliDielectronVarManager::kOpeningAngle);
+  histos->UserHistogram("Pair","OpeningAngletransverse","Opening angle transverse;angle",
+                        100,0.,3.15,AliDielectronVarManager::kDeltaPhi);
+  histos->UserHistogram("Pair","Chi2NDF","chisquareNDF;chisquare/ndf;#pairs",
+                        100,0.,30.,AliDielectronVarManager::kChi2NDF);
+  histos->UserHistogram("Pair","distanceXY","distancelegsXY;distanceXY[cm];#pairs",
+                       100,0.,.0001,AliDielectronVarManager::kLegDistXY);
+  histos->UserHistogram("Pair","distance","distancelegs;distance[cm];#pairs",
+                        100,0.,.0001,AliDielectronVarManager::kLegDist);
+  histos->UserHistogram("Pair","pseudoproperdecaylength","pseudoproperdecaylength;pseudoproperdecaylength[cm];#pairs",
+                       100,0.,.5,AliDielectronVarManager::kPseudoProperTime);
+  histos->UserHistogram("Pair","Armenteros-Podolanski","Armenteros-Podolanski;ArmAlpha;ArmPt[GeV];#tracks",
+                       100,-10.0,10.,100,0.,2.,AliDielectronVarManager::kArmAlpha,AliDielectronVarManager::kArmPt,kTRUE);
  
 
  // 3D histos: invMass - Multiplicity - ptJpsi
@@ -279,28 +302,31 @@ void InitCFDieleData(AliDielectron *diele, Int_t cutDefinition, Bool_t isAOD)
   AliDielectronCF *cf=new AliDielectronCF(diele->GetName(),diele->GetTitle());
   
   //pair variables
-  cf->AddVariable(AliDielectronVarManager::kPt,"0.0, 1.0, 1.3, 2.0, 3.0, 5., 7.0, 10.0, 100.0");
+  cf->AddVariable(AliDielectronVarManager::kPt,"0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0, 3.2, 3.5, 3.8, 4.2, 4.6, 5.0, 5.5, 6.0, 6.5, 7.0, 7.5, 8.0, 8.5, 9.0, 9.5, 10.0");
   cf->AddVariable(AliDielectronVarManager::kY,"-5,-1,-0.9,-0.8,-0.7,-0.5,-0.3,0.3,0.5,0.7,0.8,0.9,1.0,5");
   cf->AddVariable(AliDielectronVarManager::kM,125,0.,125*.04); //40Mev Steps
   cf->AddVariable(AliDielectronVarManager::kPseudoProperTime,150,-0.3,0.3);
   cf->AddVariable(AliDielectronVarManager::kPseudoProperTimeErr,600,0.,0.3);
   cf->AddVariable(AliDielectronVarManager::kPairType,"-0.5,0.5,1.5,2.5,9.5,10.5");
+  cf->AddVariable(AliDielectronVarManager::kArmAlpha,"-10.,-5.,-2.,-.1.,0.,1.,2.,5.,10.");
+  cf->AddVariable(AliDielectronVarManager::kArmPt,"0.0,0.4,0.6,0.8,1.0,1.5,2.0,3.0");
   
 
   //leg variables
   cf->AddVariable(AliDielectronVarManager::kPt,"0.0, 0.8, 0.9, 0.95, 1.0, 1.05, 1.1, 1.2, 100.0",kTRUE);
   cf->AddVariable(AliDielectronVarManager::kNclsTPC,"0, 70, 75, 80, 85, 90, 100, 120, 160",kTRUE);
+  //cf->AddVariable(AliDielectronVarManager::kTPCsignalN,"0, 50, 60, 70, 80, 90, 100, 160",kTRUE);
   cf->AddVariable(AliDielectronVarManager::kTPCchi2Cl,"0, 0.5, 1., 1.5, 2., 2.5, 3., 3.5, 4.",kTRUE);  
-  cf->AddVariable(AliDielectronVarManager::kEta,"-5,-1,-0.9,-0.85,-0.8,-0.75,0.75,0.8,0.85,0.9,1.0,5",kTRUE);
+  cf->AddVariable(AliDielectronVarManager::kEta, "-1.0, -0.88, -0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.1, 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.88, 1.0", kTRUE);
   cf->AddVariable(AliDielectronVarManager::kTPCnSigmaEle,"-2.5,-2,-1.5,-1,-0.5,4.",kTRUE);
   cf->AddVariable(AliDielectronVarManager::kTPCnSigmaPio,"3.,3.5,4.,100",kTRUE);
   cf->AddVariable(AliDielectronVarManager::kTPCnSigmaPro,"3.,3.5,4.,100",kTRUE);
   cf->AddVariable(AliDielectronVarManager::kITSLayerFirstCls,6,-0.5,5.5,kTRUE);
-
+  cf->AddVariable(AliDielectronVarManager::kP,"0.0, 0.8, 0.9, 0.95, 1.0, 1.05, 1.1, 1.2,1.5,2.0,3.0,4.0,5.0, 100.0",kTRUE);
   //event variables
   //cf->AddVariable(AliDielectronVarManager::kNaccTrcklts,"0.0, 9.0, 17.0, 25.0, 36.0, 55.0, 500.0");
   cf->AddVariable(AliDielectronVarManager::kNaccTrckltsEsd10,101,-0.5,100.5);
-  cf->AddVariable(AliDielectronVarManager::kNaccTrckltsEsd10Corr,101,-0.5,100.5);
+  //cf->AddVariable(AliDielectronVarManager::kNaccTrckltsEsd10Corr,101,-0.5,100.5);
   cf->AddVariable(AliDielectronVarManager::kZvPrim,"-20.,-15.,-10.,-5.,0.,5.,10.,15.,20.");
   if (!isAOD){
     Bool_t hasMC=(AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler()!=0x0);