Changes to run on PbPb events
authordainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 21 Jul 2010 03:36:52 +0000 (03:36 +0000)
committerdainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 21 Jul 2010 03:36:52 +0000 (03:36 +0000)
PWG1/ITS/AliAnalysisTaskITSTrackingCheck.cxx
PWG1/ITS/AliAnalysisTaskITSTrackingCheck.h
PWG1/ITS/AliAnalysisTaskSEImpParRes.cxx
PWG1/global/AliAnalysisTaskVertexESD.cxx

index 8a133a8e10689a08ce0a8fbb5596abae338b085d..607e521599c7da88fef48fb8075c4b4ff0226f42 100644 (file)
@@ -150,6 +150,13 @@ fHistPtITSMI5InAcc(0),
 fHistPtITSMI6InAcc(0),
 fHistPtITSMISPDInAcc(0),
 fHistPtITSMIoneSPDInAcc(0),
 fHistPtITSMI6InAcc(0),
 fHistPtITSMISPDInAcc(0),
 fHistPtITSMIoneSPDInAcc(0),
+fHistPtITSMI2InAccFake(0),
+fHistPtITSMI3InAccFake(0),
+fHistPtITSMI4InAccFake(0),
+fHistPtITSMI5InAccFake(0),
+fHistPtITSMI6InAccFake(0),
+fHistPtITSMISPDInAccFake(0),
+fHistPtITSMIoneSPDInAccFake(0),
 fHistPtITSMIoneSPDthreeSDDSSDInAcc(0),
 fHistPtITSTPCsel(0),
 fHistPtITSTPCselP(0),
 fHistPtITSMIoneSPDthreeSDDSSDInAcc(0),
 fHistPtITSTPCsel(0),
 fHistPtITSTPCselP(0),
@@ -333,6 +340,13 @@ fHistPtITSMI5InAcc(0),
 fHistPtITSMI6InAcc(0),
 fHistPtITSMISPDInAcc(0),
 fHistPtITSMIoneSPDInAcc(0),
 fHistPtITSMI6InAcc(0),
 fHistPtITSMISPDInAcc(0),
 fHistPtITSMIoneSPDInAcc(0),
+fHistPtITSMI2InAccFake(0),
+fHistPtITSMI3InAccFake(0),
+fHistPtITSMI4InAccFake(0),
+fHistPtITSMI5InAccFake(0),
+fHistPtITSMI6InAccFake(0),
+fHistPtITSMISPDInAccFake(0),
+fHistPtITSMIoneSPDInAccFake(0),
 fHistPtITSMIoneSPDthreeSDDSSDInAcc(0),
 fHistPtITSTPCsel(0),
 fHistPtITSTPCselP(0),
 fHistPtITSMIoneSPDthreeSDDSSDInAcc(0),
 fHistPtITSTPCsel(0),
 fHistPtITSTPCselP(0),
@@ -834,6 +848,41 @@ void AliAnalysisTaskITSTrackingCheck::UserCreateOutputObjects()
   fHistPtITSMIoneSPDInAcc->SetMinimum(0);
   fOutput->Add(fHistPtITSMIoneSPDInAcc);
 
   fHistPtITSMIoneSPDInAcc->SetMinimum(0);
   fOutput->Add(fHistPtITSMIoneSPDInAcc);
 
+  fHistPtITSMI6InAccFake = new TH1F("fHistPtITSMI6InAccFake","pt distribution of ITSMI6 tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMI6InAccFake->Sumw2();
+  fHistPtITSMI6InAccFake->SetMinimum(0);
+  fOutput->Add(fHistPtITSMI6InAccFake);
+  
+  fHistPtITSMI5InAccFake = new TH1F("fHistPtITSMI5InAccFake","pt distribution of ITSMI5 tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMI5InAccFake->Sumw2();
+  fHistPtITSMI5InAccFake->SetMinimum(0);
+  fOutput->Add(fHistPtITSMI5InAccFake);
+  
+  fHistPtITSMI4InAccFake = new TH1F("fHistPtITSMI4InAccFake","pt distribution of ITSMI4 tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMI4InAccFake->Sumw2();
+  fHistPtITSMI4InAccFake->SetMinimum(0);
+  fOutput->Add(fHistPtITSMI4InAccFake);
+  
+  fHistPtITSMI3InAccFake = new TH1F("fHistPtITSMI3InAccFake","pt distribution of ITSMI3 tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMI3InAccFake->Sumw2();
+  fHistPtITSMI3InAccFake->SetMinimum(0);
+  fOutput->Add(fHistPtITSMI3InAccFake);
+  
+  fHistPtITSMI2InAccFake = new TH1F("fHistPtITSMI2InAccFake","pt distribution of ITSMI2 tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMI2InAccFake->Sumw2();
+  fHistPtITSMI2InAccFake->SetMinimum(0);
+  fOutput->Add(fHistPtITSMI2InAccFake);
+  
+  fHistPtITSMISPDInAccFake = new TH1F("fHistPtITSMISPDInAccFake","pt distribution of ITSMISPD tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMISPDInAccFake->Sumw2();
+  fHistPtITSMISPDInAccFake->SetMinimum(0);
+  fOutput->Add(fHistPtITSMISPDInAccFake);
+  
+  fHistPtITSMIoneSPDInAccFake = new TH1F("fHistPtITSMIoneSPDInAccFake","pt distribution of ITSMISPD tracks; p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
+  fHistPtITSMIoneSPDInAccFake->Sumw2();
+  fHistPtITSMIoneSPDInAccFake->SetMinimum(0);
+  fOutput->Add(fHistPtITSMIoneSPDInAccFake);
+
   fHistPtITSMIoneSPDthreeSDDSSDInAcc = new TH1F("fHistPtITSMIoneSPDthreeSDDSSDInAcc","pt distribution of ITSMI tracks (>0 in SPD, >2 in SDD+SSD); p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
   fHistPtITSMIoneSPDthreeSDDSSDInAcc->Sumw2();
   fHistPtITSMIoneSPDthreeSDDSSDInAcc->SetMinimum(0);
   fHistPtITSMIoneSPDthreeSDDSSDInAcc = new TH1F("fHistPtITSMIoneSPDthreeSDDSSDInAcc","pt distribution of ITSMI tracks (>0 in SPD, >2 in SDD+SSD); p_{t} [GeV/c]; N tracks",nPtBins,xPtBins);
   fHistPtITSMIoneSPDthreeSDDSSDInAcc->Sumw2();
   fHistPtITSMIoneSPDthreeSDDSSDInAcc->SetMinimum(0);
@@ -1465,6 +1514,7 @@ void AliAnalysisTaskITSTrackingCheck::UserExec(Option_t *)
     Int_t nClsMCSPD=0;
   
     Int_t trkLabel = TMath::Abs(track->GetLabel());
     Int_t nClsMCSPD=0;
   
     Int_t trkLabel = TMath::Abs(track->GetLabel());
+    Bool_t isFake=(track->GetLabel()>=0 ? kFALSE : kTRUE);
     // check if it is primary
     if(fReadMC && stack) {
       isPrimary = stack->IsPhysicalPrimary(trkLabel);
     // check if it is primary
     if(fReadMC && stack) {
       isPrimary = stack->IsPhysicalPrimary(trkLabel);
@@ -1736,30 +1786,37 @@ void AliAnalysisTaskITSTrackingCheck::UserExec(Option_t *)
       if(itsfindableAcc) {
        if(nclsITS==6) {
          fHistPtITSMI6InAcc->Fill(track->Pt());
       if(itsfindableAcc) {
        if(nclsITS==6) {
          fHistPtITSMI6InAcc->Fill(track->Pt());
+         if(isFake) fHistPtITSMI6InAccFake->Fill(track->Pt());
          if(isPrimary) {fHistPtITSMI6InAccP->Fill(track->Pt());} else {fHistPtITSMI6InAccS->Fill(track->Pt());}  
        }
        if(nclsITS==5) {
          fHistPtITSMI5InAcc->Fill(track->Pt());
          if(isPrimary) {fHistPtITSMI6InAccP->Fill(track->Pt());} else {fHistPtITSMI6InAccS->Fill(track->Pt());}  
        }
        if(nclsITS==5) {
          fHistPtITSMI5InAcc->Fill(track->Pt());
+         if(isFake) fHistPtITSMI5InAccFake->Fill(track->Pt());
          if(isPrimary) {fHistPtITSMI5InAccP->Fill(track->Pt());} else {fHistPtITSMI5InAccS->Fill(track->Pt());}  
        }
        if(nclsITS==4) {
          fHistPtITSMI4InAcc->Fill(track->Pt());
          if(isPrimary) {fHistPtITSMI5InAccP->Fill(track->Pt());} else {fHistPtITSMI5InAccS->Fill(track->Pt());}  
        }
        if(nclsITS==4) {
          fHistPtITSMI4InAcc->Fill(track->Pt());
+         if(isFake) fHistPtITSMI4InAccFake->Fill(track->Pt());
          if(isPrimary) {fHistPtITSMI4InAccP->Fill(track->Pt());} else {fHistPtITSMI4InAccS->Fill(track->Pt());}  
        }
        if(nclsITS==3) {
          fHistPtITSMI3InAcc->Fill(track->Pt());
          if(isPrimary) {fHistPtITSMI4InAccP->Fill(track->Pt());} else {fHistPtITSMI4InAccS->Fill(track->Pt());}  
        }
        if(nclsITS==3) {
          fHistPtITSMI3InAcc->Fill(track->Pt());
+         if(isFake) fHistPtITSMI3InAccFake->Fill(track->Pt());
          if(isPrimary) {fHistPtITSMI3InAccP->Fill(track->Pt());} else {fHistPtITSMI3InAccS->Fill(track->Pt());}  
        }
        if(nclsITS==2) {
          fHistPtITSMI2InAcc->Fill(track->Pt());
          if(isPrimary) {fHistPtITSMI3InAccP->Fill(track->Pt());} else {fHistPtITSMI3InAccS->Fill(track->Pt());}  
        }
        if(nclsITS==2) {
          fHistPtITSMI2InAcc->Fill(track->Pt());
+         if(isFake) fHistPtITSMI2InAccFake->Fill(track->Pt());
          if(isPrimary) {fHistPtITSMI2InAccP->Fill(track->Pt());} else {fHistPtITSMI2InAccS->Fill(track->Pt());}  
        }
        if(track->HasPointOnITSLayer(0) && track->HasPointOnITSLayer(1)) {
          fHistPtITSMISPDInAcc->Fill(track->Pt());
          if(isPrimary) {fHistPtITSMI2InAccP->Fill(track->Pt());} else {fHistPtITSMI2InAccS->Fill(track->Pt());}  
        }
        if(track->HasPointOnITSLayer(0) && track->HasPointOnITSLayer(1)) {
          fHistPtITSMISPDInAcc->Fill(track->Pt());
+         if(isFake) fHistPtITSMISPDInAccFake->Fill(track->Pt());
          if(isPrimary) {fHistPtITSMISPDInAccP->Fill(track->Pt());} else {fHistPtITSMISPDInAccS->Fill(track->Pt());}  
        }
        if(track->HasPointOnITSLayer(0) || track->HasPointOnITSLayer(1)) {
          fHistPtITSMIoneSPDInAcc->Fill(track->Pt());
          if(isPrimary) {fHistPtITSMISPDInAccP->Fill(track->Pt());} else {fHistPtITSMISPDInAccS->Fill(track->Pt());}  
        }
        if(track->HasPointOnITSLayer(0) || track->HasPointOnITSLayer(1)) {
          fHistPtITSMIoneSPDInAcc->Fill(track->Pt());
+         if(isFake) fHistPtITSMIoneSPDInAccFake->Fill(track->Pt());
          if(nclsSDDSSD>=3) fHistPtITSMIoneSPDthreeSDDSSDInAcc->Fill(track->Pt());
 
          if(isPrimary) {fHistPtITSMIoneSPDInAccP->Fill(track->Pt());} else {fHistPtITSMIoneSPDInAccS->Fill(track->Pt());}  
          if(nclsSDDSSD>=3) fHistPtITSMIoneSPDthreeSDDSSDInAcc->Fill(track->Pt());
 
          if(isPrimary) {fHistPtITSMIoneSPDInAccP->Fill(track->Pt());} else {fHistPtITSMIoneSPDInAccS->Fill(track->Pt());}  
index 65fbbe3a6f11c0d9c9c033b5ed96e2388f5a38ea..d3db7dafda833e815faf7afd2a0508bc21c84bc3 100644 (file)
@@ -130,6 +130,13 @@ class AliAnalysisTaskITSTrackingCheck : public AliAnalysisTaskSE
   TH1F         *fHistPtITSMI6InAcc; //! output hist
   TH1F         *fHistPtITSMISPDInAcc; //! output hist
   TH1F         *fHistPtITSMIoneSPDInAcc; //! output hist
   TH1F         *fHistPtITSMI6InAcc; //! output hist
   TH1F         *fHistPtITSMISPDInAcc; //! output hist
   TH1F         *fHistPtITSMIoneSPDInAcc; //! output hist
+  TH1F         *fHistPtITSMI2InAccFake; //! output hist
+  TH1F         *fHistPtITSMI3InAccFake; //! output hist
+  TH1F         *fHistPtITSMI4InAccFake; //! output hist
+  TH1F         *fHistPtITSMI5InAccFake; //! output hist
+  TH1F         *fHistPtITSMI6InAccFake; //! output hist
+  TH1F         *fHistPtITSMISPDInAccFake; //! output hist
+  TH1F         *fHistPtITSMIoneSPDInAccFake; //! output hist
   TH1F         *fHistPtITSMIoneSPDthreeSDDSSDInAcc; //! output hist
   TH1F         *fHistPtITSTPCsel; //! output hist
   TH1F         *fHistPtITSTPCselP; //! output hist
   TH1F         *fHistPtITSMIoneSPDthreeSDDSSDInAcc; //! output hist
   TH1F         *fHistPtITSTPCsel; //! output hist
   TH1F         *fHistPtITSTPCselP; //! output hist
index 083702b9b4464fe494602e3c33d0f630c6e7df58..306f3ddca8e4cf73394417f8a809e1f243e2d0c9 100644 (file)
@@ -1139,6 +1139,12 @@ void AliAnalysisTaskSEImpParRes::UserExec(Option_t */*option*/)
   }
 
   fNentries->Fill(1);
   }
 
   fNentries->Fill(1);
+
+
+  Int_t nTrks = esd->GetNumberOfTracks();
+  Bool_t highMult=(nTrks>500 ? kTRUE : kFALSE);
+
+
   
   // diamond constraint
   Float_t diamondcovxy[3];
   
   // diamond constraint
   Float_t diamondcovxy[3];
@@ -1157,6 +1163,7 @@ void AliAnalysisTaskSEImpParRes::UserExec(Option_t */*option*/)
   AliVertexerTracks vertexer0(esd->GetMagneticField());
   vertexer0.SetITSMode();
   vertexer0.SetMinClusters(4);  
   AliVertexerTracks vertexer0(esd->GetMagneticField());
   vertexer0.SetITSMode();
   vertexer0.SetMinClusters(4);  
+  if(highMult) vertexer0.SetITSMode(0.1,0.1,0.5,5,1,3.,100.,1000.,3.,30.,1,1); 
   if(fUseDiamond) vertexer0.SetVtxStart(&diamond);
   vtxESDRec = (AliESDVertex*)vertexer0.FindPrimaryVertex(esd);
   if(vtxESDRec->GetNContributors()<1) {
   if(fUseDiamond) vertexer0.SetVtxStart(&diamond);
   vtxESDRec = (AliESDVertex*)vertexer0.FindPrimaryVertex(esd);
   if(vtxESDRec->GetNContributors()<1) {
@@ -1201,7 +1208,6 @@ void AliAnalysisTaskSEImpParRes::UserExec(Option_t */*option*/)
     vtxESDTrue = new AliESDVertex(vtxTrue,sigmaTrue);
   }
  
     vtxESDTrue = new AliESDVertex(vtxTrue,sigmaTrue);
   }
  
-  Int_t nTrks = esd->GetNumberOfTracks();
   Double_t beampiperadius=3.;
   AliESDtrack *esdtrack = 0;
   Int_t pdgCode=0; 
   Double_t beampiperadius=3.;
   AliESDtrack *esdtrack = 0;
   Int_t pdgCode=0; 
@@ -1247,10 +1253,14 @@ void AliAnalysisTaskSEImpParRes::UserExec(Option_t */*option*/)
     skipped[0] = (Int_t)esdtrack->GetID();
     vertexer.SetSkipTracks(1,skipped);      
     // create vertex with new!
     skipped[0] = (Int_t)esdtrack->GetID();
     vertexer.SetSkipTracks(1,skipped);      
     // create vertex with new!
-    vtxESDSkip = (AliESDVertex*)vertexer.FindPrimaryVertex(esd);
-    if(vtxESDSkip->GetNContributors()<1) {
-      delete vtxESDSkip; vtxESDSkip=NULL;
-      continue;
+    if(!highMult) {
+      vtxESDSkip = (AliESDVertex*)vertexer.FindPrimaryVertex(esd);
+      if(vtxESDSkip->GetNContributors()<1) {
+       delete vtxESDSkip; vtxESDSkip=NULL;
+       continue;
+      }
+    } else {
+      vtxESDSkip = new AliESDVertex(); // dummy
     }
 
     //pt= esdtrack->P();
     }
 
     //pt= esdtrack->P();
@@ -1277,7 +1287,12 @@ void AliAnalysisTaskSEImpParRes::UserExec(Option_t */*option*/)
     // wrt event vertex
     esdtrack->PropagateToDCA(vtxESDRec, esd->GetMagneticField(), beampiperadius, dzRec, covdzRec);
     // wrt event vertex without this track
     // wrt event vertex
     esdtrack->PropagateToDCA(vtxESDRec, esd->GetMagneticField(), beampiperadius, dzRec, covdzRec);
     // wrt event vertex without this track
-    esdtrack->PropagateToDCA(vtxESDSkip, esd->GetMagneticField(), beampiperadius, dzRecSkip, covdzRecSkip);
+    if(!highMult) {
+      esdtrack->PropagateToDCA(vtxESDSkip, esd->GetMagneticField(), beampiperadius, dzRecSkip, covdzRecSkip);
+    } else {
+      dzRecSkip[0]=0.;dzRecSkip[1]=0.;
+      covdzRecSkip[0]=1.;covdzRecSkip[1]=0.;covdzRecSkip[2]=1.;
+    }
     delete vtxESDSkip; vtxESDSkip=NULL; // not needed anymore
     // wrt MC vertex
     if(fReadMC) esdtrack->PropagateToDCA(vtxESDTrue, esd->GetMagneticField(), beampiperadius, dzTrue, covdzTrue);
     delete vtxESDSkip; vtxESDSkip=NULL; // not needed anymore
     // wrt MC vertex
     if(fReadMC) esdtrack->PropagateToDCA(vtxESDTrue, esd->GetMagneticField(), beampiperadius, dzTrue, covdzTrue);
index 64be43d34b21639faa85af7714f2384c7ce48e6c..04765b2665f365a98c61142d05e079d99ceca40e 100644 (file)
@@ -579,7 +579,11 @@ AliESDVertex* AliAnalysisTaskVertexESD::ReconstructPrimaryVertexTPC(Bool_t const
   // On the fly reco of TPC vertex from ESD
   AliESDEvent* evt = (AliESDEvent*) fInputEvent;
   AliVertexerTracks vertexer(evt->GetMagneticField());
   // On the fly reco of TPC vertex from ESD
   AliESDEvent* evt = (AliESDEvent*) fInputEvent;
   AliVertexerTracks vertexer(evt->GetMagneticField());
-  vertexer.SetTPCMode(); // defaults
+  if(evt->GetNumberOfTracks()<500) {
+    vertexer.SetTPCMode(); // defaults
+  } else { 
+    vertexer.SetTPCMode(0.1,1.0,5.0,10,1,3.,0.1,1.5,3.,30.,1,1);// PbPb
+  } 
   Float_t diamondcovxy[3]; evt->GetDiamondCovXY(diamondcovxy);
   Double_t pos[3]={evt->GetDiamondX(),evt->GetDiamondY(),0}; 
   Double_t cov[6]={diamondcovxy[0],diamondcovxy[1],diamondcovxy[2],0.,0.,10.*10.};
   Float_t diamondcovxy[3]; evt->GetDiamondCovXY(diamondcovxy);
   Double_t pos[3]={evt->GetDiamondX(),evt->GetDiamondY(),0}; 
   Double_t cov[6]={diamondcovxy[0],diamondcovxy[1],diamondcovxy[2],0.,0.,10.*10.};
@@ -600,8 +604,12 @@ AliESDVertex* AliAnalysisTaskVertexESD::ReconstructPrimaryVertexITSTPC(Bool_t co
 
   AliESDEvent* evt = (AliESDEvent*) fInputEvent;
   AliVertexerTracks vertexer(evt->GetMagneticField());
 
   AliESDEvent* evt = (AliESDEvent*) fInputEvent;
   AliVertexerTracks vertexer(evt->GetMagneticField());
-  vertexer.SetITSMode(); // defaults
-  vertexer.SetMinClusters(4); // default is 5
+  if(evt->GetNumberOfTracks()<500) {
+    vertexer.SetITSMode(); // defaults
+    vertexer.SetMinClusters(4); // default is 5
+  } else { 
+    vertexer.SetITSMode(0.1,0.1,0.5,5,1,3.,100.,1000.,3.,30.,1,1);// PbPb
+  } 
   //vertexer.SetITSpureSA();
   Float_t diamondcovxy[3]; evt->GetDiamondCovXY(diamondcovxy);
   Double_t pos[3]={evt->GetDiamondX(),evt->GetDiamondY(),0}; 
   //vertexer.SetITSpureSA();
   Float_t diamondcovxy[3]; evt->GetDiamondCovXY(diamondcovxy);
   Double_t pos[3]={evt->GetDiamondX(),evt->GetDiamondY(),0};