splitting of simulation and reconstruction code (T.Kuhr)
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 28 Jul 2004 12:32:46 +0000 (12:32 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 28 Jul 2004 12:32:46 +0000 (12:32 +0000)
19 files changed:
ALIROOT/binaliroot.pkg
FMD/AliFMD.cxx
FMD/AliFMD.h
FMD/AliFMDReconstructor.cxx
FMD/FMDbaseLinkDef.h [new file with mode: 0644]
FMD/FMDrecLinkDef.h [new file with mode: 0644]
FMD/FMDsimLinkDef.h [moved from FMD/FMDLinkDef.h with 77% similarity]
FMD/libFMD.pkg [deleted file]
FMD/libFMDbase.pkg [new file with mode: 0644]
FMD/libFMDrec.pkg [new file with mode: 0644]
FMD/libFMDsim.pkg [new file with mode: 0644]
START/STARTbaseLinkDef.h [new file with mode: 0755]
START/STARTrecLinkDef.h [new file with mode: 0755]
START/STARTsimLinkDef.h [moved from START/STARTLinkDef.h with 80% similarity]
START/libSTART.pkg [deleted file]
START/libSTARTbase.pkg [new file with mode: 0644]
START/libSTARTrec.pkg [new file with mode: 0644]
START/libSTARTsim.pkg [new file with mode: 0644]
build/module.dep

index b29eb78..1ce735d 100644 (file)
@@ -5,8 +5,9 @@ ELIBSDIR:=
 
 ELIBS:= MUON TPCbase TPCsim TPCrec TPCfast \
        ITS PMD TRDbase TRDsim TRDrec TRDfast \
-       FMD TOF PHOS CRT RICH ZDC VZERO EMCAL \
-        STRUCT START EVGEN STEER CONTAINERS pythia6 AliPythia6 pdf THijing \
+       FMDbase FMDsim FMDrec TOF PHOS CRT RICH ZDC VZERO EMCAL \
+        STRUCT STARTbase STARTsim STARTrec EVGEN STEER CONTAINERS \
+        pythia6 AliPythia6 pdf THijing \
         hijing TMEVSIM mevsim THbtp HBTP THerwig herwig TEPEMGEN EPEMGEN \
         TPHIC FASTSIM microcern RAW
 # g2c_sh
index 0c21558..f780ae8 100644 (file)
@@ -53,7 +53,6 @@
 #include <TVirtualMC.h>
 
 #include "AliDetector.h"
-#include "AliFMDReconstParticles.h"
 #include "AliFMDdigit.h"
 #include "AliFMDhit.h"
 #include "AliFMDv1.h"
@@ -72,7 +71,6 @@ AliFMD::AliFMD ():AliDetector ()
   fIshunt = 0;
   fHits     = 0;
   fDigits   = 0;
-  fReconParticles=0; 
 }
 
 //_____________________________________________________________________________
@@ -88,7 +86,6 @@ AliDetector (name, title)
   fHits = new TClonesArray ("AliFMDhit", 1000);
   // Digits for each Si disk
   fDigits = new TClonesArray ("AliFMDdigit", 1000);
-  fReconParticles=new TClonesArray("AliFMDReconstParticles",1000); 
   gAlice->GetMCApp()->AddHitList (fHits);
 
   fIshunt = 0;
@@ -112,12 +109,6 @@ AliFMD::~AliFMD ()
       delete fDigits;
       fDigits = 0;
     }
-   if (fReconParticles)
-    {
-      fReconParticles->Delete ();
-      delete fReconParticles;
-      fReconParticles = 0;
-    }
 
 }
 
@@ -248,7 +239,6 @@ void AliFMD::MakeBranch (Option_t * option)
   
   const char *cH = strstr(option,"H");
   const char *cD = strstr(option,"D");
-  const char *cR = strstr(option,"R");
   
   if (cH && (fHits == 0x0)) fHits = new TClonesArray ("AliFMDhit", 1000);
 
@@ -259,12 +249,6 @@ void AliFMD::MakeBranch (Option_t * option)
     MakeBranchInTree(fLoader->TreeD(), branchname,&fDigits, kBufferSize, 0);
   }
 
-  if (cR){
-    if (fReconParticles == 0x0) 
-      fReconParticles=new TClonesArray("AliFMDReconstParticles",1000); 
-    MakeBranchInTree(fLoader->TreeR(), branchname,&fReconParticles, kBufferSize, 0);
-  }
-  
 }
 
 //_____________________________________________________________________________
@@ -288,14 +272,6 @@ void AliFMD::SetTreeAddress ()
       if (branch)
        branch->SetAddress (&fDigits);
     }
-  
-  if (fLoader->TreeR() && fReconParticles) 
-    {
-      if (fReconParticles == 0x0) 
-        fReconParticles=new TClonesArray("AliFMDReconstParticles",1000); 
-      branch = fLoader->TreeR()->GetBranch("FMD"); 
-      if (branch) branch->SetAddress(&fReconParticles) ;
-    }   
 }
 
 
index f564788..b1834ed 100644 (file)
@@ -41,7 +41,6 @@ public:
 
  
    // Digitisation
-  TClonesArray *ReconParticles() const {return fReconParticles;}   
   virtual const void SetHitsAddressBranch(TBranch *b){b->SetAddress(&fHits);}
   virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const;
 
@@ -55,10 +54,7 @@ public:
   Int_t   fNevents ;        // Number of events to digitize
   Int_t fEvNrSig;                 // signal     event number
 
-
-  TClonesArray *fReconParticles; //array of reconstructed multiplicity in 0.1eta
-
- ClassDef(AliFMD,6)  //Class for the FMD detector
+ ClassDef(AliFMD,7)  //Class for the FMD detector
 };
 #endif // AliFMD_H
 
index fb3233c..4cc6f68 100644 (file)
@@ -28,6 +28,7 @@
 #include "TROOT.h"
 #include "TFolder.h"
 #include "TH2F.h"
+#include "TRandom.h"
 
 // --- Standard library ---
 #include <stdlib.h>
 #include "AliLoader.h"
 
 #include "AliFMDdigit.h"
-#include "AliFMDhit.h"
 #include "AliFMDReconstParticles.h"
-#include "AliFMD.h"
-#include "AliFMDv1.h"
 #include "AliFMDReconstructor.h"
 #include "AliRun.h"
 #include "AliConfig.h"
@@ -114,6 +112,9 @@ void AliFMDReconstructor::Reconstruct(AliRunLoader* runLoader) const
   gDirectory = cwd;
  
   plFMD->LoadRecPoints("RECREATE");
+  TClonesArray* reconParticles = new TClonesArray("AliFMDReconstParticles"); 
+  TClonesArray* digits = new TClonesArray("AliFMDDigit");
   Int_t retval=0;     
   Int_t nevents=Int_t (runLoader->TreeE()->GetEntries()); 
 #ifdef DEBUG
@@ -142,10 +143,6 @@ void AliFMDReconstructor::Reconstruct(AliRunLoader* runLoader) const
          return;
        }
       
-      AliFMD * fFMD = (AliFMD *)gAlice->GetDetector("FMD");
-      TClonesArray *fReconParticles=fFMD->ReconParticles();
-      TClonesArray *fDigits=fFMD->Digits();
       TTree* treeD = plFMD->TreeD();
       if (treeD == 0x0)
        {
@@ -158,7 +155,7 @@ void AliFMDReconstructor::Reconstruct(AliRunLoader* runLoader) const
       brDigits=treeD->GetBranch("FMD");
 
       if (brDigits) {
-       brDigits->SetAddress(&fDigits);
+       brDigits->SetAddress(&digits);
       }else{
        cerr<<"EXEC Branch FMD digits not found"<<endl;
        return;
@@ -167,17 +164,16 @@ void AliFMDReconstructor::Reconstruct(AliRunLoader* runLoader) const
       if(plFMD->TreeR()==0) plFMD->MakeTree("R");
 
       //Make branches
-      fFMD->MakeBranch("R");
+      const Int_t kBufferSize = 16000;
+      plFMD->TreeR()->Branch("FMD", &reconParticles, kBufferSize);
 
       
       Int_t zeroADC=6;
       // read Digits 
       AliFMDdigit  *fmdDigit;
-       if (fFMD)
-       {
-         plFMD->TreeD()->GetEvent(0); 
-                 
-         Int_t nDigits=fDigits->GetEntries();
+       if (plFMD->TreeD()->GetEvent(0))
+       {                 
+         Int_t nDigits=digits->GetEntries();
          Int_t recParticles[6];
          Int_t nRecPart=0 ;
          Int_t zeroPads=0;
@@ -186,7 +182,7 @@ void AliFMDReconstructor::Reconstruct(AliRunLoader* runLoader) const
          Float_t channelWidth=(22400*50)/1024;
          for (Int_t digit=0;digit<nDigits;digit++) 
            {
-             fmdDigit=(AliFMDdigit*)fDigits->UncheckedAt(digit);    
+             fmdDigit=(AliFMDdigit*)digits->UncheckedAt(digit);    
              ivol=fmdDigit->Volume();
              iSector=fmdDigit->NumberOfSector();
              iRing=fmdDigit->NumberOfRing();
@@ -247,13 +243,13 @@ void AliFMDReconstructor::Reconstruct(AliRunLoader* runLoader) const
                  recParticles[3]=rmin;
                  recParticles[4]=rmax;
                  recParticles[5]= fRecon;
-                 new((*fReconParticles)[nRecPart++])   AliFMDReconstParticles(recParticles);             
+                 new((*reconParticles)[nRecPart++])   AliFMDReconstParticles(recParticles);             
                  
 
                 } // eta
             } // volume
           
-       }//if FMD
+       }//if (plFMD->TreeD()->GetEvent(0))
        plFMD->TreeR()->Reset();
        plFMD->TreeR()->Fill(); 
        plFMD->WriteRecPoints("OVERWRITE");
diff --git a/FMD/FMDbaseLinkDef.h b/FMD/FMDbaseLinkDef.h
new file mode 100644 (file)
index 0000000..af807ee
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __CINT__
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+#pragma link off all globals;
+#pragma link off all classes;
+#pragma link off all functions;
+#pragma link C++ class  AliFMDdigit+;
+
+#endif
diff --git a/FMD/FMDrecLinkDef.h b/FMD/FMDrecLinkDef.h
new file mode 100644 (file)
index 0000000..82a1414
--- /dev/null
@@ -0,0 +1,14 @@
+#ifdef __CINT__
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+#pragma link off all globals;
+#pragma link off all classes;
+#pragma link off all functions;
+#pragma link C++ class  AliFMDReconstructor+;
+#pragma link C++ class  AliFMDReconstParticles+;
+
+#endif
similarity index 77%
rename from FMD/FMDLinkDef.h
rename to FMD/FMDsimLinkDef.h
index b19329d..1fb0098 100644 (file)
@@ -12,9 +12,6 @@
 #pragma link C++ class  AliFMDv0+;
 #pragma link C++ class  AliFMDv1+;
 #pragma link C++ class  AliFMDhit+;
-#pragma link C++ class  AliFMDdigit+;
-#pragma link C++ class  AliFMDReconstructor+;
-#pragma link C++ class  AliFMDReconstParticles+;
 #pragma link C++ class  AliFMDDigitizer+;
 
 #endif
diff --git a/FMD/libFMD.pkg b/FMD/libFMD.pkg
deleted file mode 100644 (file)
index 8e43729..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-SRCS= AliFMD.cxx AliFMDv0.cxx AliFMDv1.cxx AliFMDhit.cxx AliFMDdigit.cxx  AliFMDReconstructor.cxx AliFMDReconstParticles.cxx AliFMDDigitizer.cxx
-
-
-HDRS= $(SRCS:.cxx=.h)
-
-DHDR:=FMDLinkDef.h
-
diff --git a/FMD/libFMDbase.pkg b/FMD/libFMDbase.pkg
new file mode 100644 (file)
index 0000000..82abea9
--- /dev/null
@@ -0,0 +1,10 @@
+#-*- Mode: Makefile -*-
+# $Id$
+
+SRCS= AliFMDdigit.cxx
+
+
+HDRS= $(SRCS:.cxx=.h)
+
+DHDR:=FMDbaseLinkDef.h
+
diff --git a/FMD/libFMDrec.pkg b/FMD/libFMDrec.pkg
new file mode 100644 (file)
index 0000000..ec877bb
--- /dev/null
@@ -0,0 +1,10 @@
+#-*- Mode: Makefile -*-
+# $Id$
+
+SRCS= AliFMDReconstructor.cxx AliFMDReconstParticles.cxx
+
+
+HDRS= $(SRCS:.cxx=.h)
+
+DHDR:=FMDrecLinkDef.h
+
diff --git a/FMD/libFMDsim.pkg b/FMD/libFMDsim.pkg
new file mode 100644 (file)
index 0000000..14aeead
--- /dev/null
@@ -0,0 +1,10 @@
+#-*- Mode: Makefile -*-
+# $Id$
+
+SRCS= AliFMD.cxx AliFMDv0.cxx AliFMDv1.cxx AliFMDhit.cxx  AliFMDDigitizer.cxx
+
+
+HDRS= $(SRCS:.cxx=.h)
+
+DHDR:=FMDsimLinkDef.h
+
diff --git a/START/STARTbaseLinkDef.h b/START/STARTbaseLinkDef.h
new file mode 100755 (executable)
index 0000000..7a95ddd
--- /dev/null
@@ -0,0 +1,14 @@
+#ifdef __CINT__
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+#pragma link off all globals;
+#pragma link off all classes;
+#pragma link off all functions;
+#pragma link C++ class  AliSTARTdigit+;
+#pragma link C++ class  AliSTARTLoader+;
+
+#endif
diff --git a/START/STARTrecLinkDef.h b/START/STARTrecLinkDef.h
new file mode 100755 (executable)
index 0000000..8b2341b
--- /dev/null
@@ -0,0 +1,13 @@
+#ifdef __CINT__
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+#pragma link off all globals;
+#pragma link off all classes;
+#pragma link off all functions;
+#pragma link C++ class  AliSTARTReconstructor+;
+
+#endif
similarity index 80%
rename from START/STARTLinkDef.h
rename to START/STARTsimLinkDef.h
index 3151500..4c4da95 100755 (executable)
@@ -13,9 +13,6 @@
 #pragma link C++ class  AliSTARTv1+;
 #pragma link C++ class  AliSTARThit+;
 #pragma link C++ class  AliSTARThitPhoton+;
-#pragma link C++ class  AliSTARTdigit+;
-#pragma link C++ class  AliSTARTReconstructor+;
 #pragma link C++ class  AliSTARTDigitizer+;
-#pragma link C++ class  AliSTARTLoader+;
 
 #endif
diff --git a/START/libSTART.pkg b/START/libSTART.pkg
deleted file mode 100644 (file)
index d8346ee..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-SRCS= AliSTART.cxx AliSTARTv0.cxx AliSTARTv1.cxx AliSTARThit.cxx AliSTARTdigit.cxx AliSTARTReconstructor.cxx AliSTARTDigitizer.cxx AliSTARThitPhoton.cxx AliSTARTLoader.cxx 
-
-HDRS= $(SRCS:.cxx=.h)
-
-
-DHDR:= STARTLinkDef.h
-
diff --git a/START/libSTARTbase.pkg b/START/libSTARTbase.pkg
new file mode 100644 (file)
index 0000000..58d98b3
--- /dev/null
@@ -0,0 +1,10 @@
+#-*- Mode: Makefile -*-
+# $Id$
+
+SRCS= AliSTARTdigit.cxx AliSTARTLoader.cxx 
+
+HDRS= $(SRCS:.cxx=.h)
+
+
+DHDR:= STARTbaseLinkDef.h
+
diff --git a/START/libSTARTrec.pkg b/START/libSTARTrec.pkg
new file mode 100644 (file)
index 0000000..701c94b
--- /dev/null
@@ -0,0 +1,10 @@
+#-*- Mode: Makefile -*-
+# $Id$
+
+SRCS= AliSTARTReconstructor.cxx
+
+HDRS= $(SRCS:.cxx=.h)
+
+
+DHDR:= STARTrecLinkDef.h
+
diff --git a/START/libSTARTsim.pkg b/START/libSTARTsim.pkg
new file mode 100644 (file)
index 0000000..491b86e
--- /dev/null
@@ -0,0 +1,10 @@
+#-*- Mode: Makefile -*-
+# $Id$
+
+SRCS= AliSTART.cxx AliSTARTv0.cxx AliSTARTv1.cxx AliSTARThit.cxx AliSTARTDigitizer.cxx AliSTARThitPhoton.cxx
+
+HDRS= $(SRCS:.cxx=.h)
+
+
+DHDR:= STARTsimLinkDef.h
+
index d233d38..2390480 100644 (file)
@@ -8,7 +8,7 @@ DISPLAY/module.mk:       DISPLAY/libDISPLAY.pkg
 EMCAL/module.mk:        EMCAL/libEMCAL.pkg
 EPEMGEN/module.mk:       EPEMGEN/libEPEMGEN.pkg
 EVGEN/module.mk:        EVGEN/libEVGEN.pkg
-FMD/module.mk:          FMD/libFMD.pkg
+FMD/module.mk:          FMD/libFMDbase.pkg FMD/libFMDsim.pkg FMD/libFMDrec.pkg
 FASTSIM/module.mk:      FASTSIM/libFASTSIM.pkg
 Flugg/module.mk:         Flugg/libFlugg.pkg
 HBTAN/module.mk:        HBTAN/libHBTAN.pkg
@@ -30,7 +30,7 @@ PYTHIA6/module.mk:     PYTHIA6/libpythia6.pkg
 RALICE/module.mk:       RALICE/libRALICE.pkg
 RAW/module.mk:           RAW/libRAW.pkg
 RICH/module.mk:                 RICH/libRICH.pkg
-START/module.mk:        START/libSTART.pkg
+START/module.mk:        START/libSTARTbase.pkg START/libSTARTsim.pkg START/libSTARTrec.pkg
 STEER/module.mk:        STEER/libSTEER.pkg
 STRUCT/module.mk:       STRUCT/libSTRUCT.pkg
 TEPEMGEN/module.mk:      TEPEMGEN/libTEPEMGEN.pkg