]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
fixed coding rule violations
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 17 Mar 2011 14:59:50 +0000 (14:59 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 17 Mar 2011 14:59:50 +0000 (14:59 +0000)
PWG4/JetTasks/AliAnalysisHelperJetTasks.cxx
PWG4/JetTasks/AliAnalysisHelperJetTasks.h

index 4c112b152a999d06ff71966f82b6fbfbac5c1546..526dc76697317bbf12e16fcbfaac6590d4f98098 100644 (file)
@@ -1,3 +1,23 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, 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.                  *
+ **************************************************************************/
+
+//
+// Helper Class that contains a lot of 
+// usefull static functions jet matchin pythia access etc.
+//
+// Author: C. Klein-Boesing IKP Muenster 
 
 #include "TROOT.h"
 #include "TDirectory.h"
@@ -36,8 +56,10 @@ ClassImp(AliAnalysisHelperJetTasks)
 Int_t AliAnalysisHelperJetTasks::fgLastProcessType = -1;
 
  
-AliGenPythiaEventHeader*  AliAnalysisHelperJetTasks::GetPythiaEventHeader(AliMCEvent *mcEvent){
-  
+AliGenPythiaEventHeader*  AliAnalysisHelperJetTasks::GetPythiaEventHeader(const AliMCEvent *mcEvent){
+  //
+  // Fetch  the pythia event header
+  // 
   if(!mcEvent)return 0;
   AliGenEventHeader* genHeader = mcEvent->GenEventHeader();
   AliGenPythiaEventHeader* pythiaGenHeader = dynamic_cast<AliGenPythiaEventHeader*>(genHeader);
@@ -67,6 +89,9 @@ AliGenPythiaEventHeader*  AliAnalysisHelperJetTasks::GetPythiaEventHeader(AliMCE
 
 
 void AliAnalysisHelperJetTasks::PrintStack(AliMCEvent *mcEvent,Int_t iFirst,Int_t iLast,Int_t iMaxPrint){
+  // 
+  // Print the stack informatuin up to the iMaxPrint event
+  //
 
   AliStack *stack = mcEvent->Stack();
   if(!stack){
@@ -97,7 +122,7 @@ void AliAnalysisHelperJetTasks::PrintStack(AliMCEvent *mcEvent,Int_t iFirst,Int_
 
 
 void AliAnalysisHelperJetTasks::GetClosestJets(AliAODJet *genJets,const Int_t &kGenJets,
-                                              AliAODJet *recJets,const Int_t &kRecJets,
+                                              const AliAODJet *recJets,const Int_t &kRecJets,
                                               Int_t *iGenIndex,Int_t *iRecIndex,
                                               Int_t iDebug,Float_t maxDist){
 
@@ -225,8 +250,8 @@ void AliAnalysisHelperJetTasks::GetClosestJets(AliAODJet *genJets,const Int_t &k
 
 
 
-void AliAnalysisHelperJetTasks::GetClosestJets(TList *genJetsList,const Int_t &kGenJets,
-                                              TList *recJetsList,const Int_t &kRecJets,
+void AliAnalysisHelperJetTasks::GetClosestJets(const TList *genJetsList,const Int_t &kGenJets,
+                                              const TList *recJetsList,const Int_t &kRecJets,
                                               TArrayI &iGenIndex,TArrayI &iRecIndex,
                                               Int_t iDebug,Float_t maxDist){
 
@@ -352,8 +377,8 @@ void AliAnalysisHelperJetTasks::GetClosestJets(TList *genJetsList,const Int_t &k
   }
 }
 
-void AliAnalysisHelperJetTasks::GetJetMatching(TList *genJetsList, const Int_t &kGenJets,
-                                               TList *recJetsList, const Int_t &kRecJets,
+void AliAnalysisHelperJetTasks::GetJetMatching(const TList *genJetsList, const Int_t &kGenJets,
+                                               const TList *recJetsList, const Int_t &kRecJets,
                                                TArrayI &iMatchIndex, TArrayF &fPtFraction,
                                                Int_t iDebug, Float_t maxDist){
 
@@ -458,8 +483,10 @@ void AliAnalysisHelperJetTasks::GetJetMatching(TList *genJetsList, const Int_t &
     }
 }
 
-Double_t AliAnalysisHelperJetTasks::GetFractionOfJet(AliAODJet *recJet, AliAODJet *genJet){
-
+Double_t AliAnalysisHelperJetTasks::GetFractionOfJet(const AliAODJet *recJet, const AliAODJet *genJet){
+  //
+  // get the fraction of hte signal jet in the full jt
+  //
     Double_t ptGen = genJet->Pt();
     if(ptGen==0.) return 999.;
     
@@ -771,6 +798,10 @@ Bool_t AliAnalysisHelperJetTasks::PythiaInfoFromFile(const char* currFile,Float_
 
 Bool_t AliAnalysisHelperJetTasks::PrintDirectorySize(const char* currFile){
 
+  //
+  // Print the size on disk and in memory occuppied by a directory 
+  //
+
   TFile *fIn = TFile::Open(currFile);
   if(!fIn){
     // not a severe condition but inciate that we have no information
@@ -815,6 +846,11 @@ Bool_t AliAnalysisHelperJetTasks::PrintDirectorySize(const char* currFile){
 
 
 Bool_t  AliAnalysisHelperJetTasks::Selected(Bool_t bSet,Bool_t bNew){
+  // 
+  // Static helper task, (re)set event by event
+  //
+
+
   static Bool_t bSelected = kTRUE; // if service task is not run we acccpet all
   if(bSet){
     bSelected = bNew;
@@ -843,6 +879,10 @@ Bool_t  AliAnalysisHelperJetTasks::TestEventClass(Int_t iMask){
 
 
 UInt_t  AliAnalysisHelperJetTasks::SelectInfo(Bool_t bSet,UInt_t iNew){
+  // 
+  // set event by event the slection info
+  // 
+
   static UInt_t iSelectInfo = 0; //
   if(bSet){
     iSelectInfo = iNew;
@@ -852,6 +892,10 @@ UInt_t  AliAnalysisHelperJetTasks::SelectInfo(Bool_t bSet,UInt_t iNew){
 
 
 Int_t  AliAnalysisHelperJetTasks::EventClass(Bool_t bSet,Int_t iNew){
+  //
+  // gloab storage/access to event class
+  //
+
   static Int_t iEventClass = 0; //
   if(bSet){
     iEventClass = iNew;
@@ -864,7 +908,7 @@ Int_t  AliAnalysisHelperJetTasks::EventClass(Bool_t bSet,Int_t iNew){
 
 //___________________________________________________________________________________________________________
 
-Bool_t AliAnalysisHelperJetTasks::GetEventShapes(TVector3 &n01, TVector3 * pTrack, Int_t nTracks, Double_t * eventShapes)
+Bool_t AliAnalysisHelperJetTasks::GetEventShapes(TVector3 &n01,const  TVector3 * pTrack, Int_t nTracks, Double_t * eventShapes)
 {       
   // ***
   // Event shape calculation
@@ -1202,6 +1246,10 @@ Bool_t AliAnalysisHelperJetTasks::IsTriggerFired(const AliVEvent* aEv, Trigger t
 
 
  AliAnalysisHelperJetTasks::MCProcessType  AliAnalysisHelperJetTasks::GetPythiaEventProcessType(AliGenEventHeader* aHeader, Bool_t adebug) {
+   //
+   // fetch the process type from the mc header
+   //
+
 
   AliGenPythiaEventHeader* pythiaGenHeader = dynamic_cast<AliGenPythiaEventHeader*>(aHeader);
 
index a4574e26f77997ab18fe6dd38cd36a53de8ba853..d81ba7fec186baf1a7c40fb005fc4864be0ff6c0 100644 (file)
@@ -11,7 +11,12 @@ class AliGenPythiaEventHeader;
 class TVector3;
 class AliGenEventHeader;
 
-// Helper Class that contains a lot of usefull static functions (i.e. for Flavor selection.
+
+//
+// Helper Class that contains a lot of 
+// usefull static functions jet matchin pythia access etc.
+//
+
 
 class AliAnalysisHelperJetTasks : public TObject {
  public:
@@ -43,27 +48,27 @@ class AliAnalysisHelperJetTasks : public TObject {
   // same as in PWG0Helper
   enum MCProcessType { kInvalidProcess = -1, kND = 0x1, kDD = 0x2, kSD = 0x4, kOnePart = 0x8 };
 
-  static AliGenPythiaEventHeader*  GetPythiaEventHeader(AliMCEvent *mcEvent);
+  static AliGenPythiaEventHeader*  GetPythiaEventHeader(const AliMCEvent *mcEvent);
   static void PrintStack(AliMCEvent *mcEvent,Int_t iFirst = 0,Int_t iLast = 0,Int_t iMaxPrint = 10);
   static void GetClosestJets(AliAODJet *genJets,
                             const Int_t &kGenJets,
-                            AliAODJet *recJets,
+                            const AliAODJet *recJets,
                             const Int_t &kRecJets,
                             Int_t *iGenIndex,
                             Int_t *iRecIndex,
                             Int_t iDebug = 0, Float_t maxDist = 0.3);
 
-  static void GetClosestJets(TList *genJetsList,const Int_t &kGenJets,
-                            TList *recJetsList,const Int_t &kRecJets,
+  static void GetClosestJets(const TList *genJetsList,const Int_t &kGenJets,
+                            const TList *recJetsList,const Int_t &kRecJets,
                             TArrayI &iGenIndex,TArrayI &iRecIndex,
                             Int_t iDebug = 0,Float_t maxDist = 0.3);
                                 
-  static void GetJetMatching(TList *genJetsList, const Int_t &kGenJets,
-                             TList *recJetsList, const Int_t &kRecJets,
+  static void GetJetMatching(const TList *genJetsList, const Int_t &kGenJets,
+                             const TList *recJetsList, const Int_t &kRecJets,
                              TArrayI &iMatchIndex, TArrayF &fPtFraction,
                              Int_t iDebug = 0, Float_t maxDist = 0.3);
                                                         
-  static Double_t GetFractionOfJet(AliAODJet *recJet, AliAODJet *genJet);
+  static Double_t GetFractionOfJet(const AliAODJet *recJet,const AliAODJet *genJet);
 
 
   static void MergeOutputDirs(const char* cFiles,const char* cPattern,const char *cOutFile,Bool_t bUpdate = false); // merges all directories containing the pattern
@@ -71,7 +76,7 @@ class AliAnalysisHelperJetTasks : public TObject {
   static void MergeOutput(char* cFiles, char* cDir = "",char *cList = "",char* cOutFile ="allpt.root",Bool_t bUpdate = false); // Merges the files in the input text file  needs the two histograms fh1PtHard_Trials, fh1Xsec and the name of the input list
   static Bool_t PythiaInfoFromFile(const char* currFile,Float_t &fXsec,Float_t &fTrials);// get the cross section and the trails either from pyxsec.root or from pysec_hists.root
   static Bool_t PrintDirectorySize(const char* currFile); // print the size of the output on a given file
-  static Bool_t GetEventShapes(TVector3 &n01, TVector3 * pTrack, Int_t nTracks, Double_t * eventShapes);
+  static Bool_t GetEventShapes(TVector3 &n01,const TVector3 * pTrack, Int_t nTracks, Double_t * eventShapes);
 
   static MCProcessType GetPythiaEventProcessType(AliGenEventHeader* aHeader, Bool_t adebug = kFALSE);
   static MCProcessType GetDPMjetEventProcessType(AliGenEventHeader* aHeader, Bool_t adebug = kFALSE);
@@ -94,7 +99,7 @@ class AliAnalysisHelperJetTasks : public TObject {
   
   static Int_t fgLastProcessType;    // stores the raw value of the last process type extracted
  
-  ClassDef(AliAnalysisHelperJetTasks, 5
+  ClassDef(AliAnalysisHelperJetTasks, 6
 };
 
 #endif // ALIANALYSISHELPERJETTASKS_H