HYDRA_development_version
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
hparticlecut.cc
Go to the documentation of this file.
1 #include "hparticlecut.h"
2 
3 templateClassImp(HParticleCut)
4 
5 //_HADES_CLASS_DESCRIPTION
6 ////////////////////////////////////////////////////////////////////////////////
7 //
8 //
9 // HParticleCut
10 //
11 // Helper class for cuts. The synthax for conditions is working like
12 // T->Draw. Internaly a TTreeFormular is used to map the conditions
13 // to the leaves and methods of the class. Since the class is using
14 // template pointers the cuts works for all objects which are added
15 // as templates in HParticleLinkDef.h (like #pragma link C++ class HParticleCut<HParticleCand>;)
16 // A cut has a name (should be unique), a cut number (better unique)
17 // and a condition as argument of creation. The cut object owns counters
18 // for the number of calls and the number of failed evaluations. The
19 // The counters cand be used to monitor the efficiency of the cut.
20 // The cut can be inversed by setInverse(Bool_t).
21 //
22 //#########################################################
23 // USAGE:
24 // // outside eventloop:
25 // HParticleCut<HParticleCand> cut1("BetaCut",1,"fBeta<1.2&&fBeta>0.9&&isFlagBit(30)==1");
26 // // will create a cut object on HParticleCand, selecting beta range and
27 // // full reconstrued particles
28 // ....
29 // // inside eventloop:
30 // if(cut1->eval(cand,0)) { // true if condition is fullfilled , count stat for version 0
31 //
32 // }
33 // if(cut1->eval(cand,1)) { // true if condition is fullfilled , count stat for version 1
34 //
35 // }
36 //
37 // ....
38 // // after eventloop
39 // cut1.print(); // show cut name,number,cut statistics and condition
40 //
41 ////////////////////////////////////////////////////////////////////////////////