]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Coding conventions (G. Bruno)
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 29 Mar 2011 22:48:19 +0000 (22:48 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 29 Mar 2011 22:48:19 +0000 (22:48 +0000)
ITS/AliITSPlaneEff.h
ITS/AliITSPlaneEffSDD.cxx
ITS/AliITSPlaneEffSDD.h
ITS/AliITSPlaneEffSPD.cxx
ITS/AliITSPlaneEffSPD.h
ITS/AliITSPlaneEffSSD.cxx
ITS/AliITSPlaneEffSSD.h
ITS/AliITSTrackleterSPDEff.cxx
ITS/AliITSTrackleterSPDEff.h

index 331d2d2d9ea821e662041a850e750b0c31d74420..9092d9672a172d6769add011fd51cd89944d8a45 100644 (file)
@@ -5,11 +5,11 @@
 
 #include <TString.h>
 #include "AliPlaneEff.h"
-#include "AliLog.h"
 
 class AliITSsegmentation;
 class TF1;
 class AliITSgeom;
+class AliLog;
 
 ////////////////////////////////////////////////////
 //                                                //
index 3ac997668df4596c7b27ecfd5d87e94afca28ace..0bc4c7890443881f17687e1b5640a2755545e383 100644 (file)
@@ -60,10 +60,10 @@ AliITSPlaneEffSDD::AliITSPlaneEffSDD():
   fHisClusErrX(0),
   fHisClusErrZ(0){
   for (UInt_t i=0; i<kNModule*kNChip*kNWing*kNSubWing; i++){
+  // default constructor
     fFound[i]=0;
     fTried[i]=0;
   }
-  // default constructor
   AliDebug(1,Form("Calling default constructor"));
 }
 //______________________________________________________________________
@@ -529,6 +529,7 @@ return kTRUE;
 }
 //_____________________________________________________________________________
 Bool_t AliITSPlaneEffSDD::AddFromCDB(AliCDBId *cdbId) {
+// read efficiency values from CDB
 AliCDBEntry *cdbEntry=0;
 if (!cdbId) {
   if(!fInitCDBCalled)
@@ -900,6 +901,7 @@ return;
 }
 //__________________________________________________________
 void AliITSPlaneEffSDD::DeleteHistos() {
+ // delete the histograms and clean the memory
   if(fHisResX) {
     for (Int_t i=0; i<kNHisto; i++ ) delete fHisResX[i];
     delete [] fHisResX; fHisResX=0;
index 99bf4a162c1c3d87a4f8fff6eded3f6367d08a2e..eff93156dabd293126f7f44985ac40124b866279 100644 (file)
@@ -6,7 +6,8 @@
 #include <TH2I.h>
 #include <TProfile.h>
 #include "AliITSPlaneEff.h"
-#include "AliCDBId.h"
+
+class AliCDBId;
 
 ///////////////////////////////////////////
 //                                       //
index 779a02ddbc57f68282eb5f55cfb34c6810913172..c453b8ddd3048ef2f49b1f94b8f3453211716afe 100644 (file)
@@ -59,10 +59,12 @@ AliITSPlaneEffSPD::AliITSPlaneEffSPD():
   fHisClusErrX(0),
   fHisClusErrZ(0){
   for (UInt_t i=0; i<kNModule*kNChip; i++){
+  //  
+  // default constructor
+  //
     fFound[i]=0;
     fTried[i]=0;
   }
-  // default constructor
   AliDebug(1,Form("Calling default constructor"));
 }
 //______________________________________________________________________
@@ -517,6 +519,7 @@ return kTRUE;
 //_____________________________________________________________________________
 Bool_t AliITSPlaneEffSPD::AddFromCDB(AliCDBId *cdbId) {
 AliCDBEntry *cdbEntry=0;
+// read efficiency values from CDB
 if (!cdbId) {
   if(!fInitCDBCalled)  
     {AliError("ReadFromCDB: CDB not inizialized. Call InitCDB first"); return kFALSE;}
@@ -820,6 +823,7 @@ return;
 }
 //__________________________________________________________
 void AliITSPlaneEffSPD::DeleteHistos() {
+// Delete the histograms and clean the memory 
   if(fHisResX) {
     for (Int_t i=0; i<kNHisto; i++ ) delete fHisResX[i];
     delete [] fHisResX; fHisResX=0;
index 82ed8be2133efad6258a8710938feb1d81357281..9f2e19661ca081892ad91f62f9e596e8791daf40 100644 (file)
@@ -7,7 +7,8 @@
 #include <TH2I.h>
 #include <TProfile.h>
 #include "AliITSPlaneEff.h"
-#include  "AliCDBId.h"
+
+class AliCDBId;
 
 ///////////////////////////////////////////
 //                                       //
index 394089370fd1db61f9f8f952c1649e8dbd08c68b..8185e452fb4a2e52334996dcb89ce94ad72bd4cb 100644 (file)
@@ -50,10 +50,10 @@ AliITSPlaneEffSSD::AliITSPlaneEffSSD():
   fHisClusErrX(0),
   fHisClusErrZ(0){
   for (UInt_t i=0; i<kNModule; i++){
+  // default constructor
     fFound[i]=0;
     fTried[i]=0;
   }
-  // default constructor
   AliDebug(1,Form("Calling default constructor"));
 }
 //______________________________________________________________________
@@ -366,6 +366,7 @@ return kTRUE;
 }
 //_____________________________________________________________________________
 Bool_t AliITSPlaneEffSSD::AddFromCDB(AliCDBId *cdbId) {
+// Read (actually add the statistics) plane eff. from Data Base
 AliCDBEntry *cdbEntry=0;
 if (!cdbId) {
   if(!fInitCDBCalled)
@@ -483,6 +484,7 @@ return;
 }
 //__________________________________________________________
 void AliITSPlaneEffSSD::DeleteHistos() {
+// Delete histograms and remove them from memory 
   if(fHisResX) {
     for (Int_t i=0; i<kNHisto; i++ ) delete fHisResX[i];
     delete [] fHisResX; fHisResX=0;
index beecd7e71613aaf2fd7d4884a627c1b9b87d00f7..03971e7a2c7325eb92d37ad524e24afcb344179b 100644 (file)
@@ -6,7 +6,8 @@
 #include <TH1F.h>
 #include <TH2I.h>
 #include "AliITSPlaneEff.h"
-#include "AliCDBId.h"
+
+class AliCDBId;
 
 ///////////////////////////////////////////
 //                                       //
index 8bd2f9451e3bd0658fea24dca2e0080f3b40c701..617eb171054af9082e1fe7660ab70df4d0fccfc8 100644 (file)
@@ -136,6 +136,10 @@ fhClustersInModuleLay2(0)
 {
    // default constructor
 // from AliITSMultReconstructor
+  Init();
+}
+//______________________________________________________________________
+void AliITSTrackleterSPDEff::Init() {
   SetPhiWindowL2();
   SetZetaWindowL2();
   SetOnlyOneTrackletPerC2();
@@ -839,7 +843,7 @@ AliITSTrackleterSPDEff::Reconstruct(AliStack *pStack, TTree *tRef, Bool_t lbkg)
   AliDebug(1,Form(("Eff. of method FindChip for Cluster on lay 2 = %d / %d"),nfClu2,ntClu2));
 }
 //____________________________________________________________________
-Bool_t AliITSTrackleterSPDEff::FindChip(UInt_t &key, Int_t layer,  Float_t* vtx, 
+Bool_t AliITSTrackleterSPDEff::FindChip(UInt_t &key, Int_t layer,const  Float_t* vtx, 
                                   Float_t thetaVtx, Float_t phiVtx, Float_t zVtx) {
 //
 // Input: a) layer number in the range [0,1]
@@ -1012,7 +1016,7 @@ phi=TMath::ATan2(pP[1],pP[0]);
 return kTRUE;
 }
 //___________________________________________________________
-Bool_t AliITSTrackleterSPDEff::SetAngleRange02Pi(Double_t &angle) {
+Bool_t AliITSTrackleterSPDEff::SetAngleRange02Pi(Double_t &angle) const {
 //
 //  simple method to reduce all angles (in rad)
 //  in range [0,2pi[
@@ -1852,7 +1856,7 @@ void AliITSTrackleterSPDEff::DeleteHistos() {
 }
 //_______________________________________________________________
 Bool_t AliITSTrackleterSPDEff::IsReconstructableAt(Int_t layer,Int_t iC,Int_t ipart,
-                                                   Float_t* vtx, AliStack *stack, TTree *ref) {
+                                                   const Float_t* vtx, const AliStack *stack, TTree *ref) {
 // This (private) method can be used only for MC events, where both AliStack and the TrackReference
 // are available. 
 // It is used to asses whether a tracklet prediction is reconstructable or not at the other layer
@@ -2131,4 +2135,16 @@ AliITSTrackleterSPDEff::SetLightBkgStudyInParallel(Bool_t b) {
     fPlaneEffBkg=0;
   }
 }
-
+//______________________________________________________________
+void AliITSTrackleterSPDEff::SetReflectClusterAroundZAxisForLayer(Int_t ilayer,Bool_t b){  
+//
+// method to study residual background:
+// Input b= KTRUE --> reflect the clusters 
+//      ilayer (either 0 or 1) --> which SPD layers should be reflected
+//
+    if(b) {AliInfo(Form("All clusters on layer %d will be rotated by 180 deg around z",ilayer));
+           SetLightBkgStudyInParallel(kFALSE);}
+    if(ilayer==0) fReflectClusterAroundZAxisForLayer0=b;                   // a rotation by 180degree around the Z axis  
+    else if(ilayer==1) fReflectClusterAroundZAxisForLayer1=b;              // (x->-x; y->-y) to all RecPoints on a 
+    else AliInfo("Nothing done: input argument (ilayer) either 0 or 1");   // given layer is applied. In such a way 
+  }                    
index 3df5460df1941ea24361f5c2219309103efec2a1..22528866c4388f74d5016fa679da7bfb3f7a18db 100644 (file)
@@ -26,9 +26,10 @@ class AliStack;
 class TTree;
 class TH1F;
 class TH2F;
+class AliPlaneEff;
+
 #include "AliTracker.h"
 #include "AliITSPlaneEffSPD.h"
-#include "AliPlaneEff.h"
 
 class AliITSTrackleterSPDEff : public  AliTracker
 {
@@ -47,13 +48,11 @@ public:
   // Main method to perform the trackleter and the SPD efficiency evaluation
   void Reconstruct(AliStack* pStack=0x0, TTree* tRef=0x0, Bool_t lbkg=kFALSE);
 
-  void SetReflectClusterAroundZAxisForLayer(Int_t ilayer,Bool_t b=kTRUE){  // method to study residual background:
-    if(b) {AliInfo(Form("All clusters on layer %d will be rotated by 180 deg around z",ilayer)); 
-           SetLightBkgStudyInParallel(kFALSE);}
-    if(ilayer==0) fReflectClusterAroundZAxisForLayer0=b;                   // a rotation by 180degree around the Z axis  
-    else if(ilayer==1) fReflectClusterAroundZAxisForLayer1=b;              // (x->-x; y->-y) to all RecPoints on a 
-    else AliInfo("Nothing done: input argument (ilayer) either 0 or 1");   // given layer is applied. In such a way 
-  }                                                                        // you remove all the true tracklets.
+  void SetReflectClusterAroundZAxisForLayer(Int_t ilayer,Bool_t b=kTRUE);  // method to study residual background:
+                                                                           // a rotation by 180degree around the Z axis  
+                                                                           // (x->-x; y->-y) to all RecPoints on a 
+                                                                           // given layer is applied. In such a way 
+                                                                           // you remove all the true tracklets.
   void SetLightBkgStudyInParallel(Bool_t b = kTRUE); // if you set this on, then the estimation of the 
                                                     // SPD efficiency is done as usual for data, but in 
                                                     // parallel a light (i.e. without control histograms, etc.) 
@@ -255,15 +254,16 @@ protected:
   TH2F**        fhClustersInModuleLay1; //! distribution of cluster in the module Lay 1 (sub-chip scale)
   TH2F**        fhClustersInModuleLay2; //! distribution of cluster in the module Lay 2 (sub-chip scale)
 //
+  void Init(); // initialize pointers and allocate memory 
   Double_t GetRLayer(Int_t layer); // return average radius of layer (0,1) from Geometry
   Bool_t PrimaryTrackChecker(Int_t ipart,AliStack* stack=0x0);  // check if a MC particle is primary (need AliStack)
   Int_t DecayingTrackChecker(Int_t ipart,AliStack* stack=0x0);  // For a primary particle, check if it is stable (see cxx)
 // check if a MC particle is reconstructable
-  Bool_t IsReconstructableAt(Int_t layer,Int_t iC,Int_t ipart,Float_t* vtx,AliStack* stack=0x0,TTree* ref=0x0);
+  Bool_t IsReconstructableAt(Int_t layer,Int_t iC,Int_t ipart,const Float_t* vtx,const AliStack* stack=0x0,TTree* ref=0x0);
   void InitPredictionMC(); // allocate memory for cuts and MC data memebers
   void DeletePredictionMC(); // deallocate memory
   // method to locate a chip using current vtx and polar coordinate od tracklet w.r.t. to vtx (zVtx may not be given)
-  Bool_t FindChip(UInt_t &key, Int_t layer,  Float_t* vtx, Float_t thetaVtx, Float_t phiVtx, Float_t zVtx=999.); 
+  Bool_t FindChip(UInt_t &key, Int_t layer,const Float_t* vtx, Float_t thetaVtx, Float_t phiVtx, Float_t zVtx=999.); 
   // method to transform from Global Cilindrical coordinate to local (module) Cartesian coordinate
   Bool_t FromGloCilToLocCart(Int_t ilayer,Int_t idet, Double_t r, Double_t phi, Double_t z,
                            Float_t &xloc, Float_t &zloc);
@@ -272,8 +272,8 @@ protected:
   // this method gives you the intersections between a line and a circle (centred in the origin) 
   // using polar coordinates
   Bool_t FindIntersectionPolar(Double_t vtx[2],Double_t phiVtx, Double_t R,Double_t &phi);
-  Bool_t SetAngleRange02Pi(Double_t &angle); // set the range of angle in [0,2pi[ 
-  Bool_t SetAngleRange02Pi(Float_t  &angle) 
+  Bool_t SetAngleRange02Pi(Double_t &angle) const; // set the range of angle in [0,2pi[ 
+  Bool_t SetAngleRange02Pi(Float_t  &angle) const 
   {Double_t tmp=(Double_t)angle; Bool_t ret=SetAngleRange02Pi(tmp);angle=(Float_t)tmp;return ret;};  
   void CallWarningMC() const {if(!fMC) AliWarning("You can use this method only for MC! Call SetMC() first");}
   Bool_t SaveHists();