From: cholm Date: Wed, 7 Dec 2005 13:25:27 +0000 (+0000) Subject: Fixes and removals X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=9aa0bdc4ff32dac1c580692fe1de910da2380e0e;p=u%2Fmrichter%2FAliRoot.git Fixes and removals --- diff --git a/FMD/Config.C b/FMD/Config.C index 7e1c07e2ddd..0ac26284b51 100644 --- a/FMD/Config.C +++ b/FMD/Config.C @@ -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; } diff --git a/FMD/FMDutilLinkDef.h b/FMD/FMDutilLinkDef.h index 789e4e36a8c..f686d26f8e1 100644 --- a/FMD/FMDutilLinkDef.h +++ b/FMD/FMDutilLinkDef.h @@ -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 diff --git a/FMD/Simulate.C b/FMD/Simulate.C index 7062a70cda4..0b5a0f1d62c 100644 --- a/FMD/Simulate.C +++ b/FMD/Simulate.C @@ -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(); } // diff --git a/FMD/scripts/DrawHits.C b/FMD/scripts/DrawHits.C index 130e8788805..2d2052ddded 100644 --- a/FMD/scripts/DrawHits.C +++ b/FMD/scripts/DrawHits.C @@ -15,6 +15,7 @@ #include #include #include +#include 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; diff --git a/FMD/scripts/DrawXsection.C b/FMD/scripts/DrawXsection.C index fb53a3aac86..36cdab1dd23 100644 --- a/FMD/scripts/DrawXsection.C +++ b/FMD/scripts/DrawXsection.C @@ -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(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"); } //____________________________________________________________________ diff --git a/FMD/scripts/MakeXsection.C b/FMD/scripts/MakeXsection.C index 8c3184fd974..f10a331fa1c 100644 --- a/FMD/scripts/MakeXsection.C +++ b/FMD/scripts/MakeXsection.C @@ -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 index cf079a4854b..00000000000 --- a/FMD/scripts/runflukageo.sh +++ /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 index 5a3dc79128e..00000000000 --- a/FMD/scripts/rungeant3geo.sh +++ /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 -#