ROOT logo
/*****************************************************************************
 * Project: RooFit                                                           *
 * Package: RooFitCore                                                       *
 * @(#)root/roofitcore:$Id: RooProdGenContext.cxx 36222 2010-10-09 18:27:06Z wouter $
 * Authors:                                                                  *
 *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
 *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
 *                                                                           *
 * Copyright (c) 2000-2005, Regents of the University of California          *
 *                          and Stanford University. All rights reserved.    *
 *                                                                           *
 * Redistribution and use in source and binary forms,                        *
 * with or without modification, are permitted according to the terms        *
 * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
 *****************************************************************************/

//////////////////////////////////////////////////////////////////////////////
//
// BEGIN_HTML
// RooProdGenContext is an efficient implementation of the generator context
// specific for RooProdPdf PDFs. The sim-context owns a list of
// component generator contexts that are used to generate the dependents
// for each component PDF sequentially. 
// END_HTML
//

#include "RooFit.h"
#include "Riostream.h"
#include "RooMsgService.h"

#include "RooProdGenContext.h"
#include "RooProdGenContext.h"
#include "RooProdPdf.h"
#include "RooDataSet.h"
#include "RooRealVar.h"
#include "RooGlobalFunc.h"



ClassImp(RooProdGenContext)
;
  

//_____________________________________________________________________________
RooProdGenContext::RooProdGenContext(const RooProdPdf &model, const RooArgSet &vars, 
				     const RooDataSet *prototype, const RooArgSet* auxProto, Bool_t verbose) :
  RooAbsGenContext(model,vars,prototype,auxProto,verbose), _uniIter(0), _pdf(&model)
{

  // Constructor of optimization generator context for RooProdPdf objects

  //Build an array of generator contexts for each product component PDF
  cxcoutI(Generation) << "RooProdGenContext::ctor() setting up event special generator context for product p.d.f. " << model.GetName() 
			<< " for generation of observable(s) " << vars ;
  if (prototype) ccxcoutI(Generation) << " with prototype data for " << *prototype->get() ;
  if (auxProto && auxProto->getSize()>0)  ccxcoutI(Generation) << " with auxiliary prototypes " << *auxProto ;
  ccxcoutI(Generation) << endl ;

  // Make full list of dependents (generated & proto)
  RooArgSet deps(vars) ;
  if (prototype) {
    RooArgSet* protoDeps = model.getObservables(*prototype->get()) ;
    deps.remove(*protoDeps,kTRUE,kTRUE) ;
    delete protoDeps ;
  }

  // Factorize product in irreducible terms
  RooLinkedList termList,depsList,impDepList,crossDepList,intList ;
  model.factorizeProduct(deps,RooArgSet(),termList,depsList,impDepList,crossDepList,intList) ;
  TIterator* termIter = termList.MakeIterator() ;
  TIterator* normIter = depsList.MakeIterator() ;
  TIterator* impIter = impDepList.MakeIterator() ;
  
  if (dologD(Generation)) {
    cxcoutD(Generation) << "RooProdGenContext::ctor() factorizing product expression in irriducible terms " ;    
    while(RooArgSet* t=(RooArgSet*)termIter->Next()) {
      ccxcoutD(Generation) << *t ;
    }
    ccxcoutD(Generation) << endl ;
  }

  RooArgSet genDeps ;
  // First add terms that do not import observables
  
  Bool_t anyAction = kTRUE ;
  Bool_t go=kTRUE ; 
  while(go) {

    RooAbsPdf* pdf ;
    RooArgSet* term ;
    RooArgSet* impDeps ;
    RooArgSet* termDeps ;

    termIter->Reset() ;
    impIter->Reset() ;
    normIter->Reset() ;

    Bool_t anyPrevAction=anyAction ;
    anyAction=kFALSE ;

    if (termList.GetSize()==0) {
      break ;
    }

    while((term=(RooArgSet*)termIter->Next())) {

      impDeps = (RooArgSet*)impIter->Next() ;
      termDeps = (RooArgSet*)normIter->Next() ;
      if (impDeps==0 || termDeps==0) {
	break ;
      }

      cxcoutD(Generation) << "RooProdGenContext::ctor() analyzing product term " << *term << " with observable(s) " << *termDeps ;
      if (impDeps->getSize()>0) {
	ccxcoutD(Generation) << " which has dependence of external observable(s) " << *impDeps << " that to be generated first by other terms" ;
      }
      ccxcoutD(Generation) << endl ;

      // Add this term if we have no imported dependents, or imported dependents are already generated
      RooArgSet neededDeps(*impDeps) ;
      neededDeps.remove(genDeps,kTRUE,kTRUE) ;

      if (neededDeps.getSize()>0) {
	if (!anyPrevAction) {
	  cxcoutD(Generation) << "RooProdGenContext::ctor() no convergence in single term analysis loop, terminating loop and process remainder of terms as single unit " << endl ;
	  go=kFALSE ;
	  break ;
	}
	cxcoutD(Generation) << "RooProdGenContext::ctor() skipping this term for now because it needs imported dependents that are not generated yet" << endl ;	
	continue ;
      }

      // Check if this component has any dependents that need to be generated
      // e.g. it can happen that there are none if all dependents of this component are prototyped
      if (termDeps->getSize()==0) {
	cxcoutD(Generation) << "RooProdGenContext::ctor() term has no observables requested to be generated, removing it" << endl ;
	termList.Remove(term) ;
	depsList.Remove(termDeps) ;
	impDepList.Remove(impDeps) ;
	delete term ;
	delete termDeps ;
	delete impDeps ;
	anyAction=kTRUE ;
	continue ;
      }

      TIterator* pdfIter = term->createIterator() ;      
      if (term->getSize()==1) {
	// Simple term
	
	pdf = (RooAbsPdf*) pdfIter->Next() ;
	RooArgSet* pdfDep = pdf->getObservables(termDeps) ;
	if (pdfDep->getSize()>0) {
 	  coutI(Generation) << "RooProdGenContext::ctor() creating subcontext for generation of observables " << *pdfDep << " from model " << pdf->GetName() << endl ;
	  RooArgSet* auxProto2 = pdf->getObservables(impDeps) ;
	  RooAbsGenContext* cx = pdf->genContext(*pdfDep,prototype,auxProto2,verbose) ;
	  delete auxProto2 ;
	  _gcList.Add(cx) ;
	} 

// 	cout << "adding following dependents to list of generated observables: " ; pdfDep->Print("1") ;
	genDeps.add(*pdfDep) ;

	delete pdfDep ;
	
      } else {
	
	// Composite term
	if (termDeps->getSize()>0) {
	  const char* name = model.makeRGPPName("PRODGEN_",*term,RooArgSet(),RooArgSet(),0) ;      
	  
	  // Construct auxiliary PDF expressing product of composite terms, 
	  // following Conditional component specification of input model
	  RooLinkedList cmdList ;
	  RooLinkedList pdfSetList ;
	  pdfIter->Reset() ;
	  RooArgSet fullPdfSet ;
	  while((pdf=(RooAbsPdf*)pdfIter->Next())) {

	    RooArgSet* pdfnset = model.findPdfNSet(*pdf) ;
	    RooArgSet* pdfSet = new RooArgSet(*pdf) ;
	    pdfSetList.Add(pdfSet) ;

	    if (pdfnset && pdfnset->getSize()>0) {
	      // This PDF requires a Conditional() construction
	      cmdList.Add(RooFit::Conditional(*pdfSet,*pdfnset).Clone()) ;
//   	      cout << "Conditional " << pdf->GetName() << " " ; pdfnset->Print("1") ;
	    } else {
	      fullPdfSet.add(*pdfSet) ;
	    }
	    
	  }
	  RooProdPdf* multiPdf = new RooProdPdf(name,name,fullPdfSet,cmdList) ;
	  cmdList.Delete() ;
	  pdfSetList.Delete() ;

	  multiPdf->useDefaultGen(kTRUE) ;
	  _ownedMultiProds.addOwned(*multiPdf) ;
	  
   	  coutI(Generation) << "RooProdGenContext()::ctor creating subcontext for generation of observables " << *termDeps 
			      << "for irriducuble composite term using sub-product object " << multiPdf->GetName() ;
	  RooAbsGenContext* cx = multiPdf->genContext(*termDeps,prototype,auxProto,verbose) ;
	  _gcList.Add(cx) ;

	  genDeps.add(*termDeps) ;

	}
      }
      
      delete pdfIter ;

//        cout << "added generator for this term, removing from list" << endl ;

      termList.Remove(term) ;
      depsList.Remove(termDeps) ;
      impDepList.Remove(impDeps) ;
      delete term ;
      delete termDeps ;
      delete impDeps ;
      anyAction=kTRUE ;
    }
  }

  // Check if there are any left over terms that cannot be generated 
  // separately due to cross dependency of observables
  if (termList.GetSize()>0) {

    cxcoutD(Generation) << "RooProdGenContext::ctor() there are left-over terms that need to be generated separately" << endl ;
 
    RooAbsPdf* pdf ;
    RooArgSet* term ;

    // Concatenate remaining terms
    termIter->Reset() ;
    normIter->Reset() ;
    RooArgSet trailerTerm ;
    RooArgSet trailerTermDeps ;
    while((term=(RooArgSet*)termIter->Next())) {
      RooArgSet* termDeps = (RooArgSet*)normIter->Next() ;
      trailerTerm.add(*term) ;
      trailerTermDeps.add(*termDeps) ;
    }

    const char* name = model.makeRGPPName("PRODGEN_",trailerTerm,RooArgSet(),RooArgSet(),0) ;      
      
    // Construct auxiliary PDF expressing product of composite terms, 
    // following Partial/Full component specification of input model
    RooLinkedList cmdList ;
    RooLinkedList pdfSetList ;
    RooArgSet fullPdfSet ;

    TIterator* pdfIter = trailerTerm.createIterator() ;
    while((pdf=(RooAbsPdf*)pdfIter->Next())) {
	
      RooArgSet* pdfnset = model.findPdfNSet(*pdf) ;
      RooArgSet* pdfSet = new RooArgSet(*pdf) ;
      pdfSetList.Add(pdfSet) ;
      
      if (pdfnset && pdfnset->getSize()>0) {
	// This PDF requires a Conditional() construction
	  cmdList.Add(RooFit::Conditional(*pdfSet,*pdfnset).Clone()) ;
      } else {
	fullPdfSet.add(*pdfSet) ;
      }
      
    }
//     cmdList.Print("v") ;
    RooProdPdf* multiPdf = new RooProdPdf(name,name,fullPdfSet,cmdList) ;
    cmdList.Delete() ;
    pdfSetList.Delete() ;
    
    multiPdf->useDefaultGen(kTRUE) ;
    _ownedMultiProds.addOwned(*multiPdf) ;
    
    cxcoutD(Generation) << "RooProdGenContext(" << model.GetName() << "): creating context for irreducible composite trailer term " 
	 << multiPdf->GetName() << " that generates observables " << trailerTermDeps << endl ;
    RooAbsGenContext* cx = multiPdf->genContext(trailerTermDeps,prototype,auxProto,verbose) ;
    _gcList.Add(cx) ;    
  }

  // Now check if the are observables in vars that are not generated by any of the above p.d.f.s
  // If not, generate uniform distributions for these using a special context
  _uniObs.add(vars) ;
  _uniObs.remove(genDeps,kTRUE,kTRUE) ;
  if (_uniObs.getSize()>0) {
    _uniIter = _uniObs.createIterator() ;
    coutI(Generation) << "RooProdGenContext(" << model.GetName() << "): generating uniform distribution for non-dependent observable(s) " << _uniObs << endl ;
  }


  delete termIter ;
  delete impIter ;
  delete normIter ;

  _gcIter = _gcList.MakeIterator() ;


  // We own contents of lists filled by factorizeProduct() 
  termList.Delete() ;
  depsList.Delete() ;
  impDepList.Delete() ;
  crossDepList.Delete() ;
  intList.Delete() ;

}



//_____________________________________________________________________________
RooProdGenContext::~RooProdGenContext()
{
  // Destructor. Delete all owned subgenerator contexts

  delete _gcIter ;
  delete _uniIter ;
  _gcList.Delete() ;  
}


//_____________________________________________________________________________
void RooProdGenContext::attach(const RooArgSet& args) 
{
  // Attach generator to given event buffer

  //Forward initGenerator call to all components
  RooAbsGenContext* gc ;
  _gcIter->Reset() ;
  while((gc=(RooAbsGenContext*)_gcIter->Next())){
    gc->attach(args) ;
  }
}


//_____________________________________________________________________________
void RooProdGenContext::initGenerator(const RooArgSet &theEvent)
{
  // One-time initialization of generator context, forward to component generators

  // Forward initGenerator call to all components
  RooAbsGenContext* gc ;
  _gcIter->Reset() ;
  while((gc=(RooAbsGenContext*)_gcIter->Next())){
    gc->initGenerator(theEvent) ;
  }
}



//_____________________________________________________________________________
void RooProdGenContext::generateEvent(RooArgSet &theEvent, Int_t remaining)
{
  // Generate a single event of the product by generating the components
  // of the products sequentially. The subcontext have been order such
  // that all conditional dependencies are correctly taken into account
  // when processed in sequential order

  // Loop over the component generators
  TList compData ;
  RooAbsGenContext* gc ;
  _gcIter->Reset() ;

  while((gc=(RooAbsGenContext*)_gcIter->Next())) {

    // Generate component 
    gc->generateEvent(theEvent,remaining) ;
  }

  // Generate uniform variables (non-dependents)  
  if (_uniIter) {
    _uniIter->Reset() ;
    RooAbsArg* uniVar ;
    while((uniVar=(RooAbsArg*)_uniIter->Next())) {
      RooAbsLValue* arglv = dynamic_cast<RooAbsLValue*>(uniVar) ;
      if (arglv) {
	arglv->randomize() ;
      }
    }
    theEvent = _uniObs ;
  }  

}



//_____________________________________________________________________________
void RooProdGenContext::setProtoDataOrder(Int_t* lut)
{
  // Set the traversal order of the prototype dataset by the
  // given lookup table

  // Forward call to component generators
  RooAbsGenContext::setProtoDataOrder(lut) ;
  _gcIter->Reset() ;
  RooAbsGenContext* gc ;
  while((gc=(RooAbsGenContext*)_gcIter->Next())) {
    gc->setProtoDataOrder(lut) ;
  }
}



//_____________________________________________________________________________
void RooProdGenContext::printMultiline(ostream &os, Int_t content, Bool_t verbose, TString indent) const 
{
  // Detailed printing interface

  RooAbsGenContext::printMultiline(os,content,verbose,indent) ;
  os << indent << "--- RooProdGenContext ---" << endl ;
  os << indent << "Using PDF ";
  _pdf->printStream(os,kName|kArgs|kClassName,kSingleLine,indent);
  os << indent << "List of component generators" << endl ;

  TString indent2(indent) ;
  indent2.Append("    ") ;
  RooAbsGenContext* gc ;
  _gcIter->Reset() ;
  while((gc=(RooAbsGenContext*)_gcIter->Next())) {
    gc->printMultiline(os,content,verbose,indent2) ;
  }  
}
 RooProdGenContext.cxx:1
 RooProdGenContext.cxx:2
 RooProdGenContext.cxx:3
 RooProdGenContext.cxx:4
 RooProdGenContext.cxx:5
 RooProdGenContext.cxx:6
 RooProdGenContext.cxx:7
 RooProdGenContext.cxx:8
 RooProdGenContext.cxx:9
 RooProdGenContext.cxx:10
 RooProdGenContext.cxx:11
 RooProdGenContext.cxx:12
 RooProdGenContext.cxx:13
 RooProdGenContext.cxx:14
 RooProdGenContext.cxx:15
 RooProdGenContext.cxx:16
 RooProdGenContext.cxx:17
 RooProdGenContext.cxx:18
 RooProdGenContext.cxx:19
 RooProdGenContext.cxx:20
 RooProdGenContext.cxx:21
 RooProdGenContext.cxx:22
 RooProdGenContext.cxx:23
 RooProdGenContext.cxx:24
 RooProdGenContext.cxx:25
 RooProdGenContext.cxx:26
 RooProdGenContext.cxx:27
 RooProdGenContext.cxx:28
 RooProdGenContext.cxx:29
 RooProdGenContext.cxx:30
 RooProdGenContext.cxx:31
 RooProdGenContext.cxx:32
 RooProdGenContext.cxx:33
 RooProdGenContext.cxx:34
 RooProdGenContext.cxx:35
 RooProdGenContext.cxx:36
 RooProdGenContext.cxx:37
 RooProdGenContext.cxx:38
 RooProdGenContext.cxx:39
 RooProdGenContext.cxx:40
 RooProdGenContext.cxx:41
 RooProdGenContext.cxx:42
 RooProdGenContext.cxx:43
 RooProdGenContext.cxx:44
 RooProdGenContext.cxx:45
 RooProdGenContext.cxx:46
 RooProdGenContext.cxx:47
 RooProdGenContext.cxx:48
 RooProdGenContext.cxx:49
 RooProdGenContext.cxx:50
 RooProdGenContext.cxx:51
 RooProdGenContext.cxx:52
 RooProdGenContext.cxx:53
 RooProdGenContext.cxx:54
 RooProdGenContext.cxx:55
 RooProdGenContext.cxx:56
 RooProdGenContext.cxx:57
 RooProdGenContext.cxx:58
 RooProdGenContext.cxx:59
 RooProdGenContext.cxx:60
 RooProdGenContext.cxx:61
 RooProdGenContext.cxx:62
 RooProdGenContext.cxx:63
 RooProdGenContext.cxx:64
 RooProdGenContext.cxx:65
 RooProdGenContext.cxx:66
 RooProdGenContext.cxx:67
 RooProdGenContext.cxx:68
 RooProdGenContext.cxx:69
 RooProdGenContext.cxx:70
 RooProdGenContext.cxx:71
 RooProdGenContext.cxx:72
 RooProdGenContext.cxx:73
 RooProdGenContext.cxx:74
 RooProdGenContext.cxx:75
 RooProdGenContext.cxx:76
 RooProdGenContext.cxx:77
 RooProdGenContext.cxx:78
 RooProdGenContext.cxx:79
 RooProdGenContext.cxx:80
 RooProdGenContext.cxx:81
 RooProdGenContext.cxx:82
 RooProdGenContext.cxx:83
 RooProdGenContext.cxx:84
 RooProdGenContext.cxx:85
 RooProdGenContext.cxx:86
 RooProdGenContext.cxx:87
 RooProdGenContext.cxx:88
 RooProdGenContext.cxx:89
 RooProdGenContext.cxx:90
 RooProdGenContext.cxx:91
 RooProdGenContext.cxx:92
 RooProdGenContext.cxx:93
 RooProdGenContext.cxx:94
 RooProdGenContext.cxx:95
 RooProdGenContext.cxx:96
 RooProdGenContext.cxx:97
 RooProdGenContext.cxx:98
 RooProdGenContext.cxx:99
 RooProdGenContext.cxx:100
 RooProdGenContext.cxx:101
 RooProdGenContext.cxx:102
 RooProdGenContext.cxx:103
 RooProdGenContext.cxx:104
 RooProdGenContext.cxx:105
 RooProdGenContext.cxx:106
 RooProdGenContext.cxx:107
 RooProdGenContext.cxx:108
 RooProdGenContext.cxx:109
 RooProdGenContext.cxx:110
 RooProdGenContext.cxx:111
 RooProdGenContext.cxx:112
 RooProdGenContext.cxx:113
 RooProdGenContext.cxx:114
 RooProdGenContext.cxx:115
 RooProdGenContext.cxx:116
 RooProdGenContext.cxx:117
 RooProdGenContext.cxx:118
 RooProdGenContext.cxx:119
 RooProdGenContext.cxx:120
 RooProdGenContext.cxx:121
 RooProdGenContext.cxx:122
 RooProdGenContext.cxx:123
 RooProdGenContext.cxx:124
 RooProdGenContext.cxx:125
 RooProdGenContext.cxx:126
 RooProdGenContext.cxx:127
 RooProdGenContext.cxx:128
 RooProdGenContext.cxx:129
 RooProdGenContext.cxx:130
 RooProdGenContext.cxx:131
 RooProdGenContext.cxx:132
 RooProdGenContext.cxx:133
 RooProdGenContext.cxx:134
 RooProdGenContext.cxx:135
 RooProdGenContext.cxx:136
 RooProdGenContext.cxx:137
 RooProdGenContext.cxx:138
 RooProdGenContext.cxx:139
 RooProdGenContext.cxx:140
 RooProdGenContext.cxx:141
 RooProdGenContext.cxx:142
 RooProdGenContext.cxx:143
 RooProdGenContext.cxx:144
 RooProdGenContext.cxx:145
 RooProdGenContext.cxx:146
 RooProdGenContext.cxx:147
 RooProdGenContext.cxx:148
 RooProdGenContext.cxx:149
 RooProdGenContext.cxx:150
 RooProdGenContext.cxx:151
 RooProdGenContext.cxx:152
 RooProdGenContext.cxx:153
 RooProdGenContext.cxx:154
 RooProdGenContext.cxx:155
 RooProdGenContext.cxx:156
 RooProdGenContext.cxx:157
 RooProdGenContext.cxx:158
 RooProdGenContext.cxx:159
 RooProdGenContext.cxx:160
 RooProdGenContext.cxx:161
 RooProdGenContext.cxx:162
 RooProdGenContext.cxx:163
 RooProdGenContext.cxx:164
 RooProdGenContext.cxx:165
 RooProdGenContext.cxx:166
 RooProdGenContext.cxx:167
 RooProdGenContext.cxx:168
 RooProdGenContext.cxx:169
 RooProdGenContext.cxx:170
 RooProdGenContext.cxx:171
 RooProdGenContext.cxx:172
 RooProdGenContext.cxx:173
 RooProdGenContext.cxx:174
 RooProdGenContext.cxx:175
 RooProdGenContext.cxx:176
 RooProdGenContext.cxx:177
 RooProdGenContext.cxx:178
 RooProdGenContext.cxx:179
 RooProdGenContext.cxx:180
 RooProdGenContext.cxx:181
 RooProdGenContext.cxx:182
 RooProdGenContext.cxx:183
 RooProdGenContext.cxx:184
 RooProdGenContext.cxx:185
 RooProdGenContext.cxx:186
 RooProdGenContext.cxx:187
 RooProdGenContext.cxx:188
 RooProdGenContext.cxx:189
 RooProdGenContext.cxx:190
 RooProdGenContext.cxx:191
 RooProdGenContext.cxx:192
 RooProdGenContext.cxx:193
 RooProdGenContext.cxx:194
 RooProdGenContext.cxx:195
 RooProdGenContext.cxx:196
 RooProdGenContext.cxx:197
 RooProdGenContext.cxx:198
 RooProdGenContext.cxx:199
 RooProdGenContext.cxx:200
 RooProdGenContext.cxx:201
 RooProdGenContext.cxx:202
 RooProdGenContext.cxx:203
 RooProdGenContext.cxx:204
 RooProdGenContext.cxx:205
 RooProdGenContext.cxx:206
 RooProdGenContext.cxx:207
 RooProdGenContext.cxx:208
 RooProdGenContext.cxx:209
 RooProdGenContext.cxx:210
 RooProdGenContext.cxx:211
 RooProdGenContext.cxx:212
 RooProdGenContext.cxx:213
 RooProdGenContext.cxx:214
 RooProdGenContext.cxx:215
 RooProdGenContext.cxx:216
 RooProdGenContext.cxx:217
 RooProdGenContext.cxx:218
 RooProdGenContext.cxx:219
 RooProdGenContext.cxx:220
 RooProdGenContext.cxx:221
 RooProdGenContext.cxx:222
 RooProdGenContext.cxx:223
 RooProdGenContext.cxx:224
 RooProdGenContext.cxx:225
 RooProdGenContext.cxx:226
 RooProdGenContext.cxx:227
 RooProdGenContext.cxx:228
 RooProdGenContext.cxx:229
 RooProdGenContext.cxx:230
 RooProdGenContext.cxx:231
 RooProdGenContext.cxx:232
 RooProdGenContext.cxx:233
 RooProdGenContext.cxx:234
 RooProdGenContext.cxx:235
 RooProdGenContext.cxx:236
 RooProdGenContext.cxx:237
 RooProdGenContext.cxx:238
 RooProdGenContext.cxx:239
 RooProdGenContext.cxx:240
 RooProdGenContext.cxx:241
 RooProdGenContext.cxx:242
 RooProdGenContext.cxx:243
 RooProdGenContext.cxx:244
 RooProdGenContext.cxx:245
 RooProdGenContext.cxx:246
 RooProdGenContext.cxx:247
 RooProdGenContext.cxx:248
 RooProdGenContext.cxx:249
 RooProdGenContext.cxx:250
 RooProdGenContext.cxx:251
 RooProdGenContext.cxx:252
 RooProdGenContext.cxx:253
 RooProdGenContext.cxx:254
 RooProdGenContext.cxx:255
 RooProdGenContext.cxx:256
 RooProdGenContext.cxx:257
 RooProdGenContext.cxx:258
 RooProdGenContext.cxx:259
 RooProdGenContext.cxx:260
 RooProdGenContext.cxx:261
 RooProdGenContext.cxx:262
 RooProdGenContext.cxx:263
 RooProdGenContext.cxx:264
 RooProdGenContext.cxx:265
 RooProdGenContext.cxx:266
 RooProdGenContext.cxx:267
 RooProdGenContext.cxx:268
 RooProdGenContext.cxx:269
 RooProdGenContext.cxx:270
 RooProdGenContext.cxx:271
 RooProdGenContext.cxx:272
 RooProdGenContext.cxx:273
 RooProdGenContext.cxx:274
 RooProdGenContext.cxx:275
 RooProdGenContext.cxx:276
 RooProdGenContext.cxx:277
 RooProdGenContext.cxx:278
 RooProdGenContext.cxx:279
 RooProdGenContext.cxx:280
 RooProdGenContext.cxx:281
 RooProdGenContext.cxx:282
 RooProdGenContext.cxx:283
 RooProdGenContext.cxx:284
 RooProdGenContext.cxx:285
 RooProdGenContext.cxx:286
 RooProdGenContext.cxx:287
 RooProdGenContext.cxx:288
 RooProdGenContext.cxx:289
 RooProdGenContext.cxx:290
 RooProdGenContext.cxx:291
 RooProdGenContext.cxx:292
 RooProdGenContext.cxx:293
 RooProdGenContext.cxx:294
 RooProdGenContext.cxx:295
 RooProdGenContext.cxx:296
 RooProdGenContext.cxx:297
 RooProdGenContext.cxx:298
 RooProdGenContext.cxx:299
 RooProdGenContext.cxx:300
 RooProdGenContext.cxx:301
 RooProdGenContext.cxx:302
 RooProdGenContext.cxx:303
 RooProdGenContext.cxx:304
 RooProdGenContext.cxx:305
 RooProdGenContext.cxx:306
 RooProdGenContext.cxx:307
 RooProdGenContext.cxx:308
 RooProdGenContext.cxx:309
 RooProdGenContext.cxx:310
 RooProdGenContext.cxx:311
 RooProdGenContext.cxx:312
 RooProdGenContext.cxx:313
 RooProdGenContext.cxx:314
 RooProdGenContext.cxx:315
 RooProdGenContext.cxx:316
 RooProdGenContext.cxx:317
 RooProdGenContext.cxx:318
 RooProdGenContext.cxx:319
 RooProdGenContext.cxx:320
 RooProdGenContext.cxx:321
 RooProdGenContext.cxx:322
 RooProdGenContext.cxx:323
 RooProdGenContext.cxx:324
 RooProdGenContext.cxx:325
 RooProdGenContext.cxx:326
 RooProdGenContext.cxx:327
 RooProdGenContext.cxx:328
 RooProdGenContext.cxx:329
 RooProdGenContext.cxx:330
 RooProdGenContext.cxx:331
 RooProdGenContext.cxx:332
 RooProdGenContext.cxx:333
 RooProdGenContext.cxx:334
 RooProdGenContext.cxx:335
 RooProdGenContext.cxx:336
 RooProdGenContext.cxx:337
 RooProdGenContext.cxx:338
 RooProdGenContext.cxx:339
 RooProdGenContext.cxx:340
 RooProdGenContext.cxx:341
 RooProdGenContext.cxx:342
 RooProdGenContext.cxx:343
 RooProdGenContext.cxx:344
 RooProdGenContext.cxx:345
 RooProdGenContext.cxx:346
 RooProdGenContext.cxx:347
 RooProdGenContext.cxx:348
 RooProdGenContext.cxx:349
 RooProdGenContext.cxx:350
 RooProdGenContext.cxx:351
 RooProdGenContext.cxx:352
 RooProdGenContext.cxx:353
 RooProdGenContext.cxx:354
 RooProdGenContext.cxx:355
 RooProdGenContext.cxx:356
 RooProdGenContext.cxx:357
 RooProdGenContext.cxx:358
 RooProdGenContext.cxx:359
 RooProdGenContext.cxx:360
 RooProdGenContext.cxx:361
 RooProdGenContext.cxx:362
 RooProdGenContext.cxx:363
 RooProdGenContext.cxx:364
 RooProdGenContext.cxx:365
 RooProdGenContext.cxx:366
 RooProdGenContext.cxx:367
 RooProdGenContext.cxx:368
 RooProdGenContext.cxx:369
 RooProdGenContext.cxx:370
 RooProdGenContext.cxx:371
 RooProdGenContext.cxx:372
 RooProdGenContext.cxx:373
 RooProdGenContext.cxx:374
 RooProdGenContext.cxx:375
 RooProdGenContext.cxx:376
 RooProdGenContext.cxx:377
 RooProdGenContext.cxx:378
 RooProdGenContext.cxx:379
 RooProdGenContext.cxx:380
 RooProdGenContext.cxx:381
 RooProdGenContext.cxx:382
 RooProdGenContext.cxx:383
 RooProdGenContext.cxx:384
 RooProdGenContext.cxx:385
 RooProdGenContext.cxx:386
 RooProdGenContext.cxx:387
 RooProdGenContext.cxx:388
 RooProdGenContext.cxx:389
 RooProdGenContext.cxx:390
 RooProdGenContext.cxx:391
 RooProdGenContext.cxx:392
 RooProdGenContext.cxx:393
 RooProdGenContext.cxx:394
 RooProdGenContext.cxx:395
 RooProdGenContext.cxx:396
 RooProdGenContext.cxx:397
 RooProdGenContext.cxx:398
 RooProdGenContext.cxx:399
 RooProdGenContext.cxx:400
 RooProdGenContext.cxx:401
 RooProdGenContext.cxx:402
 RooProdGenContext.cxx:403
 RooProdGenContext.cxx:404
 RooProdGenContext.cxx:405
 RooProdGenContext.cxx:406
 RooProdGenContext.cxx:407
 RooProdGenContext.cxx:408
 RooProdGenContext.cxx:409
 RooProdGenContext.cxx:410
 RooProdGenContext.cxx:411
 RooProdGenContext.cxx:412
 RooProdGenContext.cxx:413
 RooProdGenContext.cxx:414
 RooProdGenContext.cxx:415
 RooProdGenContext.cxx:416
 RooProdGenContext.cxx:417
 RooProdGenContext.cxx:418
 RooProdGenContext.cxx:419
 RooProdGenContext.cxx:420