]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG4/JetTasks/AliPWG4CosmicCandidates.cxx
New analysis devoted to shower shape studies
[u/mrichter/AliRoot.git] / PWG4 / JetTasks / AliPWG4CosmicCandidates.cxx
index b17fad059da4722482a7d90bb7efb537e6c7b811..871568ce8dace2507ed348258de5146594ef3ef4 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")); 
 
@@ -176,6 +181,7 @@ void AliPWG4CosmicCandidates::UserCreateOutputObjects()
   Float_t fgkPtMin=0.;
   Float_t fgkPtMax=100.;
   Int_t fgkNPtBins= (int)(fgkPtMax-fgkPtMin);
+  Int_t fgkNPtBins2D= (int)((fgkPtMax-fgkPtMin)/4.);
 
   Int_t fgkNPhiBins=18;
   Float_t kMinPhi = -0.5*TMath::Pi();
@@ -185,19 +191,19 @@ void AliPWG4CosmicCandidates::UserCreateOutputObjects()
   Float_t kMinTheta = -0.5*TMath::Pi();
   Float_t kMaxTheta = 3./2.*TMath::Pi();
 
-  Int_t fgkNDCARBins=80;
+  Int_t fgkNDCARBins=40;
   Float_t fgkDCARMin = -0.2;
   Float_t fgkDCARMax = 0.2;
   Float_t *binsDCAR=new Float_t[fgkNDCARBins+1];
   for(Int_t i=0; i<=fgkNDCARBins; i++) binsDCAR[i]=(Float_t)fgkDCARMin + (fgkDCARMax-fgkDCARMin)/fgkNDCARBins*(Float_t)i ;
 
-  Int_t fgkNDCAZBins=80;
+  Int_t fgkNDCAZBins=40;
   Float_t fgkDCAZMin = -2.;
   Float_t fgkDCAZMax = 2.;
   Float_t *binsDCAZ=new Float_t[fgkNDCAZBins+1];
   for(Int_t i=0; i<=fgkNDCAZBins; i++) binsDCAZ[i]=(Float_t)fgkDCAZMin + (fgkDCAZMax-fgkDCAZMin)/fgkNDCAZBins*(Float_t)i ;
 
-  fPtSignedCosmicCandidates = new TH1F("fPtSignedCosmicCandidates","fPtSignedCosmicCandidates",2*(int)(fgkPtMax-fgkPtMin), -1.*fgkPtMax, fgkPtMax);
+  fPtSignedCosmicCandidates = new TH1F("fPtSignedCosmicCandidates","fPtSignedCosmicCandidates",2*fgkNPtBins, -1.*fgkPtMax, fgkPtMax);
   fHistListCosmics->Add(fPtSignedCosmicCandidates);  
 
   fDeltaPtCosmicCandidates = new TH1F("fDeltaPtCosmicCandidates","fDeltaPtCosmicCandidates",fgkNPtBins, -50., 50.);
@@ -218,16 +224,16 @@ void AliPWG4CosmicCandidates::UserCreateOutputObjects()
   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);
+  fThetaPt1Pt2 = new TH3F("fThetaPt1Pt2","fThetaPt1Pt2",fgkNThetaBins,kMinTheta,kMaxTheta,fgkNPtBins2D,fgkPtMin,fgkPtMax,fgkNPtBins2D,fgkPtMin,fgkPtMax);
   fHistListCosmics->Add(fThetaPt1Pt2);
 
-  fThetaPt1Pt2Signed = new TH3F("fThetaPt1Pt2Signed","fThetaPt1Pt2Signed",fgkNThetaBins,kMinTheta,kMaxTheta,4*(int)(fgkPtMax-fgkPtMin),-1.*fgkPtMax,fgkPtMax,4*(int)(fgkPtMax-fgkPtMin),-1.*fgkPtMax,fgkPtMax);
+  fThetaPt1Pt2Signed = new TH3F("fThetaPt1Pt2Signed","fThetaPt1Pt2Signed",fgkNThetaBins,kMinTheta,kMaxTheta,fgkNPtBins2D,-1.*fgkPtMax,fgkPtMax,fgkNPtBins2D,-1.*fgkPtMax,fgkPtMax);
   fHistListCosmics->Add(fThetaPt1Pt2Signed);
 
-  fDeltaPhiSumEtaPt1 = new TH3F("fDeltaPhiSumEtaPt1","fDeltaPhiSumEtaPt1",fgkNThetaBins,kMinTheta,kMaxTheta,80, -2.,2.,(int)(fgkPtMax-fgkPtMin),fgkPtMin,fgkPtMax);
+  fDeltaPhiSumEtaPt1 = new TH3F("fDeltaPhiSumEtaPt1","fDeltaPhiSumEtaPt1",fgkNThetaBins,kMinTheta,kMaxTheta,80, -2.,2.,fgkNPtBins2D,fgkPtMin,fgkPtMax);
   fHistListCosmics->Add(fDeltaPhiSumEtaPt1);
 
-  fDeltaPhiSumEtaPt2 = new TH3F("fDeltaPhiSumEtaPt2","fDeltaPhiSumEtaPt2",fgkNThetaBins,kMinTheta,kMaxTheta,80, -2.,2.,(int)(fgkPtMax-fgkPtMin),fgkPtMin,fgkPtMax);
+  fDeltaPhiSumEtaPt2 = new TH3F("fDeltaPhiSumEtaPt2","fDeltaPhiSumEtaPt2",fgkNThetaBins,kMinTheta,kMaxTheta,80, -2.,2.,fgkNPtBins2D,fgkPtMin,fgkPtMax);
   fHistListCosmics->Add(fDeltaPhiSumEtaPt2);
 
   fThetaDCAZ1DCAZ2 = new TH3F("fThetaDCAZ1DCAZ2","fThetaDCAZ1DCAZ2",fgkNThetaBins,kMinTheta,kMaxTheta,fgkNDCAZBins,-2.,2.,fgkNDCAZBins,-2.,2.);
@@ -249,8 +255,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.);
@@ -264,7 +271,8 @@ void AliPWG4CosmicCandidates::UserExec(Option_t *)
 
   const AliVVertex *vtx = fInputEvent->GetPrimaryVertex();
   // Need vertex cut
-  if (!vtx || vtx->GetNContributors() < 2) {
+  TString vtxName(vtx->GetName());
+  if(!vtx || vtx->GetNContributors() < 2 || (vtxName.Contains("TPCVertex")) ) {
     // Post output data
     PostData(1, fHistListCosmics);
     return;
@@ -291,12 +299,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 +364,8 @@ void AliPWG4CosmicCandidates::UserExec(Option_t *)
 //________________________________________________________________________
 void AliPWG4CosmicCandidates::Terminate(Option_t *) 
 {
+  //
   // Called once at the end of the query
-
+  //
   
 }