예제 #1
0
void rdMu2TrigSimu(char *file="/star/data47/reco/pp200/pythia6_410/9_11gev/cdf_a/y2006c/gheisha_on/p07ic/rcf1309_*_2000evts.MuDst.root"){
  
  int nevents = 200;
  int flagMC=1;  // 0/1 == Using Real/Simulation data files 
  int useEemc=1; // 0/1 == Exclude/Include EEMC in Trigger Decisions 
  int useBemc=1; // 0/1 == Exclude/Include BEMC in Trigger Decisions 
  int useL2=1;   // 0/1 == Exclude/Include L2 in Trigger Decisions 
  int L2ConfigYear=2006; // possible: 2006, 2008
  int bemcConfig=2; // Online==1, Offline==2, Expert==3
  int playConfig=0; // jan:100_199
  int emcEveDump=0; // extrating raw EMC data in a custom format
  int outputL2Histo=0;//output L2 histos to directory outL2
  TString outDir="./outL2/"; 


  gROOT->LoadMacro("$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
  loadSharedLibraries();
  assert( !gSystem->Load("StDetectorDbMaker"));
  assert( !gSystem->Load("StDbUtilities"));
  assert( !gSystem->Load("StDbBroker"));
  assert( !gSystem->Load("St_db_Maker"));
  assert( !gSystem->Load("StEEmcUtil")); // needed by eemcDb
  assert( !gSystem->Load("StEEmcDbMaker"));
  assert( !gSystem->Load("StDaqLib")); // needed by bemcDb
  assert( !gSystem->Load("StEmcRawMaker"));
  assert( !gSystem->Load("StEmcADCtoEMaker"));
  if (flagMC) {
    assert( !gSystem->Load("StMcEvent"));
    assert( !gSystem->Load("StMcEventMaker"));
    assert( !gSystem->Load("StEmcSimulatorMaker"));
    assert( !gSystem->Load("StEEmcSimulatorMaker"));
    assert( !gSystem->Load("StEpcMaker"));
  }
  assert( !gSystem->Load("StTriggerUtilities"));

  gROOT->Macro("LoadLogger.C");
  cout << " loading done " << endl;
  
  chain= new StChain("StChain"); 

  if (flagMC){
    TString geantFile;
    geantFile += file;
    geantFile.ReplaceAll("MuDst.root", "geant.root");
    printf("geantFile=%s\n", geantFile.Data());
    StIOMaker* ioMaker = new StIOMaker();
    ioMaker->SetFile(geantFile);
    ioMaker->SetIOMode("r");
    ioMaker->SetBranch("*",0,"0");             //deactivate all branches
    ioMaker->SetBranch("geantBranch",0,"r");   //activate geant Branch
    StMcEventMaker *evtMaker = new StMcEventMaker();
  }

  //Need MuDstMaker to get data
  printf(" Analyzing file=%s\n",file);  
  StMuDstMaker* muDstMaker =new StMuDstMaker(0,0,"",file,"",1000);

  //Database -- get a real calibration from the database
  St_db_Maker* dbMk =0;
  if(useEemc || useL2) // full DB access
    dbMk = new St_db_Maker("StarDb","MySQL:StarDb","MySQL:StarDb","$STAR/StarDb");
  else // only Barrel is uploaded, is faster 
    dbMk  = new St_db_Maker("Calibrations","MySQL:Calibrations_emc");

    
  //If MC then must set database time and date
  //If Endcap fast simu is used tower gains in DB do not matter,JB
  if (flagMC) dbMk->SetDateTime(20060522, 55000);//timestamp R7142018
  
  //Collect all output histograms 
  TObjArray* HList=new TObjArray; 
  
  //Endcap DB
  if(useEemc || useL2) new StEEmcDbMaker("eemcDb");
  

  //Get BEMC adc values
  if (flagMC && useBemc) {
    StEmcSimulatorMaker* emcSim = new StEmcSimulatorMaker(); //use this instead to "redo" converstion from geant->adc
    if (bemcConfig == 1) {
        emcSim->setCheckStatus(kBarrelEmcTowerId,false); //this returns hits regardless of offline tower status
    }
    emcSim->setCalibSpread(kBarrelEmcTowerId,0.15);//spread gains by 15%
  }
  if (flagMC==0 && useBemc){
    StEmcADCtoEMaker *bemcAdc = new StEmcADCtoEMaker();//for real data this sets calibration and status
    if (bemcConfig == 1) {
        bemcAdc->setCheckStatus(kBarrelEmcTowerId,false);
    }
  }

  //must use slow simulator to get pedestals correct for L2
  if (flagMC==1 && useEemc){
    StEEmcSlowMaker *slowSim = new StEEmcSlowMaker("slowSim");
    slowSim->setSamplingFraction(0.0384); // effectively scales all Tower energies with a factor of 1.3 (added by: Ilya Selyuzhenkov; April 11, 2008)
    slowSim->setAddPed(true);
    slowSim->setSmearPed(true);
  }
 
  //Get TriggerMaker
  StTriggerSimuMaker *simuTrig = new StTriggerSimuMaker("StarTrigSimu");
  simuTrig->setHList(HList);
  simuTrig->setMC(flagMC); // must be before individual detectors, to be passed
  simuTrig->useBbc();
  if(useEemc) {
    simuTrig->useEemc(0);//default=0:just process ADC, 1,2:comp w/trgData,see .
    simuTrig->eemc->setSetupPath(eemcSetupPath);
  } 
  if(useBemc){
    simuTrig->useBemc();
    simuTrig->bemc->setConfig(bemcConfig);
  }

  if(flagMC && useEemc==2){
    // pass one argument to M-C as generic switch    
    // Endcap specific params -- ok Jan you need to change this to a default "online" setup
    int eemcDsmSetup[20]; // see StEemcTriggerSimu::initRun() for definition
    memset(eemcDsmSetup, 0,sizeof(eemcDsmSetup));// clear all, may be a bad default
    eemcDsmSetup[0]=3;  // HTthr0
    eemcDsmSetup[1]=12; // HTthr1
    eemcDsmSetup[2]=22; // HTthr2
    eemcDsmSetup[3]=1;  // TPthr0
    eemcDsmSetup[4]=17; // TPthr1
    eemcDsmSetup[5]=31; // TPthr2
    eemcDsmSetup[10]=2; //HTTPthrSelc, 2=use_thres_#1
    simuTrig->eemc->setDsmSetup(eemcDsmSetup);    
  }


  if(useL2) {
    /* 
       reads all input/setup files from  L2setup-yyyymmdd/
       writes all output files to L2out-yyyymmdd 
       depending on the DB time stamp 
       both dierectiorie MUST exist, setup must be reasonable
    */
    StGenericL2Emulator* simL2Mk=0;
    if(L2ConfigYear==2006) simL2Mk= new StL2_2006EmulatorMaker;
    else if(L2ConfigYear==2008) simL2Mk= new StL2_2008EmulatorMaker;
    assert(simL2Mk);
    simL2Mk->setSetupPath(eemcSetupPath);
    simL2Mk->setOutPath(outDir.Data());
    if (flagMC) simL2Mk->setMC();
    simuTrig->useL2(simL2Mk);
  }

  
  //if(emcEveDump) new StJanEventMaker;
    
  StTriggerSimuPlayMaker *playMk= new StTriggerSimuPlayMaker; // to develope user  analysis of trigQA 
  playMk->setConfig(playConfig);
  playMk->setHList(HList);
  
  
  chain->ls(3);
  chain->Init();
 
  for (Int_t iev=0;iev<nevents; iev++) {
    cout << "\n****************************************** " << endl;
    cout << "Working on eventNumber:\t" << iev <<"\tof:\t"<<nevents<<endl;
    cout << "****************************************** " << endl;
    chain->Clear();
    int iret = chain->Make(iev);
    total++;   
    if (iret % 10 == kStEOF || iret % 10 == kStFatal)  {
      cout << "Bad return code!" << endl;
      break;
    }

    int trigID[3]={127213,117211,137611};
    StMuDst *muDst = muDstMaker->muDst();
    StMuEvent *muEvent = muDst->event();    
    StMuTriggerIdCollection trig = muEvent -> triggerIdCollection();
    StTriggerId l1trig = trig.nominal();
    if( l1trig.isTrigger(trigID[0])) {
      cout<<" SimuTrigger 127213 ="<<simuTrig->isTrigger(trigID[0])<<" BEMC="<<simuTrig->bemc->triggerDecision(trigID[0])<<" L2="<<simuTrig->lTwo->triggerDecision(trigID[0])<<endl;
     }
    if( l1trig.isTrigger(trigID[1])) {
      cout<<" SimuTrigger 117211 ="<<simuTrig->isTrigger(trigID[1])<<" BEMC="<<simuTrig->bemc->triggerDecision(trigID[1])<<" L2="<<simuTrig->lTwo->triggerDecision(trigID[1])<<endl;
     }
    if( l1trig.isTrigger(trigID[2])) {
      cout<<" SimuTrigger 137611 ="<<simuTrig->isTrigger(trigID[2])<<" BEMC="<<simuTrig->bemc->triggerDecision(trigID[2])<<" L2="<<simuTrig->lTwo->triggerDecision(trigID[2])<<endl;
    }

    
    StTriggerSimuResult trigResult = simuTrig->detailedResult(trigID[2]);
    if (trigResult.bemcDecision()==1){
       vector<short> towerId = trigResult.highTowerIds();
      for (unsigned i=0; i<towerId.size(); i++) {
      	cout<<" LO Trigger BEMC Tower="<<towerId[i]<<" adc="<<trigResult.highTowerAdc(towerId[i])<<endl;
      }
    }


   if (trigResult.l2Decision()==1){
       vector<short> towerId = trigResult.highTowerIds();
      for (unsigned i=0; i<towerId.size(); i++) {
      	cout<<" L2 Trigger BEMC Tower="<<towerId[i]<<" adc="<<trigResult.highTowerAdc(towerId[i])<<endl;
      }
    }
 
  }

 
  chain->Finish();
  cout << "****************************************** " << endl;
  cout << "total number of events  " << total << endl;
  cout << "****************************************** " << endl;


  if (outputL2Histo==1) {
  
    TString fileMu=file;
    printf("=%s=\n",fileMu.Data());
    if(fileMu.Contains(".lis")) fileMu.ReplaceAll(".lis",".trgSim");
    if(fileMu.Contains(".MuDst.root")) fileMu.ReplaceAll(".MuDst.root",".trgSim");
    TString outF=outDir+fileMu;
    outF+=".hist.root";
    printf("=%s=\n",outF.Data());
    hf=new TFile(outF,"recreate");
    if(hf->IsOpen()) {
      HList->Write();
      printf("\n Histo saved -->%s<\n",outF.Data());
    } 
    else {
      printf("\n Failed to open Histo-file -->%s<, continue\n",outF.Data());
    }
  }
  
  //cout <<Form("sorting done %d of   nEve=%d, CPU rate=%.1f Hz, total time %.1f minute(s) \n\n",total,nEntries,rate,tMnt)<<endl;
 
}
예제 #2
0
void RunJetFinder2012pro(int nevents = 1000000,
const char* indir = "~zchang/2013-08-trgsimu/MuDst/",
const char* MuDst = "st_physics_13109014_raw_1020001.MuDst.root",
//const char* outdir ="~/data05/Run12Jets/",
const char* Jetfile = "st_physics_13109014_raw_1020001.jets.root",
const char* Uefile = "st_physics_13109014_raw_1020001.ueoc.root",
const char *Uefile_Region = "st_physics_13109014_raw_1020001.uereg.root",
const char* Skimfile = "st_physics_13109014_raw_1020001.skim.root"
//, bool useL2 = false
)
{
  cout<<"MuDst file is "<<MuDst<<endl;
  cout<<"JetTree file is "<<Jetfile<<endl;
  cout<<"SkimTree file is "<<Skimfile<<endl;

  gROOT->Macro("loadMuDst.C");
  gROOT->Macro("LoadLogger.C");

  gSystem->Load("StDetectorDbMaker");
  gSystem->Load("StTpcDb");
  gSystem->Load("StDbUtilities");
  gSystem->Load("StMcEvent");
  gSystem->Load("StMcEventMaker");
  gSystem->Load("StDaqLib");
  gSystem->Load("StEmcRawMaker");
  gSystem->Load("StEmcADCtoEMaker");
  gSystem->Load("StEmcSimulatorMaker");
  gSystem->Load("StDbBroker");
  gSystem->Load("St_db_Maker");
  gSystem->Load("StEEmcUtil");
  gSystem->Load("StEEmcDbMaker");
  gSystem->Load("StSpinDbMaker");
  gSystem->Load("StEmcTriggerMaker");
  gSystem->Load("StTriggerUtilities");
  gSystem->Load("StMCAsymMaker");
  gSystem->Load("StRandomSelector");
  gSystem->Load("libfastjet.so");
//  gSystem->Load("libCDFConesPlugin.so");
//  gSystem->Load("libEECambridgePlugin.so");
//  gSystem->Load("libJadePlugin.so");
//  gSystem->Load("libNestedDefsPlugin.so");
//  gSystem->Load("libSISConePlugin.so");
  gSystem->Load("libfastjet.so");
  gSystem->Load("libsiscone.so");
  gSystem->Load("libsiscone_spherical.so");
  gSystem->Load("libfastjetplugins.so");
 
  gSystem->Load("StJetFinder");
  gSystem->Load("StJetSkimEvent");
  gSystem->Load("StJets");
  gSystem->Load("StJetEvent");
  gSystem->Load("StUeEvent");
  gSystem->Load("StJetMaker");
  gSystem->Load("StTriggerFilterMaker");
  
   StChain *chain = new StChain;

   StMuDstMaker* muDstMaker = new StMuDstMaker(0,0,indir, MuDst,"",1000);

   StMuDbReader* muDstDb = StMuDbReader::instance();

   StTriggerFilterMaker* filterMaker = new StTriggerFilterMaker;
   //JP0
   filterMaker->addTrigger(380401);
   //JP1
   filterMaker->addTrigger(380402);
   //JP2
   filterMaker->addTrigger(380403);
   //AJP
   filterMaker->addTrigger(380404);
   
   //JP2*L2JetHigh
   //filterMaker->addTrigger(380405);
   //BHT2*BJP1
   //filterMaker->addTrigger(380205);
   //BHT2*BJP1*L2Bgamma
   //filterMaker->addTrigger(380208);
   //EHT0*EJP1*L2Egamma
   //filterMaker->addTrigger(380304);
   //BHT3*L2BW
   //filterMaker->addTrigger(380209);
   //filterMaker->addTrigger(380219);
   //EHT1*L2EW
   //filterMaker->addTrigger(380305);
   
   St_db_Maker* starDb = new St_db_Maker("StarDb","MySQL:StarDb");

   StEEmcDbMaker* eemcDb = new StEEmcDbMaker;

   StSpinDbMaker* spinDb = new StSpinDbMaker;

   StEmcADCtoEMaker* adc = new StEmcADCtoEMaker;
   adc->saveAllStEvent(true);

   StTriggerSimuMaker* simuTrig = new StTriggerSimuMaker;
   simuTrig->useOnlineDB();
   simuTrig->setMC(false);
   simuTrig->askTrigger("JP0");
   simuTrig->askTrigger("JP1");
   simuTrig->askTrigger("JP2");
   simuTrig->askTrigger("AJP");
//   simuTrig->emc->defineTrigger2012(13,"JP0",380401,0x8000);
//   simuTrig->emc->defineTrigger2012(14,"JP1",380402,0x0040);
//   simuTrig->emc->defineTrigger2012(15,"JP2",380403,0x0080);
//   simuTrig->emc->defineTrigger2012(16,"AJP",380404,0x1000);

   simuTrig->useBbc();
   simuTrig->useBemc();
   simuTrig->useEemc();
   simuTrig->bemc->setConfig(StBemcTriggerSimu::kOffline);

   StJetMaker2012* jetmaker = new StJetMaker2012;
   jetmaker->setJetFile(Jetfile);
   jetmaker->setJetFileUe(Uefile);

   StJetSkimEventMaker* skimEventMaker = new StJetSkimEventMaker("StJetSkimEventMaker", muDstMaker, Skimfile);

   StAnaPars* anapars12 = new StAnaPars;
   anapars12->useTpc = true;
   anapars12->useBemc = true;
   anapars12->useEemc = true;

   // The classes available for correcting tower energy for tracks are:
   // 1. StjTowerEnergyCorrectionForTracksMip
   // 2. StjTowerEnergyCorrectionForTracksFraction
   // 3. StjTowerEnergyCorrectionForTracksNull (default: no correction)
   anapars12->setTowerEnergyCorrection(new StjTowerEnergyCorrectionForTracksFraction(1.00));
   anapars12->addTpcCut(new StjTrackCutFlag(0));
   anapars12->addTpcCut(new StjTrackCutNHits(12));
   anapars12->addTpcCut(new StjTrackCutPossibleHitRatio(0.51));
   anapars12->addTpcCut(new StjTrackCutDca(3));
   //DcaD pT dependent cut for pp200 run9
   //   anapars12->addTpcCut(new StjTrackCutDcaPtDependent);
   //DcaT pT dependent cut for pp500 run11, run12
   anapars12->addTpcCut(new StjTrackCutTdcaPtDependent);
   //Don't Need Chi2 cut for Run12 either 
   //anapars12->addTpcCut(new StjTrackCutChi2(0,4));
   anapars12->addTpcCut(new StjTrackCutPt(0.2,200));
   anapars12->addTpcCut(new StjTrackCutEta(-2.5,2.5));
   anapars12->addTpcCut(new StjTrackCutLastPoint(125));

   // BEMC cuts
   anapars12->addBemcCut(new StjTowerEnergyCutBemcStatus(1));
   anapars12->addBemcCut(new StjTowerEnergyCutAdc(4,3)); // ADC-ped>4 AND ADC-ped>3*RMS
   anapars12->addBemcCut(new StjTowerEnergyCutEt(0.2));

   // EEMC cuts
   anapars12->addEemcCut(new StjTowerEnergyCutBemcStatus(1));
   anapars12->addEemcCut(new StjTowerEnergyCutAdc(4,3)); // ADC-ped>4 AND ADC-ped>3*RMS
   anapars12->addEemcCut(new StjTowerEnergyCutEt(0.2));

   // Jet cuts
   anapars12->addJetCut(new StProtoJetCutPt(5,200));
   anapars12->addJetCut(new StProtoJetCutEta(-100,100));
   // Jet Area
   StFastJetAreaPars *JetAreaPars = new StFastJetAreaPars;
   //Anti-kT R=0.6 for run12 jet finding
   // Set anti-kt R=0.6 parameters
   StFastJetPars* AntiKtR060Pars = new StFastJetPars;
   
   AntiKtR060Pars->setJetAlgorithm(StFastJetPars::antikt_algorithm);
   AntiKtR060Pars->setRparam(0.6);
   AntiKtR060Pars->setRecombinationScheme(StFastJetPars::E_scheme);
   AntiKtR060Pars->setStrategy(StFastJetPars::Best);
   AntiKtR060Pars->setPtMin(5.0);
   AntiKtR060Pars->setJetArea(JetAreaPars);
   //Anti-kT R=0.5 for run12 jet finding
   // Set anti-kt R=0.5 parameters
   StFastJetPars* AntiKtR050Pars = new StFastJetPars;
   AntiKtR050Pars->setJetAlgorithm(StFastJetPars::antikt_algorithm);
   AntiKtR050Pars->setRparam(0.5);
   AntiKtR050Pars->setRecombinationScheme(StFastJetPars::E_scheme);
   AntiKtR050Pars->setStrategy(StFastJetPars::Best);
   AntiKtR050Pars->setPtMin(5.0);
   AntiKtR050Pars->setJetArea(JetAreaPars);

   //  jetmaker->addBranch("CdfMidpointR070NHits12",anapars12,CdfMidpointR070Pars);
   //  jetmaker->addBranch("CdfMidpointR070NHits5",anapars5,CdfMidpointR070Pars);
   //  jetmaker->addBranch("CdfMidpointR070EMC",anaparsEMC,CdfMidpointR070Pars);
   jetmaker->addBranch("AntiKtR060NHits12",anapars12,AntiKtR060Pars);
   //  jetmaker->addBranch("AntiKtR060NHits5",anapars5,AntiKtR060Pars);
   //  jetmaker->addBranch("AntiKtR060EMC",anaparsEMC,AntiKtR060Pars);
   jetmaker->addBranch("AntiKtR050NHits12",anapars12,AntiKtR050Pars);
   //  jetmaker->addBranch("AntiKtR050NHits5",anapars5,AntiKtR050Pars);
   //  jetmaker->addBranch("AntiKtR050EMC",anaparsEMC,AntiKtR050Pars);
   StOffAxisConesPars *off050 = new StOffAxisConesPars(0.5);
   StOffAxisConesPars *off060 = new StOffAxisConesPars(0.6);
   jetmaker->addUeBranch("OffAxisConesR050", off050);
   jetmaker->addUeBranch("OffAxisConesR060", off060);
   
  // Run
   chain->Init();
   chain->EventLoop(nevents);
}
예제 #3
0
void runTrigTreeMaker( const Char_t *file="rcf10063_2_6000evts.MuDst.root", const Char_t* fileOut = "rcf10063_2_6000evts.TrigTree-A.root", Char_t trigVer = 'g', Int_t nevents = 10000000,
                       Int_t flagMC = 1, const Char_t *eemcSetupPath="/star/u/sgliske/Share/StarTrigSimuSetup/" ){
  
   //int flagMC=0;  // 0/1 == Using Real/Simulation data files 
  int useEemc=2; // 0/1 == Exclude/Include EEMC in Trigger Decisions 
  int useBemc=0; // 0/1 == Exclude/Include BEMC in Trigger Decisions 
  int useL2=1;   // 0/1 == Exclude/Include L2 in Trigger Decisions 
  int L2ConfigYear=2006; // possible: 2006, 2008
  int bemcConfig=1; // Online==1, Offline==2, Expert==3
  int playConfig=0; // jan:100_199
  int emcEveDump=0; // extrating raw EMC data in a custom format
  int outputL2Histo=1;//output L2 histos to directory outL2
  TString outDir="./outL2/"; 

  gROOT->LoadMacro("$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
  loadSharedLibraries();
  assert( !gSystem->Load("StDetectorDbMaker"));
  assert( !gSystem->Load("StTpcDb"));
  assert( !gSystem->Load("StDbUtilities"));
  assert( !gSystem->Load("StDbBroker"));
  assert( !gSystem->Load("St_db_Maker"));
  assert( !gSystem->Load("StEEmcUtil")); // needed by eemcDb
  assert( !gSystem->Load("StEEmcDbMaker"));
  assert( !gSystem->Load("StDaqLib")); // needed by bemcDb
  assert( !gSystem->Load("StEmcRawMaker"));
  assert( !gSystem->Load("StEmcADCtoEMaker"));
  if (flagMC) {
    assert( !gSystem->Load("StMcEvent"));
    assert( !gSystem->Load("StMcEventMaker"));
    assert( !gSystem->Load("StEmcSimulatorMaker"));
    assert( !gSystem->Load("StEEmcSimulatorMaker"));
    assert( !gSystem->Load("StEpcMaker"));
  }
  assert( !gSystem->Load("StTriggerUtilities"));
   assert( !gSystem->Load("StSpinDbMaker") );
  assert( !gSystem->Load("StEEmcPoolEEmcTreeContainers") );
  assert( !gSystem->Load("StEEmcTreeMaker") );

  gROOT->Macro("LoadLogger.C");
  cout << " loading done " << endl;
  
  chain= new StChain("StChain"); 

  if (flagMC){
    TString geantFile;
    geantFile += file;
    geantFile.ReplaceAll("MuDst.root", "geant.root");
    printf("geantFile=%s\n", geantFile.Data());
    StIOMaker* ioMaker = new StIOMaker();
    ioMaker->SetFile(geantFile);
    ioMaker->SetIOMode("r");
    ioMaker->SetBranch("*",0,"0");             //deactivate all branches
    ioMaker->SetBranch("geantBranch",0,"r");   //activate geant Branch
    StMcEventMaker *evtMaker = new StMcEventMaker();
  }

  //Need MuDstMaker to get data
  printf(" Analyzing file=%s\n",file);  
  StMuDstMaker* muDstMaker =new StMuDstMaker(0,0,"",file,"",1000);

   // just to make sure StEvent is found for the trig simu
   StMuDst2StEventMaker *muDst2StEvent = new StMuDst2StEventMaker();

  //Database -- get a real calibration from the database
  St_db_Maker* dbMk =0;
  if(useEemc || useL2) // full DB access
    dbMk = new St_db_Maker("StarDb","MySQL:StarDb","MySQL:StarDb","$STAR/StarDb");
  else // only Barrel is uploaded, is faster 
    dbMk  = new St_db_Maker("Calibrations","MySQL:Calibrations_emc");
   dbMk->SetAttr("blacklist", "fgt");
   dbMk->SetAttr("blacklist", "svt");
   dbMk->SetAttr("blacklist", "tpc");
   dbMk->SetAttr("blacklist", "ftpc");

    
  // CORRECTION: do not always need to set date and time for MC
  //If MC then must set database time and date
  //If Endcap fast simu is used tower gains in DB do not matter,JB
  //if (flagMC) dbMk->SetDateTime(20060522, 55000);//timestamp R7142018
  
  //Collect all output histograms 
  TObjArray* HList=new TObjArray; 
  
  //Endcap DB
  if(useEemc || useL2) new StEEmcDbMaker("eemcDb");
  

  //Get BEMC adc values
  if (flagMC && useBemc) {
    StEmcSimulatorMaker* emcSim = new StEmcSimulatorMaker(); //use this instead to "redo" converstion from geant->adc
    if (bemcConfig == 1) {
        emcSim->setCheckStatus(kBarrelEmcTowerId,false); //this returns hits regardless of offline tower status
    }
    emcSim->setCalibSpread(kBarrelEmcTowerId,0.15);//spread gains by 15%
  }
  if (flagMC==0 && useBemc){
    StEmcADCtoEMaker *bemcAdc = new StEmcADCtoEMaker();//for real data this sets calibration and status
    if (bemcConfig == 1) {
        bemcAdc->setCheckStatus(kBarrelEmcTowerId,false);
    }
  }

  // original comment: must use slow simulator to get pedestals
  // correct for L2.  New comment: I think this is needed if slow simulator was
  // used in the MC production.
  if (0 && flagMC==1 && useEemc){
    StEEmcSlowMaker *slowSim = new StEEmcSlowMaker("slowSim");

    // note: changing the sampling fraction does not effect the
    // L0 trigger decision.  Also, it is probably better to use the value
    // in the slow simulator, so that it matches data. (S. Gliske,
    // Sept 2012)

    // This 1.3 comes from the iron/air MC, where the sampling
    // fraction was believed to be near 4%, but slow/fast simulator
    // used 5%.

    // Now that the slow/fast simulator uses 0.048, it is a 1.25 scaling factor

    // slowSim->setSamplingFraction(0.0384); // effectively scale all Tower energies with a factor of 1.3 (added by: Ilya Selyuzhenkov; April 11, 2008)

    slowSim->setAddPed(true);
    slowSim->setSmearPed(true);
  }
 
  //Get TriggerMaker
  StTriggerSimuMaker *simuTrig = new StTriggerSimuMaker("StarTrigSimu");
  simuTrig->setHList(HList);
  simuTrig->setMC(flagMC); // must be before individual detectors, to be passed
  simuTrig->useBbc();
  if(useEemc) {
    simuTrig->useEemc(0);//default=0:just process ADC, 1,2:comp w/trgData,see .
    simuTrig->eemc->setSetupPath(eemcSetupPath);
  } 
  if(useBemc){
    simuTrig->useBemc();
    simuTrig->bemc->setConfig(bemcConfig);
  }

  if(flagMC && useEemc==2){
     // pass one argument to M-C as generic switch    
     // Endcap specific params -- ok Jan you need to change this to a default "online" setup
     int eemcDsmSetup[20]; // see StEemcTriggerSimu::initRun() for definition
     memset(eemcDsmSetup, 0,sizeof(eemcDsmSetup));// clear all, may be a bad default

     if( trigVer == 'd' ){
        // valid runs 7130037-7132029
        eemcDsmSetup[0]=6;  // HTthr0
        eemcDsmSetup[1]=12; // HTthr1
        eemcDsmSetup[2]=22; // HTthr2
        eemcDsmSetup[3]=1;  // TPthr0
        eemcDsmSetup[4]=20; // TPthr1
        eemcDsmSetup[5]=31; // TPthr2
     } else if ( trigVer == 'e' ){
        // valid runs 7132045-7133051
        eemcDsmSetup[0]=6;  // HTthr0
        eemcDsmSetup[1]=17; // HTthr1
        eemcDsmSetup[2]=22; // HTthr2
        eemcDsmSetup[3]=1;  // TPthr0
        eemcDsmSetup[4]=20; // TPthr1
        eemcDsmSetup[5]=31; // TPthr2
     } else if ( trigVer == 'f' ){
        // valid runs 7133052-7156040
        eemcDsmSetup[0]=6;  // HTthr0
        eemcDsmSetup[1]=16; // HTthr1
        eemcDsmSetup[2]=22; // HTthr2
        eemcDsmSetup[3]=1;  // TPthr0
        eemcDsmSetup[4]=20; // TPthr1
        eemcDsmSetup[5]=31; // TPthr2
     } else if ( trigVer == 'g' ){
        // test trigger, ht1 & tp2 are 1 DSM (roughly 5%) higher than 'e'
        eemcDsmSetup[0]=6;  // HTthr0
        eemcDsmSetup[1]=18; // HTthr1
        eemcDsmSetup[2]=22; // HTthr2
        eemcDsmSetup[3]=1;  // TPthr0
        eemcDsmSetup[4]=21; // TPthr1
        eemcDsmSetup[5]=31; // TPthr2
   } else if ( trigVer == 'h' || trigVer == 'i' ){
      // test trigger, ht1 & tp2 are 2 DSM (roughly 10%) higher than 'e'
      eemcDsmSetup[0]=6;  // HTthr0
      eemcDsmSetup[1]=19; // HTthr1
      eemcDsmSetup[2]=22; // HTthr2
      eemcDsmSetup[3]=1;  // TPthr0
      eemcDsmSetup[4]=22; // TPthr1
      eemcDsmSetup[5]=31; // TPthr2
     } else {
        cerr << "Invalid trigger version" << endl;
        return;
     };
    eemcDsmSetup[10]=2; //HTTPthrSelc, 2=use_thres_#1

    simuTrig->eemc->setDsmSetup(eemcDsmSetup);    
  }


  StGenericL2Emulator* simL2Mk=0;
  if(useL2) {
    /* 
       NOTE: the following comment was in the rdMu2TrigSimu.C macro,
       but does not seem applicable.  Just use the given
       StarTrigSimuSetup directory, and make sure the given outDir
       exists, all will be well.

       reads all input/setup files from  L2setup-yyyymmdd/
       writes all output files to L2out-yyyymmdd 
       depending on the DB time stamp 
       both dierectiorie MUST exist, setup must be reasonable
    */
    if(L2ConfigYear==2006) simL2Mk= new StL2_2006EmulatorMaker;
    else if(L2ConfigYear==2008) simL2Mk= new StL2_2008EmulatorMaker;
    assert(simL2Mk);
    simL2Mk->setSetupPath(eemcSetupPath);

    simL2Mk->setOutPath(outDir.Data());
    if (flagMC) simL2Mk->setMC();
    simuTrig->useL2(simL2Mk);
  }

  // now the maker to write the tree
  StTrigTreeMaker_t *treeMkr = new StTrigTreeMaker_t( "trigTreeMaker", fileOut, 1 );
  treeMkr->addTrigger( -999 ); // i.e. no trigger cut now

  chain->ls(3);

  cout << "******* Initialize *******" << endl ;
  chain->Init();
  cout << "******* done with initializing *******" << endl;
 
  for (Int_t iev=0;iev<nevents; iev++) {
     if( iev % 100 == 1  )
        cout << "Working on eventNumber:\t" << iev <<"\tof:\t"<<nevents<<endl;

    chain->Clear();
    int iret = chain->Make(iev);
    total++;   
    if (iret % 10 == kStEOF || iret % 10 == kStFatal)  {
      cout << iev << " Bad return code!" << endl;
      break;
    }

    //struct L2gammaResult2006* result = dynamic_cast< L2gammaResult2006* >( simL2Mk->result() );
    //cout << "ZZZ " << result->trigger << endl;

    if( simL2Mk ){
//        const unsigned int* result = simL2Mk->result();
//        cout << "ZZZ " << std::hex << result[0] << result[1] << result[2] << result[3] << result[4] << result[5] << result[6] << result[7] << std::dec
//             << " " << simL2Mk->mAcceptTriggerList.size() << ' ' << simL2Mk->mVetoTriggerList.size() << endl;

//        cout << "ZZZ accept: ";
//        for( Int_t i=0; i<simL2Mk->mAcceptTriggerList.size(); ++i )
//           cout << simL2Mk->mAcceptTriggerList.at(i) << ' ';
//        cout << endl;

//        cout << "ZZZ veto: ";
//        for( Int_t i=0; i<simL2Mk->mVetoTriggerList.size(); ++i )
//           cout << simL2Mk->mVetoTriggerList.at(i) << ' ';
//        cout << endl;

//       cout << "ZZZ " << simuTrig->isTrigger( 137641 ) << endl;
    }
  }

 
  chain->Finish();
  cout << "****************************************** " << endl;
  cout << "total number of events  " << total << endl;
  cout << "****************************************** " << endl;

  if (outputL2Histo==1) {
  
    TString fileMu=file;
    printf("=%s=\n",fileMu.Data());
    if(fileMu.Contains(".lis")) fileMu.ReplaceAll(".lis",".trgSim");
    if(fileMu.Contains(".MuDst.root")) fileMu.ReplaceAll(".MuDst.root",".trgSim");
    TString outF=outDir+fileMu;
    outF+=".hist.root";
    printf("=%s=\n",outF.Data());
    hf=new TFile(outF,"recreate");
    if(hf->IsOpen()) {
       cout << "HList not saved, or seg faults" << endl;
       //HList->Write();
       //printf("\n Histo saved -->%s<\n",outF.Data());
    } 
    else {
      printf("\n Failed to open Histo-file -->%s<, continue\n",outF.Data());
    }
  }
 
}
예제 #4
0
파일: Macro.C 프로젝트: yistand/PicoCode
void Macro(int nEvents = 1e5,
		const char* filelist = "test.list", 
		const char* nametag  = "test",
		    int nFiles = 8
		    )
{
  gROOT->Macro("LoadLogger.C");
  gROOT->Macro("loadMuDst.C");
  gSystem->Load("StarMagField.so");
  gSystem->Load("StMagF");
  gSystem->Load("StDetectorDbMaker");
  gSystem->Load("StTpcDb");
  gSystem->Load("St_db_Maker");
  gSystem->Load("StDbUtilities");
  gSystem->Load("StMcEvent");
  gSystem->Load("StMcEventMaker");
  gSystem->Load("StDaqLib");
  gSystem->Load("StEmcRawMaker");
  gSystem->Load("StEmcADCtoEMaker");
  gSystem->Load("StEpcMaker");
  gSystem->Load("StTriggerUtilities");
  gSystem->Load("StDbBroker");
  gSystem->Load("libgeometry_Tables");
  gSystem->Load("StEEmcUtil");
  gSystem->Load("StEEmcDbMaker");
  gSystem->Load("StPreEclMaker");
  gSystem->Load("StEpcMaker");
 
  gSystem->Load("libTStarJetPico.so");
  gSystem->Load("JetPicoMaker");
	
  StChain* chain = new StChain("StChain");
	
  // MuDst maker
  StMuDstMaker* muDstMaker = new StMuDstMaker(0,0,"",filelist,"",nFiles);

  // star database
  St_db_Maker *dbMaker = new St_db_Maker("StarDb","MySQL:StarDb");
  // Endcap database
  StEEmcDbMaker* eemcb = new StEEmcDbMaker("eemcDb");
  // Barrel ADC to energy maker
  StEmcADCtoEMaker *adc = new StEmcADCtoEMaker();
  StPreEclMaker *pre_ecl  = new StPreEclMaker();
  StEpcMaker *epc         = new StEpcMaker();

  //get control table so we can turn off BPRS zero-suppression and save hits from "bad" caps
  controlADCtoE_st* control_table = adc->getControlTable();
  control_table->CutOff[1] = -1;
  control_table->CutOffType[1] = 0;
  control_table->DeductPedestal[1] = 2;
  adc->saveAllStEvent(kTRUE);

  StTriggerSimuMaker* trigsim = new StTriggerSimuMaker();
  trigsim->setMC(false);
  trigsim->useBemc();
  trigsim->useEemc();
  //trigsim->useBbc();
  trigsim->useOnlineDB();
  trigsim->bemc->setConfig(StBemcTriggerSimu::kOnline);



  StMuJetAnalysisTreeMaker *ana = new StMuJetAnalysisTreeMaker;
  ana->SetVerbose(10);
  ana->setRootFile(Form("pAu15Pico_%s.root",nametag));  
  ana->SetFlagData(12); //For pAu Y15
  ana->GetV0Cuts()->SetStandardCutspp();   
  ana->SetDoV0s(kFALSE);      
  //TString outfile(name);
  //StEmcOfflineCalibrationMaker* bemcCalibMaker = new StEmcOfflineCalibrationMaker("bemcCalibMaker",outfile.Data());

  StMemStat memory;
  memory.PrintMem(NULL);
	
  chain->Init();
  cout<<"chain initialized"<<endl;
	
  TStopwatch total;
  TStopwatch timer;
	
  int i=0;
  while(i<nEvents && chain->Make()==kStOk)
    {
      if(i % 100000 == 0){
	cout<<"done with event "<<i;
	cout<<"\tcpu: "<<timer.CpuTime()<<"\treal: "<<timer.RealTime()<<"\tratio: "<<timer.CpuTime()/timer.RealTime();//<<endl;
	timer.Start();
	memory.PrintMem(NULL);
      }
      i++;
      chain->Clear();
    }
	
  chain->ls(3);
  chain->Finish();
  printf("my macro processed %i events in %s",i,nametag);
  cout<<"\tcpu: "<<total.CpuTime()<<"\treal: "<<total.RealTime()<<"\tratio: "<<total.CpuTime()/total.RealTime()<<endl;

  cout << endl;
  cout << "-------------" << endl;
  cout << "(-: Done :-) " << endl;
  cout << "-------------" << endl;
  cout << endl;
}
예제 #5
0
void RunJetFinder2009pro_ue(int nevents = 1E3,
			 const char* mudstfile = "/star/institutions/uky/gdwebb/UE_histos/st_physics_10103041_raw_8030001.MuDst.root",
			 const char* jetfile = "jets_copy.root",
			 const char* skimfile = "skim_copy.root",
			 const char* uefile = "ueTree_copy.root",
			 int mEmbed = 0,
			 int mPythia = 0,
			 bool useL2 = false)
{
  cout << "nevents = " << nevents << endl;
  cout << "mudstfile = " << mudstfile << endl;
  cout << "jetfile = " << jetfile << endl;
  cout << "skimfile = " << skimfile << endl;
  cout << "uefile = " << uefile << endl;

  gROOT->Macro("loadMuDst.C");
  gROOT->Macro("LoadLogger.C");

  gSystem->Load("StDetectorDbMaker");
  gSystem->Load("StTpcDb");
  gSystem->Load("StDbUtilities");
  gSystem->Load("StMcEvent");
  gSystem->Load("StMcEventMaker");
  gSystem->Load("StDaqLib");
  gSystem->Load("StEmcRawMaker");
  gSystem->Load("StEmcADCtoEMaker");
  gSystem->Load("StEpcMaker");
  gSystem->Load("StEmcSimulatorMaker");
  gSystem->Load("StDbBroker");
  gSystem->Load("St_db_Maker");
  gSystem->Load("StEEmcUtil");
  gSystem->Load("StEEmcDbMaker");
  gSystem->Load("StSpinDbMaker");
  gSystem->Load("StEmcTriggerMaker");
  gSystem->Load("StTriggerUtilities");
  gSystem->Load("StMCAsymMaker");
  gSystem->Load("StRandomSelector");

  gSystem->Load("libfastjet.so");
  gSystem->Load("libsiscone.so");
  gSystem->Load("libsiscone_spherical.so");
  gSystem->Load("libfastjetplugins.so");

  // gSystem->Load("libfastjet.so");
  // gSystem->Load("libCDFConesPlugin.so");
  // gSystem->Load("libEECambridgePlugin.so");
  // gSystem->Load("libJadePlugin.so");
  // gSystem->Load("libNestedDefsPlugin.so");
  // gSystem->Load("libSISConePlugin.so");
  gSystem->Load("StJetFinder");
  gSystem->Load("StJetSkimEvent");
  gSystem->Load("StJets");
  gSystem->Load("StJetEvent");
  gSystem->Load("StUeEvent");
  gSystem->Load("StJetMaker");
  gSystem->Load("StTriggerFilterMaker");

  StChain* chain = new StChain; 

  // MuDst reader
  StMuDstMaker* muDstMaker = new StMuDstMaker(0,0,"",mudstfile,"",100000,"MuDst");

  // MuDst DB
  StMuDbReader* muDstDb = StMuDbReader::instance();

  // Trigger filter
  StTriggerFilterMaker* filterMaker = new StTriggerFilterMaker;

  // 2009 pp500
  filterMaker->addTrigger(230410); // JP1
  filterMaker->addTrigger(230411); // JP2
  filterMaker->addTrigger(230420); // AJP
  filterMaker->addTrigger(230531); // BHT3

  // star database
  St_db_Maker* starDb = new St_db_Maker("StarDb","MySQL:StarDb");

  // Endcap database
  StEEmcDbMaker* eemcDb = new StEEmcDbMaker;

  // Spin database
  StSpinDbMaker* spinDb = new StSpinDbMaker;

  // Barrel ADC to energy maker
  StEmcADCtoEMaker* adc = new StEmcADCtoEMaker;
  adc->saveAllStEvent(true);

  // Trigger simulator
  StTriggerSimuMaker* simuTrig = new StTriggerSimuMaker;
  simuTrig->useOnlineDB(); // for trigger definitions and thresholds
  simuTrig->setMC(false); // Must be before individual detectors, to be passed

  simuTrig->useBemc();
  simuTrig->useEemc();
  simuTrig->bemc->setConfig(StBemcTriggerSimu::kOffline);

  // L2 (only L2btowCalib, L2etowCalib, L2ped, L2jet in CVS as of 17 April 2010)
  if (useL2) {
    StL2_2009EmulatorMaker* simL2Mk = new StL2_2009EmulatorMaker;
    assert(simL2Mk);
    simL2Mk->setSetupPath("/star/u/pibero/public/StarTrigSimuSetup/");
    simL2Mk->setOutPath("./");
    simuTrig->useL2(simL2Mk);
  }

  // Skim event maker
  StJetSkimEventMaker* skimEventMaker = new StJetSkimEventMaker("StJetSkimEventMaker",muDstMaker,skimfile);

  // Jet maker
  StJetMaker2009* jetmaker = new StJetMaker2009;
  jetmaker->setJetFile(jetfile);
  // UE maker
  StUEMaker2009* uemaker = new StUEMaker2009;
  uemaker->setUeFile(uefile);
  
  // Set analysis cuts for 12-point branch
  StAnaPars* anapars12 = new StAnaPars;
  anapars12->useTpc  = true;
  anapars12->useBemc = true;
  anapars12->useEemc = false;

  // The classes available for correcting tower energy for tracks are:
  // 1. StjTowerEnergyCorrectionForTracksMip
  // 2. StjTowerEnergyCorrectionForTracksFraction
  // 3. StjTowerEnergyCorrectionForTracksNull (default: no correction)
  anapars12->setTowerEnergyCorrection(new StjTowerEnergyCorrectionForTracksFraction(1.00));
 
  //
  // 1. StjTrackPtFraction
  // 2. StjTowerEnergyFraction
  //    The input parameter is the fraction which you want to increase or decrease the track/tower pT/energy. 
  //    i.e. If you want to decrease the track pT by 5%, you should put in -0.05 as the input parameter for StjTrackPtFraction
  //  anapars12->setTrackShift(new StjTrackPtFraction(-0.05));
  // anapars12->setTowerShift(new StjTowerEnergyFraction(-0.05));
  
  // TPC cuts
  anapars12->addTpcCut(new StjTrackCutFlag(0));
  anapars12->addTpcCut(new StjTrackCutNHits(12));
  anapars12->addTpcCut(new StjTrackCutPossibleHitRatio(0.51));
  anapars12->addTpcCut(new StjTrackCutDca(3));
  anapars12->addTpcCut(new StjTrackCutTdcaPtDependent);
  anapars12->addTpcCut(new StjTrackCutPt(0.2,200));
  anapars12->addTpcCut(new StjTrackCutEta(-2.5,2.5));
  anapars12->addTpcCut(new StjTrackCutLastPoint(125));

  // BEMC cuts
  anapars12->addBemcCut(new StjTowerEnergyCutBemcStatus(1));
  anapars12->addBemcCut(new StjTowerEnergyCutAdc(4,3));	// ADC-ped>4 AND ADC-ped>3*RMS
  anapars12->addBemcCut(new StjTowerEnergyCutEt(0.2));

  // EEMC cuts
  anapars12->addEemcCut(new StjTowerEnergyCutBemcStatus(1));
  anapars12->addEemcCut(new StjTowerEnergyCutAdc(4,3));	// ADC-ped>4 AND ADC-ped>3*RMS
  anapars12->addEemcCut(new StjTowerEnergyCutEt(0.2));

  // Jet cuts
  anapars12->addJetCut(new StProtoJetCutPt(5,200));
  anapars12->addJetCut(new StProtoJetCutEta(-100,100));
 
  //---------Region Criteria---------
  anapars12_toward = anapars12; // Toward Region for Tracks and Towers
  anapars12_toward->setTrackRegion(new StjTrackRegion(60.0,-60.0,1.0));
  anapars12_toward->setTowerRegion(new StjTowerRegion(60.0,-60.0,1.0));

  anapars12_away = anapars12; // Away Region for Tracks and Towers
  anapars12_away->setTrackRegion(new StjTrackRegion(120.0,-120.0,1.0));
  anapars12_away->setTowerRegion(new StjTowerRegion(120.0,-120.0,1.0));

  anapars12_transPlus = anapars12; // Trans Plus for Tracks and Towers
  anapars12_transPlus->setTrackRegion(new StjTrackRegion(120.0,60.0,1.0));
  anapars12_transPlus->setTowerRegion(new StjTowerRegion(120.0,60.0,1.0));

  anapars12_transMinus = anapars12; // Trans Minus for Tracks and Towers
  anapars12_transMinus->setTrackRegion(new StjTrackRegion(-60.0,-120.0,1.0));
  anapars12_transMinus->setTowerRegion(new StjTowerRegion(-60.0,-120.0,1.0));
  //---------------------------------

  //Jet Area 
  StFastJetAreaPars *JetAreaPars = new StFastJetAreaPars;
  JetAreaPars->setGhostArea(0.04);
  // Set anti-kt R=0.6 parameters
  StFastJetPars* AntiKtR060Pars = new StFastJetPars;
  AntiKtR060Pars->setJetAlgorithm(StFastJetPars::antikt_algorithm);
  AntiKtR060Pars->setRparam(0.6);
  AntiKtR060Pars->setRecombinationScheme(StFastJetPars::E_scheme);
  AntiKtR060Pars->setStrategy(StFastJetPars::Best);
  AntiKtR060Pars->setPtMin(5.0);
  AntiKtR060Pars->setJetArea(JetAreaPars);

  // Set anti-kt R=0.4 parameters
  StFastJetPars* AntiKtR040Pars = new StFastJetPars;
  AntiKtR040Pars->setJetAlgorithm(StFastJetPars::antikt_algorithm);
  AntiKtR040Pars->setRparam(0.4);
  AntiKtR040Pars->setRecombinationScheme(StFastJetPars::E_scheme);
  AntiKtR040Pars->setStrategy(StFastJetPars::Best);
  AntiKtR040Pars->setPtMin(5.0);
  AntiKtR040Pars->setJetArea(JetAreaPars);

  // Set anti-kt R=0.5 parameters
  StFastJetPars* AntiKtR050Pars = new StFastJetPars;
  AntiKtR050Pars->setJetAlgorithm(StFastJetPars::antikt_algorithm);
  AntiKtR050Pars->setRparam(0.5);
  AntiKtR050Pars->setRecombinationScheme(StFastJetPars::E_scheme);
  AntiKtR050Pars->setStrategy(StFastJetPars::Best);
  AntiKtR050Pars->setPtMin(5.0);
  AntiKtR050Pars->setJetArea(JetAreaPars);

  jetmaker->addBranch("AntiKtR060NHits12",anapars12,AntiKtR060Pars);
  jetmaker->addBranch("AntiKtR040NHits12",anapars12,AntiKtR040Pars);
  jetmaker->addBranch("AntiKtR050NHits12",anapars12,AntiKtR050Pars); 

  uemaker->addBranch("toward",anapars12_toward,"AntiKtR060NHits12");
  uemaker->addBranch("away",anapars12_away,"AntiKtR060NHits12");
  uemaker->addBranch("transP",anapars12_transPlus,"AntiKtR060NHits12");
  uemaker->addBranch("transM",anapars12_transMinus,"AntiKtR060NHits12");


  // Run
  chain->Init();
  chain->EventLoop(nevents);
}