Coding violations fix.
authorkaamodt <kaamodt@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 17 Dec 2010 13:38:44 +0000 (13:38 +0000)
committerkaamodt <kaamodt@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 17 Dec 2010 13:38:44 +0000 (13:38 +0000)
PWG4/GammaConv/AliV0Reader.cxx
PWG4/GammaConv/AliV0Reader.h

index a487aea..13f2919 100644 (file)
@@ -137,7 +137,7 @@ AliV0Reader::AliV0Reader() :
   fBGEventInitialized(kFALSE),
   fEsdTrackCuts(NULL),
   fNumberOfESDTracks(0),
-  nEventsForBGCalculation(20),
+  fNEventsForBGCalculation(20),
   fUseChargedTrackMultiplicityForBG(kTRUE),
   fNumberOfGoodV0s(0),
   fIsHeavyIon(0)
@@ -234,7 +234,7 @@ AliV0Reader::AliV0Reader(const AliV0Reader & original) :
   fBGEventInitialized(original.fBGEventInitialized),
   fEsdTrackCuts(original.fEsdTrackCuts),
   fNumberOfESDTracks(original.fNumberOfESDTracks),
-  nEventsForBGCalculation(original.nEventsForBGCalculation),
+  fNEventsForBGCalculation(original.fNEventsForBGCalculation),
   fUseChargedTrackMultiplicityForBG(original.fUseChargedTrackMultiplicityForBG),
   fNumberOfGoodV0s(original.fNumberOfGoodV0s),
   fIsHeavyIon(original.fIsHeavyIon)
@@ -377,7 +377,7 @@ void AliV0Reader::Initialize(){
          multiplicityBinLimitsArray[4] = 1500.;
          multiplicityBinLimitsArray[5] = 3000.;
        }
-       fBGEventHandler = new AliGammaConversionBGHandler(9,6,nEventsForBGCalculation);
+       fBGEventHandler = new AliGammaConversionBGHandler(9,6,fNEventsForBGCalculation);
       }
       else{
        multiplicityBinLimitsArray[0] = 2;
@@ -393,7 +393,7 @@ void AliV0Reader::Initialize(){
          multiplicityBinLimitsArray[4] = 9999;
        }
 
-       fBGEventHandler = new AliGammaConversionBGHandler(9,5,nEventsForBGCalculation);
+       fBGEventHandler = new AliGammaConversionBGHandler(9,5,fNEventsForBGCalculation);
       }
 
 
@@ -422,6 +422,7 @@ AliESDv0* AliV0Reader::GetV0(Int_t index){
 }
 
 Int_t AliV0Reader::GetNumberOfContributorsVtx(){
+  // returns number of contributors to the vertex
   if(fESDEvent->GetPrimaryVertexTracks()->GetNContributors()>0) {
     return fESDEvent->GetPrimaryVertexTracks()->GetNContributors();
   }
@@ -551,7 +552,7 @@ Bool_t AliV0Reader::NextV0(){
     fHistograms->FillHistogram("ESD_AllV0sCurrentFinder_alfa_qt",armenterosQtAlfa[1],armenterosQtAlfa[0]);
  
    
-    if(fCurrentNegativeESDTrack->GetSign() == fCurrentPositiveESDTrack->GetSign()){             // avoid like sign
+    if(fCurrentNegativeESDTrack->Charge() == fCurrentPositiveESDTrack->Charge()){             // avoid like sign
       //  iResult=kFALSE;
       if(fHistograms != NULL ){
        fHistograms->FillHistogram("ESD_CutLikeSign_InvMass",GetMotherCandidateMass());
@@ -622,7 +623,7 @@ Bool_t AliV0Reader::NextV0(){
        continue;
       }
       if(fDoCF){
-       fCFManager->GetParticleContainer()->Fill(containerInput,kStepdEdx_electronselection);               // for CF
+       fCFManager->GetParticleContainer()->Fill(containerInput,kStepdEdxElectronselection);               // for CF
       }
 
       if( fCurrentPositiveESDTrack->P()>fPIDMinPnSigmaAbovePionLine && fCurrentPositiveESDTrack->P()<fPIDMaxPnSigmaAbovePionLine ){
@@ -657,7 +658,7 @@ Bool_t AliV0Reader::NextV0(){
        }
       }
       if(fDoCF){
-       fCFManager->GetParticleContainer()->Fill(containerInput,kStepdEdx_pionrejection);               // for CF
+       fCFManager->GetParticleContainer()->Fill(containerInput,kStepdEdxPionrejection);               // for CF
       }
 
     }
@@ -839,17 +840,17 @@ Bool_t AliV0Reader::NextV0(){
     if(fDoCF){
       fCFManager->GetParticleContainer()->Fill(containerInput,kStepMinClsTPC);         // for CF       
     }
-    Double_t NegclsToF = 0.;
+    Double_t negclsToF = 0.;
     if(fCurrentNegativeESDTrack->GetTPCNclsF()!=0  ){
-      NegclsToF = (Double_t)fCurrentNegativeESDTrack->GetNcls(1)/(Double_t)fCurrentNegativeESDTrack->GetTPCNclsF();
+      negclsToF = (Double_t)fCurrentNegativeESDTrack->GetNcls(1)/(Double_t)fCurrentNegativeESDTrack->GetTPCNclsF();
     }
 
-    Double_t PosclsToF = 0.;
+    Double_t posclsToF = 0.;
     if(fCurrentPositiveESDTrack->GetTPCNclsF()!=0  ){
-      PosclsToF = (Double_t)fCurrentPositiveESDTrack->GetNcls(1)/(Double_t)fCurrentPositiveESDTrack->GetTPCNclsF();
+      posclsToF = (Double_t)fCurrentPositiveESDTrack->GetNcls(1)/(Double_t)fCurrentPositiveESDTrack->GetTPCNclsF();
     }
 
-    if( NegclsToF < fMinClsTPCToF ||  PosclsToF < fMinClsTPCToF ){
+    if( negclsToF < fMinClsTPCToF ||  posclsToF < fMinClsTPCToF ){
       if(fHistograms != NULL){
        fHistograms->FillHistogram("ESD_CutMinNClsTPCToF_InvMass",GetMotherCandidateMass());
       }
@@ -1599,7 +1600,7 @@ Double_t AliV0Reader::GetConvPosZ(AliESDtrack* ptrack,AliESDtrack* ntrack, Doubl
    return convposz;
 }
 
-AliGammaConversionKFVector* AliV0Reader::GetBGGoodV0s(Int_t /*event*/){
+AliGammaConversionKFVector* AliV0Reader::GetBGGoodV0s(Int_t /*event*/) const{
   /*
   if(fUseChargedTrackMultiplicityForBG == kTRUE){
     return fBGEventHandler->GetBGGoodV0s(event,fESDEvent->GetPrimaryVertex()->GetZ(),CountESDTracks());
@@ -1649,7 +1650,7 @@ Bool_t AliV0Reader::CheckIfEtaIsMother(Int_t label){
 }
 
 
-Bool_t AliV0Reader::GetArmenterosQtAlfa(AliKFParticle* positiveKFParticle, AliKFParticle * negativeKFParticle, AliKFParticle * gammaKFCandidate, Double_t armenterosQtAlfa[2] ){
+Bool_t AliV0Reader::GetArmenterosQtAlfa(const AliKFParticle* positiveKFParticle, const AliKFParticle * negativeKFParticle, const AliKFParticle * gammaKFCandidate, Double_t armenterosQtAlfa[2] ){
   //see header file for documentation
 
   TVector3 momentumVectorPositiveKF(positiveKFParticle->GetPx(),positiveKFParticle->GetPy(),positiveKFParticle->GetPz());
index 661d586..2c8bc7b 100644 (file)
@@ -56,8 +56,8 @@ class AliV0Reader : public TObject {
     kStepLikeSign = 3,
     kStepTPCRefit = 4,
     kStepKinks = 5,
-    kStepdEdx_electronselection = 6,
-    kStepdEdx_pionrejection = 7,
+    kStepdEdxElectronselection = 6,
+    kStepdEdxPionrejection = 7,
     kStepNContributors = 8,
     kStepTPCPID = 9,
     kStepR = 10,
@@ -785,7 +785,7 @@ class AliV0Reader : public TObject {
   /*
    * Gets the vector of previous events v0s (for bacground analysis)
    */
-  AliGammaConversionKFVector* GetBGGoodV0s(Int_t event);
+  AliGammaConversionKFVector* GetBGGoodV0s(Int_t event) const;
   //  vector<AliKFParticle> GetPreviousEventGoodV0s() const{return fPreviousEventGoodV0s;}
 
   void SetUseOwnXYZCalculation(Bool_t flag){fUseOwnXYZCalculation=flag;}
@@ -798,7 +798,7 @@ class AliV0Reader : public TObject {
        
   Double_t GetConvPosZ(AliESDtrack* ptrack,AliESDtrack* ntrack, Double_t b);
 
-  Bool_t GetArmenterosQtAlfa(AliKFParticle * posKFparticle,AliKFParticle * negKFparticle,AliKFParticle * gamKFparticle,Double_t armenterosQtAlfa[2]);
+  Bool_t GetArmenterosQtAlfa(const AliKFParticle * posKFparticle, const AliKFParticle * negKFparticle, const AliKFParticle * gamKFparticle,Double_t armenterosQtAlfa[2]);
 
   void SetDoCF(Bool_t flag){fDoCF = flag;}
 
@@ -818,7 +818,7 @@ class AliV0Reader : public TObject {
 
   void SetESDtrackCuts(AliESDtrackCuts * const trackCuts){fEsdTrackCuts = trackCuts;}
 
-  void SetNEventsForBG(Int_t nev){nEventsForBGCalculation = nev;}
+  void SetNEventsForBG(Int_t nev){fNEventsForBGCalculation = nev;}
 
   Int_t CountESDTracks();
 
@@ -892,7 +892,7 @@ class AliV0Reader : public TObject {
   Bool_t fDoMC;            // flag 
 
   //Event Cuts
-  Double_t fMaxVertexZ;
+  Double_t fMaxVertexZ; // max z vertex cut
   //cuts
   Double_t fMaxR; //r cut
   Double_t fMinR; //r cut
@@ -901,8 +901,8 @@ class AliV0Reader : public TObject {
   Double_t fPtCut; // pt cut
   Double_t fSinglePtCut; // pt cut for electron/positron
   Double_t fMaxZ; //z cut
-  Double_t fMinClsTPC;
-  Double_t fMinClsTPCToF;
+  Double_t fMinClsTPC; // minimum clusters in the TPC
+  Double_t fMinClsTPCToF; // minimum clusters to findable clusters
   Double_t fLineCutZRSlope; //linecut
   Double_t fLineCutZValue; //linecut
   Double_t fChi2CutConversion; //chi2cut
@@ -948,8 +948,8 @@ class AliV0Reader : public TObject {
        
   TClonesArray* fCurrentEventGoodV0s; //vector of good v0s
  
-  vector<Int_t> fV0Pindex;
-  vector<Int_t> fV0Nindex;  
+  vector<Int_t> fV0Pindex; // index of positive track belonging to a V0
+  vector<Int_t> fV0Nindex; // index of positive track belonging to a V0
   //  vector<AliKFParticle> fPreviousEventGoodV0s; // vector of good v0s from prevous events
 
   Bool_t fCalculateBackground; //flag
@@ -961,11 +961,11 @@ class AliV0Reader : public TObject {
 
   static AliESDpid* fgESDpid;                 // ESD pid object
 
-  Int_t nEventsForBGCalculation;
+  Int_t fNEventsForBGCalculation; // Number of events used for background calculation
   
-  Bool_t fUseChargedTrackMultiplicityForBG;
-  Int_t fNumberOfGoodV0s;
-  Int_t fIsHeavyIon;
+  Bool_t fUseChargedTrackMultiplicityForBG; // flag
+  Int_t fNumberOfGoodV0s; // number of good V0s
+  Int_t fIsHeavyIon; // flag
 
   ClassDef(AliV0Reader,17)
 };