| cwb_setcuts ~~~~~~~~~~~~~~~~ | | **Usage** | | This command applies thresholds on tree leaves to select events with certain characteristics defined by the user. We remind that for each merge label we have two files type: the wave and the mdc/live, with different structure but some leafs are in common. So when choosing selection cuts, you should distinguish between the cuts that should be applied only to wave tree from the ones that will be applied also to mdc/live. One example of the former cut is a selection on rho or cc, on the contray a selection on the run is an example of the latter. | | **Syntax** | - ``cwb_setcuts mlabel/list wcuts clabel jcuts(opt) mcuts(opt) lcuts(opt)`` - **mlabel/lists** same label used by cwb_merge, if the user writes lists it list the available labels - **clabel** label that will be added to the new merged files names (M1 -> M1.C\_clabel) - **wcuts** selections for only wave tree must contains only leaf of waveburst tree (not the leaf run) the syntax is the the same as the one used for the selection TTree - **jcuts** job selection for wave & mdc trees must contains only the leaf run the syntax is the the same as the one used for the selection TTree - **mcuts** selections for only mdc tree must contains only leaf of mdc tree (not the leaf run) the syntax is the the same as the one used for the selection TTree - **lcuts** selections of lag/slag : is applied only to wave and livetime tree must contains only lag/slag leafs the syntax is the the same as the one used for the selection TTree | | **Alternative Syntax** | - ``cwb_setcuts mlabel/list options`` - **mlabel/lists** same label used by cwb_merge - **options** options (options must be declared inside '...') : see previous definitions - ``cwb_setcuts mlabel/list wcuts clabel jcuts(opt) mcuts(opt) lcuts(opt)`` - **--label clabel** default="" - **--tcuts tcuts** default="" : tcuts is the name of TCut selection defined in user\_pparameters.C, it is added to wcuts - **--wcuts wcuts** default="" - **--jcuts jcuts** default="" - **--mcuts mcuts** default="" - **--lcuts lcuts** default="" - **--unique true/false** select from the root file a unique reconstructed event for each injected signal. The signal is selected from the reconstructed events which have the same injected gps time, the selected one has the maximum rho. When this option is used the label ".C\_U" will be added to the new merged files names. (default=false) A new leaf is added to the waveburst tree : fsize=number of fragments found in the `iwindow <#Simulation-parameters>`__ NOTE : this option can be applied only when simulation>0. .. note:: not use **!expression** but **!(expression)** EX : ot use !veto\_cat3\_H1 but !(veto\_cat3\_H1) use **!expression** instead of **"expression"** EX : use !veto_cat3_H1 instead of "!(veto\_cat3\_H1)" | | **Examples** | .. code-block:: bash * cwb_setcuts M1 'netcc[1]>0.8' cc1_gt_0d8_run_lt_100 'run<100' - apply the cut ((netcc[1]>0.8)&&(run<100)) to wave file - apply the cut (run<100) to the live file if the input file is with name: merge/wave_S6A_BKG_L1H1_run1.M1.root the output file assumes the name: merge/wave_S6A_BKG_L1H1_run1.M1.C_cc1_gt_0d8_run_lt_100.root and the same for live file. Alternative Syntax : cwb_setcuts M1 '--wcuts netcc[1]>0.8 --label cc1_gt_0d8_run_lt_100 --jcuts run<100' * cwb_setcuts M1.C_rho0_gt6.V_cat2LH_hvetoLH_cat3LH '!(veto_cat3_H1) && !(veto_cat3_L1)' nohwinj * cwb_setcuts M1 'netcc[2]>0.45' cc2_gt_0d45_lag1_eq_0 '' '' 'lag[1]==0' - apply the cut ((netcc[2]>0.45)&&(lag[1]==0)) to wave file - apply the cut (lag[1]==0) to the live file Alternative Syntax : cwb_setcuts M1 '--wcuts netcc[2]>0.45 --label cc2_gt_0d45_lag1_eq_0 --lcuts lag[1]==0' * cwb_setcuts M1 '--unique true' - apply unique selection of detected events if the input file is with name: merge/wave_S6A_BKG_L1H1_run1.M1.root the output file assumes the name: merge/wave_S6A_BKG_L1H1_run1.M1.C_U.root * cwb_setcuts M1 '--unique true --wcuts netcc[2]>0.45 --label cc2_gt_0d45' - apply unique selection of detected events and tree cuts if the input file is with name: merge/wave_S6A_BKG_L1H1_run1.M1.root the output file assumes the name: merge/wave_S6A_BKG_L1H1_run1.M1.C_U.C_cc2_gt_0d45.root * cwb_setcuts M1 '--tcuts MyTCut --wcuts netcc[2]>0.45 --label cc2_gt_0d45_mytcut' - select events with (MyTCut.GetTitle()) && (netcc[2]>0.45) The MyTCut must be defined in user_pparameters.C Ex : TCut MyTCut('MyTCut','rho[0]>6'); // MyTCut.GetTitle() is 'rho[0]>6' or it can be defined in a file.hh and included in user_pparameters.C inside the brackets {} Ex : #include "file.hh"