Updating track cuts and removing functionality that is now in separate cosmics tasks
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 8 Jul 2010 10:32:41 +0000 (10:32 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 8 Jul 2010 10:32:41 +0000 (10:32 +0000)
PWG4/JetTasks/AliPWG4CosmicCandidates.cxx
PWG4/JetTasks/AliPWG4HighPtQATPConly.cxx
PWG4/JetTasks/AliPWG4HighPtQATPConly.h
PWG4/JetTasks/AliPWG4HighPtSpectra.cxx
PWG4/JetTasks/AliPWG4HighPtSpectra.h
PWG4/macros/AddTaskPWG4HighPtQAMC.C
PWG4/macros/AddTaskPWG4HighPtQATPConly.C
PWG4/macros/AddTaskPWG4HighPtSpectra.C

index b17fad0..fd28441 100644 (file)
@@ -14,7 +14,7 @@
  **************************************************************************/
 
 //-----------------------------------------------------------------------
-// Analysis task looking for cosmic candidates
+// Analysis task looking for cosmic candidates embedded in a p-p event
 // Task checks if particles are back-to-back in eta and phi
 //             
 //
@@ -136,14 +136,18 @@ AliPWG4CosmicCandidates::AliPWG4CosmicCandidates(const AliPWG4CosmicCandidates &
     fRisolTheta(0),
     fHistListCosmics(0)
 {
-    // Dummy copy constructor
+  //
+  // Dummy copy constructor
+  //
 }
 
 //________________________________________________________________________
 AliPWG4CosmicCandidates& AliPWG4CosmicCandidates::operator=(const AliPWG4CosmicCandidates& /*trclass*/)
 {
-    // Dummy assignment operator
-    return *this;
+  //
+  // Dummy assignment operator
+  //
+  return *this;
 }
 
 //________________________________________________________________________
@@ -158,7 +162,8 @@ void AliPWG4CosmicCandidates::LocalInit()
 //________________________________________________________________________
 void AliPWG4CosmicCandidates::UserCreateOutputObjects()
 {
-  //Create output objects
+  //
+  // Create output objects
   // Called once
   AliDebug(2,Form(">> AliPWG4CosmicCandidates::UserCreateOutputObjects \n")); 
 
@@ -249,8 +254,9 @@ void AliPWG4CosmicCandidates::UserCreateOutputObjects()
 //________________________________________________________________________
 void AliPWG4CosmicCandidates::UserExec(Option_t *) 
 {
-//   // Main loop
-//   // Called for each event
+  // Main loop
+  // Called for each event
+  //
 
   // All events without selection
   fNEventAll->Fill(0.);
@@ -291,12 +297,11 @@ void AliPWG4CosmicCandidates::UserExec(Option_t *)
     return;
   }
 
- fNEventSel->Fill(0.);
+  fNEventSel->Fill(0.);
 
   Float_t dcaR[2] = {0.,0.};
   Float_t dcaZ[2] = {0.,0.};
 
-  // Track loop to fill a pT spectrum
   for (Int_t iTrack1 = 0; iTrack1 < nTracks; iTrack1++) {
 
     AliESDtrack* track1 = (AliESDtrack*)fInputEvent->GetTrack(iTrack1);
@@ -357,7 +362,8 @@ void AliPWG4CosmicCandidates::UserExec(Option_t *)
 //________________________________________________________________________
 void AliPWG4CosmicCandidates::Terminate(Option_t *) 
 {
+  //
   // Called once at the end of the query
-
+  //
   
 }
index 0ebda15..1aaf3be 100644 (file)
@@ -65,7 +65,6 @@ AliPWG4HighPtQATPConly::AliPWG4HighPtQATPConly(): AliAnalysisTask("AliPWG4HighPt
   fCutType(1),
   fTrackCuts(0), 
   fTrackCutsITS(0),
-  fMaxCosmicAngle(0.002),
   fNEventAll(0),
   fNEventSel(0),
   fPtAll(0),
@@ -142,19 +141,7 @@ AliPWG4HighPtQATPConly::AliPWG4HighPtQATPConly(): AliAnalysisTask("AliPWG4HighPt
   fPtITSminPtTPCvsNPointITSPhi(0),
   fPtITSminPtTPCvsRel1PtUncertaintyPhi(0),
   fPtRel1PtUncertaintyChi2PerClusTPC(0),
-  fHistListITS(0),
-  fPtSignedCosmicCandidates(0),
-  fDeltaPtCosmicCandidates(0),
-  fDeltaPhiSumEta(0),
-  fDCAZCosmicCandidates(0),
-  fDCARCosmicCandidates(0),
-  fTheta(0),
-  fThetaZoom(0),
-  fThetaPt1Pt2(0),
-  fDeltaPhiSumEtaPt1(0),
-  fDeltaPhiSumEtaPt2(0),
-  fThetaDCAZ1DCAZ2(0),
-  fHistListCosmics(0)
+  fHistListITS(0)
   
 {
 
@@ -168,7 +155,6 @@ AliPWG4HighPtQATPConly::AliPWG4HighPtQATPConly(const char *name):
   fCutType(1),  
   fTrackCuts(),
   fTrackCutsITS(),
-  fMaxCosmicAngle(0.002),
   fNEventAll(0),
   fNEventSel(0),
   fPtAll(0),
@@ -245,19 +231,7 @@ AliPWG4HighPtQATPConly::AliPWG4HighPtQATPConly(const char *name):
   fPtITSminPtTPCvsNPointITSPhi(0),
   fPtITSminPtTPCvsRel1PtUncertaintyPhi(0),
   fPtRel1PtUncertaintyChi2PerClusTPC(0),
-  fHistListITS(0),
-  fPtSignedCosmicCandidates(0),
-  fDeltaPtCosmicCandidates(0),
-  fDeltaPhiSumEta(0),
-  fDCAZCosmicCandidates(0),
-  fDCARCosmicCandidates(0),
-  fTheta(0),
-  fThetaZoom(0),
-  fThetaPt1Pt2(0),
-  fDeltaPhiSumEtaPt1(0),
-  fDeltaPhiSumEtaPt2(0),
-  fThetaDCAZ1DCAZ2(0),
-  fHistListCosmics(0)
+  fHistListITS(0)
 {
   //
   // Constructor. Initialization of Inputs and Outputs
@@ -283,8 +257,8 @@ void AliPWG4HighPtQATPConly::LocalInit()
   //
   // Only called once at beginning
   //
-  PostData(4,fTrackCuts);
-  PostData(5,fTrackCutsITS);
+  PostData(3,fTrackCuts);
+  PostData(4,fTrackCutsITS);
 }
 
 //________________________________________________________________________
@@ -316,21 +290,6 @@ void AliPWG4HighPtQATPConly::ConnectInputData(Option_t *)
   else
     fMC = eventHandler->MCEvent();
 
-  //attach the ESD friend
-   //  tree->SetBranchStatus("*", kTRUE);
-//   tree->SetBranchStatus("Tracks*", kTRUE);
-//   tree->SetBranchStatus("ESDfriend*", kTRUE);
-  //  fESD->ReadFromTree(tree);
-
-  //old
-//   fESDfriend = (AliESDfriend*)fESD->FindListObject("AliESDfriend");
-//   if (!fESDfriend)
-//     {
-//       // works for both, we just want to avoid setting the branch adress twice
-//       // in case of the new ESD
-//       tree->SetBranchAddress("ESDfriend.",&fESDfriend);
-//     }
-  
   fESDfriend = esdH->GetESDfriend();
 
 }
@@ -349,8 +308,6 @@ void AliPWG4HighPtQATPConly::CreateOutputObjects() {
   fHistListTPC = new TList();
   OpenFile(2);
   fHistListITS = new TList();
-  OpenFile(3);
-  fHistListCosmics = new TList();
 
   Int_t fgkNPhiBins=18;
   Float_t kMinPhi = 0.;
@@ -839,36 +796,6 @@ void AliPWG4HighPtQATPConly::CreateOutputObjects() {
   fPtSelTPCITS = new TH1F("fPtSelTPCITS","PtSel",fgkNPtBins,binsPt);
   fHistListTPC->Add(fPtSelTPCITS);
 
-  //****************************************************************************************************************//
-  //                                              Cosmic Candidates                                                 //
-  //****************************************************************************************************************//
-  Int_t fgkNThetaBins=fgkNPhiBins*8;
-  Float_t kMinTheta = -0.5*TMath::Pi();
-  Float_t kMaxTheta = 3./2.*TMath::Pi();
-
-  fPtSignedCosmicCandidates = new TH1F("fPtSignedCosmicCandidates","fPtSignedCosmicCandidates",2*(int)(fgkPtMax-fgkPtMin), -1.*fgkPtMax, fgkPtMax);
-  fHistListCosmics->Add(fPtSignedCosmicCandidates);  
-  fDeltaPtCosmicCandidates = new TH1F("fDeltaPtCosmicCandidates","fDeltaPtCosmicCandidates",fgkNPtBins, -50., 50.);
-  fHistListCosmics->Add(fDeltaPtCosmicCandidates);  
-  fDeltaPhiSumEta = new TH2F("fDeltaPhiSumEta","fDeltaPhiSumEta",fgkNThetaBins,kMinTheta,kMaxTheta,80, -2.,2.);
-  fHistListCosmics->Add(fDeltaPhiSumEta);  
-  fDCAZCosmicCandidates = new TH2F("fDCAZCosmicCandidates","fDCAZCosmicCandidates",fgkNDCAZBins,binsDCAZ,fgkNDCAZBins,binsDCAZ);
-  fHistListCosmics->Add(fDCAZCosmicCandidates);
-  fDCARCosmicCandidates = new TH2F("fDCARCosmicCandidates","fDCARCosmicCandidates",fgkNDCARBins,binsDCAR,fgkNDCARBins,binsDCAR);
-  fHistListCosmics->Add(fDCARCosmicCandidates);
-  fTheta = new TH1F("fTheta","fTheta",fgkNThetaBins,kMinTheta,kMaxTheta);
-  fHistListCosmics->Add(fTheta);
-  fThetaZoom = new TH1F("fThetaZoom","fThetaZoom",100,TMath::Pi()-1.,TMath::Pi()+1.);
-  fHistListCosmics->Add(fThetaZoom);
-  fThetaPt1Pt2 = new TH3F("fThetaPt1Pt2","fThetaPt1Pt2",fgkNThetaBins,kMinTheta,kMaxTheta,(int)(fgkPtMax-fgkPtMin),fgkPtMin,fgkPtMax,(int)(fgkPtMax-fgkPtMin),fgkPtMin,fgkPtMax);
-  fHistListCosmics->Add(fThetaPt1Pt2);
-  fDeltaPhiSumEtaPt1 = new TH3F("fDeltaPhiSumEtaPt1","fDeltaPhiSumEtaPt1",fgkNThetaBins,kMinTheta,kMaxTheta,80, -2.,2.,(int)(fgkPtMax-fgkPtMin),fgkPtMin,fgkPtMax);
-  fHistListCosmics->Add(fDeltaPhiSumEtaPt1);
-  fDeltaPhiSumEtaPt2 = new TH3F("fDeltaPhiSumEtaPt2","fDeltaPhiSumEtaPt2",fgkNThetaBins,kMinTheta,kMaxTheta,80, -2.,2.,(int)(fgkPtMax-fgkPtMin),fgkPtMin,fgkPtMax);
-  fHistListCosmics->Add(fDeltaPhiSumEtaPt2);
-  fThetaDCAZ1DCAZ2 = new TH3F("fThetaDCAZ1DCAZ2","fThetaDCAZ1DCAZ2",fgkNThetaBins,kMinTheta,kMaxTheta,fgkNDCAZBins,-2.,2.,fgkNDCAZBins,-2.,2.);
-  fHistListCosmics->Add(fThetaDCAZ1DCAZ2);
-
   TH1::AddDirectory(oldStatus);   
 
   if(binsPhi) delete [] binsPhi;
@@ -901,21 +828,9 @@ void AliPWG4HighPtQATPConly::Exec(Option_t *) {
      PostData(0, fHistList);
      PostData(1, fHistListTPC);
      PostData(2, fHistListITS);
-     PostData(3, fHistListCosmics);
     return;
   }
 
-//   fESD->SetESDfriend(fESDfriend); //Attach the friend to the ESD
-//   if (!fESDfriend) {
-//     AliDebug(2,Form("ERROR: fESDfriend not available"));
-//     // Post output data
-//      PostData(0, fHistList);
-//      PostData(1, fHistListTPC);
-//      PostData(2, fHistListITS);
-//      PostData(3, fHistListCosmics);
-//     return;
-//   }
-
   Bool_t isSelected = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
   if(!isSelected) { //Select collison candidates
     AliDebug(2,Form(" Trigger Selection: event REJECTED ... "));
@@ -923,13 +838,9 @@ void AliPWG4HighPtQATPConly::Exec(Option_t *) {
      PostData(0, fHistList);
      PostData(1, fHistListTPC);
      PostData(2, fHistListITS);
-     PostData(3, fHistListCosmics);
     return;
   }
 
-  //  AliMCEventHandler *eventHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
-//   //  AliMCEventHandler* eventHandler = (AliMCEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler());
-  
   AliStack* stack = 0x0;
   AliMCEvent* mcEvent = 0x0;
   
@@ -940,7 +851,6 @@ void AliPWG4HighPtQATPConly::Exec(Option_t *) {
       PostData(0, fHistList);
       PostData(1, fHistListTPC);
       PostData(2, fHistListITS);
-      PostData(3, fHistListCosmics);
       return;
     }
     
@@ -963,13 +873,12 @@ void AliPWG4HighPtQATPConly::Exec(Option_t *) {
       PostData(0, fHistList);
       PostData(1, fHistListTPC);
       PostData(2, fHistListITS);
-      PostData(3, fHistListCosmics);
       return;
     }
   }
 
   AliDebug(2,Form("Vertex title %s, status %d, nCont %d\n",vtx->GetTitle(), vtx->GetStatus(), vtx->GetNContributors()));
-  double primVtx[3];
+  double primVtx[3] = {0.,0.,0.};
   vtx->GetXYZ(primVtx);
   //  printf("primVtx: %g  %g  %g \n",primVtx[0],primVtx[1],primVtx[2]);
   if(TMath::Sqrt(primVtx[0]*primVtx[0] + primVtx[1]*primVtx[1])>1. || TMath::Abs(primVtx[2]>10.)){
@@ -977,7 +886,6 @@ void AliPWG4HighPtQATPConly::Exec(Option_t *) {
     PostData(0, fHistList);
     PostData(1, fHistListTPC);
     PostData(2, fHistListITS);
-    PostData(3, fHistListCosmics);
     return;
   }
   if(!fESD->GetNumberOfTracks() || fESD->GetNumberOfTracks()<2){ 
@@ -985,7 +893,6 @@ void AliPWG4HighPtQATPConly::Exec(Option_t *) {
     PostData(0, fHistList);
     PostData(1, fHistListTPC);
     PostData(2, fHistListITS);
-    PostData(3, fHistListCosmics);
     return;
   }
   Int_t nTracks = fESD->GetNumberOfTracks();
@@ -996,7 +903,6 @@ void AliPWG4HighPtQATPConly::Exec(Option_t *) {
     PostData(0, fHistList);
     PostData(1, fHistListTPC);
     PostData(2, fHistListITS);
-    PostData(3, fHistListCosmics);
     return;
   }
 
@@ -1009,26 +915,26 @@ void AliPWG4HighPtQATPConly::Exec(Option_t *) {
     AliExternalTrackParam *trackTPC = (AliExternalTrackParam *)track->GetTPCInnerParam();
     if(!track || !trackTPC) continue;
 
-    const AliESDfriendTrack* constfriendtrack = track->GetFriendTrack();
-    //if (!constfriendtrack) { continue;}
-    //    AliESDfriendTrack friendtrack(*constfriendtrack);
+    const AliESDfriendTrack* constfriendtrack = 0x0;
+    if(fESDfriend && fESDfriend->TestSkipBit()==kFALSE) constfriendtrack = track->GetFriendTrack();
  
     Float_t pt = track->Pt();
     Float_t ptTPC = trackTPC->Pt();
     Float_t phi = track->Phi();
-    Float_t dca2D, dcaZ;
+    Float_t dca2D = 0.;
+    Float_t dcaZ = 0.;
+
     track->GetImpactParameters(dca2D,dcaZ);
-    // Float_t dca2DTPC, dcaZTPC;
-    //track->GetImpactParametersTPC(dca2DTPC,dcaZTPC);
+
     UChar_t itsMap = track->GetITSClusterMap();
     Int_t nPointITS = 0;
     for (Int_t i=0; i < 6; i++) {
       if (itsMap & (1 << i))
        nPointITS ++;
     }
-    double mom[3];
+    double mom[3] = {0.,0.,0.};
     track->GetPxPyPz(mom);
-    double momTPC[3];
+    double momTPC[3] = {0.,0.,0.};
     trackTPC->GetPxPyPz(momTPC);
     Float_t nSigmaToVertex = fTrackCuts->GetSigmaToVertex(track);// Calculates the number of sigma to the vertex for a track.
     Float_t chi2C = track->GetConstrainedChi2();
@@ -1042,13 +948,7 @@ void AliPWG4HighPtQATPConly::Exec(Option_t *) {
     fPtAll->Fill(pt);
     fPtAllTPC->Fill(ptTPC);
 
-    Bool_t cosmic = kFALSE;    
-    if(GetCutType()==2) { if(pt>6.) { cosmic = IsCosmic(track,iTrack,4.); } }
-
     if (fTrackCuts->AcceptTrack(track)) {
-      if(GetCutType()==1) {   if(pt>6.) { cosmic = IsCosmic(track,iTrack,4.); } }
-      //    if(cosmic) continue;
-
       fPtSel->Fill(pt);
       fPtSelTPC->Fill(ptTPC);
       if(ptTPC==0. || pt==0.) continue;
@@ -1168,76 +1068,15 @@ void AliPWG4HighPtQATPConly::Exec(Option_t *) {
   PostData(0, fHistList);
   PostData(1, fHistListTPC);
   PostData(2, fHistListITS);
-  PostData(3, fHistListCosmics);
-
-}
-//________________________________________________________________________
-Bool_t AliPWG4HighPtQATPConly::IsCosmic(const AliESDtrack *track1 , Int_t trackNumber, Double_t ptMin)
-{
-  Bool_t candidate1 = kFALSE;
-  Bool_t candidate2 = kFALSE;
-  if(!track1) return candidate1;
-
-  Int_t nTracks = fESD->GetNumberOfTracks();
-
-  Float_t dcaR[2] = {0.,0.};
-  Float_t dcaZ[2] = {0.,0.};
-  for (Int_t iTrack2 = trackNumber+1; iTrack2 < nTracks; iTrack2++) {
-    candidate2 = kFALSE;
-    AliESDtrack *track2 = fESD->GetTrack(iTrack2);
-    if(!track2) continue;
-    if(GetCutType()==1 && !(fTrackCuts->AcceptTrack(track2))) { continue; }
-    if(track2->Pt()<ptMin) continue;
-    
-    //Check if same charge. If not same charge, pair is cosmic candidate
-    //Removed condition for time being. Not so clear how well we can measure curvature at high momenta
-    // if( (track1->GetSign()*track2->GetSign()) > 0. ) continue;
-    
-    //Check if back-to-back
-    Double_t mom1[3],mom2[3];
-    track1->GetPxPyPz(mom1);
-    track2->GetPxPyPz(mom2);
-    TVector3 momv1(mom1[0],mom1[1],mom1[2]);
-    TVector3 momv2(mom2[0],mom2[1],mom2[2]);
-    Double_t theta = momv1.Phi()-momv2.Phi();
-    if(theta<-0.5*TMath::Pi()) theta+=2.*TMath::Pi();
-
-    //if(TMath::Abs(TMath::Pi()-theta)<fMaxCosmicAngle) { candidate1 = kTRUE; candidate2 = kTRUE;}
-    
-    //    Double_t cosMaxCosmicAngle[2] = {TMath::Cos(TMath::Pi()-fMaxCosmicAngle),TMath::Cos(TMath::Pi()+fMaxCosmicAngle)};
-    //    if(cosTheta >= cosMaxCosmicAngle[0] && cosTheta <= cosMaxCosmicAngle[1]) { 
-    candidate1 = kTRUE; candidate2 = kTRUE;//}
-    if(candidate2) {
-      fDeltaPtCosmicCandidates->Fill(track1->Pt()-track2->Pt());
-      Float_t deltaPhi = track1->Phi()-track2->Phi();
-      if(deltaPhi<-0.5*TMath::Pi()) deltaPhi+=2.*TMath::Pi();
-      fDeltaPhiSumEta->Fill(deltaPhi,track1->Eta()+track2->Eta());
-
-      track1->GetImpactParameters(dcaR[0],dcaZ[0]);
-      track2->GetImpactParameters(dcaR[1],dcaZ[1]);
-      fDCAZCosmicCandidates->Fill(dcaZ[0],dcaZ[1]);
-      fDCARCosmicCandidates->Fill(dcaR[0],dcaR[1]);
-      fTheta->Fill(theta);
-      fThetaZoom->Fill(theta);
-      fThetaPt1Pt2->Fill(theta,track1->Pt(),track2->Pt());
-      fDeltaPhiSumEtaPt1->Fill(deltaPhi,track1->Eta()+track2->Eta(),track1->Pt());
-      fDeltaPhiSumEtaPt2->Fill(deltaPhi,track1->Eta()+track2->Eta(),track2->Pt());
-      fThetaDCAZ1DCAZ2->Fill(theta,dcaZ[0],dcaZ[1]);
-    }
 
-  }
-
-  if(candidate1) {
-    fPtSignedCosmicCandidates->Fill(track1->GetSign()*track1->Pt());
-  }
-
-   return candidate1;
 }
 
 //________________________________________________________________________
 void AliPWG4HighPtQATPConly::Terminate(Option_t *)
 {
+  //
+  // Terminate
+  //
 
 }
 
index 8b70748..e9c8012 100644 (file)
@@ -46,13 +46,11 @@ class AliPWG4HighPtQATPConly: public AliAnalysisTask {
   virtual void   ConnectInputData(Option_t *);
   virtual void   CreateOutputObjects();
   virtual void   Exec(Option_t *option);
-  Bool_t IsCosmic(const AliESDtrack* track1 = 0x0, Int_t trackNumber = 0, Double_t ptMin = 6.);
   virtual void   Terminate(Option_t *);
 
   void SetCutType(Int_t ctype) {fCutType = ctype;}
   void SetCuts(AliESDtrackCuts* trackCuts) {fTrackCuts = trackCuts;}
   void SetCutsITS(AliESDtrackCuts* trackCutsITS) {fTrackCutsITS = trackCutsITS;}
-  void SetMaxCosmicAngle(Double_t angle) {fMaxCosmicAngle = angle;}
 
   Int_t GetCutType() {return fCutType;}
 
@@ -71,8 +69,6 @@ class AliPWG4HighPtQATPConly: public AliAnalysisTask {
   AliESDtrackCuts *fTrackCuts;    // TrackCuts for global vs TPConly comparison
   AliESDtrackCuts *fTrackCutsITS; // TrackCuts including ITSrefit
   
-  Double_t fMaxCosmicAngle;       // Max deviation from pi (angle between two tracks) in case of cosmic candidate
-
   TH1F *fNEventAll;                             //! Event counter
   TH1F *fNEventSel;                             //! Event counter: Selected events for analysis
   TH1F *fPtAll;                                 //! Pt spectrum all charged particles
@@ -164,20 +160,6 @@ class AliPWG4HighPtQATPConly: public AliAnalysisTask {
 
   TList *fHistListITS; //! List of Histograms
 
-  TH1F *fPtSignedCosmicCandidates;              //! Cosmic Candidates
-  TH1F *fDeltaPtCosmicCandidates;               //! Cosmic Candidates Delta Pt
-  TH2F *fDeltaPhiSumEta;                        //! Cosmic Candidates Delta Phi vs Sum Eta
-  TH2F *fDCAZCosmicCandidates;                  //! Cosmic Candidates DCAZ track1 vs track2
-  TH2F *fDCARCosmicCandidates;                  //! Cosmic Candidates DCAR track1 vs track2
-  TH1F *fTheta;                                 //! Angle \theta between cosmic candidates in 3D space
-  TH1F *fThetaZoom;                             //! Angle between cosmic candidates in 3D space zoomed into back-to-back region
-  TH3F *fThetaPt1Pt2;                           //! Angle theta vs Pt1 vs Pt2
-  TH3F *fDeltaPhiSumEtaPt1;                     //! Delta Phi vs Sum Eta vs Pt1
-  TH3F *fDeltaPhiSumEtaPt2;                     //! Delta Phi vs Sum Eta vs Pt2
-  TH3F *fThetaDCAZ1DCAZ2;                       //! Angle theta vs DCAZ1 vs DCAZ2
-
-  TList *fHistListCosmics;                      //! List of Histograms for cosmic candidates
-
   ClassDef(AliPWG4HighPtQATPConly,1) 
   
 };
index 818ee5d..8f6724b 100644 (file)
@@ -335,19 +335,9 @@ void AliPWG4HighPtSpectra::Exec(Option_t *)
        containerInputMC[3] = 0.0;
        containerInputMC[4] = 0.0;
 
-       int counter;
-       Float_t trackLengthTPC = 0.;
        if(stack->IsPhysicalPrimary(iPart)) {
-         if(mcPart->Charge()>0. && fCFManagerPos->CheckParticleCuts(3,mcPart)) {
-           fCFManagerPos->GetParticleContainer()->Fill(containerInputMC,kStepMCAcceptance) ;
-           trackLengthTPC = mcPart->GetTPCTrackLength(fESD->GetMagneticField(),0.1,counter,3.0);
-           if(trackLengthTPC > (float)fTrackCuts->GetMinNClusterTPC()) fCFManagerPos->GetParticleContainer()->Fill(containerInputMC,kStepMCtrackable) ;
-         }
-         if(mcPart->Charge()<0. && fCFManagerNeg->CheckParticleCuts(3,mcPart)) {
-           fCFManagerNeg->GetParticleContainer()->Fill(containerInputMC,kStepMCAcceptance) ;
-           trackLengthTPC = mcPart->GetTPCTrackLength(fESD->GetMagneticField(),0.1,counter,3.0);
-           if(trackLengthTPC > (float)fTrackCuts->GetMinNClusterTPC()) fCFManagerNeg->GetParticleContainer()->Fill(containerInputMC,kStepMCtrackable) ;
-         }
+         if(mcPart->Charge()>0. && fCFManagerPos->CheckParticleCuts(kStepMCAcceptance,mcPart)) fCFManagerPos->GetParticleContainer()->Fill(containerInputMC,kStepMCAcceptance);
+         if(mcPart->Charge()<0. && fCFManagerNeg->CheckParticleCuts(kStepMCAcceptance,mcPart)) fCFManagerNeg->GetParticleContainer()->Fill(containerInputMC,kStepMCAcceptance);
        }
       }
   }
@@ -365,6 +355,7 @@ void AliPWG4HighPtSpectra::Terminate(Option_t*)
   // The Terminate() function is the last function to be called during
   // a query. It always runs on the client, it can be used to present
   // the results graphically or save the results to file.
+
 }
 
 //___________________________________________________________________________
index 0829a9e..e1c0a90 100644 (file)
@@ -38,9 +38,8 @@ class AliPWG4HighPtSpectra : public AliAnalysisTask {
     kStepReconstructed        = 0,
     kStepReconstructedTPCOnly = 1,
     kStepSecondaries          = 2,
-    kStepMCtrackable          = 3,
-    kStepReconstructedMC      = 4,
-    kStepMCAcceptance         = 5
+    kStepReconstructedMC      = 3,
+    kStepMCAcceptance         = 4
   };
 
   AliPWG4HighPtSpectra();
index 779ba62..40bf001 100644 (file)
@@ -29,30 +29,17 @@ AliPWG4HighPtQAMC* AddTaskPWG4HighPtQAMC()
   //Use AliESDtrackCuts
   AliESDtrackCuts *trackCuts = new AliESDtrackCuts("AliESDtrackCuts","Standard Cuts");
   //Standard Cuts
-  trackCuts->SetAcceptKinkDaughters(kFALSE);//
-  trackCuts->SetRequireTPCRefit(kTRUE);//
-  trackCuts->SetEtaRange(-0.9,0.9);//-0.5,0.5);//
-  trackCuts->SetMaxCovDiagonalElements(2,2,0.5,0.5,2);//
-  trackCuts->SetPtRange(0.15, 1e10);//
-  trackCuts->SetMinNClustersTPC(70);//
-  trackCuts->SetMaxChi2PerClusterTPC(3.5);//
-  //trackCuts->SetRequireITSRefit(kTRUE);
-  trackCuts->SetMaxDCAToVertexXY(2.4);
-  trackCuts->SetMaxDCAToVertexZ(3.2);
-  trackCuts->SetDCAToVertex2D(kTRUE);
+  trackCuts=trackCuts->GetStandardITSTPCTrackCuts2009(kTRUE);//Primary Track Selection
+  trackCuts->SetEtaRange(-0.9,0.9);
+  trackCuts->SetPtRange(0.15, 1e10);
+  trackCuts->SetRequireITSRefit(kFALSE);
   
   AliESDtrackCuts *trackCutsITS = new AliESDtrackCuts("AliESDtrackCuts","Standard Cuts with ITSrefit");
-  trackCutsITS->SetAcceptKinkDaughters(kFALSE);//
-  trackCutsITS->SetRequireTPCRefit(kTRUE);//
-  trackCutsITS->SetEtaRange(-0.9,0.9);//-0.5,0.5);//
-  trackCutsITS->SetMaxCovDiagonalElements(2,2,0.5,0.5,2);//
-  trackCutsITS->SetPtRange(0.15, 1e10);//
-  trackCutsITS->SetMinNClustersTPC(70);//
-  trackCutsITS->SetMaxChi2PerClusterTPC(3.5);//
-  trackCutsITS->SetRequireITSRefit(kTRUE);
-  trackCutsITS->SetMaxDCAToVertexXY(2.4);
-  trackCutsITS->SetMaxDCAToVertexZ(3.2);
-  trackCutsITS->SetDCAToVertex2D(kTRUE); 
+  //Standard Cuts
+  trackCuts=trackCuts->GetStandardITSTPCTrackCuts2009(kTRUE);//Primary Track Selection
+  trackCuts->SetEtaRange(-0.9,0.9);
+  trackCuts->SetPtRange(0.15, 1e10);
+  trackCuts->SetRequireITSRefit(kTRUE);
 
   //Create the task
   AliPWG4HighPtQAMC *taskPWG4QAMC = new AliPWG4HighPtQAMC("AliPWG4HighPtQAMC");
index 75540c2..d334dfc 100644 (file)
@@ -73,7 +73,6 @@ AliPWG4HighPtQATPConly* AddTaskPWG4HighPtQATPConly(int cuts=1)//1: Standard Cuts
   AliPWG4HighPtQATPConly *taskPWG4QA = new AliPWG4HighPtQATPConly(Form("AliPWG4HighPtQATPConly%d",cuts));
   taskPWG4QA->SetCuts(trackCuts);
   taskPWG4QA->SetCutsITS(trackCutsITS);
-  taskPWG4QA->SetMaxCosmicAngle(1.);//0.008);
   taskPWG4QA->SetCutType(cuts);
  
   // E. Create ONLY the output containers for the data produced by the task.
@@ -88,14 +87,14 @@ AliPWG4HighPtQATPConly* AddTaskPWG4HighPtQATPConly(int cuts=1)//1: Standard Cuts
   AliAnalysisDataContainer *cout_hist0;
   AliAnalysisDataContainer *cout_hist1;
   AliAnalysisDataContainer *cout_hist2;
-  AliAnalysisDataContainer *cout_hist3;
+
   AliAnalysisDataContainer *cout_cuts0;
   AliAnalysisDataContainer *cout_cuts1;
 
   cout_hist0 = mgr->CreateContainer(Form("qa_histsCuts%d",cuts), TList::Class(), AliAnalysisManager::kOutputContainer,outputfile);
   cout_hist1 = mgr->CreateContainer(Form("qa_histsTPCCuts%d",cuts), TList::Class(), AliAnalysisManager::kOutputContainer,outputfile);
   cout_hist2 = mgr->CreateContainer(Form("qa_histsITSCuts%d",cuts), TList::Class(), AliAnalysisManager::kOutputContainer,outputfile);  
-  cout_hist3 = mgr->CreateContainer(Form("qa_histsCosmicsCuts%d",cuts), TList::Class(), AliAnalysisManager::kOutputContainer,outputfile);  
+
   cout_cuts0 = mgr->CreateContainer(Form("qa_trackCuts%d",cuts), AliESDtrackCuts::Class(), AliAnalysisManager::kParamContainer,outputfile);
   cout_cuts1 = mgr->CreateContainer(Form("qa_trackCutsITS%d",cuts), AliESDtrackCuts::Class(), AliAnalysisManager::kParamContainer,outputfile);
 
@@ -109,9 +108,8 @@ AliPWG4HighPtQATPConly* AddTaskPWG4HighPtQATPConly(int cuts=1)//1: Standard Cuts
   mgr->ConnectOutput(taskPWG4QA,0,cout_hist0);
   mgr->ConnectOutput(taskPWG4QA,1,cout_hist1);
   mgr->ConnectOutput(taskPWG4QA,2,cout_hist2);
-  mgr->ConnectOutput(taskPWG4QA,3,cout_hist3);
-  mgr->ConnectOutput(taskPWG4QA,4,cout_cuts0);
-  mgr->ConnectOutput(taskPWG4QA,5,cout_cuts1);
+  mgr->ConnectOutput(taskPWG4QA,3,cout_cuts0);
+  mgr->ConnectOutput(taskPWG4QA,4,cout_cuts1);
 
   // Return task pointer at the end
   return taskPWG4QA;
index 0516ca8..707d098 100644 (file)
@@ -55,13 +55,12 @@ AliPWG4HighPtSpectra* AddTaskPWG4HighPtSpectra()
   UInt_t ichi2TPC = 4;
 
   //Setting up the container grid... 
-  UInt_t nstep = 6; //Steps/Modes for containers
+  UInt_t nstep = 5; //Steps/Modes for containers
   Int_t kStepReconstructed = 0;
   Int_t kStepReconstructedTPCOnly = 1;
   Int_t kStepSecondaries = 2;
-  Int_t kStepMCtrackable = 3;
-  Int_t kStepReconstructedMC = 4;
-  Int_t kStepMCAcceptance = 5;
+  Int_t kStepReconstructedMC = 3;
+  Int_t kStepMCAcceptance = 4;
   
   const Int_t nvar   = 5; //number of variables on the grid: pt:phi:eta:DCAR:Chi2/NClusTPC
   const Int_t nbin11 = (int)(ptmax1-ptmin1);
@@ -142,9 +141,9 @@ AliPWG4HighPtSpectra* AddTaskPWG4HighPtSpectra()
   mcAccCuts->SetMinNHitTPC(mintrackrefsTPC);
 
   TObjArray* recList = new TObjArray(0);
-  TObjArray* recMCList = new TObjArray(0);
   TObjArray* recTPConlyList = new TObjArray(0);
   TObjArray* secList = new TObjArray(0) ;
+  TObjArray* recMCList = new TObjArray(0);
 
   printf("CREATE MC KINE CUTS\n");
   TObjArray* mcList = new TObjArray(0) ;
@@ -155,19 +154,21 @@ AliPWG4HighPtSpectra* AddTaskPWG4HighPtSpectra()
   printf("CREATE INTERFACE AND CUTS\n");
   AliCFManager* manPos = new AliCFManager("manPos","Manager for Positive tracks") ;
   manPos->SetParticleContainer(containerPos);
-  manPos->SetParticleCutsList(0,recList);
-  manPos->SetParticleCutsList(1,recTPConlyList);
-  manPos->SetParticleCutsList(2,secList);
-  manPos->SetParticleCutsList(3,mcList);
-  manPos->SetParticleCutsList(4,recMCList);
+  manPos->SetParticleCutsList(kStepReconstructed,recList);
+  manPos->SetParticleCutsList(kStepReconstructedTPCOnly,recTPConlyList);
+  manPos->SetParticleCutsList(kStepSecondaries,secList);
+  manPos->SetParticleCutsList(kStepReconstructedMC,recMCList);
+  manPos->SetParticleCutsList(kStepMCAcceptance,mcList);
+
 
   AliCFManager* manNeg = new AliCFManager("manNeg","Manager for Negative tracks") ;
   manNeg->SetParticleContainer(containerNeg);
-  manNeg->SetParticleCutsList(0,recList);
-  manNeg->SetParticleCutsList(1,recTPConlyList);
-  manNeg->SetParticleCutsList(2,secList);
-  manNeg->SetParticleCutsList(3,mcList);
-  manNeg->SetParticleCutsList(4,recMCList);
+  manNeg->SetParticleCutsList(kStepReconstructed,recList);
+  manNeg->SetParticleCutsList(kStepReconstructedTPCOnly,recTPConlyList);
+  manNeg->SetParticleCutsList(kStepSecondaries,secList);
+  manNeg->SetParticleCutsList(kStepReconstructedMC,recMCList);
+  manNeg->SetParticleCutsList(kStepMCAcceptance,mcList);
+
 
 
   printf("Create task AliPWG4HighPtSpectra\n");