| 1 | /* ======================================================================== *\ | 
|---|
| 2 | ! | 
|---|
| 3 | ! * | 
|---|
| 4 | ! * This file is part of MARS, the MAGIC Analysis and Reconstruction | 
|---|
| 5 | ! * Software. It is distributed to you in the hope that it can be a useful | 
|---|
| 6 | ! * and timesaving tool in analysing Data of imaging Cerenkov telescopes. | 
|---|
| 7 | ! * It is distributed WITHOUT ANY WARRANTY. | 
|---|
| 8 | ! * | 
|---|
| 9 | ! * Permission to use, copy, modify and distribute this software and its | 
|---|
| 10 | ! * documentation for any purpose is hereby granted without fee, | 
|---|
| 11 | ! * provided that the above copyright notice appear in all copies and | 
|---|
| 12 | ! * that both that copyright notice and this permission notice appear | 
|---|
| 13 | ! * in supporting documentation. It is provided "as is" without express | 
|---|
| 14 | ! * or implied warranty. | 
|---|
| 15 | ! * | 
|---|
| 16 | ! | 
|---|
| 17 | ! | 
|---|
| 18 | !   Author(s): Thomas Bretz 5/2002 <mailto:tbretz@astro.uni-wuerzburg.de> | 
|---|
| 19 | ! | 
|---|
| 20 | !   Copyright: MAGIC Software Development, 2000-2002 | 
|---|
| 21 | ! | 
|---|
| 22 | ! | 
|---|
| 23 | \* ======================================================================== */ | 
|---|
| 24 |  | 
|---|
| 25 | ///////////////////////////////////////////////////////////////////////////// | 
|---|
| 26 | // | 
|---|
| 27 | // MHadronness | 
|---|
| 28 | // | 
|---|
| 29 | // The Value must be in the range [0,1] | 
|---|
| 30 | // It should be the value used for gamma/hadron seperation. | 
|---|
| 31 | // For quality histograms look at MHHadronness | 
|---|
| 32 | // | 
|---|
| 33 | ///////////////////////////////////////////////////////////////////////////// | 
|---|
| 34 | #include "MHadronness.h" | 
|---|
| 35 |  | 
|---|
| 36 | #include "MLog.h" | 
|---|
| 37 | #include "MLogManip.h" | 
|---|
| 38 |  | 
|---|
| 39 | ClassImp(MHadronness); | 
|---|
| 40 |  | 
|---|
| 41 | using namespace std; | 
|---|
| 42 |  | 
|---|
| 43 | // -------------------------------------------------------------------------- | 
|---|
| 44 | // | 
|---|
| 45 | // Default constructor. | 
|---|
| 46 | // | 
|---|
| 47 | MHadronness::MHadronness(const char *name, const char *title) | 
|---|
| 48 | : fHadronness(-1) | 
|---|
| 49 | { | 
|---|
| 50 | fName  = name  ? name  : "MHadronness"; | 
|---|
| 51 | fTitle = title ? title : "Storage container for hadroness value"; | 
|---|
| 52 | } | 
|---|
| 53 |  | 
|---|
| 54 | // -------------------------------------------------------------------------- | 
|---|
| 55 | // | 
|---|
| 56 | // Reset hadroness, -1 indicates: invalid value | 
|---|
| 57 | // | 
|---|
| 58 | void MHadronness::Reset() | 
|---|
| 59 | { | 
|---|
| 60 | fHadronness = -1; | 
|---|
| 61 | } | 
|---|
| 62 |  | 
|---|
| 63 | // -------------------------------------------------------------------------- | 
|---|
| 64 | // | 
|---|
| 65 | // Print the hillas Parameters to *fLog | 
|---|
| 66 | // | 
|---|
| 67 | void MHadronness::Print(Option_t *) const | 
|---|
| 68 | { | 
|---|
| 69 | *fLog << all << GetDescriptor() << ": Hadronness = " << fHadronness << endl; | 
|---|
| 70 | } | 
|---|
| 71 |  | 
|---|