minor changes to improve serializability
authorjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 3 Jul 2006 12:15:16 +0000 (12:15 +0000)
committerjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 3 Jul 2006 12:15:16 +0000 (12:15 +0000)
PWG0/dNdEta/AlidNdEtaCorrection.cxx
PWG0/dNdEta/AlidNdEtaCorrection.h
PWG0/dNdEta/AlidNdEtaCorrectionSelector.cxx
PWG0/dNdEta/CreatedNdEta.C
PWG0/dNdEta/drawCorrection.C
PWG0/dNdEta/drawPlots.C
PWG0/dNdEta/makeCorrection.C
PWG0/dNdEta/testAnalysis2.C
PWG0/esdTrackCuts/AliESDtrackCuts.h

index 10ede25e75df4fc6ed334696b9c3c7a3970c45d9..b4cf996807786856a43f3bb50faa50a135656110 100644 (file)
 ClassImp(AlidNdEtaCorrection)
 
 //____________________________________________________________________
-AlidNdEtaCorrection::AlidNdEtaCorrection(Char_t* name) 
-  : TNamed(name, name),
+AlidNdEtaCorrection::AlidNdEtaCorrection()
+  : TNamed(),
+  fTrack2ParticleCorrection(0),
+  fVertexRecoCorrection(0),
+  fTriggerCorrection(0),
+  fTriggerBiasCorrection(0),
   fNEvents(0),
   fNTriggeredEvents(0)
-{  
+{
+  // default constructor
+}
+
+//____________________________________________________________________
+AlidNdEtaCorrection::AlidNdEtaCorrection(const Char_t* name, const Char_t* title)
+  : TNamed(name, title),
+  fNEvents(0),
+  fNTriggeredEvents(0)
+{
   // constructor
   //
 
index 212c602fb81c2cfb8b52ed763218d031f53bc3c6..17d97aac600105b29516158d4bf39f47c915c1f4 100644 (file)
@@ -26,7 +26,8 @@
 class AlidNdEtaCorrection : public TNamed
 {
 public:
-  AlidNdEtaCorrection(Char_t* name="dndeta_correction");
+  AlidNdEtaCorrection();
+  AlidNdEtaCorrection(const Char_t* name, const Char_t* title);
 
   // fVertexRecoCorrection, fTriggerCorrection
   void FillEvent(Float_t vtx, Float_t n)                        {fTriggerCorrection->FillGene(vtx, n);}
@@ -54,7 +55,7 @@ public:
 
   void    SaveHistograms();
   Bool_t  LoadHistograms(Char_t* fileName, Char_t* dir = "dndeta_correction");
-  Bool_t  LoadCorrection(Char_t* fileName, Char_t* dir = "dndeta_correction") 
+  Bool_t  LoadCorrection(Char_t* fileName, Char_t* dir = "dndeta_correction")
     {return LoadHistograms(fileName, dir);}
   
   void DrawHistograms();
@@ -72,17 +73,19 @@ public:
 
   Float_t GetMeasuredFraction(Float_t ptCutOff, Float_t eta = -1, Bool_t debug = kFALSE);
 
+  void SetNEvents(Long64_t events) { fNEvents = events; }
+
 protected:
-  AliCorrectionMatrix3D* fTrack2ParticleCorrection; // handles the track-to-particle correction, function of vtx_z, eta, pt
-  AliCorrectionMatrix2D* fVertexRecoCorrection;     // handles the vertex reconstruction efficiency, function of n_clustersITS and vtx_z
-  AliCorrectionMatrix2D* fTriggerCorrection;       // handles the trigger efficiency efficiency, function of n_clustersITS and vtx_z
+  AliCorrectionMatrix3D* fTrack2ParticleCorrection; //-> handles the track-to-particle correction, function of vtx_z, eta, pt
+  AliCorrectionMatrix2D* fVertexRecoCorrection;     //-> handles the vertex reconstruction efficiency, function of n_clustersITS and vtx_z
+  AliCorrectionMatrix2D* fTriggerCorrection;       //-> handles the trigger efficiency efficiency, function of n_clustersITS and vtx_z
 
-  AliCorrectionMatrix2D* fTriggerBiasCorrection;          // MB to desired sample
+  AliCorrectionMatrix2D* fTriggerBiasCorrection;          //-> MB to desired sample
 
   Long64_t fNEvents;
   Long64_t fNTriggeredEvents;
 
-  ClassDef(AlidNdEtaCorrection,0)
+  ClassDef(AlidNdEtaCorrection, 1)
 };
 
 #endif
index 247262d263f09d34ec0d639a028ccd58abde7b56..60494d5f4207fa0a710c5e14bdac727a13ecd16c 100644 (file)
@@ -65,7 +65,7 @@ void AlidNdEtaCorrectionSelector::SlaveBegin(TTree * tree)
 
   AliSelectorRL::SlaveBegin(tree);
 
-  fdNdEtaCorrection = new AlidNdEtaCorrection();
+  fdNdEtaCorrection = new AlidNdEtaCorrection("dndeta_correction", "dndeta_correction");
 
   if (fTree)
     fEsdTrackCuts = dynamic_cast<AliESDtrackCuts*> (fTree->GetUserInfo()->FindObject("AliESDtrackCuts"));
index 19e207bb96fb9438de5100d21e3c4c81194ea145..ec23af438a827721fd3ffecc0652a91fc33a7d5d 100644 (file)
@@ -7,7 +7,7 @@ void CreatedNdEta(Bool_t correct = kTRUE, const Char_t* filename = "analysis_esd
   AlidNdEtaCorrection* dNdEtaCorrection = 0;
   if (correct)
   {
-    dNdEtaCorrection = new AlidNdEtaCorrection();
+    dNdEtaCorrection = new AlidNdEtaCorrection("dndeta_correction", "dndeta_correction");
     dNdEtaCorrection->LoadHistograms("correction_map.root","dndeta_correction");
     //dNdEtaCorrection->RemoveEdges(2, 0, 2);
   }
index 1ccf1f1fca5d0ca35645dd1a713cbf414a470c42..739141c1c238f31509c0c6f654a48e68ad2f0834 100644 (file)
@@ -4,7 +4,7 @@ void drawCorrection()
 {
   gSystem->Load("libPWG0base");
 
-  AlidNdEtaCorrection* dNdEtaMap = new AlidNdEtaCorrection();
+  AlidNdEtaCorrection* dNdEtaMap = new AlidNdEtaCorrection("dndeta_correction", "dndeta_correction");
   dNdEtaMap->LoadCorrection("correction_map.root");
 
   dNdEtaMap->DrawHistograms();
index c938d27aa2c7ebe57319180d22dc4374b0f0a9f1..8b94211408142f1b27b9ff60fcbf947a9c4fe228 100644 (file)
@@ -125,7 +125,7 @@ void ptCutoff()
 {
   gSystem->Load("libPWG0base");
 
-  AlidNdEtaCorrection* dNdEtaCorrection = new AlidNdEtaCorrection();
+  AlidNdEtaCorrection* dNdEtaCorrection = new AlidNdEtaCorrection("dndeta_correction", "dndeta_correction");
   dNdEtaCorrection->LoadHistograms("correction_map.root","dndeta_correction");
 
   dNdEtaCorrection->GetMeasuredFraction(0.3, -1, kTRUE);
@@ -203,7 +203,7 @@ void Track2Particle2D()
   gSystem->Load("libPWG0base");
 
   TFile* file = TFile::Open("correction_map.root");
-  AlidNdEtaCorrection* dNdEtaCorrection = new AlidNdEtaCorrection();
+  AlidNdEtaCorrection* dNdEtaCorrection = new AlidNdEtaCorrection("dndeta_correction", "dndeta_correction");
   dNdEtaCorrection->LoadHistograms("correction_map.root","dndeta_correction");
 
   TH3* gene = dNdEtaCorrection->GetTrack2ParticleCorrection()->GetGeneratedHistogram();
index b1c041c3701115e47edced4f44f8ba14fa0878f0..f8ea4911536f466ac5368151b901cc53625693d4 100644 (file)
@@ -27,7 +27,7 @@ makeCorrection(Char_t* dataDir, Int_t nRuns=20) {
   // ########################################################
   // definition of dNdEta correction object
 
-  AlidNdEtaCorrection* dNdEtaMap = new AlidNdEtaCorrection();
+  AlidNdEtaCorrection* dNdEtaMap = new AlidNdEtaCorrection("dndeta_correction", "dndeta_correction");
 
   // ########################################################
   // get the data dir  
index fb0f467b332fe20c9db5ae79b5d4033313902af9..711090205aa7e5b541490bd4878bc591d155c634 100644 (file)
@@ -29,7 +29,7 @@ void testAnalysis2(Char_t* data, Int_t nRuns=20, Int_t offset=0, Bool_t aMC = kF
   else
   {
     chain = CreateESDChainFromList(data, nRuns, offset);
-    proof = gROOT->Proof("jgrosseo@lxb6046");
+    proof = TProof::Open("jgrosseo@lxb6046");
 
     if (!proof)
     {
@@ -70,19 +70,19 @@ void testAnalysis2(Char_t* data, Int_t nRuns=20, Int_t offset=0, Bool_t aMC = kF
     return;
   }
 
-  chain->GetUserInfo()->Add(esdTrackCuts);
-  if (proof)
-    proof->AddInput(esdTrackCuts);
+  //chain->GetUserInfo()->Add(esdTrackCuts);
+  //if (proof)
+  //  proof->AddInput(esdTrackCuts);
 
   if (aMC == kFALSE)
   {
-    AlidNdEtaCorrection* dNdEtaCorrection = new AlidNdEtaCorrection();
+    AlidNdEtaCorrection* dNdEtaCorrection = new AlidNdEtaCorrection("dndeta_correction", "dndeta_correction");
     dNdEtaCorrection->LoadHistograms("correction_map.root","dndeta_correction");
     //dNdEtaCorrection->RemoveEdges(2, 0, 2);
 
-    chain->GetUserInfo()->Add(dNdEtaCorrection);
-    if (proof)
-      proof->AddInput(dNdEtaCorrection);
+    //chain->GetUserInfo()->Add(dNdEtaCorrection);
+    //if (proof)
+    //  proof->AddInput(dNdEtaCorrection);
   }
 
   TString selectorName = ((aMC == kFALSE) ? "AlidNdEtaAnalysisESDSelector" : "AlidNdEtaAnalysisMCSelector");
@@ -91,9 +91,9 @@ void testAnalysis2(Char_t* data, Int_t nRuns=20, Int_t offset=0, Bool_t aMC = kF
   // workaround for a bug in PROOF that only allows header files for .C files
   // please create symlink from <selector>.cxx to <selector>.C
   if (proof != kFALSE)
-    selectorName += ".C+";
+    selectorName += ".C++";
   else
-    selectorName += ".cxx+";
+    selectorName += ".cxx++";
 
   if (aDebug != kFALSE)
     selectorName += "g";
index c1e61e9ba0379042693750e079e6acd971863592..38d7a1333c781736fc2f20d0397aa21bd03263ff 100644 (file)
@@ -87,7 +87,7 @@ protected:
 
   //######################################################
   // esd track quality cuts
-  static const Char_t* fgkCutNames[kNCuts]; // names of cuts (for internal use)
+  static const Char_t* fgkCutNames[kNCuts]; //! names of cuts (for internal use)
 
   Int_t   fCutMinNClusterTPC;         // min number of tpc clusters
   Int_t   fCutMinNClusterITS;         // min number of its clusters  
@@ -122,30 +122,30 @@ protected:
   // diagnostics histograms
   Bool_t fHistogramsOn;               // histograms on/off
 
-  TH1F* fhNClustersITS[2];            //[2]
-  TH1F* fhNClustersTPC[2];            //[2]
-  
-  TH1F* fhChi2PerClusterITS[2];       //[2]
-  TH1F* fhChi2PerClusterTPC[2];       //[2]
+  TH1F* fhNClustersITS[2];            //->
+  TH1F* fhNClustersTPC[2];            //->
+
+  TH1F* fhChi2PerClusterITS[2];       //->
+  TH1F* fhChi2PerClusterTPC[2];       //->
 
-  TH1F* fhC11[2];                     //[2]
-  TH1F* fhC22[2];                     //[2]
-  TH1F* fhC33[2];                     //[2]
-  TH1F* fhC44[2];                     //[2]
-  TH1F* fhC55[2];                     //[2]
+  TH1F* fhC11[2];                     //->
+  TH1F* fhC22[2];                     //->
+  TH1F* fhC33[2];                     //->
+  TH1F* fhC44[2];                     //->
+  TH1F* fhC55[2];                     //->
 
-  TH1F* fhDXY[2];                     //[2]
-  TH1F* fhDZ[2];                      //[2]
-  TH2F* fhDXYvsDZ[2];                 //[2]
+  TH1F* fhDXY[2];                     //->
+  TH1F* fhDZ[2];                      //->
+  TH2F* fhDXYvsDZ[2];                 //->
 
-  TH1F* fhDXYNormalized[2];           //[2]
-  TH1F* fhDZNormalized[2];            //[2]
-  TH2F* fhDXYvsDZNormalized[2];       //[2]
+  TH1F* fhDXYNormalized[2];           //->
+  TH1F* fhDZNormalized[2];            //->
+  TH2F* fhDXYvsDZNormalized[2];       //->
 
-  TH1F*  fhCutStatistics;             // statistics of what cuts the tracks did not survive
-  TH2F*  fhCutCorrelation;            // 2d statistics plot
+  TH1F*  fhCutStatistics;             //-> statistics of what cuts the tracks did not survive
+  TH2F*  fhCutCorrelation;            //-> 2d statistics plot
   
-  ClassDef(AliESDtrackCuts,0)
+  ClassDef(AliESDtrackCuts, 1)
 };