New cuts for cosmics, updates to spectra
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 3 Jun 2010 09:47:39 +0000 (09:47 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 3 Jun 2010 09:47:39 +0000 (09:47 +0000)
PWG4/JetTasks/AliPWG4HighPtQATPConly.cxx
PWG4/JetTasks/AliPWG4HighPtQATPConly.h
PWG4/JetTasks/AliPWG4HighPtSpectra.cxx
PWG4/JetTasks/AliPWG4HighPtSpectra.h
PWG4/macros/AddTaskPWG4HighPtSpectra.C

index 7bdcb98..870f46f 100644 (file)
@@ -156,6 +156,10 @@ AliPWG4HighPtQATPConly::AliPWG4HighPtQATPConly(): AliAnalysisTask("AliPWG4HighPt
   fDCARCosmicCandidates(0),
   fTheta(0),
   fThetaZoom(0),
+  fThetaPt1Pt2(0),
+  fDeltaPhiSumEtaPt1(0),
+  fDeltaPhiSumEtaPt2(0),
+  fThetaDCAZ1DCAZ2(0),
   fHistListCosmics(0)
   
 {
@@ -261,6 +265,10 @@ AliPWG4HighPtQATPConly::AliPWG4HighPtQATPConly(const char *name):
   fDCARCosmicCandidates(0),
   fTheta(0),
   fThetaZoom(0),
+  fThetaPt1Pt2(0),
+  fDeltaPhiSumEtaPt1(0),
+  fDeltaPhiSumEtaPt2(0),
+  fThetaDCAZ1DCAZ2(0),
   fHistListCosmics(0)
 {
   //
@@ -284,7 +292,9 @@ AliPWG4HighPtQATPConly::AliPWG4HighPtQATPConly(const char *name):
 //________________________________________________________________________
 void AliPWG4HighPtQATPConly::LocalInit()
 {
-  // Post Data (!!!)
+  //
+  // Only called once at beginning
+  //
   PostData(4,fTrackCuts);
   PostData(5,fTrackCutsITS);
 }
@@ -381,8 +391,6 @@ void AliPWG4HighPtQATPConly::CreateOutputObjects() {
     if(i<=nbin13 && i>nbin12) binsPt[i]=(Double_t)ptmin3 + (ptmax3-ptmin3)/(nbin13-nbin12)*((Double_t)i-(Double_t)nbin12) ;  
   }
 
-
-
   Float_t fgkChi2PerClusMin = 0.;
   Float_t fgkChi2PerClusMax = 4.;
   Int_t fgkNChi2PerClusBins = (int)(fgkChi2PerClusMax*10.);
@@ -892,16 +900,24 @@ void AliPWG4HighPtQATPConly::CreateOutputObjects() {
   fHistListCosmics->Add(fPtSignedCosmicCandidates);  
   fDeltaPtCosmicCandidates = new TH1F("fDeltaPtCosmicCandidates","fDeltaPtCosmicCandidates",fgkNPtBins, -50., 50.);
   fHistListCosmics->Add(fDeltaPtCosmicCandidates);  
-  fDeltaPhiSumEta = new TH2F("fDeltaPhiSumEta","fDeltaPhiSumEta",fgkNPhiBins*4,0.,kMaxPhi,40, -2.,2.);
+  fDeltaPhiSumEta = new TH2F("fDeltaPhiSumEta","fDeltaPhiSumEta",fgkNPhiBins*4,0.,kMaxPhi,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",fgkNPhiBins*8,-1.*kMaxPhi,kMaxPhi);
+  fTheta = new TH1F("fTheta","fTheta",fgkNPhiBins*8,0.,kMaxPhi);
   fHistListCosmics->Add(fTheta);
   fThetaZoom = new TH1F("fThetaZoom","fThetaZoom",100,TMath::Pi()-1.,TMath::Pi()+1.);
   fHistListCosmics->Add(fThetaZoom);
+  fThetaPt1Pt2 = new TH3F("fThetaPt1Pt2","fThetaPt1Pt2",fgkNPhiBins*8,0.,kMaxPhi,(int)(fgkPtMax-fgkPtMin),fgkPtMin,fgkPtMax,(int)(fgkPtMax-fgkPtMin),fgkPtMin,fgkPtMax);
+  fHistListCosmics->Add(fThetaPt1Pt2);
+  fDeltaPhiSumEtaPt1 = new TH3F("fDeltaPhiSumEtaPt1","fDeltaPhiSumEtaPt1",fgkNPhiBins*4,0.,kMaxPhi,80, -2.,2.,(int)(fgkPtMax-fgkPtMin),fgkPtMin,fgkPtMax);
+  fHistListCosmics->Add(fDeltaPhiSumEtaPt1);
+  fDeltaPhiSumEtaPt2 = new TH3F("fDeltaPhiSumEtaPt2","fDeltaPhiSumEtaPt2",fgkNPhiBins*4,0.,kMaxPhi,80, -2.,2.,(int)(fgkPtMax-fgkPtMin),fgkPtMin,fgkPtMax);
+  fHistListCosmics->Add(fDeltaPhiSumEtaPt2);
+  fThetaDCAZ1DCAZ2 = new TH3F("fThetaDCAZ1DCAZ2","fThetaDCAZ1DCAZ2",fgkNPhiBins*8,0.,kMaxPhi,fgkNDCAZBins,-2.,2.,fgkNDCAZBins,-2.,2.);
+  fHistListCosmics->Add(fThetaDCAZ1DCAZ2);
 
   TH1::AddDirectory(oldStatus);   
 
@@ -1248,8 +1264,8 @@ Bool_t AliPWG4HighPtQATPConly::IsCosmic(const AliESDtrack *track1 , Int_t trackN
     track2->GetPxPyPz(mom2);
     Double_t cosTheta = (mom1[0]*mom2[0]+mom1[1]*mom2[1]+mom1[2]*mom2[2])/( TMath::Sqrt(mom1[0]*mom1[0]+mom1[1]*mom1[1]+mom1[2]*mom1[2])*TMath::Sqrt(mom2[0]*mom2[0]+mom2[1]*mom2[1]+mom2[2]*mom2[2]) );
     Double_t theta = TMath::ACos(cosTheta);
-   
-//if(TMath::Abs(TMath::Pi()-theta)<fMaxCosmicAngle) { candidate1 = kTRUE; candidate2 = kTRUE;}
+    if(cosTheta<0.) theta+=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]) { 
@@ -1266,6 +1282,10 @@ Bool_t AliPWG4HighPtQATPConly::IsCosmic(const AliESDtrack *track1 , Int_t trackN
       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]);
     }
 
   }
index 52817e4..a35d1f7 100644 (file)
@@ -175,8 +175,12 @@ class AliPWG4HighPtQATPConly: public AliAnalysisTask {
   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 between cosmic candidates in 3D space
+  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
 
index ce3063f..d73d3bf 100644 (file)
@@ -93,9 +93,22 @@ AliPWG4HighPtSpectra::AliPWG4HighPtSpectra(const Char_t* name) :
   AliDebug(2,Form("AliPWG4HighPtSpectra","Calling Constructor"));
   // Input slot #0 works with a TChain ESD
   DefineInput(0, TChain::Class());
+  // Output slot #0 writes into a TList
   DefineOutput(0,TList::Class());
+  // Output slot #1, #2 writes into a AliCFContainer
   DefineOutput(1,AliCFContainer::Class());
   DefineOutput(2,AliCFContainer::Class());
+  // Output slot #3 writes into a AliESDtrackCuts
+  DefineOutput(3, AliESDtrackCuts::Class());
+}
+
+//________________________________________________________________________
+void AliPWG4HighPtSpectra::LocalInit()
+{
+  //
+  // Only called once at beginning
+  //
+  PostData(3,fTrackCuts);
 }
 
 // //___________________________________________________________________________
index 2d7f8e3..c8a431a 100644 (file)
@@ -50,6 +50,7 @@ class AliPWG4HighPtSpectra : public AliAnalysisTask {
   ~AliPWG4HighPtSpectra() {;};
 
   // ANALYSIS FRAMEWORK STUFF to loop on data and fill output objects
+  virtual void   LocalInit();
   virtual void   ConnectInputData(Option_t *);
   virtual void   CreateOutputObjects();
   virtual void   Exec(Option_t *option);
index 61ad2fe..98af5ec 100644 (file)
@@ -55,7 +55,7 @@ AliPWG4HighPtSpectra* AddTaskPWG4HighPtSpectra()
   UInt_t ichi2TPC = 4;
 
   //Setting up the container grid... 
-  UInt_t nstep = 5; //Steps/Modes for containers
+  UInt_t nstep = 6; //Steps/Modes for containers
   Int_t kStepReconstructed = 0;
   Int_t kStepReconstructedTPCOnly = 1;
   Int_t kStepSecondaries = 2;
@@ -197,14 +197,15 @@ AliPWG4HighPtSpectra* AddTaskPWG4HighPtSpectra()
   AliAnalysisDataContainer *coutput0 = mgr->CreateContainer("chist0HighPtSpectra", TList::Class(),AliAnalysisManager::kOutputContainer,outputfile);
   AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("ccontainer0HighPtSpectra", AliCFContainer::Class(),AliAnalysisManager::kOutputContainer,outputfile);
   AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("ccontainer1HighPtSpectra", AliCFContainer::Class(),AliAnalysisManager::kOutputContainer,outputfile);
-  
+  AliAnalysisDataContainer *cout_cuts0 = mgr->CreateContainer("qa_trackCuts", AliESDtrackCuts::Class(), AliAnalysisManager::kParamContainer,outputfile);
   mgr->AddTask(taskPWG4HighPtSpectra);
 
   mgr->ConnectInput(taskPWG4HighPtSpectra,0,mgr->GetCommonInputContainer());
   mgr->ConnectOutput(taskPWG4HighPtSpectra,0,coutput0);
   mgr->ConnectOutput(taskPWG4HighPtSpectra,1,coutput1);
   mgr->ConnectOutput(taskPWG4HighPtSpectra,2,coutput2);
-
+  mgr->ConnectOutput(taskPWG4HighPtSpectra,3,cout_cuts0);
 
   // Return task pointer at the end
   return taskPWG4HighPtSpectra;