Changeset 4102


Ignore:
Timestamp:
05/19/04 11:33:24 (21 years ago)
Author:
mazin
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mtemp/mmpi/macros
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mtemp/mmpi/macros/callalphaplot.C

    r4099 r4102  
    3838
    3939
    40 #define XSOUR   0.0  // [deg]
    41 #define YSOUR   -0.05  // [deg]
     40#define XSOUR   0.05  // [deg]
     41#define YSOUR   0.6  // [deg]
    4242#define NUM     0
    4343
    4444
    45 TString sourcename = "CrabOn";
     45TString sourcename = "M87On";
    4646
    4747const Bool_t ROTOPTION  = kFALSE;  // kFALSE: do not derotate, use camera coordinates
    4848                                  // kTRUE: derotate into "quasi" sky coordinates
    4949
    50 const Bool_t USEOFFDATA = kTRUE; // kFALSE: do not use OFF data to estimate the significance
     50const Bool_t USEOFFDATA = kFALSE; // kFALSE: do not use OFF data to estimate the significance
    5151                                  // kTRUE: use in addition OFF data to estimate the significance
    5252
     
    6464                                                                  // if USEFILE == kFALSE : not needed
    6565
    66 TString dirname  = "~/data/Crab/2004_01_27/";
    67 TString filename = "CrabHillasON.root"; //  NOTE in case of several subsamples (SAMPLES=kTRUE)
     66TString dirname  = "~/data/M87/2004_02_17/";
     67TString filename = "M87HillasON.root"; //  NOTE in case of several subsamples (SAMPLES=kTRUE)
    6868                                         // folllowing name construction is assumed:
    6969                                         // file = dirname + sample + <number> + / + filename
     
    7272/* ******************************************************   */
    7373      /*  dynamical cuts  Crab 27th Jan 2004 */
    74 
     74/*
    7575#define LENGTHMINParA 0.136  // deg
    7676#define LENGTHMINParB 0.036  //
     
    9191#define DISTMAXParB   0.059  //
    9292#define DISTMAXParC   0.  //
    93 
     93*/
    9494
    9595      /*  dynamical cuts  Mrk 421 and Crab 15th Feb 2004 */
    96 /*
     96
    9797#define LENGTHMINParA 0.12  // deg
    9898#define LENGTHMINParB 0.034  //
     
    113113#define DISTMAXParB   0.059  //
    114114#define DISTMAXParC   0.  //
    115 */
     115
    116116
    117117#define SIZEMIN 2000
     
    813813// **********************************************************************  //
    814814//  use OFF data to estimate background   *******************************  //
     815    TF1 * bgoff2 = new TF1("bgoffOFF", parabfunc, 0., 90., 3);
    815816  if (USEOFFDATA == kTRUE)
    816817  {
     
    851852
    852853
    853             TF1 * bgoff2 = new TF1("bgoffOFF", parabfunc, 0., 90., 3);
    854854            bgoff2->SetParameters(aparOff, bparOff, normf/binwidth*binwidthOff);
    855855            bgoff2->FixParameter(0, aparOff);
  • trunk/MagicSoft/Mars/mtemp/mmpi/macros/gridloop.C

    r4088 r4102  
    236236//    histalphagrid.Fit("fsig","NR");
    237237//printf("content bin 1: %4.2f\n", histalphagrid.GetBinContent(1));
    238     histalphagrid.Fit(fitsig,"NR");
    239     histalphagrid.Fit("fbg4","+NR");
    240     histalphagrid.Fit("fbgpar","+NR");
     238    histalphagrid.Fit(fitsig,"NWR");
     239    histalphagrid.Fit("fbg4","+NWR");
     240    histalphagrid.Fit("fbgpar","+NWR");
    241241
    242242// cout << "OK" << endl;
     
    245245    for(Int_t i=1; i<=numbbinOnMax;i++) Non += histalphagrid.GetBinContent(i);
    246246//    Non = (fitsig->GetParameter(0)) * numbbinOnMax;
    247 
     247//cout << "Non : " << Non << endl;
    248248//    histalphagrid.Draw();
    249249
     
    252252           (fitbgpar->GetParameter(1)) * ALPHAMAX) /  binwidth1;
    253253   
     254//cout << "Noff : " << Noff << endl;
     255   
    254256    Nex = Non - Noff;
    255257
     
    258260           fitbg4->GetParameter(2) * ALPHAMAX ) / binwidth1;
    259261 
     262//cout << "Noff4 : " << Noff4 << endl;
    260263 
    261264    Nex4 = Non - Noff4;
     
    264267
    265268//    Sign4 = Nex4 / sqrt(Nex4 + 2.* Noff4);
    266     Sign4 = LiMa17(Non,Noff4,1.);
     269    if (Noff4<0.) Sign4 = 0.;
     270    else Sign4 = LiMa17(Non,Noff4,1.);
     271
     272//cout << "Sign4 : " << Sign4 << endl;
    267273//    Sign = Nex / sqrt(Nex + 2.* Noff);
    268     Sign = LiMa17(Non,Noff,1.);
     274    if (Noff<0.) Sign = 0.;
     275    else Sign = LiMa17(Non,Noff,1.);
     276//cout << "Sign LiMa : " << Sign << endl;
    269277
    270278   /*  calculate Noff from the OFF data  */
     
    294302
    295303        // calculate according to Li Ma:
    296            SignLiMa = LiMa17(Non,NoffOFF*normf,1./normf);
     304           if (NoffOFF<0.) SignLiMa=0.;
     305           else SignLiMa = LiMa17(Non,NoffOFF*normf,1./normf);
    297306
    298307   }
Note: See TracChangeset for help on using the changeset viewer.