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 939d161ad3871a0a15f7350a207889c1133713d1..ce2a3ef41f3afe8804ea432a2b06141d5e0085dd 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 1a59a578c6dc6ab7d08fcb8fc837a9b0b6a969ea..4f2783ca9f0c1ec1d92d4fd7a36ac8723de7420b 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 a407cc5b1d0d1dbd24f7e5bbdb6c0e11af88ee4f..6cfee1835445a13b834a9e5086558b027def1e9f 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 1509555269c567bc2c147d322ad73549b274cf6a..ba29869d44a8f3a29607bdad7c49ed3e9a80a77a 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 f40c4a3a917fd2ce78488adb2cc6fffb82e6b260..c805387e8a0f522819637cdfd13859f4f8cd25c9 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 7edadfec5b835f2e5630de6fb686829089e64290..99435d3b5bba79a6861a82c23cf0798ccf83dbd2 100644 (file)
@@ -30,6 +30,8 @@ public:
 
   virtual ~AliCorrectionMatrix3D();
 
+  AliCorrectionMatrix3D& operator= (const AliCorrectionMatrix3D& c);
+
   TH3F* GetGeneratedHistogram();
   TH3F* GetMeasuredHistogram();
   TH3F* GetCorrectionHistogram();
index 3576253b5c240b0b1955d9521041c98203121b53..b0f1a62ad5bb88482202a7d1d438820bd65a85af 100644 (file)
@@ -24,6 +24,10 @@ class AliPWG0Helper : public TObject
     
   protected:
     ClassDef(AliPWG0Helper, 0)
+
+  private:
+    AliPWG0Helper(const AliPWG0Helper&);
+    AliPWG0Helper& operator=(const AliPWG0Helper&);
 };
 
 #endif
index 6d543974bfb0adcb11f7cdf6520838cf3a73c884..988db5609d858c7aa8c499f32a60ede6c13edde0 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 307365629d7c2bc8ff196c9c865fa22086ad23f9..451c8807da6ae03bcc01ef644238188a778ea7da 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 4255a48f47a48d97540e32357fc9a70d3ae1ffcd..52cc15a554ba12e01584c2203711aa436af24c25 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 454ee48a29f7943caabf814abd06f51e42fb2b5f..3bfc48640c390ab02c9b16e1b5fd1dc69c998406 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 941ad55abed304a3224ec70c7053f9df152f5ece..1e139150041957884af8b0f81133a7710dfdc904 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 6fe7b9f8ea376c24cca684213145ed71034d94e8..c716c05f625b86c8fafd01896bada9c59c209cd8 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 d2be00af5838b58b938e08e7759789a9f8c387f2..bf1a4d2d87292b8150da122cb05439b32a278049 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 69d6cb03221edc20d59f9588d59b529d40de1866..7b249df26a9b935e6349e5a7a17dcd5042d95d1c 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 7291a40363dddfdba6d15202c307470d66caf3a4..da13123ea0e4842248651b6940322be31bb7074a 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 735ad3d76201551b0550f46b77ecce9db8e8158f..fbc7b08c926ebf63e2752dbba280a10258f5753b 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 d44bdf18344afbf78e9e128913e92b2bdd9e0688..7750b22d1669ba1419ee59e3d4b47a2d9a6adaa7 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 49bef891bc91a5c214332749b549c4fc04a60733..727e9dcc5fa2ca63cf580fe57d47c6aea572b23c 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 1311a412d19f0e9a08410b1d0b606fa81b81ecc9..48d24556d497e5d838e3175aec6ce169f3913dee 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);
 };