Ignore:
Timestamp:
11/08/03 09:20:10 (21 years ago)
Author:
galante
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/macros/triglvl2.C

    r2370 r2489  
    3838   
    3939    tasklist.AddToList(&reader);
    40 
    4140    MGeomCamMagic geocam;
    4241    parlist.AddToList(&geocam);
     
    5554    // Set the number of Next Neighbourhoods that define a compact pixel
    5655    //
    57     cell.SetCompactNN(2);
     56    cell.SetCompactNN(3);
    5857    //  USER:       --^
    5958
     
    6160    //  A filter to select events using the L2T parameters is created
    6261    //
    63 
    6462    // MF lvl2filter("MMcTriggerLvl2.fPseudoSize > 25 && MMcTriggerLvl2.fPseudoSize < 31");
    65     MF lvl2filter("MMcTriggerLvl2.fPseudoSize > 15");
     63    //    MF lvl2filter("MMcTriggerLvl2.fSizeBiggerCell > 34");
     64    MF lvl2filter("MMcTriggerLvl2.fSizeBiggerCell > 18");
    6665 
    6766    //
     
    9089    MFilterList flist;
    9190    //flist.AddToList(&energyfilter);
    92     //flist.AddToList(&lvl2filter);
     91    flist.AddToList(&lvl2filter);
    9392    //   flist.AddToList(&selector);
    9493    //   flist.AddToList(&eslope);
    9594    //   flist.AddToList(&fTrig);
    9695
    97 
    98    
    9996    //
    10097    // The task to calculate the L2T parameter is added to the task list
     
    107104    //
    108105    tasklist.AddToList(&flist);
     106
     107
     108    MContinue L1offline ("MMcTriggerLvl2.fLutPseudoSize < 6");
     109    //    tasklist.AddToList(&L1offline);
    109110
    110111    //
     
    176177    // filled and can be displayd
    177178    //
    178     parlist.FindObject("MHMcCollectionArea")->DrawClone();
    179 
    180     parlist.FindObject("MHMcTriggerLvl2")->DrawClone("sbc");
    181     parlist.FindObject("MHMcTriggerLvl2")->DrawClone("lps");
    182     parlist.FindObject("MHMcTriggerLvl2")->DrawClone();
     179   
     180
     181    //parlist.FindObject("MHMcTriggerLvl2")->DrawClone("sbc");
     182    //parlist.FindObject("MHMcTriggerLvl2")->DrawClone("lps");
     183    //parlist.FindObject("MHMcTriggerLvl2")->DrawClone();
    183184    //parlist.FindObject("MHMcTriggerLvl2")->DrawClone("energy");
    184     parlist.FindObject("MHMcTriggerLvl2")->DrawClone("size-energy");
    185 
     185    //parlist.FindObject("MHMcTriggerLvl2")->DrawClone("lut-energy");
     186    //parlist.FindObject("MHMcCollectionArea")->DrawClone();
    186187    // Returns histogram of the class MHMcTriggerLvl2 
    187 
     188   
    188189    MHMcTriggerLvl2 *htrig = (MHMcTriggerLvl2 *)parlist.FindObject("MHMcTriggerLvl2");
    189     TH1F *h1 = (TH1F *)htrig->GetHistByName("fHistPseudoSize");
    190     TH2D *h2 = htrig->GetHistSizeBiggerCellEnergy();
    191     TH2D *h3 = (TH2D *)htrig->GetHistByName("fHistLutPseudoSizeEnergy");
    192     //csbce = new TCanvas();
    193     //h2->DrawClone();
    194 
    195     hfile = new TFile("HistFileLUT.root", "RECREATE");
    196     h1->Write();
    197     h2->Write();
    198     h3->Write();
     190    MHMcCollectionArea *collarea = (MHMcCollectionArea *)parlist.FindObject("MHMcCollectionArea");
     191    TH1F *hps = (TH1F *)htrig->GetHistByName("fHistPseudoSize");
     192    TH1F *hlps = (TH1F *)htrig->GetHistByName("fHistLutPseudoSize");
     193    TH1F *hsbc = (TH1F *)htrig->GetHistSizeBiggerCell();
     194    TH1F *hpsn = (TH1F *)htrig->GetHistByName("fHistPseudoSizeNorm");
     195    TH1F *hlpsn = (TH1F *)htrig->GetHistByName("fHistLutPseudoSizeNorm");
     196    TH1F *hsbcn = (TH1F *)htrig->GetHistSizeBiggerCellNorm();
     197    TH2D *hlpse = (TH2D *)htrig->GetHistByName("fHistLutPseudoSizeEnergy");
     198    TH2D *hpse = (TH2D *)htrig->GetHistByName("fHistPseudoSizeEnergy");
     199    TH2D *hsbce = (TH2D *)htrig->GetHistSizeBiggerCellEnergy();
     200    TH1D *hcollarea = collarea->GetHist();
     201
     202    // Please set rootfile as the directory where you want to store
     203    // your file.root containing histograms
     204    rootfile = new TString(filename);
     205    if (rootfile->Index("/*.root",1)>=0){
     206      rootfile->Resize(rootfile->Index("/*.root",1));
     207      rootfile[0]+="_sbcmag18_CNN3.root";
     208    }
     209     
     210    hfile = new TFile((char *)rootfile[0], "RECREATE");
     211    hlps->Write();
     212    hps->Write();
     213    hsbc->Write();
     214    hlpsn->Write();
     215    hpsn->Write();
     216    hsbcn->Write();
     217    hlpse->Write();
     218    hpse->Write();
     219    hsbce->Write();
     220    hcollarea->Write();
    199221    hfile->Close();
     222    cout << "Histograms stored into " << rootfile[0] << endl;
     223   
    200224
    201225}
Note: See TracChangeset for help on using the changeset viewer.