effc++ changes
authorjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 15 Aug 2006 12:47:56 +0000 (12:47 +0000)
committerjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 15 Aug 2006 12:47:56 +0000 (12:47 +0000)
20 files changed:
PWG0/AliCorrectionMatrix.cxx
PWG0/AliCorrectionMatrix.h
PWG0/AliCorrectionMatrix2D.cxx
PWG0/AliCorrectionMatrix2D.h
PWG0/AliCorrectionMatrix3D.cxx
PWG0/AliCorrectionMatrix3D.h
PWG0/AliPWG0Helper.h
PWG0/AliRecoVsGeneCheck.h
PWG0/AliSelector.h
PWG0/AliSelectorRL.h
PWG0/dNdEta/AliMultiplicityESDSelector.h
PWG0/dNdEta/AliMultiplicityMCSelector.h
PWG0/dNdEta/AlidNdEtaAnalysisESDSelector.h
PWG0/dNdEta/AlidNdEtaAnalysisMCSelector.h
PWG0/dNdEta/AlidNdEtaCorrection.h
PWG0/dNdEta/AlidNdEtaCorrectionSelector.cxx
PWG0/dNdEta/AlidNdEtaCorrectionSelector.h
PWG0/dNdEta/AlidNdEtaSystematicsSelector.cxx
PWG0/dNdEta/AlidNdEtaSystematicsSelector.h
PWG0/dNdEta/AlidNdEtaVertexRecEffSelector.h

index 939d161..ce2a3ef 100644 (file)
@@ -27,6 +27,7 @@ AliCorrectionMatrix::AliCorrectionMatrix() : TNamed(),
   // default constructor
 }
 
+//____________________________________________________________________
 AliCorrectionMatrix::AliCorrectionMatrix(const Char_t* name, const Char_t* title) : TNamed(name, title),
   fhMeas(0),
   fhGene(0),
@@ -36,8 +37,10 @@ AliCorrectionMatrix::AliCorrectionMatrix(const Char_t* name, const Char_t* title
 }
 
 //____________________________________________________________________
-AliCorrectionMatrix::AliCorrectionMatrix(const AliCorrectionMatrix& c)
-  : TNamed(c)
+AliCorrectionMatrix::AliCorrectionMatrix(const AliCorrectionMatrix& c) : TNamed(c),
+  fhMeas(0),
+  fhGene(0),
+  fhCorr(0)
 {
   // copy constructor
   ((AliCorrectionMatrix &)c).Copy(*this);
@@ -74,7 +77,7 @@ AliCorrectionMatrix &AliCorrectionMatrix::operator=(const AliCorrectionMatrix &c
 {
   // assigment operator
 
-  if (this != &c) 
+  if (this != &c)
     ((AliCorrectionMatrix &) c).Copy(*this);
 
   return *this;
index 1a59a57..4f2783c 100644 (file)
@@ -25,9 +25,9 @@ protected: // do not create this baseclass
   AliCorrectionMatrix(const Char_t* name, const Char_t* title);
   AliCorrectionMatrix(const AliCorrectionMatrix& c);
   virtual ~AliCorrectionMatrix();
+  AliCorrectionMatrix& operator=(const AliCorrectionMatrix& corrMatrix);
 
 public:
-  AliCorrectionMatrix& operator=(const AliCorrectionMatrix& corrMatrix);
   virtual void Copy(TObject& c) const;
   virtual Long64_t Merge(TCollection* list);
 
index a407cc5..6cfee18 100644 (file)
@@ -31,6 +31,17 @@ AliCorrectionMatrix2D::AliCorrectionMatrix2D(const AliCorrectionMatrix2D& c)
   ((AliCorrectionMatrix2D &)c).Copy(*this);
 }
 
+//____________________________________________________________________
+AliCorrectionMatrix2D &AliCorrectionMatrix2D::operator=(const AliCorrectionMatrix2D &c)
+{
+  // assigment operator
+
+  if (this != &c)
+    ((AliCorrectionMatrix2D &) c).Copy(*this);
+
+  return *this;
+}
+
 //____________________________________________________________________
 AliCorrectionMatrix2D::AliCorrectionMatrix2D(const Char_t* name, const Char_t* title,
                                       Int_t nBinX, Float_t Xmin, Float_t Xmax,
index 1509555..ba29869 100644 (file)
@@ -28,6 +28,8 @@ public:
 
   virtual ~AliCorrectionMatrix2D();
 
+  AliCorrectionMatrix2D& operator= (const AliCorrectionMatrix2D& c);
+
   TH2F* GetGeneratedHistogram() const;
   TH2F* GetMeasuredHistogram() const;
 
@@ -41,6 +43,8 @@ public:
 
 protected:
   ClassDef(AliCorrectionMatrix2D,1)
+
+private:
 };
 
 #endif
index f40c4a3..c805387 100644 (file)
@@ -32,6 +32,17 @@ AliCorrectionMatrix3D::AliCorrectionMatrix3D(const AliCorrectionMatrix3D& c)
   ((AliCorrectionMatrix3D &)c).Copy(*this);
 }
 
+//____________________________________________________________________
+AliCorrectionMatrix3D &AliCorrectionMatrix3D::operator=(const AliCorrectionMatrix3D &c)
+{
+  // assigment operator
+
+  if (this != &c)
+    ((AliCorrectionMatrix3D &) c).Copy(*this);
+
+  return *this;
+}
+
 //____________________________________________________________________
 AliCorrectionMatrix3D::AliCorrectionMatrix3D(const Char_t* name, const Char_t* title,
               Int_t nBinX, Float_t Xmin, Float_t Xmax,
index 7edadfe..99435d3 100644 (file)
@@ -30,6 +30,8 @@ public:
 
   virtual ~AliCorrectionMatrix3D();
 
+  AliCorrectionMatrix3D& operator= (const AliCorrectionMatrix3D& c);
+
   TH3F* GetGeneratedHistogram();
   TH3F* GetMeasuredHistogram();
   TH3F* GetCorrectionHistogram();
index 3576253..b0f1a62 100644 (file)
@@ -24,6 +24,10 @@ class AliPWG0Helper : public TObject
     
   protected:
     ClassDef(AliPWG0Helper, 0)
+
+  private:
+    AliPWG0Helper(const AliPWG0Helper&);
+    AliPWG0Helper& operator=(const AliPWG0Helper&);
 };
 
 #endif
index 6d54397..988db56 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "AliESDtrack.h"
 
-class AliRecoVsGeneCheck : public TObject 
+class AliRecoVsGeneCheck : public TObject
 {
 
 public:
@@ -61,7 +61,9 @@ protected:
   TH3F* fhDPtVsPtVsEta;
   TH3F* fhDEtaVsPtVsEta;  
 
-
+  private:
+    AliRecoVsGeneCheck(const AliRecoVsGeneCheck&);
+    AliRecoVsGeneCheck& operator=(const AliRecoVsGeneCheck&);
 
   ClassDef(AliRecoVsGeneCheck, 1)
 };
index 3073656..451c880 100644 (file)
@@ -41,6 +41,9 @@ class AliSelector : public TSelector {
 
     TFile*        fKineFile;   //! pointer to Kinematics.root if the file was opened
 
+    AliSelector(const AliSelector&);
+    AliSelector& operator=(const AliSelector&);
+
   ClassDef(AliSelector,0);
 };
 
index 4255a48..52cc15a 100644 (file)
@@ -32,6 +32,9 @@ class AliSelectorRL : public AliSelector {
     Bool_t fKinematicsLoaded;    // determines if the stack is properly loaded (AliRunLoader::LoadKinematics() succeeded), this is needed because the GetStack returnes a invalid stack object when the function failed
     Bool_t fHeaderLoaded;        // determines if the header is properly loaded
 
+    AliSelectorRL(const AliSelectorRL&);
+    AliSelectorRL& operator=(const AliSelectorRL&);
+
     ClassDef(AliSelectorRL,0);
 };
 
index 454ee48..3bfc486 100644 (file)
@@ -27,6 +27,8 @@ class AliMultiplicityESDSelector : public AliSelector {
     AliESDtrackCuts*  fEsdTrackCuts;     // Object containing the parameters of the esd track cuts
 
  private:
+    AliMultiplicityESDSelector(const AliMultiplicityESDSelector&);
+    AliMultiplicityESDSelector& operator=(const AliMultiplicityESDSelector&);
 
   ClassDef(AliMultiplicityESDSelector, 0);
 };
index 941ad55..1e13915 100644 (file)
@@ -31,6 +31,8 @@ class AliMultiplicityMCSelector : public AliSelectorRL {
     AliESDtrackCuts*  fEsdTrackCuts;     // Object containing the parameters of the esd track cuts
 
  private:
+    AliMultiplicityMCSelector(const AliMultiplicityMCSelector&);
+    AliMultiplicityMCSelector& operator=(const AliMultiplicityMCSelector&);
 
   ClassDef(AliMultiplicityMCSelector, 0);
 };
index 6fe7b9f..c716c05 100644 (file)
@@ -33,6 +33,8 @@ class AlidNdEtaAnalysisESDSelector : public AliSelector {
     AlidNdEtaCorrection* fdNdEtaCorrection; // correction maps
 
  private:
+    AlidNdEtaAnalysisESDSelector(const AlidNdEtaAnalysisESDSelector&);
+    AlidNdEtaAnalysisESDSelector& operator=(const AlidNdEtaAnalysisESDSelector&);
 
   ClassDef(AlidNdEtaAnalysisESDSelector, 0);
 };
index d2be00a..bf1a4d2 100644 (file)
@@ -29,6 +29,9 @@ class AlidNdEtaAnalysisMCSelector : public AliSelectorRL {
     TH1F* fPartEta; //! counted particles as function of eta
     Int_t fEvents;  //! number of processed events
 
+    AlidNdEtaAnalysisMCSelector(const AlidNdEtaAnalysisMCSelector&);
+    AlidNdEtaAnalysisMCSelector& operator=(const AlidNdEtaAnalysisMCSelector&);
+
     ClassDef(AlidNdEtaAnalysisMCSelector, 0);
 };
 
index 69d6cb0..7b249df 100644 (file)
@@ -89,6 +89,10 @@ protected:
   Long64_t fNEvents;
   Long64_t fNTriggeredEvents;
 
+private:
+  AlidNdEtaCorrection(const AlidNdEtaCorrection&);
+  AlidNdEtaCorrection& operator=(const AlidNdEtaCorrection&);
+
   ClassDef(AlidNdEtaCorrection, 1)
 };
 
index 7291a40..da13123 100644 (file)
@@ -35,6 +35,10 @@ AlidNdEtaCorrectionSelector::AlidNdEtaCorrectionSelector() :
   fdNdEtaCorrection(0),
   fPIDParticles(0),
   fPIDTracks(0),
+  fClustersITSPos(0),
+  fClustersTPCPos(0),
+  fClustersITSNeg(0),
+  fClustersTPCNeg(0),
   fSignMode(0)
 {
   //
index 735ad3d..fbc7b08 100644 (file)
@@ -40,6 +40,8 @@ class AlidNdEtaCorrectionSelector : public AliSelectorRL {
     Int_t fSignMode;  // if 0 process all particles, if +-1 process only particles with that sign
 
  private:
+    AlidNdEtaCorrectionSelector(const AlidNdEtaCorrectionSelector&);
+    AlidNdEtaCorrectionSelector& operator=(const AlidNdEtaCorrectionSelector&);
 
   ClassDef(AlidNdEtaCorrectionSelector, 0);
 };
index d44bdf1..7750b22 100644 (file)
@@ -30,7 +30,9 @@ AlidNdEtaSystematicsSelector::AlidNdEtaSystematicsSelector() :
   fSigmaVertex(0),
   fEsdTrackCuts(0),
   fOverallPrimaries(0),
-  fOverallSecondaries(0)
+  fOverallSecondaries(0),
+  fPIDParticles(0),
+  fPIDTracks(0)
 {
   //
   // Constructor. Initialization of pointers
@@ -104,6 +106,9 @@ void AlidNdEtaSystematicsSelector::SlaveBegin(TTree* tree)
     fSigmaVertex = new TH1F("fSigmaVertex", "fSigmaVertex;Nsigma2vertex;NacceptedTracks", 10, 0.25, 5.25);
     printf("WARNING: sigma-vertex analysis enabled. This will produce weird results in the AliESDtrackCuts histograms\n");
   }
+
+  fPIDParticles = new TH1F("pid_particles", "PID of generated primary particles", 10001, -5000.5, 5000.5);
+  fPIDTracks = new TH1F("pid_tracks", "MC PID of reconstructed tracks", 10001, -5000.5, 5000.5);
 }
 
 Bool_t AlidNdEtaSystematicsSelector::Process(Long64_t entry)
@@ -214,11 +219,27 @@ void AlidNdEtaSystematicsSelector::FillCorrectionMaps(TObjArray* listOfTracks)
       case 211: id = 0; break;
       case 321: id = 1; break;
       case 2212: id = 2; break;
+      case 11: 
+        {
+          if (pt < 0.1 && particle->GetMother(0) > -1)
+          {
+            TParticle* mother = stack->Particle(particle->GetMother(0));
+            printf("Mother pdg code is %d\n", mother->GetPdgCode());
+          }   
+          //particle->Dump();
+          //if (particle->GetUniqueID() == 1)
+
+          //printf("Found illegal particle mc id = %d file = %s event = %d\n", iMc,  fTree->GetCurrentFile()->GetName(), fTree->GetTree()->GetReadEntry()); 
+        }
       default: id = 3; break;
     }
 
     if (vertexReconstructed)
+    {
       fdNdEtaCorrection[id]->FillParticle(vtxMC[2], eta, pt);
+      if (pt < 0.1)
+        fPIDParticles->Fill(particle->GetPdgCode());
+    }
 
     fdNdEtaCorrection[id]->FillParticleAllEvents(eta, pt);
     if (eventTriggered)
@@ -253,7 +274,11 @@ void AlidNdEtaSystematicsSelector::FillCorrectionMaps(TObjArray* listOfTracks)
     }
 
     if (vertexReconstructed)
+    {
       fdNdEtaCorrection[id]->FillParticleWhenMeasuredTrack(vtxMC[2], particle->Eta(), particle->Pt());
+      if (particle->Pt() < 0.1)
+        fPIDTracks->Fill(particle->GetPdgCode());
+    }
   } // end of track loop
 
   delete iter;
@@ -401,6 +426,15 @@ void AlidNdEtaSystematicsSelector::Terminate()
     fdNdEtaCorrection[i] = dynamic_cast<AlidNdEtaCorrection*> (fOutput->FindObject(Form("correction_%d", i)));
   fSigmaVertex = dynamic_cast<TH1F*> (fOutput->FindObject("fSigmaVertex"));
 
+  TDatabasePDG* pdgDB = new TDatabasePDG;
+
+  for (Int_t i=0; i <= fPIDParticles->GetNbinsX()+1; ++i)
+    if (fPIDParticles->GetBinContent(i) > 0)
+      printf("PDG = %d (%s): generated: %d, reconstructed: %d, ratio: %f\n", (Int_t) fPIDParticles->GetBinCenter(i), pdgDB->GetParticle((Int_t) fPIDParticles->GetBinCenter(i))->GetName(), (Int_t) fPIDParticles->GetBinContent(i), (Int_t) fPIDTracks->GetBinContent(i), ((fPIDTracks->GetBinContent(i) > 0) ? fPIDParticles->GetBinContent(i) / fPIDTracks->GetBinContent(i) : -1));
+
+  delete pdgDB;
+  pdgDB = 0;
+
   TFile* fout = TFile::Open("systematics.root", "RECREATE");
 
   if (fEsdTrackCuts)
index 49bef89..727e9dc 100644 (file)
@@ -37,7 +37,12 @@ class AlidNdEtaSystematicsSelector : public AliSelectorRL {
     Long64_t fOverallPrimaries; // count of all primaries
     Long64_t fOverallSecondaries; // count of all secondaries
 
+    TH1F* fPIDParticles; // pid of primary particles
+    TH1F* fPIDTracks; // pid of reconstructed tracks
+
  private:
+    AlidNdEtaSystematicsSelector(const AlidNdEtaSystematicsSelector&);
+    AlidNdEtaSystematicsSelector& operator=(const AlidNdEtaSystematicsSelector&);
 
   ClassDef(AlidNdEtaSystematicsSelector, 0);
 };
index 1311a41..48d2455 100644 (file)
@@ -31,6 +31,8 @@ class AlidNdEtaVertexRecEffSelector : public AliSelectorRL {
     TH1F* fVtxRec;  //! generated vertex z of events with reconstructed vertex
 
  private:
+    AlidNdEtaVertexRecEffSelector(const AlidNdEtaVertexRecEffSelector&);
+    AlidNdEtaVertexRecEffSelector& operator=(const AlidNdEtaVertexRecEffSelector&);
 
   ClassDef(AlidNdEtaVertexRecEffSelector, 0);
 };