]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Updated event embedding test suite (Adam)
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 18 Feb 2009 10:01:49 +0000 (10:01 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 18 Feb 2009 10:01:49 +0000 (10:01 +0000)
test/embedding/Config.C
test/embedding/rec.C
test/embedding/sim.C
test/embedding/simrun.C

index f9f952805c7730c4413f8f0de018792da6607698..e96e7813bfde53669adbb172a553c2eebaf59945 100644 (file)
@@ -40,7 +40,8 @@
 #include "FMD/AliFMDv1.h"
 #include "MUON/AliMUONv1.h"
 #include "PHOS/AliPHOSv1.h"
-#include "PHOS/AliPHOSSimParam.h"
+
+#include "PHOS/AliPHOSv1.h"
 #include "PMD/AliPMDv1.h"
 #include "T0/AliT0v1.h"
 #include "EMCAL/AliEMCALv2.h"
@@ -222,6 +223,8 @@ void Config()
     Float_t thmin = EtaToTheta(1);   // theta min. <---> eta max
     Float_t thmax = EtaToTheta(-1);  // theta max. <---> eta min 
     gener->SetThetaRange(thmin,thmax);
+    gener->SetProjectile("A",208,82);
+    gener->SetTarget("A",208,82);
 
     AliGenTherminator *genther = new AliGenTherminator();
     genther->SetFileName("event.out");
@@ -276,23 +279,27 @@ void Config()
 
   // FIELD
   //
-  AliMagF* field = 0x0;
+// Field
+
+    //  AliMagF* field = 0x0;
   if (mag == kNoField) {
     comment = comment.Append(" | L3 field 0.0 T");
-    field = new AliMagF("Maps","Maps", 2, 0., 0., 10., AliMagF::k2kG);
+    //    field = new AliMagF("Maps","Maps", 2, 0., 0., 10., AliMagF::k2kG);
+    TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, 1., 1., 10., AliMagF::k5kG));
   } else if (mag == k5kG) {
     comment = comment.Append(" | L3 field 0.5 T");
-    field = new AliMagFCheb("Maps","Maps", 2, 1., 1., 10., AliMagF::k5kG);
+    TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, 1., 1., 10., AliMagF::kNoField));
+//     field = new AliMagFCheb("Maps","Maps", 2, 1., 1., 10., AliMagF::k5kG);
   }
   printf("\n \n Comment: %s \n \n", comment.Data());
-  TGeoGlobalMagField::Instance()->SetField(field);
+  //  TGeoGlobalMagField::Instance()->SetField(field);
     
   rl->CdGAFile();
   
   Int_t iABSO  = 1;
   Int_t iACORDE= 0;
   Int_t iDIPO  = 1;
-  Int_t iEMCAL = 0;
+  Int_t iEMCAL = 1;
   Int_t iFMD   = 1;
   Int_t iFRAME = 1;
   Int_t iHALL  = 1;
@@ -301,7 +308,7 @@ void Config()
   Int_t iMUON  = 1;
   Int_t iPHOS  = 1;
   Int_t iPIPE  = 1;
-  Int_t iPMD   = 0;
+  Int_t iPMD   = 1;
   Int_t iHMPID = 1;
   Int_t iSHIL  = 1;
   Int_t iT0    = 1;
@@ -412,23 +419,6 @@ void Config()
         //=================== TRD parameters ============================
 
         AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
-        AliTRDgeometry *geoTRD = TRD->GetGeometry();
-       // Partial geometry: modules at 0,8,9,17
-       // starting at 3h in positive direction
-        geoTRD->SetSMstatus(1,0);
-       geoTRD->SetSMstatus(2,0);
-       geoTRD->SetSMstatus(3,0);
-       geoTRD->SetSMstatus(4,0);
-        geoTRD->SetSMstatus(5,0);
-       geoTRD->SetSMstatus(6,0);
-        geoTRD->SetSMstatus(7,0);
-        geoTRD->SetSMstatus(10,0);
-        geoTRD->SetSMstatus(11,0);
-        geoTRD->SetSMstatus(12,0);
-        geoTRD->SetSMstatus(13,0);
-        geoTRD->SetSMstatus(14,0);
-        geoTRD->SetSMstatus(15,0);
-        geoTRD->SetSMstatus(16,0);
     }
 
     if (iFMD)
@@ -449,25 +439,7 @@ void Config()
     if (iPHOS)
     {
         //=================== PHOS parameters ===========================
-
         AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
-        //Set simulation parameters different from the default ones.
-        AliPHOSSimParam* simEmc = AliPHOSSimParam::GetInstance() ;
-  
-        // APD noise of warm (+20C) PHOS:
-        // a2 = a1*(Y1/Y2)*(M1/M2), where a1 = 0.012 is APD noise at -25C,
-        // Y1 = 4.3 photo-electrons/MeV, Y2 = 1.7 p.e/MeV - light yields at -25C and +20C,
-        // M1 = 50, M2 = 50 - APD gain factors chosen for t1 = -25C and t2 = +20C,
-        // Y = MeanLightYield*APDEfficiency.
-
-        Float_t apdNoise = 0.012*2.5; 
-        simEmc->SetAPDNoise(apdNoise);
-
-        //Raw Light Yield at +20C
-        simEmc->SetMeanLightYield(18800);
-
-        //ADC channel width at +18C.
-        simEmc->SetADCchannelW(0.0125);
     }
 
 
@@ -531,9 +503,10 @@ AliGenerator* MbPhojet()
 //
 //    DPMJET
 #if defined(__CINT__)
-  gSystem->Load("libdpmjet");      // Parton density functions
-  gSystem->Load("libTDPMjet");      // Parton density functions
 #endif
+      gSystem->Load("libdpmjet");      // Parton density functions
+      gSystem->Load("libTDPMjet");      // Parton density functions
+
       AliGenDPMjet* dpmjet = new AliGenDPMjet(-1); 
       dpmjet->SetMomentumRange(0, 999999.);
       dpmjet->SetThetaRange(0., 180.);
index a1060f443c23c96381185b5a9ba76665f2928bfb..0e4974cf31e5e277c6209f584aa971160a0d1eef 100644 (file)
@@ -1,17 +1,41 @@
 void rec(Int_t embrun=0) {\r
-  new AliRun("gAlice","The ALICE Off-line Simulation Framework");\r
+//  new AliRun("gAlice","The ALICE Off-line Simulation Framework");\r
   AliReconstruction reco;\r
   reco.SetUniformFieldTracking(kFALSE);\r
   reco.SetWriteESDfriend(kTRUE);\r
   reco.SetWriteAlignmentData(kFALSE);\r
-  AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetLowFluxParam();\r
-  AliTPCReconstructor::SetRecoParam(tpcRecoParam);\r
-  AliTPCReconstructor::SetStreamLevel(0);\r
+//    reco.SetRecoParam("ITS",AliITSRecoParam::GetHighFluxParam());\r
+//    reco.SetRecoParam("TPC",AliTPCRecoParam::GetHighFluxParam());\r
+//    reco.SetRecoParam("TRD",AliTRDrecoParam::GetHighFluxParam());\r
+//    reco.SetRecoParam("PHOS",AliPHOSRecoParam::GetDefaultParameters());\r
+//    reco.SetRecoParam("MUON",AliMUONRecoParam::GetHighFluxParam());\r
+   \r
+//   AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetLowFluxParam();\r
+//   AliTPCReconstructor::SetRecoParam(tpcRecoParam);\r
+//   AliTPCReconstructor::SetStreamLevel(0);\r
   reco.SetRunReconstruction("ITS TPC TRD TOF");\r
-  reco.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-12-Release/Ideal/");\r
-  reco.SetRunQA(kFALSE);\r
-  reco.SetRunGlobalQA(kFALSE);\r
+//   reco.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/");\r
+//   reco.SetRunQA(kFALSE);\r
+//   reco.SetRunGlobalQA(kFALSE);\r
 \r
+  reco.SetDefaultStorage("local://$ALICE_ROOT/OCDB");\r
+  if (embrun == 1) {\r
+    reco.SetSpecificStorage("GRP/GRP/Data",\r
+                           Form("local://%s/../BackgroundFull",gSystem->pwd()));\r
+  }\r
+  else {\r
+    reco.SetSpecificStorage("GRP/GRP/Data",\r
+                           Form("local://%s",gSystem->pwd()));\r
+  }\r
+  reco.SetRunQA("ALL:ALL") ;\r
+  \r
+  AliQA::SetQARefStorage("local://$ALICE_ROOT/OCDB") ;\r
+  \r
+  for (Int_t det = 0 ; det < AliQA::kNDET ; det++) {\r
+    reco.SetQACycles(det, 999) ;\r
+    reco.SetQAWriteExpert(det) ; \r
+  }\r
+  \r
   TStopwatch timer;\r
   timer.Start();\r
   reco.Run();\r
index 87f22d73692ae42169d54b4bad04257c7ea661a0..2fd042c5bd25082a4186f13112a7b29accd382ab 100644 (file)
@@ -1,6 +1,17 @@
 void sim(Int_t embrun) 
 {
   AliSimulation sim;
+  if (embrun == 4) {
+    AliCDBManager *cdbm = AliCDBManager::Instance();
+    cdbm->SetRun(atoi(gSystem->Getenv("DC_RUN")));
+    cdbm->SetDefaultStorage("local://$ALICE_ROOT/OCDB");     
+    cdbm->SetSpecificStorage("GRP/GRP/Data",Form("local://%s",gSystem->pwd()));
+    sim.SetMakeSDigits("ITS TPC TRD TOF");  
+
+    sim.ConvertRaw2SDigits("raw.root","AliESDs.root");
+    return;
+  }
+  
   if (embrun == 2) {
     sim.SetRunGeneration(kFALSE);
     sim.SetMakeSDigits("");
@@ -13,10 +24,21 @@ void sim(Int_t embrun)
   sim.SetMakeDigits("ITS TPC TRD TOF");
   sim.SetWriteRawData("ITS TPC TRD TOF","raw.root",kTRUE);
   if (embrun == 1)
-    sim.MergeWith("../Background/galice.root",1);
-  sim.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-12-Release/Full/");
-  sim.SetRunHLT("");
-  sim.SetQA(kFALSE);
+    sim.MergeWith("../BackgroundSDigits/galice.root",1);
+
+  sim.SetDefaultStorage("local://$ALICE_ROOT/OCDB");
+  sim.SetSpecificStorage("GRP/GRP/Data",
+                              Form("local://%s",gSystem->pwd()));
+  sim.SetRunQA(":") ; 
+  AliQA::SetQARefStorage("local://$ALICE_ROOT/OCDB") ;
+  
+  for (Int_t det = 0 ; det < AliQA::kNDET ; det++) {
+    sim.SetQACycles(det, 1) ;
+  }
+
+//   sim.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Full/");
+//   sim.SetRunHLT("");
+//   sim.SetQA(kFALSE);
 
   sim.Run(1);
 }
index f5e27acde9d3ae6b6f7b7e3028a5aef8aba139a0..e1c5d8a1be3ad9d0b79cc83edf3482fcd236fc48 100644 (file)
   gSystem->Setenv("ALIMDC_RAWDB2","./mdc2");\r
   gSystem->Setenv("ALIMDC_TAGDB","./mdc1/tag");\r
   gSystem->Setenv("ALIMDC_RUNDB","./mdc1/meta");\r
-  cout<< "SIMRUN:: Run " << gSystem->Getenv("DC_RUN") << " Event " << gSystem->Getenv("DC_EVENT")\r
-         << " Process "    << gSystem->Getenv("DC_RUN_TYPE")\r
-         << " minpthard " << gSystem->Getenv("PTHARDMIN")\r
-         << " maxpthard " << gSystem->Getenv("PTHARDMAX")\r
-         << " minpt "     << gSystem->Getenv("PTGAMMAPI0MIN")\r
+  cout    << "SIMRUN:: Run " << gSystem->Getenv("DC_RUN") << " Event " << gSystem->Getenv("DC_EVENT")\r
          << endl;\r
 \r
 \r
   gSystem->Setenv("CONFIG_EMBEDDING","kBackground");\r
 \r
   cout<<">>>>> BACKGROUND SIMULATION <<<<<"<<endl;\r
-  gSystem->Exec("mkdir Background");\r
-  gSystem->Exec("cp Config.C Background/");\r
-  gSystem->Exec("cp sim.C Background/");\r
-  gSystem->Exec("cp rec.C Background/");\r
-  gSystem->ChangeDirectory("Background/");\r
+  gSystem->Exec("mkdir BackgroundFull");\r
+  gSystem->Exec("cp Config.C BackgroundFull/");\r
+  gSystem->Exec("cp sim.C BackgroundFull/");\r
+  gSystem->Exec("cp rec.C BackgroundFull/");\r
+  gSystem->ChangeDirectory("BackgroundFull/");\r
   gSystem->Exec("aliroot -b -q 'sim.C(0)' > sim.log 2>&1");\r
   cout<<">>>>> BACKGROUND RECONSTRUCTION <<<<<"<<endl;\r
   gSystem->Exec("aliroot -b -q 'rec.C(0)' > rec.log 2>&1");\r
   gSystem->ChangeDirectory("../");\r
 \r
+  // Convert Raw to SDigits\r
+  cout << ">>>>> CONVERTING RAW 2 SDIGITS <<<<<" << endl;\r
+  gSystem->Exec("mkdir Background");\r
+  gSystem->Exec("cp BackgroundFull/raw.root Background/");\r
+  gSystem->Exec("cp BackgroundFull/AliESDs.root Background/");\r
+  gSystem->Exec("cp -a BackgroundFull/GRP Background/");\r
+  gSystem->Exec("cp sim.C Background/");\r
+  gSystem->ChangeDirectory("Background/");\r
+  gSystem->Exec("aliroot -b -q 'sim.C(4)' > sim.log 2>&1");\r
+  gSystem->ChangeDirectory("../");\r
+  gSystem->Exec("mkdir BackgroundSDigits");\r
+  gSystem->Exec("cp Background/*SDigits.root BackgroundSDigits");\r
+  gSystem->Exec("cp BackgroundFull/galice.root BackgroundSDigits/");\r
+  gSystem->Exec("cp BackgroundFull/AliESDs.root BackgroundSDigits/");\r
+\r
   // Merged simulation\r
   gSystem->Setenv("CONFIG_EMBEDDING","kMerged");\r
 \r
 \r
   // Pure signal re-reconstruction\r
   gSystem->Setenv("CONFIG_EMBEDDING","kSignal");\r
-\r
+  \r
   cout<<">>>>> SIGNAL SIMULATION <<<<<<"<< endl;\r
   gSystem->Exec("mkdir Signal");\r
   gSystem->Exec("cp Config.C Signal/");\r
   cout<<">>>>> SIGNAL RECONSTRUCTION <<<<<"<<endl;\r
   gSystem->Exec("aliroot -b -q 'rec.C(2)' > rec.log 2>&1");\r
   gSystem->ChangeDirectory("../");\r
-\r
+  \r
   //  cout<<">>>>> TAG <<<<<"<<endl;\r
   //  gSystem->Exec("aliroot -b -q tag.C > tag.log 2>&1");\r
   //  cout<<">>>>> CHECK ESD <<<<<"<<endl;\r