]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
- coding rule violations corrected
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 Apr 2010 07:45:11 +0000 (07:45 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 Apr 2010 07:45:11 +0000 (07:45 +0000)
- added to compilation

PWG1/PWG1LinkDef.h
PWG1/cosmic/AliAnalysisTaskCosmic.cxx
PWG1/cosmic/AliAnalysisTaskCosmic.h
PWG1/libPWG1.pkg

index 721a30c2a67f3b1f2187a4b6529c76dc86b5a125..14184b4dc01d569299c839eb69ce36196faf9c7a 100644 (file)
 #pragma link C++ class  AliTRDpidRefMaker::AliTRDpidRefDataArray+;
 #pragma link C++ class  AliTRDpidRefMakerLQ+;
 #pragma link C++ class  AliTRDpidRefMakerNN+;
 #pragma link C++ class  AliTRDpidRefMaker::AliTRDpidRefDataArray+;
 #pragma link C++ class  AliTRDpidRefMakerLQ+;
 #pragma link C++ class  AliTRDpidRefMakerNN+;
-
+// Cosmics QA
+#pragma link C++ class  AliAnalysisTaskCosmic+;
 #endif
 #endif
index db6f1ad1cf928094ff7ba337eab221cacd056183..b86160a83b079054df6bf277e409e8fc11663005 100644 (file)
@@ -1,7 +1,31 @@
-//------------------------------------------------------------
-// Prototype of QA analysis mini-train
-// Origin: Andreas.Morsch@cern.ch
-//------------------------------------------------------------
+/**************************************************************************
+ * Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id$ */
+
+// Analysis Task for the Quality Assurance of Cosmic Data
+// Two track segments in the are matched in angle and charged. T
+// The quality of the matching in is checked by comparing 
+// the tarnsverse momenta and starting points of the track segments
+//
+// Author
+// Andreas Morsch
+// andreas.morsch@cern.ch
+
+#include "TChain.h"
+#include "TTree.h"
 
 #include "TH1F.h"
 #include "TH2F.h"
 
 #include "TH1F.h"
 #include "TH2F.h"
@@ -28,6 +52,7 @@ AliAnalysisTaskCosmic::AliAnalysisTaskCosmic(const char *name)
   //
   // Constructor
   //
   //
   // Constructor
   //
+    
     for (Int_t i = 0; i < 6; i++) {
        fhPt[i]      = 0;
        fhTheta[i]   = 0;
     for (Int_t i = 0; i < 6; i++) {
        fhPt[i]      = 0;
        fhTheta[i]   = 0;
@@ -47,6 +72,77 @@ AliAnalysisTaskCosmic::AliAnalysisTaskCosmic(const char *name)
   DefineOutput(1,  TList::Class());
 }
 
   DefineOutput(1,  TList::Class());
 }
 
+AliAnalysisTaskCosmic::AliAnalysisTaskCosmic(const AliAnalysisTaskCosmic& task)
+    : AliAnalysisTaskSE(task),
+      fHists(0),
+      fhDZvsZ(0),
+      fhDZvsPhi(0),
+      fhCh1Ch2(0),
+      fhPh1Ph2(0),
+      fhCl1Cl2G(0),
+      fhCl1Cl2B(0)
+{
+  // Copy constructor
+    fHists       = new TList();
+    fhDZvsZ      = (TH2F*)    ((task.fhDZvsZ)   ->Clone()); 
+    fhDZvsPhi    = (TH2F*)    ((task.fhDZvsPhi) ->Clone());
+    fhCh1Ch2     = (TH2F*)    ((task.fhCh1Ch2)  ->Clone());
+    fhPh1Ph2     = (TH2F*)    ((task.fhPh1Ph2)  ->Clone());
+    fhCl1Cl2G    = (TH2F*)    ((task.fhCl1Cl2G) ->Clone());
+    fhCl1Cl2B    = (TH2F*)    ((task.fhCl1Cl2B) ->Clone());
+    for (Int_t i = 0; i < 6; i++) {
+       fhPt[i]       =    (TH1F*) ((task.fhPt[i])        ->Clone());
+       fhTheta[i]    =    (TH1F*) ((task.fhTheta[i])     ->Clone());
+       fhPhi[i]      =    (TH1F*) ((task.fhPhi[i])       ->Clone());
+       fhDPhi[i]     =    (TH1F*) ((task.fhDPhi[i])      ->Clone());
+       fhDTheta[i]   =    (TH1F*) ((task.fhDTheta[i])    ->Clone());
+       fhDZ[i]       =    (TH1F*) ((task.fhDZ[i])        ->Clone());
+       fhDX[i]       =    (TH1F*) ((task.fhDX[i])        ->Clone());
+       fhDY[i]       =    (TH1F*) ((task.fhDY[i])        ->Clone());
+       fhDPt[i]      =    (TH1F*) ((task.fhDPt[i])       ->Clone());
+       fhD1ovPt[i]   =    (TH1F*) ((task.fhD1ovPt[i])    ->Clone());
+       fhDPtovPt[i]  =    (TH1F*) ((task.fhDPtovPt[i])   ->Clone());
+
+       fpDPt[i]      =    (TProfile*) ((task.fpDPt[i])       ->Clone());
+       fpDPtS[i]     =    (TProfile*) ((task.fpDPtS[i])      ->Clone());
+    }
+}
+
+//______________________________________________________________________________
+AliAnalysisTaskCosmic& AliAnalysisTaskCosmic::operator=(const AliAnalysisTaskCosmic& task)
+{
+  // Assignment operator
+  if(this!=&task) {
+
+    AliAnalysisTaskSE::operator=(task);
+
+    fHists       = new TList();
+    fhDZvsZ      = (TH2F*)    ((task.fhDZvsZ)   ->Clone()); 
+    fhDZvsPhi    = (TH2F*)    ((task.fhDZvsPhi) ->Clone());
+    fhCh1Ch2     = (TH2F*)    ((task.fhCh1Ch2)  ->Clone());
+    fhPh1Ph2     = (TH2F*)    ((task.fhPh1Ph2)  ->Clone());
+    fhCl1Cl2G    = (TH2F*)    ((task.fhCl1Cl2G) ->Clone());
+    fhCl1Cl2B    = (TH2F*)    ((task.fhCl1Cl2B) ->Clone());
+    for (Int_t i = 0; i < 6; i++) {
+       fhPt[i]       =    (TH1F*) ((task.fhPt[i])        ->Clone());
+       fhTheta[i]    =    (TH1F*) ((task.fhTheta[i])     ->Clone());
+       fhPhi[i]      =    (TH1F*) ((task.fhPhi[i])       ->Clone());
+       fhDPhi[i]     =    (TH1F*) ((task.fhDPhi[i])      ->Clone());
+       fhDTheta[i]   =    (TH1F*) ((task.fhDTheta[i])    ->Clone());
+       fhDZ[i]       =    (TH1F*) ((task.fhDZ[i])        ->Clone());
+       fhDX[i]       =    (TH1F*) ((task.fhDX[i])        ->Clone());
+       fhDY[i]       =    (TH1F*) ((task.fhDY[i])        ->Clone());
+       fhDPt[i]      =    (TH1F*) ((task.fhDPt[i])       ->Clone());
+       fhD1ovPt[i]   =    (TH1F*) ((task.fhD1ovPt[i])    ->Clone());
+       fhDPtovPt[i]  =    (TH1F*) ((task.fhDPtovPt[i])   ->Clone());
+
+       fpDPt[i]      =    (TProfile*) ((task.fpDPt[i])       ->Clone());
+       fpDPtS[i]     =    (TProfile*) ((task.fpDPtS[i])      ->Clone());
+    }
+  }
+  return *this;
+}
+
 
 //________________________________________________________________________
 void AliAnalysisTaskCosmic::UserCreateOutputObjects()
 
 //________________________________________________________________________
 void AliAnalysisTaskCosmic::UserCreateOutputObjects()
@@ -188,7 +284,7 @@ void AliAnalysisTaskCosmic::UserExec(Option_t *)
       Float_t pt     = track->Pt();
       Short_t charge = track->Charge();
       Float_t phi    = track->Phi();
       Float_t pt     = track->Pt();
       Short_t charge = track->Charge();
       Float_t phi    = track->Phi();
-      if (phi > 0. && phi  < TMath::Pi()) charge*=(-1.);
+      if (phi > 0. && phi  < TMath::Pi()) charge*=(-1);
 
 
 
 
 
 
@@ -350,7 +446,7 @@ void AliAnalysisTaskCosmic::UserExec(Option_t *)
                  Double_t sigmaPt = 0.5 * TMath::Sqrt(sigmaPt1 * sigmaPt1 + sigmaPt2 * sigmaPt2);
                  if (TMath::Abs(dpt)/ptm > 0.2 && pt > 10. &&  charge > 0.)
 //                   printf("Track#2 %5d %5d %13.3f %13.3f %13.3f %13.3f\n", Entry(), jMin, track2->Phi(), dz, dpt, zOut2);                      
                  Double_t sigmaPt = 0.5 * TMath::Sqrt(sigmaPt1 * sigmaPt1 + sigmaPt2 * sigmaPt2);
                  if (TMath::Abs(dpt)/ptm > 0.2 && pt > 10. &&  charge > 0.)
 //                   printf("Track#2 %5d %5d %13.3f %13.3f %13.3f %13.3f\n", Entry(), jMin, track2->Phi(), dz, dpt, zOut2);                      
-                 if (zOut != 0. && zOut2 != 0.) fhDZvsZ->Fill(TMath::Abs(zOut) * zOut/zOut2, dz);
+                 if (TMath::Abs(zOut) > 1.e-10 && TMath::Abs(zOut2) > 1.e-10) fhDZvsZ->Fill(TMath::Abs(zOut) * zOut/zOut2, dz);
                  if (zOut * zOut2 > 0. && zOut < 0) fhDZvsPhi->Fill(phi, dz);
                  
                  fhCh1Ch2->Fill(charge, track2->Charge());
                  if (zOut * zOut2 > 0. && zOut < 0) fhDZvsPhi->Fill(phi, dz);
                  
                  fhCh1Ch2->Fill(charge, track2->Charge());
index 01f9b06801dba9eac45374afdfcc53f644dd9ab6..024740d3203859a088249d58348c358fc5fcbd8f 100644 (file)
@@ -1,11 +1,20 @@
-// gSystem->SetIncludePath("-I$ROOTSYS/include -I$ALICE_ROOT/include");\r
-#ifndef AliAnalysisTaskCosmic_h\r
-#define AliAnalysisTaskCosmic_h\r
+#ifndef ALIANALYSISTASKCOSMIC_H\r
+#define ALIANALYSISTASKCOSMIC_H \r
+\r
+/* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *\r
+ * See cxx source for full Copyright notice                               */\r
+\r
+/* $Id$ */\r
+\r
+// Analysis Task for the Quality Assurance of Cosmic Data\r
+// Two track segments in the are matched in angle and charged. T\r
+// The quality of the matching in is checked by comparing \r
+// the tarnsverse momenta and starting points of the track segments\r
+//\r
+// Author\r
+// Andreas Morsch\r
+// andreas.morsch@cern.ch\r
 \r
 \r
-//------------------------------------------------------------\r
-// Prototype of QA analysis mini-train\r
-// Origin: Andreas.Morsch@cern.ch\r
-//------------------------------------------------------------\r
 \r
 \r
 class TH1F;\r
 \r
 \r
 class TH1F;\r
@@ -32,14 +41,13 @@ class AliAnalysisTaskCosmic : public AliAnalysisTaskSE {
  public:\r
   AliAnalysisTaskCosmic(const char *name = "AliAnalysisTaskCosmic");\r
   virtual ~AliAnalysisTaskCosmic() {}\r
  public:\r
   AliAnalysisTaskCosmic(const char *name = "AliAnalysisTaskCosmic");\r
   virtual ~AliAnalysisTaskCosmic() {}\r
+  AliAnalysisTaskCosmic(const AliAnalysisTaskCosmic& task); \r
+  AliAnalysisTaskCosmic& operator=(const AliAnalysisTaskCosmic& task);\r
   \r
   virtual void   UserCreateOutputObjects();\r
   virtual void   UserExec(Option_t *option);\r
   virtual void   Terminate(Option_t *);\r
  private:\r
   \r
   virtual void   UserCreateOutputObjects();\r
   virtual void   UserExec(Option_t *option);\r
   virtual void   Terminate(Option_t *);\r
  private:\r
-  AliAnalysisTaskCosmic(const AliAnalysisTaskCosmic&); // not implemented\r
-  AliAnalysisTaskCosmic& operator=(const AliAnalysisTaskCosmic&); // not implemented\r
-  \r
   TList*          fHists;        // List of histograms\r
   TH1F*           fhPt[6];       // Pt distribution\r
   TH1F*           fhTheta[6];    // Eta distribution\r
   TList*          fHists;        // List of histograms\r
   TH1F*           fhPt[6];       // Pt distribution\r
   TH1F*           fhTheta[6];    // Eta distribution\r
index 5b3b76617ff922a80f4e2a2ba7dc4102d50776cc..51a7bb0f3aaeb1dfc90e77c55821c3a52e35252e 100644 (file)
@@ -2,6 +2,7 @@
 
 ORGSRCS  := $(wildcard PWG1/*.cxx)
 ORGSRCS  += $(wildcard PWG1/global/*.cxx)
 
 ORGSRCS  := $(wildcard PWG1/*.cxx)
 ORGSRCS  += $(wildcard PWG1/global/*.cxx)
+ORGSRCS  += $(wildcard PWG1/cosmic/*.cxx)
 ORGSRCS  += $(wildcard PWG1/tender/*.cxx)
 ORGSRCS  += $(wildcard PWG1/ITS/*.cxx)
 ORGSRCS  += $(wildcard PWG1/TRD/*.cxx)
 ORGSRCS  += $(wildcard PWG1/tender/*.cxx)
 ORGSRCS  += $(wildcard PWG1/ITS/*.cxx)
 ORGSRCS  += $(wildcard PWG1/TRD/*.cxx)