]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fixes and removals
authorcholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 Dec 2005 13:25:27 +0000 (13:25 +0000)
committercholm <cholm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 7 Dec 2005 13:25:27 +0000 (13:25 +0000)
FMD/Config.C
FMD/FMDutilLinkDef.h
FMD/Simulate.C
FMD/scripts/DrawHits.C
FMD/scripts/DrawXsection.C
FMD/scripts/MakeXsection.C
FMD/scripts/runflukageo.sh [deleted file]
FMD/scripts/rungeant3geo.sh [deleted file]

index 7e1c07e2dddd3de0df63db11614d5d3b4b41fc98..0ac26284b514948f9b40fe3f04f4497603bb78ea 100644 (file)
@@ -247,7 +247,7 @@ Config()
     gSystem->Load("libGeom");
     cout << "\t* Loading TFluka..." << endl;  
     gSystem->Load("libTFluka");    
-    
+    gSystem->MakeDirectory("peg");
     // 
     // FLUKA MC
     //
@@ -316,6 +316,11 @@ Config()
        ((TFluka*)gMC)->SetGeneratePemf(kFALSE);
       else
        ((TFluka*)gMC)->SetGeneratePemf(kTRUE);
+      TString neuxsc(gSystem->Which(".", "neuxsc.bin"));
+      if (neusxc->IsNull()) {
+       gSystem->Link("$(FLUPRO)/neuxsc.bin", "neuxsc.bin");
+      }
+      gSystem->CopyFile("$(FLUPRO)/random.dat", "old.seed", kTRUE);
     }
     break;
   }
index 789e4e36a8c833246996996c8671505ea60baafa..f686d26f8e11b185bf2f4c0da5a30847b50049d3 100644 (file)
@@ -19,6 +19,7 @@
 #pragma link C++ class  AliFMDInputHits;
 #pragma link C++ class  AliFMDInputDigits;
 #pragma link C++ class  AliFMDInputSDigits;
+#pragma link C++ class  AliFMDInputRecPoints;
 
 #else
 # error Not for compilation 
index 7062a70cda4abda68fdf7e3a5e772eb8e3832bb2..0b5a0f1d62cbc849c8c2fcd96e477a8844c60aeb 100644 (file)
@@ -23,9 +23,13 @@ Simulate()
  sim.SetConfigFile("$(ALICE_ROOT)/FMD/Config.C");
  // sim.SetMakeSDigits("FMD");
  sim.SetMakeDigits("FMD");
- sim.SetWriteRawData("FMD");
// sim.SetWriteRawData("FMD");
  // sim.SetMakeDigitsFromHits("FMD");
- sim.Run(1); 
+ TStopwatch w;
+ w.Start();
+ sim.Run(10); 
+ w.Stop();
+ w.Print();
 }
 
 //
index 130e87888058fb83d655850d52316c0f16a985c0..2d2052ddded5cbc7f388692479514b1bef41b567 100644 (file)
@@ -15,6 +15,7 @@
 #include <AliFMDInput.h>
 #include <iostream>
 #include <TStyle.h>
+#include <TArrayF.h>
 
 class DrawHits : public AliFMDInputHits
 {
@@ -23,9 +24,28 @@ private:
 public:
   DrawHits() 
   { 
-    fElossVsPMQ = new TH2D("bad", "#Delta E vs. p/(mq^{2})>1GeV", 
-                    1000, 1, 100, 50, 0.00001, 10);
-    fElossVsPMQ->SetXTitle("p/(mq^{2}) [GeV/GeV]");
+    Double_t emax = 1e4;
+    Double_t emin = 1e-5;
+    Int_t    n    = 901;
+    TArrayF tkine(n);
+    Float_t dp   = 1/TMath::Log10(emax/emin)/10;
+    Float_t pmin = TMath::Log10(emin);
+    tkine[0]     = emin;
+    for (Int_t i=1; i < tkine.fN; i++) {
+      Float_t el = pmin + i * dp;
+      tkine[i]   = TMath::Power(10, el);
+    }
+    Double_t dmin = .1;
+    Double_t dmax = 10;
+    Int_t    nd = 1000;
+    TArrayF eloss(nd+1);
+    eloss[0] = dmin;
+    for (Int_t i = 1; i < eloss.fN; i++){
+      eloss[i] = dmin + i * (dmax-dmin)/(eloss.fN-1);
+    }
+    fElossVsPMQ = new TH2D("bad", "#Delta E vs. p/(mq^{2})", 
+                          tkine.fN-1, tkine.fArray, eloss.fN-1, eloss.fArray);
+    fElossVsPMQ->SetXTitle("p/(mq^{2})");
     fElossVsPMQ->SetYTitle("#Delta E [MeV]");
   }
   Bool_t ProcessHit(AliFMDHit* hit, TParticle*) 
@@ -34,15 +54,19 @@ public:
       std::cout << "No hit" << std::endl;
       return kFALSE;
     }
-    Float_t pmq = 0;
-    if (hit->M() != 0 && hit->Q() != 0) 
-      pmq = hit->P() / hit->M() / TMath::Power(hit->Q()/3, 2);
+    if (TMath::Abs(hit->Pdg()) != 211) return kTRUE;
+    // Float_t pmq = 0;
+    // Float_t q = hit->Q() / 3.;
+    // if (hit->M() != 0 && hit->Q() != 0) 
+    //  pmq = hit->P() / (hit->M()*q*q);
+    Float_t pmq = hit->P();
     fElossVsPMQ->Fill(pmq, hit->Edep());
     return kTRUE;
   }
   Bool_t Finish()
   {
     gStyle->SetPalette(1);
+    gStyle->SetOptTitle(0);
     fElossVsPMQ->SetStats(kFALSE);
     fElossVsPMQ->Draw("COLZ");
     return kTRUE;
index fb53a3aac86a16d4d7f2b0dc10014b68a8535305..36cdab1dd239a815701e662879d549e4dec09e0a 100644 (file)
@@ -1,11 +1,11 @@
 void
-DrawXsection(const char* file="xsec.root", 
+DrawXsection(const char* filename="xsec.root", 
             const char* var="LOSS", 
             const char* medName="FMD_Si$", 
             Double_t thick=.03,
             const char* pdgName="pi+")
 {
-  TFile*   file = TFile::Open("xsec.root", "READ");
+  TFile*   file = TFile::Open(filename, "READ");
   TTree*   tree = static_cast<TTree*>(file->Get(Form("%s_%s",medName,
                                                     pdgName)));
   TLeaf* tb   = tree->GetLeaf("T");
@@ -25,19 +25,20 @@ DrawXsection(const char* file="xsec.root",
     std::cerr << "Couldn't find particle " << pdgName << std::endl;
     return;
   }
-  Double_t m = pdgP->Mass();
-  Double_t q = pdgP->Charge() / 3;
-  if (m == 0) {
-    std::cerr  << "Mass is 0" << std::endl;
-    return;
-  }
+  // Double_t m = pdgP->Mass();
+  // Double_t q = pdgP->Charge() / 3;
+  // std::cout << q << "\t" << m << std::endl;
+  // if (m == 0) {
+  ///  std::cerr  << "Mass is 0" << std::endl;
+  // return;
+  // }
   
   TGraph* graph = new TGraph(n);
   for (Int_t i = 0; i < n; i++) {
     tree->GetEntry(i);
-    graph->SetPoint(i, tkine/m/q/q, value*thick);
+    graph->SetPoint(i, tkine, value*thick); // /(m*q*q)
   }
-  graph->Draw("ALP");
+  graph->Draw("LP same");
 }
 
 //____________________________________________________________________
index 8c3184fd9748fa5b548eefd2d20481cd051c651c..f10a331fa1c2e807db0dea8a5d3ca3d0d18d4292 100644 (file)
@@ -12,7 +12,7 @@
 void
 MakeXsection()
 {
-  gROOT->ProcessLine(".x Compile.C(\"$ALICE_ROOT/FMD/scripts/GetSection.C\"");
+  gROOT->ProcessLine(".x Compile.C(\"$(ALICE_ROOT)/FMD/scripts/GetXsection.C\"");
   gAlice->InitMC("$(ALICE_ROOT)/FMD/Config.C");
   TFile* file = TFile::Open("xsec.root", "RECREATE");
   GetXsection("FMD_Si$", "pi+");
diff --git a/FMD/scripts/runflukageo.sh b/FMD/scripts/runflukageo.sh
deleted file mode 100755 (executable)
index cf079a4..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/bash
-CURDIR=`pwd`
-cd $ALICE_ROOT
-echo 'Making sure that TFluka is up to date...'
-make all-TFluka
-cd $CURDIR
-
-# Make working directory 
-rm -rf fluka
-mkdir -p fluka
-cd fluka 
-
-# Make a peg directory 
-mkdir -p peg
-
-# Link here some special Fluka files needed
-ln -s $FLUPRO/xnloan.dat .
-ln -s $FLUPRO/sigmapi.bin .
-ln -s $FLUPRO/nuclear.bin .
-ln -s $FLUPRO/neuxsc_72.bin neuxsc.bin
-ln -s $FLUPRO/fluodt.dat .
-ln -s $FLUPRO/elasct.bin .
-
-# Copy the random seed
-cp $FLUPRO/random.dat old.seed
-
-# Give some meaningfull name to the output
-ln -s fluka.out fort.11
-
-# Link the pemf and input file for alice
-# This is wrong:
-#   ln -s $ALICE_ROOT/TFluka/input/FlukaVmc.pemf .
-# Maybe 
-cp $ALICE_ROOT/TFluka/input/alice.pemf FlukaVmc.pemf
-
-#Link FlukaConfig.C as Config.C
-cp $ALICE_ROOT/FMD/scripts/ConfigInner.C .
-cp $ALICE_ROOT/.rootrc . 
-# echo 'Execute: gAlice->Init() OR gAlice->RunMC() at the ROOT prompt'
-# Launch aliroot
-aliroot -l  # -b -q ../runIt.C > run.log 2>&1 
-
-cd $CURDIR
-# ____________________________________________________________________
-#
-# EOF
-#
diff --git a/FMD/scripts/rungeant3geo.sh b/FMD/scripts/rungeant3geo.sh
deleted file mode 100755 (executable)
index 5a3dc79..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/bash
-CURDIR=`pwd`
-cd $ALICE_ROOT
-echo 'Making sure that AliROOT is up to date...'
-make
-cd $CURDIR
-
-# Make working directory 
-rm -rf geant321
-mkdir -p geant321
-cd geant321
-
-
-#Link FlukaConfig.C as Config.C
-cp $ALICE_ROOT/FMD/Config.C .
-cp $ALICE_ROOT/.rootrc . 
-# echo 'Execute: gAlice->Init() OR gAlice->RunMC() at the ROOT prompt'
-# Launch aliroot
-aliroot -l -b -q ../runIt.C > run.log 2>&1 
-
-cd $CURDIR
-# ____________________________________________________________________
-#
-# EOF
-#