small updates
authorjotwinow <jotwinow@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Jan 2010 12:00:21 +0000 (12:00 +0000)
committerjotwinow <jotwinow@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Jan 2010 12:00:21 +0000 (12:00 +0000)
PWG0/dNdPt/AlidNdPtAnalysis.cxx
PWG0/dNdPt/AlidNdPtCorrection.cxx
PWG0/dNdPt/AlidNdPtCutAnalysis.cxx
PWG0/dNdPt/AlidNdPtHelper.cxx
PWG0/dNdPt/AlidNdPtHelper.h
PWG0/dNdPt/AlidNdPtTask.cxx
PWG0/dNdPt/macros/CreatedNdPtTrackCuts.C

index f2f57e5478fe5a6b223a13fc8dbd7029f7d9e0d7..a47238b110b05a98572655722029b5789f3eae13 100644 (file)
@@ -993,6 +993,7 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc
 \r
     Int_t entries = allChargedTracks->GetEntries();\r
     //printf("entries %d \n",entries);\r
+     Bool_t isCosmic = kFALSE;\r
 \r
     labelsAll = new Int_t[entries];\r
     labelsAcc = new Int_t[entries];\r
@@ -1003,13 +1004,6 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc
       if(!track) continue;\r
       if(track->Charge()==0) continue;\r
 \r
-      /*\r
-      // cosmics analysis\r
-      if( GetParticleMode()==AlidNdPtHelper::kCosmics  && \r
-          AlidNdPtHelper::IsCosmicTrack(allChargedTracks, track, i, accCuts, esdTrackCuts)==kFALSE ) \r
-        continue;\r
-      */\r
-\r
       // only postive charged \r
       if(GetParticleMode() == AlidNdPtHelper::kPlus && track->Charge() < 0) \r
         continue;\r
@@ -1022,15 +1016,38 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc
       labelsAll[multAll] = TMath::Abs(track->GetLabel());\r
       multAll++;\r
 \r
-       //if(accCuts->AcceptTrack(track)) {\r
          //FillHistograms(track,stack,AlidNdPtHelper::kAccTracks); \r
         //labelsAcc[multAcc] = TMath::Abs(track->GetLabel());\r
         //multAcc++;\r
 \r
-         if(esdTrackCuts->AcceptTrack(track)) \r
-        {\r
-          if(GetAnalysisMode() == AlidNdPtHelper::kTPCSPDvtxUpdate) {\r
-            // update track parameters\r
+         // cosmics analysis\r
+         isCosmic = kFALSE;\r
+         if( GetParticleMode()==AlidNdPtHelper::kCosmics )\r
+         {\r
+           Int_t mult = 0;\r
+           if(esdTrackCuts->AcceptTrack(track) && accCuts->AcceptTrack(track) ) \r
+          { \r
+             for(Int_t j=0; j<entries;++j) \r
+             {\r
+               AliESDtrack *track1 = (AliESDtrack*)allChargedTracks->At(j);\r
+               if(!track1) continue;\r
+               if(track1->Charge()==0) continue;\r
+\r
+               if( esdTrackCuts->AcceptTrack(track1) && accCuts->AcceptTrack(track1) ) \r
+               { \r
+                 mult++;\r
+                 isCosmic = AlidNdPtHelper::IsCosmicTrack(track,track1);\r
+              }\r
+            }\r
+          }\r
+          if(isCosmic) \r
+             printf("evt. number %d , mult %d \n", esdEvent->GetEventNumberInFile(), mult);\r
+\r
+           if(!isCosmic) continue;\r
+         }\r
+\r
+        if(GetAnalysisMode() == AlidNdPtHelper::kTPCSPDvtxUpdate) {\r
+          // update track parameters\r
              AliExternalTrackParam cParam;\r
             track->RelateToVertexTPC(esdEvent->GetPrimaryVertexSPD(),esdEvent->GetMagneticField(),kVeryBig,&cParam);\r
             track->Set(cParam.GetX(),cParam.GetAlpha(),cParam.GetParameter(),cParam.GetCovariance());\r
@@ -1040,8 +1057,8 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc
               labelsRec[multRec] = TMath::Abs(track->GetLabel());\r
               multRec++;\r
             }  \r
-          }\r
-           else {\r
+         }\r
+          else {\r
              if(accCuts->AcceptTrack(track)) {\r
                FillHistograms(track,stack,AlidNdPtHelper::kRecTracks); \r
               labelsRec[multRec] = TMath::Abs(track->GetLabel());\r
@@ -1049,14 +1066,16 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc
             }\r
           }\r
          }\r
-       //}\r
-     } \r
+\r
      // fill track multiplicity histograms\r
      FillHistograms(allChargedTracks,labelsAll,multAll,labelsAcc,multAcc,labelsRec,multRec);\r
 \r
      Double_t vRecEventHist1[3] = {vtxESD->GetXv(),vtxESD->GetYv(),vtxESD->GetZv()};\r
      fRecEventHist1->Fill(vRecEventHist1);\r
 \r
+     if(isCosmic) \r
+       printf("evt. number %d , rec. mult %d \n", esdEvent->GetEventNumberInFile(), multRec);\r
+\r
      Double_t vRecEventHist2[3] = {vtxESD->GetZv(),multMBTracks,multRec};\r
      fRecEventHist2->Fill(vRecEventHist2);\r
    } \r
index af2254e298c1bc9e82061b0fda2f8f89b683db2b..56ddbc2b77546fe72d4c6cab607b0f3cfe99c4d5 100644 (file)
@@ -666,6 +666,7 @@ void AlidNdPtCorrection::Process(AliESDEvent *esdEvent, AliMCEvent *mcEvent)
   TObjArray *allChargedTracks=0;\r
   Int_t multRec=0, multRecTemp=0;\r
   Int_t *labelsRec=0;\r
+  Bool_t isCosmic = kFALSE;\r
 \r
   if(isEventOK && isEventTriggered)\r
   {\r
@@ -692,7 +693,7 @@ void AlidNdPtCorrection::Process(AliESDEvent *esdEvent, AliMCEvent *mcEvent)
         continue;\r
 \r
       // cosmics analysis\r
-      Bool_t isCosmic = kFALSE;\r
+      isCosmic = kFALSE;\r
       if( GetParticleMode()==AlidNdPtHelper::kCosmics )\r
       {\r
           for(Int_t j=0; j<entries;++j) \r
@@ -704,11 +705,11 @@ void AlidNdPtCorrection::Process(AliESDEvent *esdEvent, AliMCEvent *mcEvent)
             if( esdTrackCuts->AcceptTrack(track) && accCuts->AcceptTrack(track) && \r
                esdTrackCuts->AcceptTrack(track1) && accCuts->AcceptTrack(track1) ) \r
             { \r
-              isCosmic = AlidNdPtHelper::IsCosmicTrack(track, track1, i, accCuts, esdTrackCuts);\r
+              isCosmic = AlidNdPtHelper::IsCosmicTrack(track, track1);\r
            }\r
             if(isCosmic) \r
            {\r
-             Double_t vCosmicsHisto[3] = {track->Eta()+track1->Eta(), track->Phi()-track1->Phi(), track1->Pt()};\r
+             Double_t vCosmicsHisto[3] = { track->Eta()+track1->Eta(), track->Phi()-track1->Phi(), track1->Pt() };\r
              fCosmicsHisto->Fill(vCosmicsHisto);\r
            }\r
          }\r
@@ -738,6 +739,25 @@ void AlidNdPtCorrection::Process(AliESDEvent *esdEvent, AliMCEvent *mcEvent)
       // track-level corrections\r
       if(esdTrackCuts->AcceptTrack(track)) \r
       {\r
+        // cosmics analysis\r
+        isCosmic = kFALSE;\r
+        if( GetParticleMode()==AlidNdPtHelper::kCosmics )\r
+        {\r
+          for(Int_t j=0; j<entries;++j) \r
+          {\r
+            AliESDtrack *track1 = (AliESDtrack*)allChargedTracks->At(j);\r
+            if(!track1) continue;\r
+            if(track1->Charge()==0) continue;\r
+\r
+            if( esdTrackCuts->AcceptTrack(track) && accCuts->AcceptTrack(track) && \r
+               esdTrackCuts->AcceptTrack(track1) && accCuts->AcceptTrack(track1) ) \r
+            { \r
+              isCosmic = AlidNdPtHelper::IsCosmicTrack(track, track1);\r
+           }\r
+         }\r
+          if(!isCosmic) continue;\r
+        }\r
+\r
          if (GetAnalysisMode()==AlidNdPtHelper::kTPCSPDvtxUpdate) \r
         {\r
           //\r
index f93d27e7430914024c686f3259288fb6aa26baff..57e2ab9c23883cb7a84fbd7af67c4064c607c534 100644 (file)
@@ -107,7 +107,7 @@ void AlidNdPtCutAnalysis::Init(){
   fEventCount->Sumw2();\r
 \r
   //Xv:Yv:Zv:ResZv:Mult\r
-  Double_t kFact = 0.1;\r
+  Double_t kFact = 1.0;\r
 \r
   Int_t binsRecEventHist[5]={80,80,100,80,150};\r
   Double_t minRecEventHist[5]={-3.*kFact,-3.*kFact,-35.,0.,0.}; \r
@@ -132,8 +132,8 @@ void AlidNdPtCutAnalysis::Init(){
 \r
   //Xv-mcXv:Yv-mcYv:Zv-mcZv:Mult\r
   Int_t binsRecMCEventHist[4]={100,100,100,150};\r
-  Double_t minRecMCEventHist[4]={-10.0*kFact,-10.0*kFact,-10.0*kFact,0.}; \r
-  Double_t maxRecMCEventHist[4]={10.0*kFact,10.0*kFact,10.0*kFact,150.}; \r
+  Double_t minRecMCEventHist[4]={-1.0*kFact,-1.0*kFact,-1.0*kFact,0.}; \r
+  Double_t maxRecMCEventHist[4]={1.0*kFact,1.0*kFact,1.0*kFact,150.}; \r
   fRecMCEventHist = new THnSparseF("fRecMCEventHist","mcXv-Xv:mcYv-Yv:mcZv-Zv:Mult",4,binsRecMCEventHist,minRecMCEventHist,maxRecMCEventHist);\r
   fRecMCEventHist->GetAxis(0)->SetTitle("mcXv-Xv (cm)");\r
   fRecMCEventHist->GetAxis(1)->SetTitle("mcYv-Yv (cm)");\r
index ac9bfa570c91c4f2038e81e824ee29bb92d3d1c7..b8f3e02b49cc896859c63700f670d0bb203a3d40 100644 (file)
@@ -290,15 +290,13 @@ return kFALSE;
 */
 
 //____________________________________________________________________
-Bool_t AlidNdPtHelper::IsCosmicTrack(AliESDtrack *track1, AliESDtrack *track2, Int_t /*trackIdx*/, AlidNdPtAcceptanceCuts *accCuts, AliESDtrackCuts *trackCuts)
+Bool_t AlidNdPtHelper::IsCosmicTrack(AliESDtrack *track1, AliESDtrack *track2)
 {
 //
 // check cosmic tracks
 //
   if(!track1) return kFALSE;
   if(!track2) return kFALSE;
-  if(!accCuts) return kFALSE;
-  if(!trackCuts) return kFALSE;
 
   /*
   if(track1->Pt() > 6. && track2->Pt() > 6. && (track1->Charge() + track2->Charge()) == 0 ) 
@@ -318,7 +316,8 @@ Bool_t AlidNdPtHelper::IsCosmicTrack(AliESDtrack *track1, AliESDtrack *track2, I
       //  ((TMath::Abs(track1->Phi()-track2->Phi()) - TMath::Pi() )<0.004) && 
 
       if( (track1->Pt()-track2->Pt()) < 0.2 && track1->Pt() > 3.0 && 
-            (track1->Charge()+track2->Charge()) == 0 )
+            (track1->Charge()+track2->Charge()) == 0 )
+      //if( track1->Pt() > 6. || track2->Pt() > 6. )
       {
         //printf("COSMIC  candidate \n");
        /*
index 53cf59f3b604b4e9c9e89775ac278df6c60939d1..f298489febdecfa42fc388aaf7adb3af640e93ac 100644 (file)
@@ -49,7 +49,7 @@ class AlidNdPtHelper : public TObject
 
     static Bool_t IsPrimaryParticle(AliStack *stack, Int_t idx, ParticleMode particleMode);
     //static Bool_t IsCosmicTrack(TObjArray *allChargedTracks, AliESDtrack *track, Int_t trackIdx, AlidNdPtAcceptanceCuts *accCuts, AliESDtrackCuts *trackCuts);
-    static Bool_t IsCosmicTrack(AliESDtrack *track1, AliESDtrack *track2, Int_t trackIdx, AlidNdPtAcceptanceCuts *accCuts, AliESDtrackCuts *trackCuts);
+    static Bool_t IsCosmicTrack(AliESDtrack *track1, AliESDtrack *track2);
     static void PrintConf(AnalysisMode analysisMode, AliTriggerAnalysis::Trigger trigger);
     static Int_t ConvertPdgToPid(TParticle *particle);
 
index c10a1df2246f4ff956a96101521a1c0b0ace90bc..7c482113e05780e1a34210209f8544c886a05dfc 100644 (file)
@@ -71,10 +71,24 @@ AlidNdPtTask::~AlidNdPtTask()
 //____________________________________________________________________________\r
 Bool_t AlidNdPtTask::Notify()\r
 {\r
+  /*\r
   static Int_t count = 0;\r
   count++;\r
   Printf("Processing %d. file", count);\r
 \r
+  TChain *chain = (TChain*)GetInputData(0);\r
+  AliESDInputHandler *esdH = dynamic_cast<AliESDInputHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());\r
+  if (!esdH) {\r
+    Printf("ERROR: Could not get ESDInputHandler");\r
+    return kFALSE;\r
+  } else {\r
+    //Printf("esdH->Notify() %s", esdH->Notify());\r
+    //Printf("fTree->GetCurrentFile()->GetName() %s", fTree->GetCurrentFile()->GetName());\r
+    if(chain)\r
+    Printf("chain->GetCurrentFile()->GetName() %s %s", chain->GetCurrentFile()->GetName(),  );\r
+  }\r
+  */\r
+\r
 return kTRUE;\r
 }\r
 \r
index b2adef48c6310005afe0d129dc7386b590dd034d..71d8bf612a19a6485be279fdee4fb0ec02857e56 100644 (file)
@@ -514,7 +514,7 @@ AliESDtrackCuts* CreatedNdPtTrackCuts(Int_t cutMode=1, Bool_t fieldOn = kTRUE, B
   {
     // beta cuts (still under investigation)
     //minNClustersTPC = 50;
-    minNClustersTPC = 90;
+    minNClustersTPC = 70;
     maxChi2PerClusterTPC = 4.0;
     maxDCAtoVertexXY = 2.4; // cm
     maxDCAtoVertexZ  = 3.2; // cm