ITS QA task with check for SDD in trigger cluster (Francesco, Andrea)
authordainesea <dainesea@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 10 Jan 2013 23:59:07 +0000 (23:59 +0000)
committerdainesea <dainesea@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 10 Jan 2013 23:59:07 +0000 (23:59 +0000)
PWGPP/ITS/AliAnalysisTaskITSTrackingCheck.cxx
PWGPP/ITS/AliAnalysisTaskITSTrackingCheck.h
PWGPP/ITS/AliAnalysisTaskITSsaTracks.cxx
PWGPP/ITS/AliAnalysisTaskITSsaTracks.h
PWGPP/ITS/AliAnalysisTaskSDDRP.cxx
PWGPP/ITS/AliAnalysisTaskSDDRP.h
PWGPP/ITS/AliAnalysisTaskSEImpParRes.cxx
PWGPP/ITS/AliAnalysisTaskSEImpParRes.h
PWGPP/macros/AddTaskImpParRes.C
PWGPP/macros/AddTaskPerformanceITS.C

index e4c2863..b4b68e1 100644 (file)
@@ -37,6 +37,9 @@
 #include "AliAnalysisManager.h"
 
 #include "AliMultiplicity.h"
+#include "AliTriggerConfiguration.h"
+#include "AliCDBManager.h"
+#include "AliCDBEntry.h"
 #include "AliVertexerTracks.h"
 #include "AliESDtrack.h"
 #include "AliExternalTrackParam.h"
@@ -68,9 +71,13 @@ fFillNtuples(kFALSE),
 fUseITSSAforNtuples(kFALSE),
 fUsePhysSel(kFALSE),
 fRejPileupSPD(kFALSE),
+fCheckSDDIsIn(0),
 fESD(0), 
 fMinMult(0),
 fMaxMult(1000000),
+fTriggerClass(""),
+fTrigConfig(0),
+fOCDBPath(""),
 fOutput(0), 
 fHistNEvents(0),
 fHistNEventsFrac(0),
@@ -79,8 +86,6 @@ fHistNclsITSMI(0),
 fHistNclsITSSA(0),
 fHistNclsITSSAInAcc(0),
 fHistClusterMapITSMI(0),
-fHistClusterMapITSMIokA(0),
-fHistClusterMapITSMIokB(0),
 fHistClusterMapITSMIok(0),
 fHistClusterMapITSMIbad(0),
 fHistClusterMapITSMIskipped(0),
@@ -124,23 +129,15 @@ fHistzlocSDDok(0),
 fHistxlocVSmodSDDok(0),
 fHistxlocSDDall(0),
 fHistzlocSDDall(0),
-fHistxlocSDDA(0),
-fHistxlocSDDB(0),
-fHistzlocSDDA(0),
-fHistzlocSDDB(0),
 fHistPhiTPCInAcc(0),
 fHistEtaTPCInAcc(0),
-fHistEtaTPCInAccA(0),
-fHistEtaTPCInAccB(0),
-fHistNclsTPCInAccA(0),
-fHistNclsTPCInAccB(0),
-fHistChi2PerClsTPCInAccA(0),
-fHistChi2PerClsTPCInAccB(0),
-fHistChi2PerClsITSInAccA(0),
-fHistChi2PerClsITSInAccB(0),
 fHistPtTPC(0),
 fHistPtTPCInAcc(0),
 fHistPtTPCInAccTOFbc0(0),
+fHistPtTPCInAccwSDD(0),
+fHistPtTPCInAccTOFbc0wSDD(0),
+fHistPtTPCInAccwoSDD(0),
+fHistPtTPCInAccTOFbc0woSDD(0),
 fHistPtTPCInAccMCtwoSPD(0),
 fHistPtTPCInAccMConeSPD(0),
 fHistdEdxVSPtTPCInAcc(0),
@@ -179,6 +176,34 @@ fHistPtITSMI5InAccTOFbc0(0),
 fHistPtITSMI6InAccTOFbc0(0),
 fHistPtITSMISPDInAccTOFbc0(0),
 fHistPtITSMIoneSPDInAccTOFbc0(0),
+fHistPtITSMI2InAccwSDD(0),
+fHistPtITSMI3InAccwSDD(0),
+fHistPtITSMI4InAccwSDD(0),
+fHistPtITSMI5InAccwSDD(0),
+fHistPtITSMI6InAccwSDD(0),
+fHistPtITSMISPDInAccwSDD(0),
+fHistPtITSMIoneSPDInAccwSDD(0),
+fHistPtITSMI2InAccTOFbc0wSDD(0),
+fHistPtITSMI3InAccTOFbc0wSDD(0),
+fHistPtITSMI4InAccTOFbc0wSDD(0),
+fHistPtITSMI5InAccTOFbc0wSDD(0),
+fHistPtITSMI6InAccTOFbc0wSDD(0),
+fHistPtITSMISPDInAccTOFbc0wSDD(0),
+fHistPtITSMIoneSPDInAccTOFbc0wSDD(0),
+fHistPtITSMI2InAccwoSDD(0),
+fHistPtITSMI3InAccwoSDD(0),
+fHistPtITSMI4InAccwoSDD(0),
+fHistPtITSMI5InAccwoSDD(0),
+fHistPtITSMI6InAccwoSDD(0),
+fHistPtITSMISPDInAccwoSDD(0),
+fHistPtITSMIoneSPDInAccwoSDD(0),
+fHistPtITSMI2InAccTOFbc0woSDD(0),
+fHistPtITSMI3InAccTOFbc0woSDD(0),
+fHistPtITSMI4InAccTOFbc0woSDD(0),
+fHistPtITSMI5InAccTOFbc0woSDD(0),
+fHistPtITSMI6InAccTOFbc0woSDD(0),
+fHistPtITSMISPDInAccTOFbc0woSDD(0),
+fHistPtITSMIoneSPDInAccTOFbc0woSDD(0),
 fHistPtITSMIoneSPDInAccShared(0),
 fHistPtITSMIoneSPDInAccSharedSPD(0),
 fHistPtITSMISPD1InAccShared(0),
@@ -209,6 +234,10 @@ fHistPtITSMIoneSPDInAccFake(0),
 fHistPtITSMIoneSPDthreeSDDSSDInAcc(0),
 fHistPtITSTPCsel(0),
 fHistPtITSTPCselTOFbc0(0),
+fHistPtITSTPCselwSDD(0),
+fHistPtITSTPCselTOFbc0wSDD(0),
+fHistPtITSTPCselwoSDD(0),
+fHistPtITSTPCselTOFbc0woSDD(0),
 fHistPtITSTPCselP(0),
 fHistPtITSTPCselS(0),
 fHistPtITSTPCselFake(0),
@@ -236,10 +265,6 @@ fHistPtITSMIokbadoutinz6InAcc(0),
 fHistPhiITSMIokbadoutinz6InAcc(0),
 fHistRProdVtxInAccP(0),
 fHistRProdVtxInAccS(0),
-fHistd0rphiTPCInAccA(0),
-fHistd0rphiTPCInAccB(0),
-fHistd0zTPCInAccA(0),
-fHistd0zTPCInAccB(0),
 fHistd0rphiTPCInAccP150200(0),
 fHistd0rphiTPCInAccP500700(0),
 fHistd0rphiTPCInAccP10001500(0),
@@ -258,10 +283,6 @@ fHistd0rphiITSMIoneSPDInAccP500700(0),
 fHistd0rphiITSMIoneSPDInAccP10001500(0),
 fHistd0rphiITSMIoneSPDInAccP25004000(0),
 fHistd0rphiITSMIoneSPDInAccP40008000(0),
-fHistd0rphiITSMIoneSPDInAccA(0),
-fHistd0rphiITSMIoneSPDInAccB(0),
-fHistd0zITSMIoneSPDInAccA(0),
-fHistd0zITSMIoneSPDInAccB(0),
 fHistd0zITSMIoneSPDInAccP150200(0),
 fHistd0zITSMIoneSPDInAccP500700(0),
 fHistd0zITSMIoneSPDInAccP10001500(0),
@@ -325,9 +346,13 @@ fFillNtuples(kFALSE),
 fUseITSSAforNtuples(kFALSE),
 fUsePhysSel(kFALSE),
 fRejPileupSPD(kFALSE),
+fCheckSDDIsIn(0),
 fESD(0), 
 fMinMult(0),
 fMaxMult(1000000),
+fTriggerClass(""),
+fTrigConfig(0),
+fOCDBPath(""),
 fOutput(0), 
 fHistNEvents(0),
 fHistNEventsFrac(0),
@@ -336,8 +361,6 @@ fHistNclsITSMI(0),
 fHistNclsITSSA(0),
 fHistNclsITSSAInAcc(0),
 fHistClusterMapITSMI(0),
-fHistClusterMapITSMIokA(0),
-fHistClusterMapITSMIokB(0),
 fHistClusterMapITSMIok(0),
 fHistClusterMapITSMIbad(0),
 fHistClusterMapITSMIskipped(0),
@@ -381,23 +404,15 @@ fHistzlocSDDok(0),
 fHistxlocVSmodSDDok(0),
 fHistxlocSDDall(0),
 fHistzlocSDDall(0),
-fHistxlocSDDA(0),
-fHistxlocSDDB(0),
-fHistzlocSDDA(0),
-fHistzlocSDDB(0),
 fHistPhiTPCInAcc(0),
 fHistEtaTPCInAcc(0),
-fHistEtaTPCInAccA(0),
-fHistEtaTPCInAccB(0),
-fHistNclsTPCInAccA(0),
-fHistNclsTPCInAccB(0),
-fHistChi2PerClsTPCInAccA(0),
-fHistChi2PerClsTPCInAccB(0),
-fHistChi2PerClsITSInAccA(0),
-fHistChi2PerClsITSInAccB(0),
 fHistPtTPC(0),
 fHistPtTPCInAcc(0),
 fHistPtTPCInAccTOFbc0(0),
+fHistPtTPCInAccwSDD(0),
+fHistPtTPCInAccTOFbc0wSDD(0),
+fHistPtTPCInAccwoSDD(0),
+fHistPtTPCInAccTOFbc0woSDD(0),
 fHistPtTPCInAccMCtwoSPD(0),
 fHistPtTPCInAccMConeSPD(0),
 fHistdEdxVSPtTPCInAcc(0),
@@ -436,6 +451,34 @@ fHistPtITSMI5InAccTOFbc0(0),
 fHistPtITSMI6InAccTOFbc0(0),
 fHistPtITSMISPDInAccTOFbc0(0),
 fHistPtITSMIoneSPDInAccTOFbc0(0),
+fHistPtITSMI2InAccwSDD(0),
+fHistPtITSMI3InAccwSDD(0),
+fHistPtITSMI4InAccwSDD(0),
+fHistPtITSMI5InAccwSDD(0),
+fHistPtITSMI6InAccwSDD(0),
+fHistPtITSMISPDInAccwSDD(0),
+fHistPtITSMIoneSPDInAccwSDD(0),
+fHistPtITSMI2InAccTOFbc0wSDD(0),
+fHistPtITSMI3InAccTOFbc0wSDD(0),
+fHistPtITSMI4InAccTOFbc0wSDD(0),
+fHistPtITSMI5InAccTOFbc0wSDD(0),
+fHistPtITSMI6InAccTOFbc0wSDD(0),
+fHistPtITSMISPDInAccTOFbc0wSDD(0),
+fHistPtITSMIoneSPDInAccTOFbc0wSDD(0),
+fHistPtITSMI2InAccwoSDD(0),
+fHistPtITSMI3InAccwoSDD(0),
+fHistPtITSMI4InAccwoSDD(0),
+fHistPtITSMI5InAccwoSDD(0),
+fHistPtITSMI6InAccwoSDD(0),
+fHistPtITSMISPDInAccwoSDD(0),
+fHistPtITSMIoneSPDInAccwoSDD(0),
+fHistPtITSMI2InAccTOFbc0woSDD(0),
+fHistPtITSMI3InAccTOFbc0woSDD(0),
+fHistPtITSMI4InAccTOFbc0woSDD(0),
+fHistPtITSMI5InAccTOFbc0woSDD(0),
+fHistPtITSMI6InAccTOFbc0woSDD(0),
+fHistPtITSMISPDInAccTOFbc0woSDD(0),
+fHistPtITSMIoneSPDInAccTOFbc0woSDD(0),
 fHistPtITSMIoneSPDInAccShared(0),
 fHistPtITSMIoneSPDInAccSharedSPD(0),
 fHistPtITSMISPD1InAccShared(0),
@@ -466,6 +509,10 @@ fHistPtITSMIoneSPDInAccFake(0),
 fHistPtITSMIoneSPDthreeSDDSSDInAcc(0),
 fHistPtITSTPCsel(0),
 fHistPtITSTPCselTOFbc0(0),
+fHistPtITSTPCselwSDD(0),
+fHistPtITSTPCselTOFbc0wSDD(0),
+fHistPtITSTPCselwoSDD(0),
+fHistPtITSTPCselTOFbc0woSDD(0),
 fHistPtITSTPCselP(0),
 fHistPtITSTPCselS(0),
 fHistPtITSTPCselFake(0),
@@ -493,10 +540,6 @@ fHistPtITSMIokbadoutinz6InAcc(0),
 fHistPhiITSMIokbadoutinz6InAcc(0),
 fHistRProdVtxInAccP(0),
 fHistRProdVtxInAccS(0),
-fHistd0rphiTPCInAccA(0),
-fHistd0rphiTPCInAccB(0),
-fHistd0zTPCInAccA(0),
-fHistd0zTPCInAccB(0),
 fHistd0rphiTPCInAccP150200(0),
 fHistd0rphiTPCInAccP500700(0),
 fHistd0rphiTPCInAccP10001500(0),
@@ -515,10 +558,6 @@ fHistd0rphiITSMIoneSPDInAccP500700(0),
 fHistd0rphiITSMIoneSPDInAccP10001500(0),
 fHistd0rphiITSMIoneSPDInAccP25004000(0),
 fHistd0rphiITSMIoneSPDInAccP40008000(0),
-fHistd0rphiITSMIoneSPDInAccA(0),
-fHistd0rphiITSMIoneSPDInAccB(0),
-fHistd0zITSMIoneSPDInAccA(0),
-fHistd0zITSMIoneSPDInAccB(0),
 fHistd0zITSMIoneSPDInAccP150200(0),
 fHistd0zITSMIoneSPDInAccP500700(0),
 fHistd0zITSMIoneSPDInAccP10001500(0),
@@ -665,15 +704,6 @@ void AliAnalysisTaskITSTrackingCheck::UserCreateOutputObjects()
   fHistClusterMapITSMIok->SetMinimum(0);
   fOutput->Add(fHistClusterMapITSMIok);
   
-  fHistClusterMapITSMIokA = new TH1F("fHistClusterMapITSMIokA", "N tracks with ok on Layer (MI); Layer; N tracks",6, -0.5, 5.5);
-  fHistClusterMapITSMIokA->Sumw2();
-  fHistClusterMapITSMIokA->SetMinimum(0);
-  fOutput->Add(fHistClusterMapITSMIokA);
-  
-  fHistClusterMapITSMIokB = new TH1F("fHistClusterMapITSMIokB", "N tracks with ok on Layer (MI); Layer; N tracks",6, -0.5, 5.5);
-  fHistClusterMapITSMIokB->Sumw2();
-  fHistClusterMapITSMIokB->SetMinimum(0);
-  fOutput->Add(fHistClusterMapITSMIokB);
   
 
   fHistClusterMapITSSAokInAcc = new TH1F("fHistClusterMapITSSAokInAcc", "N tracks with ok on Layer (SA); Layer; N tracks",6, -0.5, 5.5);
@@ -861,26 +891,6 @@ void AliAnalysisTaskITSTrackingCheck::UserCreateOutputObjects()
   fHistzlocSDDall->SetMinimum(0);
   fOutput->Add(fHistzlocSDDall);
 
-  fHistxlocSDDA = new TH1F("fHistxlocSDDA", "SDD points; xloc [cm]; N tracks",75, -3.75, 3.75);
-  fHistxlocSDDA->Sumw2();
-  fHistxlocSDDA->SetMinimum(0);
-  fOutput->Add(fHistxlocSDDA);
-
-  fHistzlocSDDA = new TH1F("fHistzlocSDDA", "SDD points; zloc [cm]; N tracks",77, -3.85, 3.85);
-  fHistzlocSDDA->Sumw2();
-  fHistzlocSDDA->SetMinimum(0);
-  fOutput->Add(fHistzlocSDDA);
-  
-  fHistxlocSDDB = new TH1F("fHistxlocSDDB", "SDD points; xloc [cm]; N tracks",75, -3.75, 3.75);
-  fHistxlocSDDB->Sumw2();
-  fHistxlocSDDB->SetMinimum(0);
-  fOutput->Add(fHistxlocSDDB);
-
-  fHistzlocSDDB = new TH1F("fHistzlocSDDB", "SDD points; zloc [cm]; N tracks",77, -3.85, 3.85);
-  fHistzlocSDDB->Sumw2();
-  fHistzlocSDDB->SetMinimum(0);
-  fOutput->Add(fHistzlocSDDB);
-  
 
   fHistPhiTPCInAcc = new TH1F("fHistPhiTPCInAcc","Azimuthal distribution of TPC tracks; #phi; N tracks",100, 0, 2.*3.1415);
   fHistPhiTPCInAcc->Sumw2();
@@ -892,45 +902,6 @@ void AliAnalysisTaskITSTrackingCheck::UserCreateOutputObjects()
   fHistEtaTPCInAcc->SetMinimum(0);
   fOutput->Add(fHistEtaTPCInAcc);
 
-  fHistEtaTPCInAccA = new TH1F("fHistEtaTPCInAccA","Eta distribution of TPC tracks; #eta; N tracks",100, -1.5, +1.5);
-  fHistEtaTPCInAccA->Sumw2();
-  fHistEtaTPCInAccA->SetMinimum(0);
-  fOutput->Add(fHistEtaTPCInAccA);
-
-  fHistEtaTPCInAccB = new TH1F("fHistEtaTPCInAccB","Eta distribution of TPC tracks; #eta; N tracks",100, -1.5, +1.5);
-  fHistEtaTPCInAccB->Sumw2();
-  fHistEtaTPCInAccB->SetMinimum(0);
-  fOutput->Add(fHistEtaTPCInAccB);
-
-  fHistNclsTPCInAccA = new TH1F("fHistNclsTPCInAccA","Ncls distribution of TPC tracks; #eta; N tracks",80, -0.5,159.5);
-  fHistNclsTPCInAccA->Sumw2();
-  fHistNclsTPCInAccA->SetMinimum(0);
-  fOutput->Add(fHistNclsTPCInAccA);
-
-  fHistNclsTPCInAccB = new TH1F("fHistNclsTPCInAccB","Ncls distribution of TPC tracks; #eta; N tracks",80, -0.5,159.5);
-  fHistNclsTPCInAccB->Sumw2();
-  fHistNclsTPCInAccB->SetMinimum(0);
-  fOutput->Add(fHistNclsTPCInAccB);
-
-  fHistChi2PerClsTPCInAccA = new TH1F("fHistChi2PerClsTPCInAccA","Chi2PerCls distribution of TPC tracks; #eta; N tracks",100,0,20);
-  fHistChi2PerClsTPCInAccA->Sumw2();
-  fHistChi2PerClsTPCInAccA->SetMinimum(0);
-  fOutput->Add(fHistChi2PerClsTPCInAccA);
-
-  fHistChi2PerClsTPCInAccB = new TH1F("fHistChi2PerClsTPCInAccB","Chi2PerCls distribution of TPC tracks; #eta; N tracks",100,0,20);
-  fHistChi2PerClsTPCInAccB->Sumw2();
-  fHistChi2PerClsTPCInAccB->SetMinimum(0);
-  fOutput->Add(fHistChi2PerClsTPCInAccB);
-
-  fHistChi2PerClsITSInAccA = new TH1F("fHistChi2PerClsITSInAccA","Chi2PerCls distribution of ITS tracks; #eta; N tracks",100,0,20);
-  fHistChi2PerClsITSInAccA->Sumw2();
-  fHistChi2PerClsITSInAccA->SetMinimum(0);
-  fOutput->Add(fHistChi2PerClsITSInAccA);
-
-  fHistChi2PerClsITSInAccB = new TH1F("fHistChi2PerClsITSInAccB","Chi2PerCls distribution of ITS tracks; #eta; N tracks",100,0,20);
-  fHistChi2PerClsITSInAccB->Sumw2();
-  fHistChi2PerClsITSInAccB->SetMinimum(0);
-  fOutput->Add(fHistChi2PerClsITSInAccB);
 
   fHistPhiITSMIokbadoutinz6InAcc = new TH1F("fHistPhiITSMIokbadoutinz6InAcc","Azimuthal distribution of ITSMI tracks with 6 layers OK; #phi; N tracks",100,0,2.*3.1415);
   fHistPhiITSMIokbadoutinz6InAcc->Sumw2();
@@ -986,6 +957,26 @@ void AliAnalysisTaskITSTrackingCheck::UserCreateOutputObjects()
   fHistPtTPCInAccTOFbc0->Sumw2();
   fHistPtTPCInAccTOFbc0->SetMinimum(0);
   fOutput->Add(fHistPtTPCInAccTOFbc0);
+
+  fHistPtTPCInAccwSDD = new TH1F("fHistPtTPCInAccwSDD","pt distribution of TPC tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtTPCInAccwSDD->Sumw2();
+  fHistPtTPCInAccwSDD->SetMinimum(0);
+  fOutput->Add(fHistPtTPCInAccwSDD);
+
+  fHistPtTPCInAccTOFbc0wSDD = new TH1F("fHistPtTPCInAccTOFbc0wSDD","pt distribution of TPC tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtTPCInAccTOFbc0wSDD->Sumw2();
+  fHistPtTPCInAccTOFbc0wSDD->SetMinimum(0);
+  fOutput->Add(fHistPtTPCInAccTOFbc0wSDD);
+  
+  fHistPtTPCInAccwoSDD = new TH1F("fHistPtTPCInAccwoSDD","pt distribution of TPC tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtTPCInAccwoSDD->Sumw2();
+  fHistPtTPCInAccwoSDD->SetMinimum(0);
+  fOutput->Add(fHistPtTPCInAccwoSDD);
+
+  fHistPtTPCInAccTOFbc0woSDD = new TH1F("fHistPtTPCInAccTOFbc0woSDD","pt distribution of TPC tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtTPCInAccTOFbc0woSDD->Sumw2();
+  fHistPtTPCInAccTOFbc0woSDD->SetMinimum(0);
+  fOutput->Add(fHistPtTPCInAccTOFbc0woSDD);
   
   fHistPtTPCInAccMCtwoSPD = new TH1F("fHistPtTPCInAccMCtwoSPD","pt distribution of TPC tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
   fHistPtTPCInAccMCtwoSPD->Sumw2();
@@ -1106,6 +1097,146 @@ void AliAnalysisTaskITSTrackingCheck::UserCreateOutputObjects()
   fHistPtITSMIoneSPDInAccTOFbc0->SetMinimum(0);
   fOutput->Add(fHistPtITSMIoneSPDInAccTOFbc0);
 
+  fHistPtITSMI6InAccwSDD = new TH1F("fHistPtITSMI6InAccwSDD","pt distribution of ITSMI6 tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMI6InAccwSDD->Sumw2();
+  fHistPtITSMI6InAccwSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMI6InAccwSDD);
+  
+  fHistPtITSMI5InAccwSDD = new TH1F("fHistPtITSMI5InAccwSDD","pt distribution of ITSMI5 tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMI5InAccwSDD->Sumw2();
+  fHistPtITSMI5InAccwSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMI5InAccwSDD);
+  
+  fHistPtITSMI4InAccwSDD = new TH1F("fHistPtITSMI4InAccwSDD","pt distribution of ITSMI4 tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMI4InAccwSDD->Sumw2();
+  fHistPtITSMI4InAccwSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMI4InAccwSDD);
+  
+  fHistPtITSMI3InAccwSDD = new TH1F("fHistPtITSMI3InAccwSDD","pt distribution of ITSMI3 tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMI3InAccwSDD->Sumw2();
+  fHistPtITSMI3InAccwSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMI3InAccwSDD);
+  
+  fHistPtITSMI2InAccwSDD = new TH1F("fHistPtITSMI2InAccwSDD","pt distribution of ITSMI2 tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMI2InAccwSDD->Sumw2();
+  fHistPtITSMI2InAccwSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMI2InAccwSDD);
+  
+  fHistPtITSMISPDInAccwSDD = new TH1F("fHistPtITSMISPDInAccwSDD","pt distribution of ITSMISPD tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMISPDInAccwSDD->Sumw2();
+  fHistPtITSMISPDInAccwSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMISPDInAccwSDD);
+  
+  fHistPtITSMIoneSPDInAccwSDD = new TH1F("fHistPtITSMIoneSPDInAccwSDD","pt distribution of ITSMISPD tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMIoneSPDInAccwSDD->Sumw2();
+  fHistPtITSMIoneSPDInAccwSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMIoneSPDInAccwSDD);
+
+  fHistPtITSMI6InAccTOFbc0wSDD = new TH1F("fHistPtITSMI6InAccTOFbc0wSDD","pt distribution of ITSMI6 tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMI6InAccTOFbc0wSDD->Sumw2();
+  fHistPtITSMI6InAccTOFbc0wSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMI6InAccTOFbc0wSDD);
+  
+  fHistPtITSMI5InAccTOFbc0wSDD = new TH1F("fHistPtITSMI5InAccTOFbc0wSDD","pt distribution of ITSMI5 tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMI5InAccTOFbc0wSDD->Sumw2();
+  fHistPtITSMI5InAccTOFbc0wSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMI5InAccTOFbc0wSDD);
+  
+  fHistPtITSMI4InAccTOFbc0wSDD = new TH1F("fHistPtITSMI4InAccTOFbc0wSDD","pt distribution of ITSMI4 tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMI4InAccTOFbc0wSDD->Sumw2();
+  fHistPtITSMI4InAccTOFbc0wSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMI4InAccTOFbc0wSDD);
+  
+  fHistPtITSMI3InAccTOFbc0wSDD = new TH1F("fHistPtITSMI3InAccTOFbc0wSDD","pt distribution of ITSMI3 tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMI3InAccTOFbc0wSDD->Sumw2();
+  fHistPtITSMI3InAccTOFbc0wSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMI3InAccTOFbc0wSDD);
+  
+  fHistPtITSMI2InAccTOFbc0wSDD = new TH1F("fHistPtITSMI2InAccTOFbc0wSDD","pt distribution of ITSMI2 tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMI2InAccTOFbc0wSDD->Sumw2();
+  fHistPtITSMI2InAccTOFbc0wSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMI2InAccTOFbc0wSDD);
+  
+  fHistPtITSMISPDInAccTOFbc0wSDD = new TH1F("fHistPtITSMISPDInAccTOFbc0wSDD","pt distribution of ITSMISPD tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMISPDInAccTOFbc0wSDD->Sumw2();
+  fHistPtITSMISPDInAccTOFbc0wSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMISPDInAccTOFbc0wSDD);
+  
+  fHistPtITSMIoneSPDInAccTOFbc0wSDD = new TH1F("fHistPtITSMIoneSPDInAccTOFbc0wSDD","pt distribution of ITSMISPD tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMIoneSPDInAccTOFbc0wSDD->Sumw2();
+  fHistPtITSMIoneSPDInAccTOFbc0wSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMIoneSPDInAccTOFbc0wSDD);
+
+  fHistPtITSMI6InAccwoSDD = new TH1F("fHistPtITSMI6InAccwoSDD","pt distribution of ITSMI6 tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMI6InAccwoSDD->Sumw2();
+  fHistPtITSMI6InAccwoSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMI6InAccwoSDD);
+  
+  fHistPtITSMI5InAccwoSDD = new TH1F("fHistPtITSMI5InAccwoSDD","pt distribution of ITSMI5 tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMI5InAccwoSDD->Sumw2();
+  fHistPtITSMI5InAccwoSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMI5InAccwoSDD);
+  
+  fHistPtITSMI4InAccwoSDD = new TH1F("fHistPtITSMI4InAccwoSDD","pt distribution of ITSMI4 tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMI4InAccwoSDD->Sumw2();
+  fHistPtITSMI4InAccwoSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMI4InAccwoSDD);
+  
+  fHistPtITSMI3InAccwoSDD = new TH1F("fHistPtITSMI3InAccwoSDD","pt distribution of ITSMI3 tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMI3InAccwoSDD->Sumw2();
+  fHistPtITSMI3InAccwoSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMI3InAccwoSDD);
+  
+  fHistPtITSMI2InAccwoSDD = new TH1F("fHistPtITSMI2InAccwoSDD","pt distribution of ITSMI2 tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMI2InAccwoSDD->Sumw2();
+  fHistPtITSMI2InAccwoSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMI2InAccwoSDD);
+  
+  fHistPtITSMISPDInAccwoSDD = new TH1F("fHistPtITSMISPDInAccwoSDD","pt distribution of ITSMISPD tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMISPDInAccwoSDD->Sumw2();
+  fHistPtITSMISPDInAccwoSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMISPDInAccwoSDD);
+  
+  fHistPtITSMIoneSPDInAccwoSDD = new TH1F("fHistPtITSMIoneSPDInAccwoSDD","pt distribution of ITSMISPD tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMIoneSPDInAccwoSDD->Sumw2();
+  fHistPtITSMIoneSPDInAccwoSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMIoneSPDInAccwoSDD);
+
+  fHistPtITSMI6InAccTOFbc0woSDD = new TH1F("fHistPtITSMI6InAccTOFbc0woSDD","pt distribution of ITSMI6 tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMI6InAccTOFbc0woSDD->Sumw2();
+  fHistPtITSMI6InAccTOFbc0woSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMI6InAccTOFbc0woSDD);
+  
+  fHistPtITSMI5InAccTOFbc0woSDD = new TH1F("fHistPtITSMI5InAccTOFbc0woSDD","pt distribution of ITSMI5 tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMI5InAccTOFbc0woSDD->Sumw2();
+  fHistPtITSMI5InAccTOFbc0woSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMI5InAccTOFbc0woSDD);
+  
+  fHistPtITSMI4InAccTOFbc0woSDD = new TH1F("fHistPtITSMI4InAccTOFbc0woSDD","pt distribution of ITSMI4 tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMI4InAccTOFbc0woSDD->Sumw2();
+  fHistPtITSMI4InAccTOFbc0woSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMI4InAccTOFbc0woSDD);
+  
+  fHistPtITSMI3InAccTOFbc0woSDD = new TH1F("fHistPtITSMI3InAccTOFbc0woSDD","pt distribution of ITSMI3 tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMI3InAccTOFbc0woSDD->Sumw2();
+  fHistPtITSMI3InAccTOFbc0woSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMI3InAccTOFbc0woSDD);
+  
+  fHistPtITSMI2InAccTOFbc0woSDD = new TH1F("fHistPtITSMI2InAccTOFbc0woSDD","pt distribution of ITSMI2 tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMI2InAccTOFbc0woSDD->Sumw2();
+  fHistPtITSMI2InAccTOFbc0woSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMI2InAccTOFbc0woSDD);
+  
+  fHistPtITSMISPDInAccTOFbc0woSDD = new TH1F("fHistPtITSMISPDInAccTOFbc0woSDD","pt distribution of ITSMISPD tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMISPDInAccTOFbc0woSDD->Sumw2();
+  fHistPtITSMISPDInAccTOFbc0woSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMISPDInAccTOFbc0woSDD);
+  
+  fHistPtITSMIoneSPDInAccTOFbc0woSDD = new TH1F("fHistPtITSMIoneSPDInAccTOFbc0woSDD","pt distribution of ITSMISPD tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMIoneSPDInAccTOFbc0woSDD->Sumw2();
+  fHistPtITSMIoneSPDInAccTOFbc0woSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSMIoneSPDInAccTOFbc0woSDD);
+
   fHistPtITSMIoneSPDInAccShared = new TH1F("fHistPtITSMIoneSPDInAccShared","pt distribution of ITSMISPD tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
   fHistPtITSMIoneSPDInAccShared->Sumw2();
   fHistPtITSMIoneSPDInAccShared->SetMinimum(0);
@@ -1257,6 +1388,26 @@ void AliAnalysisTaskITSTrackingCheck::UserCreateOutputObjects()
   fHistPtITSTPCselTOFbc0->SetMinimum(0);
   fOutput->Add(fHistPtITSTPCselTOFbc0);
 
+  fHistPtITSTPCselwSDD = new TH1F("fHistPtITSTPCselwSDD","pt distribution of ITSMISPD tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSTPCselwSDD->Sumw2();
+  fHistPtITSTPCselwSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSTPCselwSDD);
+
+  fHistPtITSTPCselTOFbc0wSDD = new TH1F("fHistPtITSTPCselTOFbc0wSDD","pt distribution of ITSMISPD tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSTPCselTOFbc0wSDD->Sumw2();
+  fHistPtITSTPCselTOFbc0wSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSTPCselTOFbc0wSDD);
+
+  fHistPtITSTPCselwoSDD = new TH1F("fHistPtITSTPCselwoSDD","pt distribution of ITSMISPD tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSTPCselwoSDD->Sumw2();
+  fHistPtITSTPCselwoSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSTPCselwoSDD);
+
+  fHistPtITSTPCselTOFbc0woSDD = new TH1F("fHistPtITSTPCselTOFbc0woSDD","pt distribution of ITSMISPD tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSTPCselTOFbc0woSDD->Sumw2();
+  fHistPtITSTPCselTOFbc0woSDD->SetMinimum(0);
+  fOutput->Add(fHistPtITSTPCselTOFbc0woSDD);
+
   fHistPtITSTPCselP = new TH1F("fHistPtITSTPCselP","pt distribution of ITSMISPD tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
   fHistPtITSTPCselP->Sumw2();
   fHistPtITSTPCselP->SetMinimum(0);
@@ -1412,25 +1563,6 @@ void AliAnalysisTaskITSTrackingCheck::UserCreateOutputObjects()
   fHistRProdVtxInAccS->SetMinimum(0);
   fOutput->Add(fHistRProdVtxInAccS);
   
-  fHistd0rphiTPCInAccA = new TH1F("fHistd0rphiTPCInAccA","Transverse imp. par. to VertexTracks; d_{0} rphi [cm]; N tracks",300,-5,5);
-  fHistd0rphiTPCInAccA->Sumw2();
-  fHistd0rphiTPCInAccA->SetMinimum(0);
-  fOutput->Add(fHistd0rphiTPCInAccA);
-
-  fHistd0rphiTPCInAccB = new TH1F("fHistd0rphiTPCInAccB","Transverse imp. par. to VertexTracks; d_{0} rphi [cm]; N tracks",300,-5,5);
-  fHistd0rphiTPCInAccB->Sumw2();
-  fHistd0rphiTPCInAccB->SetMinimum(0);
-  fOutput->Add(fHistd0rphiTPCInAccB);
-
-  fHistd0zTPCInAccA = new TH1F("fHistd0zTPCInAccA","Transverse imp. par. to VertexTracks; d_{0} z [cm]; N tracks",300,-5,5);
-  fHistd0zTPCInAccA->Sumw2();
-  fHistd0zTPCInAccA->SetMinimum(0);
-  fOutput->Add(fHistd0zTPCInAccA);
-
-  fHistd0zTPCInAccB = new TH1F("fHistd0zTPCInAccB","Transverse imp. par. to VertexTracks; d_{0} z [cm]; N tracks",300,-5,5);
-  fHistd0zTPCInAccB->Sumw2();
-  fHistd0zTPCInAccB->SetMinimum(0);
-  fOutput->Add(fHistd0zTPCInAccB);
 
   fHistd0rphiTPCInAccP150200 = new TH1F("fHistd0rphiTPCInAccP150200","Transverse imp. par. to VertexTracks for primaries; d_{0} rphi [cm]; N tracks",300,-5,5);
   fHistd0rphiTPCInAccP150200->Sumw2();
@@ -1522,26 +1654,6 @@ void AliAnalysisTaskITSTrackingCheck::UserCreateOutputObjects()
   fHistd0rphiITSMIoneSPDInAccP40008000->SetMinimum(0);
   fOutput->Add(fHistd0rphiITSMIoneSPDInAccP40008000);
 
-  fHistd0rphiITSMIoneSPDInAccA = new TH1F("fHistd0rphiITSMIoneSPDInAccA","Transverse imp. par. to VertexTracks for primaries; d_{0} rphi [cm]; N tracks",300,-1.5,1.5);
-  fHistd0rphiITSMIoneSPDInAccA->Sumw2();
-  fHistd0rphiITSMIoneSPDInAccA->SetMinimum(0);
-  fOutput->Add(fHistd0rphiITSMIoneSPDInAccA);
-
-  fHistd0rphiITSMIoneSPDInAccB = new TH1F("fHistd0rphiITSMIoneSPDInAccB","Transverse imp. par. to VertexTracks for primaries; d_{0} rphi [cm]; N tracks",300,-1.5,1.5);
-  fHistd0rphiITSMIoneSPDInAccB->Sumw2();
-  fHistd0rphiITSMIoneSPDInAccB->SetMinimum(0);
-  fOutput->Add(fHistd0rphiITSMIoneSPDInAccB);
-
-  fHistd0zITSMIoneSPDInAccA = new TH1F("fHistd0zITSMIoneSPDInAccA","Transverse imp. par. to VertexTracks for primaries; d_{0} z [cm]; N tracks",300,-1.5,1.5);
-  fHistd0zITSMIoneSPDInAccA->Sumw2();
-  fHistd0zITSMIoneSPDInAccA->SetMinimum(0);
-  fOutput->Add(fHistd0zITSMIoneSPDInAccA);
-
-  fHistd0zITSMIoneSPDInAccB = new TH1F("fHistd0zITSMIoneSPDInAccB","Transverse imp. par. to VertexTracks for primaries; d_{0} z [cm]; N tracks",300,-1.5,1.5);
-  fHistd0zITSMIoneSPDInAccB->Sumw2();
-  fHistd0zITSMIoneSPDInAccB->SetMinimum(0);
-  fOutput->Add(fHistd0zITSMIoneSPDInAccB);
-
   fHistd0zITSMIoneSPDInAccP150200 = new TH1F("fHistd0zITSMIoneSPDInAccP150200","Longitudinal imp. par. to VertexTracks for primaries; d_{0} z [cm]; N tracks",300,-1.5,1.5);
   fHistd0zITSMIoneSPDInAccP150200->Sumw2();
   fHistd0zITSMIoneSPDInAccP150200->SetMinimum(0);
@@ -1732,6 +1844,7 @@ void AliAnalysisTaskITSTrackingCheck::UserExec(Option_t *)
   // Main loop
   // Called for each event
 
+
   fESD = dynamic_cast<AliESDEvent*>(InputEvent());
 
   if (!fESD) {
@@ -1753,7 +1866,37 @@ void AliAnalysisTaskITSTrackingCheck::UserExec(Option_t *)
   }
   if(!isSelected) return;
 
+  TString firedTriggerClasses=fESD->GetFiredTriggerClasses();  
+  if(!firedTriggerClasses.Contains(fTriggerClass.Data())) return;
   
+
+  Bool_t sddIsIn=kTRUE;
+  if(fCheckSDDIsIn) {
+
+    if(!fTrigConfig) {    
+      AliCDBManager* man = AliCDBManager::Instance();
+      if(fOCDBPath.Contains("OCDB")) { // when running in the QAtrain this is not called (OCBD is already set)
+       man->SetDefaultStorage(fOCDBPath.Data());
+       man->SetRun(fESD->GetRunNumber());
+      }
+      if(!man) {       
+       AliFatal("CDB not set but needed by AliAnalysisTaskITSTrackingCheck");
+       return;    
+      }   
+      AliCDBEntry* eT=(AliCDBEntry*)man->Get("GRP/CTP/Config");    
+      if(eT) {      
+       fTrigConfig=(AliTriggerConfiguration*)eT->GetObject();    
+      }    
+      if(!eT || !fTrigConfig) {      
+       AliError("Cannot retrieve CDB entry for GRP/CTP/Config");      
+       return;     
+      }
+    }
+
+    sddIsIn=fESD->IsDetectorInTriggerCluster("ITSSDD",fTrigConfig);
+  }
+
+
   //if(fESD->GetEventType()!=7) return;
 
   // ***********  MC info ***************
@@ -1999,8 +2142,6 @@ void AliAnalysisTaskITSTrackingCheck::UserExec(Option_t *)
     Int_t nclsokbadoutinzITS = 0;
     Bool_t outInZ=kFALSE;
     Bool_t skipTrack=kFALSE;
-    Bool_t fillA=kFALSE;
-    Bool_t fillB=kFALSE;
 
     for(Int_t layer=0; layer<6; layer++) {
       if(layer>=2 && track->HasPointOnITSLayer(layer)) nclsSDDSSD++;
@@ -2040,8 +2181,6 @@ void AliAnalysisTaskITSTrackingCheck::UserExec(Option_t *)
        if(track->Pt()>0.7 && track->Pt()<2.0) {
          if(status==1) {
            fHistClusterMapITSMIok->Fill(layer);
-           if(fillA) fHistClusterMapITSMIokA->Fill(layer);
-           if(fillB) fHistClusterMapITSMIokB->Fill(layer);
          }
          if(status==2) fHistClusterMapITSMIbad->Fill(layer);
          if(status==3) fHistClusterMapITSMIskipped->Fill(layer);
@@ -2052,8 +2191,6 @@ void AliAnalysisTaskITSTrackingCheck::UserExec(Option_t *)
          if((status==2 || status==7) && !outInZ) fHistClusterMapModuleITSMIbadInAcc->Fill(idet);
          if(status==5 && !outInZ) fHistClusterMapModuleITSMInoclsInAcc->Fill(idet);
 
-         if((idet>=0 && idet<=11) || (idet>=36 && idet<=47)) fillA=kTRUE;
-         if((idet>=28 && idet<=35) || (idet>=62 && idet<=71)) fillB=kTRUE;
 
        }
        if(status==1 || status==2 || status==4) {
@@ -2074,10 +2211,6 @@ void AliAnalysisTaskITSTrackingCheck::UserExec(Option_t *)
            fHistxlocSDDok->Fill(xloc);
            fHistxlocVSmodSDDok->Fill(idet,xloc);
            fHistzlocSDDok->Fill(zloc);
-           if(fillA) fHistxlocSDDA->Fill(xloc);
-           if(fillA) fHistzlocSDDA->Fill(zloc);
-           if(fillB) fHistxlocSDDB->Fill(xloc);
-           if(fillB) fHistzlocSDDB->Fill(zloc);
 
          }     
        }
@@ -2199,7 +2332,13 @@ void AliAnalysisTaskITSTrackingCheck::UserExec(Option_t *)
          itsfindableAcc=kTRUE; 
          fHistdEdxVSPtTPCInAcc->Fill(track->Pt(),track->GetTPCsignal());
          fHistPtTPCInAcc->Fill(track->Pt());
-         if(isTOFbc0) fHistPtTPCInAccTOFbc0->Fill(track->Pt());
+         if(fCheckSDDIsIn && sddIsIn) fHistPtTPCInAccwSDD->Fill(track->Pt());
+         if(fCheckSDDIsIn && !sddIsIn) fHistPtTPCInAccwoSDD->Fill(track->Pt());
+         if(isTOFbc0) {
+           fHistPtTPCInAccTOFbc0->Fill(track->Pt());
+           if(fCheckSDDIsIn && sddIsIn) fHistPtTPCInAccTOFbc0wSDD->Fill(track->Pt());
+           if(fCheckSDDIsIn && !sddIsIn) fHistPtTPCInAccTOFbc0woSDD->Fill(track->Pt());
+         }
          fHistTPCclsVSPtTPCInAcc->Fill(trackTPC->Pt(),trackTPC->GetNcls(1));
          fHistPtVSphiTPCInAcc->Fill(track->Phi(),track->Pt());
          if(!(track->GetStatus()&AliESDtrack::kTRDout)) fHistPtTPCInAccNoTRDout->Fill(track->Pt()); 
@@ -2225,16 +2364,6 @@ void AliAnalysisTaskITSTrackingCheck::UserExec(Option_t *)
          if(nClsMCSPD==2) fHistPtTPCInAccMCtwoSPD->Fill(track->Pt());
          if(nClsMCSPD>=1) fHistPtTPCInAccMConeSPD->Fill(track->Pt());
 
-         if(fillA) {
-           fHistEtaTPCInAccA->Fill(trackTPC->Eta());
-           fHistNclsTPCInAccA->Fill(track->GetTPCNclsIter1());
-           fHistChi2PerClsTPCInAccA->Fill(track->GetTPCchi2Iter1()/track->GetTPCNclsIter1());
-         }
-         if(fillB) {
-           fHistEtaTPCInAccB->Fill(trackTPC->Eta());
-           fHistNclsTPCInAccB->Fill(track->GetTPCNclsIter1());
-           fHistChi2PerClsTPCInAccB->Fill(track->GetTPCchi2Iter1()/track->GetTPCNclsIter1());
-         }
          //if(isPrimary) {fHistRProdVtxInAccP->Fill(rProdVtx);} else {fHistRProdVtxInAccS->Fill(rProdVtx);}
        }
       }
@@ -2275,7 +2404,13 @@ void AliAnalysisTaskITSTrackingCheck::UserExec(Option_t *)
       if(itsfindableAcc) {
        if(nclsITS==6) {
          fHistPtITSMI6InAcc->Fill(track->Pt());
-         if(isTOFbc0) fHistPtITSMI6InAccTOFbc0->Fill(track->Pt());
+         if(fCheckSDDIsIn && sddIsIn) fHistPtITSMI6InAccwSDD->Fill(track->Pt());
+         if(fCheckSDDIsIn && !sddIsIn) fHistPtITSMI6InAccwoSDD->Fill(track->Pt());
+         if(isTOFbc0) {
+           fHistPtITSMI6InAccTOFbc0->Fill(track->Pt());
+           if(fCheckSDDIsIn && sddIsIn) fHistPtITSMI6InAccTOFbc0wSDD->Fill(track->Pt());
+           if(fCheckSDDIsIn && !sddIsIn) fHistPtITSMI6InAccTOFbc0woSDD->Fill(track->Pt());
+         }
          if(track->Pt()>1) {
            fHistPhiITSMI6InAcc->Fill(track->Phi());
            fHistEtaITSMI6InAcc->Fill(track->Eta());
@@ -2285,7 +2420,13 @@ void AliAnalysisTaskITSTrackingCheck::UserExec(Option_t *)
        }
        if(nclsITS==5) {
          fHistPtITSMI5InAcc->Fill(track->Pt());
-         if(isTOFbc0) fHistPtITSMI5InAccTOFbc0->Fill(track->Pt());
+         if(fCheckSDDIsIn && sddIsIn) fHistPtITSMI5InAccwSDD->Fill(track->Pt());
+         if(fCheckSDDIsIn && !sddIsIn) fHistPtITSMI5InAccwoSDD->Fill(track->Pt());
+         if(isTOFbc0) {
+           fHistPtITSMI5InAccTOFbc0->Fill(track->Pt());
+           if(fCheckSDDIsIn && sddIsIn) fHistPtITSMI5InAccTOFbc0wSDD->Fill(track->Pt());
+           if(fCheckSDDIsIn && !sddIsIn) fHistPtITSMI5InAccTOFbc0woSDD->Fill(track->Pt());
+         }
          if(track->Pt()>1) {
            fHistPhiITSMI5InAcc->Fill(track->Phi());
            fHistEtaITSMI5InAcc->Fill(track->Eta());
@@ -2295,7 +2436,13 @@ void AliAnalysisTaskITSTrackingCheck::UserExec(Option_t *)
        }
        if(nclsITS==4) {
          fHistPtITSMI4InAcc->Fill(track->Pt());
-         if(isTOFbc0) fHistPtITSMI4InAccTOFbc0->Fill(track->Pt());
+         if(fCheckSDDIsIn && sddIsIn) fHistPtITSMI4InAccwSDD->Fill(track->Pt());
+         if(fCheckSDDIsIn && !sddIsIn) fHistPtITSMI4InAccwoSDD->Fill(track->Pt());
+         if(isTOFbc0) {
+           fHistPtITSMI4InAccTOFbc0->Fill(track->Pt());
+           if(fCheckSDDIsIn && sddIsIn) fHistPtITSMI4InAccTOFbc0wSDD->Fill(track->Pt());
+           if(fCheckSDDIsIn && !sddIsIn) fHistPtITSMI4InAccTOFbc0woSDD->Fill(track->Pt());
+         }
          if(track->Pt()>1) {
            fHistPhiITSMI4InAcc->Fill(track->Phi());
            fHistEtaITSMI4InAcc->Fill(track->Eta());
@@ -2305,7 +2452,13 @@ void AliAnalysisTaskITSTrackingCheck::UserExec(Option_t *)
        }
        if(nclsITS==3) {
          fHistPtITSMI3InAcc->Fill(track->Pt());
-         if(isTOFbc0) fHistPtITSMI3InAccTOFbc0->Fill(track->Pt());
+         if(fCheckSDDIsIn && sddIsIn) fHistPtITSMI3InAccwSDD->Fill(track->Pt());
+         if(fCheckSDDIsIn && !sddIsIn) fHistPtITSMI3InAccwoSDD->Fill(track->Pt());
+         if(isTOFbc0) {
+           fHistPtITSMI3InAccTOFbc0->Fill(track->Pt());
+           if(fCheckSDDIsIn && sddIsIn) fHistPtITSMI3InAccTOFbc0wSDD->Fill(track->Pt());
+           if(fCheckSDDIsIn && !sddIsIn) fHistPtITSMI3InAccTOFbc0woSDD->Fill(track->Pt());
+         }
          if(track->Pt()>1) {
            fHistPhiITSMI3InAcc->Fill(track->Phi());
            fHistEtaITSMI3InAcc->Fill(track->Eta());
@@ -2315,7 +2468,13 @@ void AliAnalysisTaskITSTrackingCheck::UserExec(Option_t *)
        }
        if(nclsITS==2) {
          fHistPtITSMI2InAcc->Fill(track->Pt());
-         if(isTOFbc0) fHistPtITSMI2InAccTOFbc0->Fill(track->Pt());
+         if(fCheckSDDIsIn && sddIsIn) fHistPtITSMI2InAccwSDD->Fill(track->Pt());
+         if(fCheckSDDIsIn && !sddIsIn) fHistPtITSMI2InAccwoSDD->Fill(track->Pt());
+         if(isTOFbc0) {
+           fHistPtITSMI2InAccTOFbc0->Fill(track->Pt());
+           if(fCheckSDDIsIn && sddIsIn) fHistPtITSMI2InAccTOFbc0wSDD->Fill(track->Pt());
+           if(fCheckSDDIsIn && !sddIsIn) fHistPtITSMI2InAccTOFbc0woSDD->Fill(track->Pt());
+         }
          if(track->Pt()>1) {
            fHistPhiITSMI2InAcc->Fill(track->Phi());
            fHistEtaITSMI2InAcc->Fill(track->Eta());
@@ -2325,7 +2484,13 @@ void AliAnalysisTaskITSTrackingCheck::UserExec(Option_t *)
        }
        if(track->HasPointOnITSLayer(0) && track->HasPointOnITSLayer(1)) {
          fHistPtITSMISPDInAcc->Fill(track->Pt());
-         if(isTOFbc0) fHistPtITSMISPDInAccTOFbc0->Fill(track->Pt());
+         if(fCheckSDDIsIn && sddIsIn) fHistPtITSMISPDInAccwSDD->Fill(track->Pt());
+         if(fCheckSDDIsIn && !sddIsIn) fHistPtITSMISPDInAccwoSDD->Fill(track->Pt());
+         if(isTOFbc0) {
+           fHistPtITSMISPDInAccTOFbc0->Fill(track->Pt());
+           if(fCheckSDDIsIn && sddIsIn) fHistPtITSMISPDInAccTOFbc0wSDD->Fill(track->Pt());
+           if(fCheckSDDIsIn && !sddIsIn) fHistPtITSMISPDInAccTOFbc0woSDD->Fill(track->Pt());
+         }
          if(track->Pt()>1) {
            fHistPhiITSMISPDInAcc->Fill(track->Phi());
            fHistEtaITSMISPDInAcc->Fill(track->Eta());
@@ -2335,7 +2500,13 @@ void AliAnalysisTaskITSTrackingCheck::UserExec(Option_t *)
        }
        if(track->HasPointOnITSLayer(0) || track->HasPointOnITSLayer(1)) {
          fHistPtITSMIoneSPDInAcc->Fill(track->Pt());
-         if(isTOFbc0) fHistPtITSMIoneSPDInAccTOFbc0->Fill(track->Pt());
+         if(fCheckSDDIsIn && sddIsIn) fHistPtITSMIoneSPDInAccwSDD->Fill(track->Pt());
+         if(fCheckSDDIsIn && !sddIsIn) fHistPtITSMIoneSPDInAccwoSDD->Fill(track->Pt());
+         if(isTOFbc0) {
+           fHistPtITSMIoneSPDInAccTOFbc0->Fill(track->Pt());
+           if(fCheckSDDIsIn && sddIsIn) fHistPtITSMIoneSPDInAccTOFbc0wSDD->Fill(track->Pt());
+           if(fCheckSDDIsIn && !sddIsIn) fHistPtITSMIoneSPDInAccTOFbc0woSDD->Fill(track->Pt());
+         }
          if(track->Pt()>1) {
            fHistPhiITSMIoneSPDInAcc->Fill(track->Phi());
            fHistEtaITSMIoneSPDInAcc->Fill(track->Eta());
@@ -2357,8 +2528,6 @@ void AliAnalysisTaskITSTrackingCheck::UserExec(Option_t *)
          if(track->HasSharedPointOnITSLayer(1)) fHistPtITSMISPD2InAccShared->Fill(track->Pt());
 
          Float_t chi2redITS = track->GetITSchi2()/track->GetNcls(0);
-         if(fillA) fHistChi2PerClsITSInAccA->Fill(chi2redITS);
-         if(fillB) fHistChi2PerClsITSInAccB->Fill(chi2redITS);
 
          if(track->Pt()>0.18 && track->Pt()<0.25)  fHistITSRedChi2NonFakePt02->Fill(chi2redITS);
          if(track->Pt()>0.4 && track->Pt()<0.6)  fHistITSRedChi2NonFakePt05->Fill(chi2redITS);
@@ -2409,7 +2578,13 @@ void AliAnalysisTaskITSTrackingCheck::UserExec(Option_t *)
     // track that passes final ITS+TPC cuts
     if(itsfindableAcc && fESDtrackCutsITSTPC->AcceptTrack(track)) {
       fHistPtITSTPCsel->Fill(track->Pt());
-      if(isTOFbc0) fHistPtITSTPCselTOFbc0->Fill(track->Pt());
+      if(fCheckSDDIsIn && sddIsIn) fHistPtITSTPCselwSDD->Fill(track->Pt());
+      if(fCheckSDDIsIn && !sddIsIn) fHistPtITSTPCselwoSDD->Fill(track->Pt());
+      if(isTOFbc0) {
+       fHistPtITSTPCselTOFbc0->Fill(track->Pt());
+       if(fCheckSDDIsIn && sddIsIn) fHistPtITSTPCselTOFbc0wSDD->Fill(track->Pt());
+       if(fCheckSDDIsIn && !sddIsIn) fHistPtITSTPCselTOFbc0woSDD->Fill(track->Pt());
+      }
       if(isFake) fHistPtITSTPCselFake->Fill(track->Pt());
       fHistdEdxVSPtITSTPCsel->Fill(track->Pt(),track->GetITSsignal());
       if(isPrimary) {
@@ -2425,22 +2600,6 @@ void AliAnalysisTaskITSTrackingCheck::UserExec(Option_t *)
 
     // fill d0 histos
     if(((!fUseITSSAforNtuples&&itsfindableAcc) || fUseITSSAforNtuples) /*&& track->Charge()>0*/) {
-      if(fillA && itsfindableAcc) {
-       fHistd0rphiTPCInAccA->Fill(d0z0TPC[0]);
-       fHistd0zTPCInAccA->Fill(d0z0TPC[1]);
-       if(!track->HasPointOnITSLayer(0) && track->HasPointOnITSLayer(1) && itsrefit) {
-         fHistd0rphiITSMIoneSPDInAccA->Fill(d0z0[0]);
-         fHistd0zITSMIoneSPDInAccA->Fill(d0z0[1]);
-       }
-      }
-      if(fillB && itsfindableAcc) {
-       fHistd0rphiTPCInAccB->Fill(d0z0TPC[0]);
-       fHistd0zTPCInAccB->Fill(d0z0TPC[1]);
-       if(!track->HasPointOnITSLayer(0) && track->HasPointOnITSLayer(1) && itsrefit) {
-         fHistd0rphiITSMIoneSPDInAccB->Fill(d0z0[0]);
-         fHistd0zITSMIoneSPDInAccB->Fill(d0z0[1]);
-       }
-      }
       if(track->Pt()>0.150 && track->Pt()<0.200) {
        if(isPrimary) {
          fHistd0rphiTPCInAccP150200->Fill(d0z0TPC[0]);
index 1d912ae..edc2417 100644 (file)
@@ -19,6 +19,7 @@ class AliESDEvent;
 class AliESDVertex;
 class AliESDfriend;
 class AliESDtrackCuts;
+class AliTriggerConfiguration;
 
 #include "AliAnalysisTaskSE.h"
 
@@ -42,6 +43,9 @@ class AliAnalysisTaskITSTrackingCheck : public AliAnalysisTaskSE
   void           SetESDtrackCutsTPC(AliESDtrackCuts *c) { fESDtrackCutsTPC=c; }
   void           SetESDtrackCutsITSTPC(AliESDtrackCuts *c) { fESDtrackCutsITSTPC=c; }
   void           SetMultiplicityRange(Int_t min,Int_t max) { fMinMult=min; fMaxMult=max; }
+  void           SetCheckSDDIsIn(Int_t check=0) { fCheckSDDIsIn=check; }
+  void           SetTriggerClass(TString tclass="") { fTriggerClass=tclass; }
+  void           SetOCDBPath(TString path="") { fOCDBPath=path; }
 
  protected:
   Bool_t       fReadMC; // read Monte Carlo
@@ -50,9 +54,13 @@ class AliAnalysisTaskITSTrackingCheck : public AliAnalysisTaskSE
   Bool_t       fUseITSSAforNtuples; // fill expert ntuples with ITSSA tracks
   Bool_t       fUsePhysSel; // use AliPhysicsSelection
   Bool_t       fRejPileupSPD; // reject pileup events based on SPD vertex
+  Int_t        fCheckSDDIsIn; // check for ITSSDD in the trigger cluster: 0 no check; +1 only wSDD; -1 only woSDD
   AliESDEvent  *fESD;    // ESD object
   Int_t        fMinMult; // minimum multiplicity
   Int_t        fMaxMult; // maximum multiplicity
+  TString      fTriggerClass; // trigger class to be inspected
+  AliTriggerConfiguration *fTrigConfig; // trigger configuration (read from OCDB)
+  TString      fOCDBPath; // to the OCDB
   TList        *fOutput; //! list send on output slot 0
   TH1F         *fHistNEvents; //! output hist
   TH1F         *fHistNEventsFrac; //! output hist
@@ -61,8 +69,6 @@ class AliAnalysisTaskITSTrackingCheck : public AliAnalysisTaskSE
   TH1F         *fHistNclsITSSA; //! output hist
   TH1F         *fHistNclsITSSAInAcc; //! output hist
   TH1F         *fHistClusterMapITSMI; //! output hist
-  TH1F         *fHistClusterMapITSMIokA; //! output hist
-  TH1F         *fHistClusterMapITSMIokB; //! output hist
   TH1F         *fHistClusterMapITSMIok; //! output hist
   TH1F         *fHistClusterMapITSMIbad; //! output hist
   TH1F         *fHistClusterMapITSMIskipped; //! output hist
@@ -106,23 +112,15 @@ class AliAnalysisTaskITSTrackingCheck : public AliAnalysisTaskSE
   TH2F         *fHistxlocVSmodSDDok; //! output hist
   TH1F         *fHistxlocSDDall; //! output hist
   TH1F         *fHistzlocSDDall; //! output hist
-  TH1F         *fHistxlocSDDA; //! output hist
-  TH1F         *fHistxlocSDDB; //! output hist
-  TH1F         *fHistzlocSDDA; //! output hist
-  TH1F         *fHistzlocSDDB; //! output hist
   TH1F         *fHistPhiTPCInAcc; //! output hist
   TH1F         *fHistEtaTPCInAcc; //! output hist
-  TH1F         *fHistEtaTPCInAccA; //! output hist
-  TH1F         *fHistEtaTPCInAccB; //! output hist
-  TH1F         *fHistNclsTPCInAccA; //! output hist
-  TH1F         *fHistNclsTPCInAccB; //! output hist
-  TH1F         *fHistChi2PerClsTPCInAccA; //! output hist
-  TH1F         *fHistChi2PerClsTPCInAccB; //! output hist
-  TH1F         *fHistChi2PerClsITSInAccA; //! output hist
-  TH1F         *fHistChi2PerClsITSInAccB; //! output hist
   TH1F         *fHistPtTPC; //! output hist
   TH1F         *fHistPtTPCInAcc; //! output hist
   TH1F         *fHistPtTPCInAccTOFbc0; //! output hist
+  TH1F         *fHistPtTPCInAccwSDD; //! output hist
+  TH1F         *fHistPtTPCInAccTOFbc0wSDD; //! output hist
+  TH1F         *fHistPtTPCInAccwoSDD; //! output hist
+  TH1F         *fHistPtTPCInAccTOFbc0woSDD; //! output hist
   TH1F         *fHistPtTPCInAccMCtwoSPD; //! output hist
   TH1F         *fHistPtTPCInAccMConeSPD; //! output hist
   TH2F         *fHistdEdxVSPtTPCInAcc; //! output hist
@@ -161,6 +159,34 @@ class AliAnalysisTaskITSTrackingCheck : public AliAnalysisTaskSE
   TH1F         *fHistPtITSMI6InAccTOFbc0; //! output hist
   TH1F         *fHistPtITSMISPDInAccTOFbc0; //! output hist
   TH1F         *fHistPtITSMIoneSPDInAccTOFbc0; //! output hist
+  TH1F         *fHistPtITSMI2InAccwSDD; //! output hist
+  TH1F         *fHistPtITSMI3InAccwSDD; //! output hist
+  TH1F         *fHistPtITSMI4InAccwSDD; //! output hist
+  TH1F         *fHistPtITSMI5InAccwSDD; //! output hist
+  TH1F         *fHistPtITSMI6InAccwSDD; //! output hist
+  TH1F         *fHistPtITSMISPDInAccwSDD; //! output hist
+  TH1F         *fHistPtITSMIoneSPDInAccwSDD; //! output hist
+  TH1F         *fHistPtITSMI2InAccTOFbc0wSDD; //! output hist
+  TH1F         *fHistPtITSMI3InAccTOFbc0wSDD; //! output hist
+  TH1F         *fHistPtITSMI4InAccTOFbc0wSDD; //! output hist
+  TH1F         *fHistPtITSMI5InAccTOFbc0wSDD; //! output hist
+  TH1F         *fHistPtITSMI6InAccTOFbc0wSDD; //! output hist
+  TH1F         *fHistPtITSMISPDInAccTOFbc0wSDD; //! output hist
+  TH1F         *fHistPtITSMIoneSPDInAccTOFbc0wSDD; //! output hist
+  TH1F         *fHistPtITSMI2InAccwoSDD; //! output hist
+  TH1F         *fHistPtITSMI3InAccwoSDD; //! output hist
+  TH1F         *fHistPtITSMI4InAccwoSDD; //! output hist
+  TH1F         *fHistPtITSMI5InAccwoSDD; //! output hist
+  TH1F         *fHistPtITSMI6InAccwoSDD; //! output hist
+  TH1F         *fHistPtITSMISPDInAccwoSDD; //! output hist
+  TH1F         *fHistPtITSMIoneSPDInAccwoSDD; //! output hist
+  TH1F         *fHistPtITSMI2InAccTOFbc0woSDD; //! output hist
+  TH1F         *fHistPtITSMI3InAccTOFbc0woSDD; //! output hist
+  TH1F         *fHistPtITSMI4InAccTOFbc0woSDD; //! output hist
+  TH1F         *fHistPtITSMI5InAccTOFbc0woSDD; //! output hist
+  TH1F         *fHistPtITSMI6InAccTOFbc0woSDD; //! output hist
+  TH1F         *fHistPtITSMISPDInAccTOFbc0woSDD; //! output hist
+  TH1F         *fHistPtITSMIoneSPDInAccTOFbc0woSDD; //! output hist
   TH1F         *fHistPtITSMIoneSPDInAccShared; //! output hist
   TH1F         *fHistPtITSMIoneSPDInAccSharedSPD; //! output hist
   TH1F         *fHistPtITSMISPD1InAccShared; //! output hist
@@ -191,6 +217,10 @@ class AliAnalysisTaskITSTrackingCheck : public AliAnalysisTaskSE
   TH1F         *fHistPtITSMIoneSPDthreeSDDSSDInAcc; //! output hist
   TH1F         *fHistPtITSTPCsel; //! output hist
   TH1F         *fHistPtITSTPCselTOFbc0; //! output hist
+  TH1F         *fHistPtITSTPCselwSDD; //! output hist
+  TH1F         *fHistPtITSTPCselTOFbc0wSDD; //! output hist
+  TH1F         *fHistPtITSTPCselwoSDD; //! output hist
+  TH1F         *fHistPtITSTPCselTOFbc0woSDD; //! output hist
   TH1F         *fHistPtITSTPCselP; //! output hist
   TH1F         *fHistPtITSTPCselS; //! output hist
   TH1F         *fHistPtITSTPCselFake; //! output hist
@@ -218,10 +248,6 @@ class AliAnalysisTaskITSTrackingCheck : public AliAnalysisTaskSE
   TH1F         *fHistPhiITSMIokbadoutinz6InAcc; //! output hist
   TH1F         *fHistRProdVtxInAccP; //! output hist
   TH1F         *fHistRProdVtxInAccS; //! output hist
-  TH1F     *fHistd0rphiTPCInAccA; //! output hist
-  TH1F     *fHistd0rphiTPCInAccB; //! output hist
-  TH1F     *fHistd0zTPCInAccA; //! output hist
-  TH1F     *fHistd0zTPCInAccB; //! output hist
   TH1F     *fHistd0rphiTPCInAccP150200; //! output hist
   TH1F     *fHistd0rphiTPCInAccP500700; //! output hist
   TH1F     *fHistd0rphiTPCInAccP10001500; //! output hist
@@ -240,10 +266,6 @@ class AliAnalysisTaskITSTrackingCheck : public AliAnalysisTaskSE
   TH1F     *fHistd0rphiITSMIoneSPDInAccP10001500; //! output hist
   TH1F     *fHistd0rphiITSMIoneSPDInAccP25004000; //! output hist
   TH1F     *fHistd0rphiITSMIoneSPDInAccP40008000; //! output hist
-  TH1F     *fHistd0rphiITSMIoneSPDInAccA; //! output hist
-  TH1F     *fHistd0rphiITSMIoneSPDInAccB; //! output hist
-  TH1F     *fHistd0zITSMIoneSPDInAccA; //! output hist
-  TH1F     *fHistd0zITSMIoneSPDInAccB; //! output hist
   TH1F     *fHistd0zITSMIoneSPDInAccP150200; //! output hist
   TH1F     *fHistd0zITSMIoneSPDInAccP500700; //! output hist
   TH1F     *fHistd0zITSMIoneSPDInAccP10001500; //! output hist
@@ -308,7 +330,7 @@ class AliAnalysisTaskITSTrackingCheck : public AliAnalysisTaskSE
   Bool_t IsSelectedCentrality() const;
   void FillNClustersModuleMap();
 
-  ClassDef(AliAnalysisTaskITSTrackingCheck,14); // ITS tracks analysis
+  ClassDef(AliAnalysisTaskITSTrackingCheck,15); // ITS tracks analysis
 };
 
 #endif
index 5cfbfa7..3968457 100644 (file)
@@ -3,6 +3,9 @@
 #include "AliAnalysisDataContainer.h"
 #include "AliESDEvent.h"
 #include "AliESDfriend.h"
+#include "AliCDBManager.h"
+#include "AliCDBEntry.h"
+#include "AliTriggerConfiguration.h"
 #include "AliStack.h"
 #include "AliPID.h"
 #include "AliCentrality.h"
@@ -64,7 +67,11 @@ AliAnalysisTaskITSsaTracks::AliAnalysisTaskITSsaTracks() : AliAnalysisTaskSE("IT
   fFillNtuple(kFALSE),
   fReadMC(kFALSE),
   fUseMCId(kFALSE),
-  fUseCentrality(kFALSE)
+  fUseCentrality(kFALSE),
+  fRequireSPD(kTRUE),
+  fRequireSDD(kTRUE),
+  fRequireSSD(kTRUE),
+  fTrigConfig(0)
 {
   //
   for(Int_t ilay=0; ilay<6;ilay++) fRequirePoint[ilay]=kFALSE;
@@ -173,9 +180,16 @@ void AliAnalysisTaskITSsaTracks::UserCreateOutputObjects() {
   // Total:                              36
   fOutput->Add(fNtupleTracks);
 
-  fHistNEvents = new TH1F("hNEvents", "Number of processed events",3,-0.5,2.5);
+  fHistNEvents = new TH1F("hNEvents", "Number of processed events",7,-0.5,6.5);
   fHistNEvents->Sumw2();
   fHistNEvents->SetMinimum(0);
+  fHistNEvents->GetXaxis()->SetBinLabel(1,"All events");
+  fHistNEvents->GetXaxis()->SetBinLabel(2,"Good vertex"); 
+  fHistNEvents->GetXaxis()->SetBinLabel(3,"In centrality range"); 
+  fHistNEvents->GetXaxis()->SetBinLabel(4,"Without SPD"); 
+  fHistNEvents->GetXaxis()->SetBinLabel(5,"Without SDD"); 
+  fHistNEvents->GetXaxis()->SetBinLabel(6,"Without SSD"); 
+  fHistNEvents->GetXaxis()->SetBinLabel(7,"Analyzed events"); 
   fOutput->Add(fHistNEvents);
 
   //binning for the dedx histogram
@@ -407,6 +421,7 @@ void AliAnalysisTaskITSsaTracks::UserExec(Option_t *)
 {
   //
 
+  static Bool_t initCalib = kFALSE;
   AliESDEvent *esd = (AliESDEvent*) (InputEvent());
 
 
@@ -420,7 +435,27 @@ void AliAnalysisTaskITSsaTracks::UserExec(Option_t *)
     printf("AliAnalysisTaskSDDRP::Exec(): bad ESDfriend\n");
     return;
   }
-  
+  if(fRequireSPD || fRequireSDD || fRequireSSD){
+    if (!initCalib) {
+      AliCDBManager* man = AliCDBManager::Instance();
+      if (!man) {
+       AliFatal("CDB not set but needed by AliAnalysisTaskSDDRP");
+       return;
+      }   
+      AliCDBEntry* eT=(AliCDBEntry*)man->Get("GRP/CTP/Config");
+      if(eT){
+       eT->PrintId();
+       eT->PrintMetaData();
+       fTrigConfig=(AliTriggerConfiguration*)eT->GetObject();
+      }
+      if(!eT || !fTrigConfig){
+       AliError("Cannot retrieve CDB entry for GRP/CTP/Config");
+       return;      
+      }
+      initCalib=kTRUE;
+    }
+  }
+
   AliStack* stack=0;
 
   if(fReadMC){
@@ -457,6 +492,23 @@ void AliAnalysisTaskITSsaTracks::UserExec(Option_t *)
   }
   fHistNEvents->Fill(2);
 
+  Bool_t spdOK=kTRUE;
+  Bool_t sddOK=kTRUE;
+  Bool_t ssdOK=kTRUE;
+  if(fTrigConfig){
+    spdOK=esd->IsDetectorInTriggerCluster("ITSSPD",fTrigConfig);
+    if(!spdOK) fHistNEvents->Fill(3);
+    sddOK=esd->IsDetectorInTriggerCluster("ITSSDD",fTrigConfig);
+    if(!sddOK) fHistNEvents->Fill(4);
+    ssdOK=esd->IsDetectorInTriggerCluster("ITSSSD",fTrigConfig);
+    if(!ssdOK) fHistNEvents->Fill(5);
+  }
+  if(fRequireSPD && !spdOK) return;
+  if(fRequireSDD && !sddOK) return;
+  if(fRequireSSD && !ssdOK) return;
+  fHistNEvents->Fill(6);
+  
+
   Int_t ntracks = esd->GetNumberOfTracks();
   const AliMultiplicity* mult=esd->GetMultiplicity();
   Int_t ntracklets = mult->GetNumberOfTracklets();
index 5f243f1..e773b59 100644 (file)
@@ -22,6 +22,7 @@ class TTree;
 class TString;
 class AliESDEvent;
 class AliESDfriend;
+class AliTriggerConfiguration;
 
 #include "AliAnalysisTaskSE.h"
 
@@ -81,6 +82,15 @@ class AliAnalysisTaskITSsaTracks : public AliAnalysisTaskSE {
   void SetCentralityRange(Float_t minc, Float_t maxc){
     fMinCentrality=minc; fMaxCentrality=maxc; fUseCentrality=kTRUE;
   }
+  void SetRequireSPDInTriggerCluster(Bool_t opt=kTRUE){
+    fRequireSPD=opt;
+  }
+  void SetRequireSDDInTriggerCluster(Bool_t opt=kTRUE){
+    fRequireSDD=opt;
+  }
+  void SetRequireSSDInTriggerCluster(Bool_t opt=kTRUE){
+    fRequireSSD=opt;
+  }
 
  private:
   enum {kPion=0,kKaon,kProton,kNspecies};
@@ -166,8 +176,12 @@ class AliAnalysisTaskITSsaTracks : public AliAnalysisTaskSE {
   Bool_t  fReadMC;          // flag read/not-read MC truth info
   Bool_t  fUseMCId;         // flag use/not-use MC identity for PID
   Bool_t  fUseCentrality;   // flag use/not-use centrality selection
+  Bool_t  fRequireSPD;      // check that SPD are in trigger cluster
+  Bool_t  fRequireSDD;      // check that SDD are in trigger cluster
+  Bool_t  fRequireSSD;      // check that SSD are in trigger cluster
+  AliTriggerConfiguration* fTrigConfig; // trigger configuration object
 
-  ClassDef(AliAnalysisTaskITSsaTracks,4);  
+  ClassDef(AliAnalysisTaskITSsaTracks,5);  
 };
 
 
index 4a9927a..6d8c887 100644 (file)
@@ -10,6 +10,7 @@
 #include "AliCDBEntry.h"
 #include "AliITSCalibrationSDD.h"
 #include "AliITSresponseSDD.h"
+#include "AliTriggerConfiguration.h"
 #include "AliGeomManager.h"
 #include <TSystem.h>
 #include <TTree.h>
@@ -84,11 +85,13 @@ AliAnalysisTaskSDDRP::AliAnalysisTaskSDDRP() : AliAnalysisTaskSE("SDD RecPoints"
   fCluSizAnVsTime(0),
   fCluSizTbVsTime(0),
   fResp(0),
+  fTrigConfig(0),
   fUseITSsaTracks(kFALSE),
   fMinITSpts(3),
   fMinTPCpts(70),
   fMinPfordEdx(0.5),
-  fOnlyCINT1BTrig(0),
+  fTriggerClass(""),
+  fOnlyEventsWithSDD(kTRUE),
   fExcludeBadMod(kFALSE)
 {
   //
@@ -115,7 +118,12 @@ void AliAnalysisTaskSDDRP::UserCreateOutputObjects() {
   fOutput->SetOwner();
   fOutput->SetName("OutputHistos");
 
-  fHistNEvents = new TH1F("hNEvents", "Number of processed events",3,-1.5,1.5);
+  fHistNEvents = new TH1F("hNEvents", "Number of processed events",5,-1.5,3.5);
+  fHistNEvents->GetXaxis()->SetBinLabel(1,"All events");
+  fHistNEvents->GetXaxis()->SetBinLabel(2,"Selected triggers"); 
+  fHistNEvents->GetXaxis()->SetBinLabel(3,"Without SDD"); 
+  fHistNEvents->GetXaxis()->SetBinLabel(4,"With SDD"); 
+  fHistNEvents->GetXaxis()->SetBinLabel(5,"Analyzed events"); 
   fHistNEvents->Sumw2();
   fHistNEvents->SetMinimum(0);
   fOutput->Add(fHistNEvents);
@@ -327,8 +335,6 @@ void AliAnalysisTaskSDDRP::UserExec(Option_t *)
   //
   static Bool_t initCalib = kFALSE;
   AliESDEvent *esd = (AliESDEvent*) (InputEvent());
-
-
   if(!esd) {
     printf("AliAnalysisTaskSDDRP::Exec(): bad ESD\n");
     return;
@@ -350,13 +356,25 @@ void AliAnalysisTaskSDDRP::UserExec(Option_t *)
        AliFatal("CDB not set but needed by AliAnalysisTaskSDDRP");
        return;
     }   
+    AliCDBEntry* eT=(AliCDBEntry*)man->Get("GRP/CTP/Config");
+    if(eT){
+      eT->PrintId();
+      eT->PrintMetaData();
+      fTrigConfig=(AliTriggerConfiguration*)eT->GetObject();
+    }
+    if(!eT || !fTrigConfig){
+      AliError("Cannot retrieve CDB entry for GRP/CTP/Config");
+      return;      
+    }
     AliCDBEntry* eR=(AliCDBEntry*)man->Get("ITS/Calib/RespSDD");
     if (eR) {
       eR->PrintId();
       eR->PrintMetaData();
       fResp=(AliITSresponseSDD*)eR->GetObject();
+    }else{
+      AliError("Cannot retrieve CDB entry for ITS/Calib/RespSDD");
+      return;
     }
-  
     AliCDBEntry* eC=(AliCDBEntry*)man->Get("ITS/Calib/CalibSDD");
     if (!eC) {
        AliError("Cannot retrieve CDB entry for ITS/Calib/CalibSDD");
@@ -398,11 +416,18 @@ void AliAnalysisTaskSDDRP::UserExec(Option_t *)
   
   PostData(1, fOutput);
 
+  fHistNEvents->Fill(-1);
+
+  TString firedTriggerClasses=esd->GetFiredTriggerClasses();
+  if(!firedTriggerClasses.Contains(fTriggerClass.Data())) return;
   fHistNEvents->Fill(0);
-  if(fOnlyCINT1BTrig){
-    if(!esd->IsTriggerClassFired("CINT1B-ABCE-NOPF-ALL")) return;
-    fHistNEvents->Fill(1);
-  }
+
+  Bool_t sddOK=esd->IsDetectorInTriggerCluster("ITSSDD",fTrigConfig);
+  if(!sddOK) fHistNEvents->Fill(1.);
+  else fHistNEvents->Fill(2.);
+  if(fOnlyEventsWithSDD && !sddOK) return; 
+  else fHistNEvents->Fill(3.);
+  
   const AliTrackPointArray *array = 0;
   Int_t ntracks = esd->GetNumberOfTracks();
   for (Int_t itrack=0; itrack < ntracks; itrack++) {
index 0ecbb8e..8ef6ca8 100644 (file)
@@ -20,6 +20,7 @@ class TString;
 class AliESDEvent;
 class AliESDfriend;
 class AliITSresponseSDD;
+class AliTriggerConfiguration;
 
 #include "AliAnalysisTaskSE.h"
 
@@ -42,8 +43,11 @@ class AliAnalysisTaskSDDRP : public AliAnalysisTaskSE {
   void SetMinTPCPoints(Int_t minp=70){
     fMinTPCpts=minp;
   }
-  void SetUseOnlyCINT1BTriggers(Bool_t use=kTRUE){
-    fOnlyCINT1BTrig=use;
+  void SetTriggerClass(TString trclass) {
+    fTriggerClass=trclass;
+  }
+  void SetUseOnlyEventsWithSDD(Bool_t use=kTRUE){
+    fOnlyEventsWithSDD=use;
   }
   void SetMinPfordEdx(Float_t minp=0.5){
     fMinPfordEdx=minp;
@@ -52,7 +56,7 @@ class AliAnalysisTaskSDDRP : public AliAnalysisTaskSE {
     fExcludeBadMod=opt;
   }
   Bool_t CheckModule(Int_t lay, Int_t lad, Int_t det) const;
-  
 
  private:
   AliAnalysisTaskSDDRP(const AliAnalysisTaskSDDRP &source);
@@ -98,14 +102,16 @@ class AliAnalysisTaskSDDRP : public AliAnalysisTaskSE {
   TH2F*   fCluSizAnVsTime;  //! Histo with anode cluster size vs. time
   TH2F*   fCluSizTbVsTime;  //! Histo with time-bin cluster size vs. time
   AliITSresponseSDD* fResp; // ResponseSDD object
+  AliTriggerConfiguration* fTrigConfig; // trigger configuration object
   Bool_t  fUseITSsaTracks;   // Flag for using standalone ITS tracs
   Int_t   fMinITSpts;       // Minimum number of ITS points per track
   Int_t   fMinTPCpts;       // Minimum number of TPC points per track
   Float_t fMinPfordEdx;     // Minimum momentum for dE/dx
-  Bool_t  fOnlyCINT1BTrig;  // Flag for using all events or only intections
+  TString fTriggerClass;    // Name of selected trigger class
+  Bool_t  fOnlyEventsWithSDD; // Flag to use only trigger cluster with SDD
   Bool_t  fExcludeBadMod;   // Flag to reject bad modules
  
-  ClassDef(AliAnalysisTaskSDDRP,4);
+  ClassDef(AliAnalysisTaskSDDRP,5);
 };
 
 
index 5226f46..fa0169d 100644 (file)
@@ -27,6 +27,9 @@
 #include "AliAnalysisManager.h"
 #include "AliGeomManager.h"
 #include "AliMultiplicity.h"
+#include "AliTriggerConfiguration.h"
+#include "AliCDBManager.h"
+#include "AliCDBEntry.h"
 #include "AliTrackPointArray.h"
 #include "AliMCEventHandler.h"
 #include "AliGenEventHeader.h"
@@ -51,6 +54,10 @@ fUseDiamond(kFALSE),
 fSkipTrack(kTRUE),
 fMinMult(0),
 fMaxMult(1000000),
+fCheckSDDIsIn(0),
+fTriggerClass(""),
+fTrigConfig(0),
+fOCDBPath(""),
 fOutputitspureSARec(0),
 fOutputitspureSASkip(0), 
 fOutputallPointRec(0),
@@ -76,12 +83,6 @@ fOutputpullAllpointTrue(0),
 fOutputphiAllpointSkip(0),
 fOutputphiPostvtracSkip(0),
 fOutputphiNegtvtracSkip(0),
-fOutputclusterTypeSPD01Skip(0),
-fOutputclusterTypeSPD02Skip(0),
-fOutputclusterTypeSPD03Skip(0),
-fOutputclusterTypeSPD11Skip(0),
-fOutputclusterTypeSPD12Skip(0),
-fOutputclusterTypeSPD13Skip(0),
 fOutputparticlePID(0),
 fOutputPt(0),
 fNentries(0),
@@ -101,6 +102,10 @@ fUseDiamond(kFALSE),
 fSkipTrack(kTRUE),
 fMinMult(0),
 fMaxMult(1000000),
+fCheckSDDIsIn(0),
+fTriggerClass(""),
+fTrigConfig(0),
+fOCDBPath(""),
 fOutputitspureSARec(0),
 fOutputitspureSASkip(0), 
 fOutputallPointRec(0),
@@ -126,12 +131,6 @@ fOutputpullAllpointTrue(0),
 fOutputphiAllpointSkip(0),
 fOutputphiPostvtracSkip(0),
 fOutputphiNegtvtracSkip(0),
-fOutputclusterTypeSPD01Skip(0),
-fOutputclusterTypeSPD02Skip(0),
-fOutputclusterTypeSPD03Skip(0),
-fOutputclusterTypeSPD11Skip(0),
-fOutputclusterTypeSPD12Skip(0),
-fOutputclusterTypeSPD13Skip(0),
 fOutputparticlePID(0),
 fOutputPt(0),
 fNentries(0),
@@ -211,12 +210,6 @@ AliAnalysisTaskSEImpParRes::~AliAnalysisTaskSEImpParRes()
   if (fOutputphiAllpointSkip)               {delete fOutputphiAllpointSkip;fOutputphiAllpointSkip=0x0;}
   if (fOutputphiPostvtracSkip)            {delete fOutputphiPostvtracSkip;fOutputphiPostvtracSkip=0x0;}
   if (fOutputphiNegtvtracSkip)            {delete fOutputphiNegtvtracSkip;fOutputphiNegtvtracSkip=0x0;}
-  if (fOutputclusterTypeSPD01Skip){delete fOutputclusterTypeSPD01Skip;fOutputclusterTypeSPD01Skip=0x0;}
-  if (fOutputclusterTypeSPD02Skip){delete fOutputclusterTypeSPD02Skip;fOutputclusterTypeSPD02Skip=0x0;}
-  if (fOutputclusterTypeSPD03Skip){delete fOutputclusterTypeSPD03Skip;fOutputclusterTypeSPD03Skip=0x0;}
-  if (fOutputclusterTypeSPD11Skip){delete fOutputclusterTypeSPD11Skip;fOutputclusterTypeSPD11Skip=0x0;}
-  if (fOutputclusterTypeSPD12Skip){delete fOutputclusterTypeSPD12Skip;fOutputclusterTypeSPD12Skip=0x0;}
-  if (fOutputclusterTypeSPD13Skip){delete fOutputclusterTypeSPD13Skip;fOutputclusterTypeSPD13Skip=0x0;}
   if (fOutputparticlePID)                           {delete fOutputparticlePID;fOutputparticlePID=0x0;}
   if (fOutputPt)                                                      {delete fOutputPt;fOutputPt=0x0;}
   if (fNentries)                                           { delete fNentries;     fNentries    =0x0; }
@@ -354,42 +347,6 @@ void AliAnalysisTaskSEImpParRes::UserCreateOutputObjects()
     fOutputpullAllpointTrue->SetName("pullAllpointTrue");
   } 
   
-  if (!fOutputclusterTypeSPD01Skip) {
-    fOutputclusterTypeSPD01Skip = new TList();
-    fOutputclusterTypeSPD01Skip->SetOwner();
-    fOutputclusterTypeSPD01Skip->SetName("clustertypeSPD01Skip");
-  }
-  
-  
-  if (!fOutputclusterTypeSPD02Skip) {
-    fOutputclusterTypeSPD02Skip = new TList();
-    fOutputclusterTypeSPD02Skip->SetOwner();
-    fOutputclusterTypeSPD02Skip->SetName("clustertypeSPD02Skip");
-  }
-  
-  if (!fOutputclusterTypeSPD03Skip) {
-    fOutputclusterTypeSPD03Skip = new TList();
-    fOutputclusterTypeSPD03Skip->SetOwner();
-    fOutputclusterTypeSPD03Skip->SetName("clustertypeSPD03Skip");
-  }
-  
-  if (!fOutputclusterTypeSPD11Skip) {
-    fOutputclusterTypeSPD11Skip = new TList();
-    fOutputclusterTypeSPD11Skip->SetOwner();
-    fOutputclusterTypeSPD11Skip->SetName("clustertypeSPD11Skip");
-  }
-  
-  if (!fOutputclusterTypeSPD12Skip) {
-    fOutputclusterTypeSPD12Skip = new TList();
-    fOutputclusterTypeSPD12Skip->SetOwner();
-    fOutputclusterTypeSPD12Skip->SetName("clustertypeSPD12Skip");
-  }
-  
-  if (!fOutputclusterTypeSPD13Skip) {
-    fOutputclusterTypeSPD13Skip = new TList();
-    fOutputclusterTypeSPD13Skip->SetOwner();
-    fOutputclusterTypeSPD13Skip->SetName("clustertypeSPD13Skip");
-  }
   
   if (!fOutputparticlePID) {
     fOutputparticlePID = new TList();
@@ -421,18 +378,6 @@ void AliAnalysisTaskSEImpParRes::UserCreateOutputObjects()
   const TString d0onlyRefitrphiTitle = "d_{0} Distribution_rphi; d_{0} [#mum]; Entries";
   const TString d0onlyRefitzTitle  = "d_{0} Distribution_z; d_{0} [#mum]; Entries";
   const TString d0ptTitle = "d_{0} Distribution_rphi; d_{0} [#mum]; Entries";
-  const TString d0clusterTypeSPD01rphiTitle = "d_{0} Distribution_rphi; d_{0} [#mum]; Entries";
-  const TString d0clusterTypeSPD01zTitle = "d_{0} Distribution_rphi; d_{0} [#mum]; Entries"; 
-  const TString d0clusterTypeSPD02rphiTitle = "d_{0} Distribution_rphi; d_{0} [#mum]; Entries";
-  const TString d0clusterTypeSPD02zTitle = "d_{0} Distribution_rphi; d_{0} [#mum]; Entries";
-  const TString d0clusterTypeSPD03rphiTitle = "d_{0} Distribution_rphi; d_{0} [#mum]; Entries";
-  const TString d0clusterTypeSPD03zTitle = "d_{0} Distribution_rphi; d_{0} [#mum]; Entries";
-  const TString d0clusterTypeSPD11rphiTitle = "d_{0} Distribution_rphi; d_{0} [#mum]; Entries";
-  const TString d0clusterTypeSPD11zTitle = "d_{0} Distribution_rphi; d_{0} [#mum]; Entries";
-  const TString d0clusterTypeSPD12rphiTitle = "d_{0} Distribution_rphi; d_{0} [#mum]; Entries";
-  const TString d0clusterTypeSPD12zTitle = "d_{0} Distribution_rphi; d_{0} [#mum]; Entries";
-  const TString d0clusterTypeSPD13rphiTitle = "d_{0} Distribution_rphi; d_{0} [#mum]; Entries";
-  const TString d0clusterTypeSPD13zTitle = "d_{0} Distribution_rphi; d_{0} [#mum]; Entries";
   const TString d0rphiTitle = "d_{0} Distribution_rphi; d_{0} [#mum]; Entries";
   const TString d0zTitle  = "d_{0} Distribution_z; d_{0} [#mum]; Entries";
   const TString d0rphiParticlPID = "d_{0} Distribution_rphi; d_{0} [#mum]; Entries";
@@ -443,9 +388,9 @@ void AliAnalysisTaskSEImpParRes::UserCreateOutputObjects()
   TH1F *d0ITSpureSArphiRec=0,*d0ITSpureSAzRec=0,*d0AllpointrphiRec=0, *d0AllpointzRec=0,*d0PartpointrphiRec=0, *d0PartpointzRec=0,
     *d0OnepointSPDrphiRec=0,*d0OnepointSPDzRec=0,*d0PostvtracrphiRec=0, *d0PostvtraczRec=0,*d0NegtvtracrphiRec=0, *d0NegtvtraczRec=0,*d0Pt=0,*d0PullAllpointrphiRec=0,*d0PullAllpointzRec=0,*d0OnlyRefitrphiRec=0,*d0OnlyRefitzRec=0,*d0PionPIDrphiRec=0,*d0PionPIDzRec=0,*d0KaonPIDrphiRec=0,*d0KaonPIDzRec=0,*d0ProtonPIDrphiRec=0,*d0ProtonPIDzRec=0;
 
-  TString  named0itspureSArphiSkip,named0itspureSAzSkip,named0allpointrphiSkip, named0allpointzSkip,named0partpointrphiSkip, named0partpointzSkip,named0onepointSPDrphiSkip, named0onepointSPDzSkip,named0postvtracrphiSkip, named0postvtraczSkip,named0negtvtracrphiSkip, named0negtvtraczSkip,named0ptSkip,named0pullAllpointrphiSkip,named0pullAllpointzSkip,named0onlyRefitrphiSkip,named0onlyRefitzSkip,named0allpointrphiTrue, named0allpointzTrue,named0postvtracrphiTrue, named0postvtraczTrue,named0negtvtracrphiTrue, named0negtvtraczTrue,named0pullAllpointrphiTrue,named0pullAllpointzTrue,named0clusterTypeSPD01rphiSkip,named0clusterTypeSPD01zSkip,named0clusterTypeSPD02rphiSkip,named0clusterTypeSPD02zSkip,named0clusterTypeSPD03rphiSkip,named0clusterTypeSPD03zSkip,named0clusterTypeSPD11rphiSkip,named0clusterTypeSPD11zSkip,named0clusterTypeSPD12rphiSkip,named0clusterTypeSPD12zSkip,named0clusterTypeSPD13rphiSkip,named0clusterTypeSPD13zSkip,named0pionPIDrphiSkip, named0pionPIDzSkip,named0kaonPIDrphiSkip, named0kaonPIDzSkip,named0protonPIDrphiSkip, named0protonPIDzSkip;
+  TString  named0itspureSArphiSkip,named0itspureSAzSkip,named0allpointrphiSkip, named0allpointzSkip,named0partpointrphiSkip, named0partpointzSkip,named0onepointSPDrphiSkip, named0onepointSPDzSkip,named0postvtracrphiSkip, named0postvtraczSkip,named0negtvtracrphiSkip, named0negtvtraczSkip,named0ptSkip,named0pullAllpointrphiSkip,named0pullAllpointzSkip,named0onlyRefitrphiSkip,named0onlyRefitzSkip,named0allpointrphiTrue, named0allpointzTrue,named0postvtracrphiTrue, named0postvtraczTrue,named0negtvtracrphiTrue, named0negtvtraczTrue,named0pullAllpointrphiTrue,named0pullAllpointzTrue,named0pionPIDrphiSkip, named0pionPIDzSkip,named0kaonPIDrphiSkip, named0kaonPIDzSkip,named0protonPIDrphiSkip, named0protonPIDzSkip;
 
-  TH1F *d0ITSpureSArphiSkip=0,*d0ITSpureSAzSkip=0,*d0AllpointrphiSkip=0, *d0AllpointzSkip=0,*d0PartpointrphiSkip=0, *d0PartpointzSkip=0,*d0OnepointSPDrphiSkip=0,*d0OnepointSPDzSkip=0,*d0PostvtracrphiSkip=0, *d0PostvtraczSkip=0,*d0NegtvtracrphiSkip=0,*d0NegtvtraczSkip=0,*d0PullAllpointrphiSkip=0,*d0PullAllpointzSkip=0,*d0OnlyRefitrphiSkip=0,*d0OnlyRefitzSkip=0,*d0AllpointrphiTrue=0, *d0AllpointzTrue=0,*d0PostvtracrphiTrue=0, *d0PostvtraczTrue=0,*d0NegtvtracrphiTrue=0,*d0NegtvtraczTrue=0,*d0PullAllpointrphiTrue,*d0PullAllpointzTrue,*d0ClustertypeSPD01rphiSkip=0,*d0ClustertypeSPD01zSkip=0,*d0ClustertypeSPD02rphiSkip=0,*d0ClustertypeSPD02zSkip=0,*d0ClustertypeSPD03rphiSkip=0,*d0ClustertypeSPD03zSkip=0,*d0ClustertypeSPD11rphiSkip=0,*d0ClustertypeSPD11zSkip=0,*d0ClustertypeSPD12rphiSkip=0,*d0ClustertypeSPD12zSkip=0,*d0ClustertypeSPD13rphiSkip=0,*d0ClustertypeSPD13zSkip=0,*d0PionPIDrphiSkip=0,*d0PionPIDzSkip=0,*d0KaonPIDrphiSkip=0,*d0KaonPIDzSkip=0,*d0ProtonPIDrphiSkip=0,*d0ProtonPIDzSkip=0;
+  TH1F *d0ITSpureSArphiSkip=0,*d0ITSpureSAzSkip=0,*d0AllpointrphiSkip=0, *d0AllpointzSkip=0,*d0PartpointrphiSkip=0, *d0PartpointzSkip=0,*d0OnepointSPDrphiSkip=0,*d0OnepointSPDzSkip=0,*d0PostvtracrphiSkip=0, *d0PostvtraczSkip=0,*d0NegtvtracrphiSkip=0,*d0NegtvtraczSkip=0,*d0PullAllpointrphiSkip=0,*d0PullAllpointzSkip=0,*d0OnlyRefitrphiSkip=0,*d0OnlyRefitzSkip=0,*d0AllpointrphiTrue=0, *d0AllpointzTrue=0,*d0PostvtracrphiTrue=0, *d0PostvtraczTrue=0,*d0NegtvtracrphiTrue=0,*d0NegtvtraczTrue=0,*d0PullAllpointrphiTrue,*d0PullAllpointzTrue,*d0PionPIDrphiSkip=0,*d0PionPIDzSkip=0,*d0KaonPIDrphiSkip=0,*d0KaonPIDzSkip=0,*d0ProtonPIDrphiSkip=0,*d0ProtonPIDzSkip=0;
 
   for(Int_t i=1; i<=nhist; i++) {
    
@@ -708,83 +653,6 @@ void AliAnalysisTaskSEImpParRes::UserCreateOutputObjects()
     d0PullAllpointzTrue->SetMinimum(0);
     fOutputpullAllpointTrue->Add(d0PullAllpointzTrue);
 
-    named0clusterTypeSPD01rphiSkip = "d0clustertypeSPD01rphiSkip_";
-    named0clusterTypeSPD01rphiSkip +=i;
-    named0clusterTypeSPD01zSkip = "d0clustertypeSPD01zSkip_";
-    named0clusterTypeSPD01zSkip +=i;
-    d0ClustertypeSPD01rphiSkip = new TH1F(named0clusterTypeSPD01rphiSkip.Data(),d0clusterTypeSPD01rphiTitle.Data(),400,-Getd0HistRange(i),Getd0HistRange(i));
-    d0ClustertypeSPD01rphiSkip->Sumw2();
-    d0ClustertypeSPD01rphiSkip->SetMinimum(0);
-    fOutputclusterTypeSPD01Skip->Add(d0ClustertypeSPD01rphiSkip);
-    d0ClustertypeSPD01zSkip = new TH1F(named0clusterTypeSPD01zSkip.Data(),d0clusterTypeSPD01zTitle.Data(),400,-Getd0HistRange(i),Getd0HistRange(i));
-    d0ClustertypeSPD01zSkip->Sumw2();
-    d0ClustertypeSPD01zSkip->SetMinimum(0);
-    fOutputclusterTypeSPD01Skip->Add(d0ClustertypeSPD01zSkip);
-
-    named0clusterTypeSPD02rphiSkip = "d0clustertypeSPD02rphiSkip_";
-    named0clusterTypeSPD02rphiSkip +=i;
-    named0clusterTypeSPD02zSkip = "d0clustertypeSPD02zSkip_";
-    named0clusterTypeSPD02zSkip +=i;
-    d0ClustertypeSPD02rphiSkip = new TH1F(named0clusterTypeSPD02rphiSkip.Data(),d0clusterTypeSPD02rphiTitle.Data(),400,-Getd0HistRange(i),Getd0HistRange(i));
-    d0ClustertypeSPD02rphiSkip->Sumw2();
-    d0ClustertypeSPD02rphiSkip->SetMinimum(0);
-    fOutputclusterTypeSPD02Skip->Add(d0ClustertypeSPD02rphiSkip);
-    d0ClustertypeSPD02zSkip = new TH1F(named0clusterTypeSPD02zSkip.Data(),d0clusterTypeSPD02zTitle.Data(),400,-Getd0HistRange(i),Getd0HistRange(i));
-    d0ClustertypeSPD02zSkip->Sumw2();
-    d0ClustertypeSPD02zSkip->SetMinimum(0);
-    fOutputclusterTypeSPD02Skip->Add(d0ClustertypeSPD02zSkip);
-
-    named0clusterTypeSPD03rphiSkip = "d0clustertypeSPD03rphiSkip_";
-    named0clusterTypeSPD03rphiSkip +=i;
-    named0clusterTypeSPD03zSkip = "d0clustertypeSPD03zSkip_";
-    named0clusterTypeSPD03zSkip +=i;
-    d0ClustertypeSPD03rphiSkip = new TH1F(named0clusterTypeSPD03rphiSkip.Data(),d0clusterTypeSPD03rphiTitle.Data(),400,-Getd0HistRange(i),Getd0HistRange(i));
-    d0ClustertypeSPD03rphiSkip->Sumw2();
-    d0ClustertypeSPD03rphiSkip->SetMinimum(0);
-    fOutputclusterTypeSPD03Skip->Add(d0ClustertypeSPD03rphiSkip);
-    d0ClustertypeSPD03zSkip = new TH1F(named0clusterTypeSPD03zSkip.Data(),d0clusterTypeSPD03zTitle.Data(),400,-Getd0HistRange(i),Getd0HistRange(i));
-    d0ClustertypeSPD03zSkip->Sumw2();
-    d0ClustertypeSPD03zSkip->SetMinimum(0);
-    fOutputclusterTypeSPD03Skip->Add(d0ClustertypeSPD03zSkip);
-
-    named0clusterTypeSPD11rphiSkip = "d0clustertypeSPD11rphiSkip_";
-    named0clusterTypeSPD11rphiSkip +=i;
-    named0clusterTypeSPD11zSkip = "d0clustertypeSPD11zSkip_";
-    named0clusterTypeSPD11zSkip +=i;
-    d0ClustertypeSPD11rphiSkip = new TH1F(named0clusterTypeSPD11rphiSkip.Data(),d0clusterTypeSPD11rphiTitle.Data(),400,-Getd0HistRange(i),Getd0HistRange(i));
-    d0ClustertypeSPD11rphiSkip->Sumw2();
-    d0ClustertypeSPD11rphiSkip->SetMinimum(0);
-    fOutputclusterTypeSPD11Skip->Add(d0ClustertypeSPD11rphiSkip);
-    d0ClustertypeSPD11zSkip = new TH1F(named0clusterTypeSPD11zSkip.Data(),d0clusterTypeSPD11zTitle.Data(),400,-Getd0HistRange(i),Getd0HistRange(i));
-    d0ClustertypeSPD11zSkip->Sumw2();
-    d0ClustertypeSPD11zSkip->SetMinimum(0);
-    fOutputclusterTypeSPD11Skip->Add(d0ClustertypeSPD11zSkip);
-
-    named0clusterTypeSPD12rphiSkip = "d0clustertypeSPD12rphiSkip_";
-    named0clusterTypeSPD12rphiSkip +=i;
-    named0clusterTypeSPD12zSkip = "d0clustertypeSPD12zSkip_";
-    named0clusterTypeSPD12zSkip +=i;
-    d0ClustertypeSPD12rphiSkip = new TH1F(named0clusterTypeSPD12rphiSkip.Data(),d0clusterTypeSPD12rphiTitle.Data(),400,-Getd0HistRange(i),Getd0HistRange(i));
-    d0ClustertypeSPD12rphiSkip->Sumw2();
-    d0ClustertypeSPD12rphiSkip->SetMinimum(0);
-    fOutputclusterTypeSPD12Skip->Add(d0ClustertypeSPD12rphiSkip);
-    d0ClustertypeSPD12zSkip = new TH1F(named0clusterTypeSPD12zSkip.Data(),d0clusterTypeSPD12zTitle.Data(),400,-Getd0HistRange(i),Getd0HistRange(i));
-    d0ClustertypeSPD12zSkip->Sumw2();
-    d0ClustertypeSPD12zSkip->SetMinimum(0);
-    fOutputclusterTypeSPD12Skip->Add(d0ClustertypeSPD12zSkip);
-
-    named0clusterTypeSPD13rphiSkip = "d0clustertypeSPD13rphiSkip_";
-    named0clusterTypeSPD13rphiSkip +=i;
-    named0clusterTypeSPD13zSkip = "d0clustertypeSPD13zSkip_";
-    named0clusterTypeSPD13zSkip +=i;
-    d0ClustertypeSPD13rphiSkip = new TH1F(named0clusterTypeSPD13rphiSkip.Data(),d0clusterTypeSPD13rphiTitle.Data(),400,-Getd0HistRange(i),Getd0HistRange(i));
-    d0ClustertypeSPD13rphiSkip->Sumw2();
-    d0ClustertypeSPD13rphiSkip->SetMinimum(0);
-    fOutputclusterTypeSPD13Skip->Add(d0ClustertypeSPD13rphiSkip);
-    d0ClustertypeSPD13zSkip = new TH1F(named0clusterTypeSPD13zSkip.Data(),d0clusterTypeSPD13zTitle.Data(),400,-Getd0HistRange(i),Getd0HistRange(i));
-    d0ClustertypeSPD13zSkip->Sumw2();
-    d0ClustertypeSPD13zSkip->SetMinimum(0);
-    fOutputclusterTypeSPD13Skip->Add(d0ClustertypeSPD13zSkip);
 
     named0pionPIDrphiRec = "d0pionPIDrphiRec_";
     named0pionPIDrphiRec += i;
@@ -1154,16 +1022,10 @@ void AliAnalysisTaskSEImpParRes::UserCreateOutputObjects()
   PostData(23, fOutputphiAllpointSkip);
   PostData(24, fOutputphiPostvtracSkip);
   PostData(25, fOutputphiNegtvtracSkip);
-  PostData(26, fOutputclusterTypeSPD01Skip);
-  PostData(27, fOutputclusterTypeSPD02Skip);
-  PostData(28, fOutputclusterTypeSPD03Skip);
-  PostData(29, fOutputclusterTypeSPD11Skip);
-  PostData(30, fOutputclusterTypeSPD12Skip);
-  PostData(31, fOutputclusterTypeSPD13Skip);
-  PostData(32, fOutputparticlePID);
-  PostData(33, fOutputPt);
-  PostData(34, fNentries);
-  PostData(35, fEstimVtx);  
+  PostData(26, fOutputparticlePID);
+  PostData(27, fOutputPt);
+  PostData(28, fNentries);
+  PostData(29, fEstimVtx);  
 
   return;
 }
@@ -1183,6 +1045,38 @@ void AliAnalysisTaskSEImpParRes::UserExec(Option_t */*option*/)
   // only events in the requested multiplicity range
   if(!IsSelectedCentrality(esd)) return;
 
+  TString firedTriggerClasses=esd->GetFiredTriggerClasses();  
+  if(!firedTriggerClasses.Contains(fTriggerClass.Data())) return;
+  
+
+  Bool_t sddIsIn=kTRUE;
+  if(fCheckSDDIsIn) {
+
+    if(!fTrigConfig) {    
+      AliCDBManager* man = AliCDBManager::Instance();
+      if(fOCDBPath.Contains("OCDB")) { // when running in the QAtrain this is not called (OCBD is already set)
+       man->SetDefaultStorage(fOCDBPath.Data());
+       man->SetRun(esd->GetRunNumber());
+      }
+      if(!man) {       
+       AliFatal("CDB not set but needed by AliAnalysisTaskITSTrackingCheck");
+       return;    
+      }   
+      AliCDBEntry* eT=(AliCDBEntry*)man->Get("GRP/CTP/Config");    
+      if(eT) {      
+       fTrigConfig=(AliTriggerConfiguration*)eT->GetObject();    
+      }    
+      if(!eT || !fTrigConfig) {      
+       AliError("Cannot retrieve CDB entry for GRP/CTP/Config");      
+       return;     
+      }
+    }
+
+    sddIsIn=esd->IsDetectorInTriggerCluster("ITSSDD",fTrigConfig);
+    if(fCheckSDDIsIn==1 && !sddIsIn) return;
+    if(fCheckSDDIsIn==-1 && sddIsIn) return;
+  }
+
   fNentries->Fill(1);
 
 
@@ -1458,7 +1352,7 @@ void AliAnalysisTaskSEImpParRes::UserExec(Option_t */*option*/)
     }
 
     // with 6 ITS points (including different selection)
-    if(npointsITS==6) {
+    if(npointsITS==6 || (npointsITS==4 && !sddIsIn)) {
       //pt 
       char *named0Pt = Form("d0pt_%d",bin);
       ((TH1F*)(fOutputPt->FindObject(named0Pt)))->Fill(pt);
@@ -1627,52 +1521,6 @@ void AliAnalysisTaskSEImpParRes::UserExec(Option_t */*option*/)
        }
       }
 
-      //cluster type
-      Int_t ctypeSPD0 = ClusterTypeOnITSLayer(esdtrack,0);
-      if(ctypeSPD0==-1) continue;
-      Int_t ctypeSPD1 = ClusterTypeOnITSLayer(esdtrack,1);
-      if(ctypeSPD1==-1) continue;
-
-      if(ctypeSPD0==1) {
-       char *named0ClustertypeSPD01rphiSkip = Form("d0clustertypeSPD01rphiSkip_%d",phibin);
-       char *named0ClustertypeSPD01zSkip = Form("d0clustertypeSPD01rphiSkip_%d",phibin);
-       ((TH1F*)(fOutputclusterTypeSPD01Skip->FindObject(named0ClustertypeSPD01rphiSkip)))->Fill(10000*dzRecSkip[0]);
-       ((TH1F*)(fOutputclusterTypeSPD01Skip->FindObject(named0ClustertypeSPD01zSkip)))->Fill(10000*dzRecSkip[1]);
-      }
-      
-      if(ctypeSPD0==2) {
-       char *named0ClustertypeSPD02rphiSkip = Form("d0clustertypeSPD02rphiSkip_%d",phibin);
-       char *named0ClustertypeSPD02zSkip = Form("d0clustertypeSPD02rphiSkip_%d",phibin);
-       ((TH1F*)(fOutputclusterTypeSPD02Skip->FindObject(named0ClustertypeSPD02rphiSkip)))->Fill(10000*dzRecSkip[0]);
-       ((TH1F*)(fOutputclusterTypeSPD02Skip->FindObject(named0ClustertypeSPD02zSkip)))->Fill(10000*dzRecSkip[1]);
-      }
-      
-      if(ctypeSPD0==3) {
-       char *named0ClustertypeSPD03rphiSkip = Form("d0clustertypeSPD03rphiSkip_%d",phibin);
-       char *named0ClustertypeSPD03zSkip = Form("d0clustertypeSPD03zSkip_%d",phibin);
-       ((TH1F*)(fOutputclusterTypeSPD03Skip->FindObject(named0ClustertypeSPD03rphiSkip)))->Fill(10000*dzRecSkip[0]);
-       ((TH1F*)(fOutputclusterTypeSPD03Skip->FindObject(named0ClustertypeSPD03zSkip)))->Fill(10000*dzRecSkip[1]);
-      }
-      
-      if(ctypeSPD1==1) {
-       char *named0ClustertypeSPD11rphiSkip = Form("d0clustertypeSPD11rphiSkip_%d",phibin);
-       char *named0ClustertypeSPD11zSkip = Form("d0clustertypeSPD11rphiSkip_%d",phibin);
-       ((TH1F*)(fOutputclusterTypeSPD11Skip->FindObject(named0ClustertypeSPD11rphiSkip)))->Fill(10000*dzRecSkip[0]);
-       ((TH1F*)(fOutputclusterTypeSPD11Skip->FindObject(named0ClustertypeSPD11zSkip)))->Fill(10000*dzRecSkip[1]);
-      } 
-      if(ctypeSPD1==2) {
-       char *named0ClustertypeSPD12rphiSkip = Form("d0clustertypeSPD12rphiSkip_%d",phibin);
-       char *named0ClustertypeSPD12zSkip = Form("d0clustertypeSPD12rphiSkip_%d",phibin);
-       ((TH1F*)(fOutputclusterTypeSPD12Skip->FindObject(named0ClustertypeSPD12rphiSkip)))->Fill(10000*dzRecSkip[0]);
-       ((TH1F*)(fOutputclusterTypeSPD12Skip->FindObject(named0ClustertypeSPD12zSkip)))->Fill(10000*dzRecSkip[1]);
-      } 
-      
-      if(ctypeSPD1==3) {
-       char *named0ClustertypeSPD13rphiSkip = Form("d0clustertypeSPD13rphiSkip_%d",phibin);
-       char *named0ClustertypeSPD13zSkip = Form("d0clustertypeSPD13rphiSkip_%d",phibin);
-       ((TH1F*)(fOutputclusterTypeSPD13Skip->FindObject(named0ClustertypeSPD13rphiSkip)))->Fill(10000*dzRecSkip[0]);
-       ((TH1F*)(fOutputclusterTypeSPD13Skip->FindObject(named0ClustertypeSPD13zSkip)))->Fill(10000*dzRecSkip[1]);
-      }  
      
       // Bayesian PID
       Double_t prob[AliPID::kSPECIES];
@@ -1773,16 +1621,10 @@ void AliAnalysisTaskSEImpParRes::UserExec(Option_t */*option*/)
   PostData(23, fOutputphiAllpointSkip);
   PostData(24, fOutputphiPostvtracSkip);
   PostData(25, fOutputphiNegtvtracSkip);
-  PostData(26, fOutputclusterTypeSPD01Skip);
-  PostData(27, fOutputclusterTypeSPD02Skip);
-  PostData(28, fOutputclusterTypeSPD03Skip);
-  PostData(29, fOutputclusterTypeSPD11Skip);
-  PostData(30, fOutputclusterTypeSPD12Skip);
-  PostData(31, fOutputclusterTypeSPD13Skip);
-  PostData(32, fOutputparticlePID);
-  PostData(33, fOutputPt);
-  PostData(34, fNentries);
-  PostData(35, fEstimVtx);  
+  PostData(26, fOutputparticlePID);
+  PostData(27, fOutputPt);
+  PostData(28, fNentries);
+  PostData(29, fEstimVtx);  
 
   return;
 }
index a5aac97..9c91733 100644 (file)
@@ -14,6 +14,7 @@
 
 class TList;
 class TH1F;
+class AliTriggerConfiguration;
 
 #include "AliAnalysisTaskSE.h"
 
@@ -35,6 +36,9 @@ class AliAnalysisTaskSEImpParRes : public AliAnalysisTaskSE {
   void SetUseDiamond(Bool_t use=kFALSE) { fUseDiamond=use; return; }
   void SetSkipTrack(Bool_t skip=kFALSE) { fSkipTrack=skip; return; }
   void SetMultiplicityRange(Int_t min,Int_t max) { fMinMult=min; fMaxMult=max; }
+  void SetCheckSDDIsIn(Int_t check=0) { fCheckSDDIsIn=check; }
+  void SetTriggerClass(TString tclass="") { fTriggerClass=tclass; }
+  void SetOCDBPath(TString path="") { fOCDBPath=path; }
 
  private:
   
@@ -52,6 +56,10 @@ class AliAnalysisTaskSEImpParRes : public AliAnalysisTaskSE {
   Bool_t fSkipTrack;    // redo primary vertex for each track
   Int_t  fMinMult; // minimum multiplicity
   Int_t  fMaxMult; // maximum multiplicity
+  Int_t  fCheckSDDIsIn; // check for ITSSDD in the trigger cluster: 0 no check; !=0 check from OCDB
+  TString      fTriggerClass; // trigger class to be inspected
+  AliTriggerConfiguration *fTrigConfig; // trigger configuration (read from OCDB)
+  TString      fOCDBPath; // to the OCDB
   TList *fOutputitspureSARec;  //! ITS StandAlone: with track in vtx 
   TList *fOutputitspureSASkip; //! ITS StandAlone: w/o track in vtx
   TList *fOutputallPointRec;   //! ITS+TPC: 6 ITScls, with track in vtx      
@@ -77,12 +85,6 @@ class AliAnalysisTaskSEImpParRes : public AliAnalysisTaskSE {
   TList *fOutputphiAllpointSkip;  //!
   TList *fOutputphiPostvtracSkip;  //!
   TList *fOutputphiNegtvtracSkip;  //!
-  TList *fOutputclusterTypeSPD01Skip;  //!
-  TList *fOutputclusterTypeSPD02Skip;  //!
-  TList *fOutputclusterTypeSPD03Skip;  //!
-  TList *fOutputclusterTypeSPD11Skip;  //!
-  TList *fOutputclusterTypeSPD12Skip;  //!
-  TList *fOutputclusterTypeSPD13Skip;  //!
   TList *fOutputparticlePID;  //!
   TList *fOutputPt;     //!           
   TH1F  *fNentries;   //! histogram of number of events
@@ -90,7 +92,7 @@ class AliAnalysisTaskSEImpParRes : public AliAnalysisTaskSE {
 
   Bool_t IsSelectedCentrality(AliESDEvent *esd) const;
 
-  ClassDef(AliAnalysisTaskSEImpParRes,5); // AliAnalysisTaskSE for the study of the impact parameter resolution
+  ClassDef(AliAnalysisTaskSEImpParRes,7); // AliAnalysisTaskSE for the study of the impact parameter resolution
 };
 
 #endif
index 6986fc6..af7c80c 100644 (file)
@@ -3,7 +3,8 @@ AliAnalysisTaskSEImpParRes *AddTaskImpParRes(Bool_t readMC=kFALSE,
                                             Bool_t diamond=kTRUE,
                                             Bool_t skipTrack=kTRUE,
                                             Int_t minmult=0,
-                                            Int_t maxmult=1000000)
+                                            Int_t maxmult=1000000,
+                                            Int_t checkSDDIsIn=1) 
 {
   //
   // Configuration for the study of the impact parameter resolution
@@ -28,9 +29,13 @@ AliAnalysisTaskSEImpParRes *AddTaskImpParRes(Bool_t readMC=kFALSE,
   d0ResTask->SetUseDiamond(diamond);
   d0ResTask->SetSkipTrack(skipTrack);
   d0ResTask->SetMultiplicityRange(minmult,maxmult);
+  d0ResTask->SetCheckSDDIsIn(checkSDDIsIn);
+  //d0ResTask->SetOCDBPath("alien://folder=/alice/data/2011/OCDB"); // to be commented for the QAtrain
   mgr->AddTask(d0ResTask);
 
   TString fname=Form("%s:ImpParRes_Performance",mgr->GetCommonFileName());
+  if(checkSDDIsIn==1) fname.Append("_wSDD"); 
+  if(checkSDDIsIn==-1) fname.Append("_woSDD"); 
   if(selPdg>0) {fname+=selPdg;}
 
  
index 2ddbb3b..51be0a4 100644 (file)
@@ -2,7 +2,8 @@ AliAnalysisTaskITSTrackingCheck *AddTaskPerformanceITS(Bool_t readMC=kFALSE,
                                                       Bool_t readRP=kFALSE,
                                                       Bool_t fillNtuples=kFALSE,
                                                       Int_t minmult=0,
-                                                      Int_t maxmult=1000000) 
+                                                      Int_t maxmult=1000000,
+                                                      Int_t checkSDDIsIn=1) 
 {
   //
   // Task for check of ITS tracking
@@ -26,6 +27,8 @@ AliAnalysisTaskITSTrackingCheck *AddTaskPerformanceITS(Bool_t readMC=kFALSE,
   taskITS->SetReadRPLabels(readRP);
   taskITS->SetFillNtuples(fillNtuples);
   taskITS->SetUseITSSAforNtuples(kFALSE);
+  taskITS->SetCheckSDDIsIn(checkSDDIsIn);
+  //taskITS->SetOCDBPath("alien://folder=/alice/data/2011/OCDB"); // to be commented for the QAtrain
   AliLog::SetClassDebugLevel("AliAnalysisTaskITSTrackingCheck",10);
   // Add to the manager
   mgr->AddTask(taskITS);
@@ -37,6 +40,8 @@ AliAnalysisTaskITSTrackingCheck *AddTaskPerformanceITS(Bool_t readMC=kFALSE,
     cname.Append("_"); cname+=minmult; 
     cname.Append("_"); cname+=maxmult;
   } 
+
+
   AliAnalysisDataContainer *cOutputITS = mgr->CreateContainer(cname.Data(),TList::Class(),AliAnalysisManager::kOutputContainer,Form("%s:ITS_Performance",mgr->GetCommonFileName()));