Implementation of event weighting for Corsika data.  
 More...
#include <JEvtWeightCorsika.hh>
Implementation of event weighting for Corsika data. 
Definition at line 35 of file JEvtWeightCorsika.hh.
 
template<class JEvtWeightFactor_t> 
 
 
template<class JEvtWeightFactor_t> 
 
 
template<class JClonable_t, class JDerived_t = JNullType> 
 
 
  
  
      
        
          | JAANET::JEvtWeightCorsika::JEvtWeightCorsika  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Default Constructor. 
Definition at line 42 of file JEvtWeightCorsika.hh.
JEvtWeightFactorHelper< JFlux > JFluxHelper
Type definition of event-weight factor helper for flux functions. 
 
 
 
 
  
  
      
        
          | JAANET::JEvtWeightCorsika::JEvtWeightCorsika  | 
          ( | 
          const JHead &  | 
          header | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Constructor. 
- Parameters
 - 
  
  
 
Definition at line 52 of file JEvtWeightCorsika.hh.
void configure(const JHead &header) override
Weight configuration. 
 
JEvtWeightFactorHelper< JFlux > JFluxHelper
Type definition of event-weight factor helper for flux functions. 
 
 
 
 
  
  
      
        
          | JAANET::JEvtWeightCorsika::JEvtWeightCorsika  | 
          ( | 
          const JHead &  | 
          header,  | 
         
        
           | 
           | 
          const JFlux &  | 
          flux  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Constructor. 
- Parameters
 - 
  
  
 
Definition at line 65 of file JEvtWeightCorsika.hh.
void configure(const JHead &header) override
Weight configuration. 
 
void configure(const JEvtWeightFactor_t &factor)
Configure event-weight factor. 
 
 
 
 
Copy constructor. 
- Parameters
 - 
  
  
 
Definition at line 78 of file JEvtWeightCorsika.hh.
   80       this->norm = 
object.norm;
 
   82       if (static_cast<const JFluxHelper&>(
object)) {
 
void configure(const JEvtWeightFactor_t &factor)
Configure event-weight factor. 
 
 
 
 
  
  
      
        
          | void JAANET::JEvtWeightCorsika::configure  | 
          ( | 
          const JHead &  | 
          header | ) | 
           | 
         
       
   | 
  
inlineoverride   | 
  
 
Weight configuration. 
- Parameters
 - 
  
  
 
Definition at line 93 of file JEvtWeightCorsika.hh.
  103         THROW(JValueOutOfRange, 
"JEvtWeightCorsika::configure(): Provided header is inconsistent with Corsika.");
 
double numberOfEvents
Number of events. 
 
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message. 
 
bool check(const JHead &header) const override
Check whether header is consistent with this event weighter. 
 
 
 
 
  
  
      
        
          | bool JAANET::JEvtWeightCorsika::check  | 
          ( | 
          const JHead &  | 
          header | ) | 
           const | 
         
       
   | 
  
inlineoverride   | 
  
 
Check whether header is consistent with this event weighter. 
- Parameters
 - 
  
  
 
- Returns
 - true if consistent; else false 
 
Definition at line 114 of file JEvtWeightCorsika.hh.
bool is_gseagen(const JHead &header)
Check for generator. 
 
 
 
 
  
  
      
        
          | double JAANET::JEvtWeightCorsika::getWeight  | 
          ( | 
          const Evt &  | 
          evt | ) | 
           const | 
         
       
   | 
  
inlineoverride   | 
  
 
Get weight of given event. 
- Parameters
 - 
  
  
 
- Returns
 - weight [Hz] 
 
Definition at line 126 of file JEvtWeightCorsika.hh.
  132       if (static_cast<const JFluxHelper&>(*
this) &&
 
  147         if (!static_cast<const JFluxHelper&>(*
this)) {
 
  148           THROW(JNullPointerException, 
"JEvtWeightCorsika::getWeight(): Unspecified flux function.");
 
  150           THROW(JIndexOutOfRange,      
"JEvtWeightCorsika::getWeight(): Empty " << (evt.
w.size() < 3 ? 
"w2-" : 
"w3-") << 
"weight.");
 
static const int WEIGHTLIST_RESCALED_EVENT_RATE
Rescaled event rate [s-1]. 
 
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message. 
 
std::vector< double > w
MC: Weights w[0]=w1, w[1]=w2, w[2]=w3 (see e.g. Tag list or km3net-dataformat/definitions) ...
 
static const int WEIGHTLIST_EVENT_RATE
Event rate [s-1]. 
 
static const int W2LIST_GSEAGEN_N_RETRIES
Number of extra chances given to each CORSIKA shower to hit the can. 
 
double getFactor(const Evt &evt) const 
Get weight-factor of given event. 
 
static const int WEIGHTLIST_DIFFERENTIAL_EVENT_RATE
Event rate per unit of flux (c.f. taglist document) [GeV m2 sr]. 
 
std::vector< double > w2list
MC: factors that make up w[1]=w2 (see e.g. Tag list or km3net-dataformat/definitions) ...
 
 
 
 
template<class JEvtWeightFactor_t> 
 
Configure event-weight factor. 
- Parameters
 - 
  
    | factor | event-weight factor  | 
  
   
Definition at line 59 of file JEvtWeightFactorHelper.hh.
   63       JEvtWeightFactor_t* p = 
dynamic_cast<JEvtWeightFactor_t*
>(factor.clone());
 
   68         THROW(JNullPointerException, 
"JEvtWeightFactorHelper::configure(): Invalid downcast to class derived from JEvtWeightFactor.");
 
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message. 
 
 
 
 
template<class JEvtWeightFactor_t> 
 
Get reference to event-weight factor. 
- Returns
 - reference to event-weight factor 
 
Definition at line 78 of file JEvtWeightFactorHelper.hh.
   82       if (static_cast<const JEvtWeightFactorHelper_t&>(*
this)) {
 
   83         return *(this->
get());
 
   85         THROW(JNullPointerException, 
"JEvtWeightFactorHelper::getEvtWeightFactor(): Event-weight factor is not set.");
 
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message. 
 
 
 
 
template<class JEvtWeightFactor_t> 
 
Get weight-factor of given event. 
- Parameters
 - 
  
  
 
- Returns
 - event-weight factor 
 
Definition at line 96 of file JEvtWeightFactorHelper.hh.
  100       return weightFactor.getFactor(evt);
 
JEvtWeightFactor_t & getEvtWeightFactor() const 
Get reference to event-weight factor. 
 
 
 
 
template<class JClonable_t, class JDerived_t = JNullType> 
  
  | 
      
   | 
  
inlineoverridevirtualinherited   | 
  
 
Get clone of this object. 
- Returns
 - pointer to newly created object 
 
Reimplemented in JPHYSICS::JPDFTransformer< 5, JArgument_t >, JPHYSICS::JPDFTransformer< 4, JArgument_t >, JPHYSICS::JPDFTransformer< 3, JArgument_t >, JPHYSICS::JPDFTransformer< 2, JArgument_t >, JPHYSICS::JPDGTransformer_t< JArgument_t >, JPHYSICS::JPD0Transformer_t< JArgument_t >, JTOOLS::JMultiMapTransformer< N, JArgument_t >::JMultiMapDefaultTransformer, JPHYSICS::JPDFTransformer_t< JArgument_t >, JLANG::JClonable< JMatch< hit_type > >, JLANG::JClonable< JMatch< hit_type >, JMatch3D >, JLANG::JClonable< JMatch< JTRIGGER::JHitR1 > >, and JLANG::JClonable< JMatch< JTRIGGER::JHitR1 >, JMatch3G< JTRIGGER::JHitR1 > >.
Definition at line 69 of file JClonable.hh.
   71       return new JDerived_t(static_cast<const JDerived_t&>(*
this));
 
 
 
 
The documentation for this struct was generated from the following file: