HepevtModule Class Reference

#include <HepevtModule.h>

Inheritance diagram for HepevtModule:

JobCModule List of all members.

Public Member Functions

 HepevtModule ()
 ~HepevtModule ()
JobCResult Get (MomNavigator *mom)
JobCResult Ana (const MomNavigator *mom)
const RegistryDefaultConfig () const
void Config (const Registry &r)
void BeginJob ()
void EndJob ()

Static Public Member Functions

static void SetDefaultDetector (Detector::Detector_t det)
static void SetDefaultStartVldTimeStamp (const VldTimeStamp &vts)
static void SetDefaultSpillTimeInterval (Double_t dt)
static VldTimeStamp GetDefaultStartVldTimeStamp ()
static Double_t GetDefaultStartVldTimeInterval ()

Private Member Functions

SimSnarlRecordFindOrCreateSimSnarlRecord (MomNavigator *mom)
 Find a record we can modify.
int CountNeededBogusNeuKin (TClonesArray *stdhep, std::vector< int > &splitIndices)
 Add bogus REROOT_NeuKin entries to make PTSim happy.
void AddBogusNeuKinEntries (SimSnarlRecord *record, int nneukin, TClonesArray *stdhep, std::vector< int > &splitIndices)
void FillNeuKinStructFromStdHepRange (NEUKIN_DEF *neukin, TClonesArray *stdhep, int ibeg, int iend)
void ModifyStdHep (TClonesArray *stdhep)
 adjust status codes, squeeze out unwanted lines

Private Attributes

Detector::Detector_t fDetector
VldTimeStamp fTimeStampStart
Double_t fDtSpill
Int_t fRun
Int_t fSubRun
Int_t fSnarl
size_t fNSnarlsCreated
TLorentzVector fVtxOffset
std::string fStdHepInputFileName
std::ifstream fStdHepInputFile
Int_t fInputBinaryFD
Bool_t fGetApplyRollback
Bool_t fAnaPrintStdHep
Int_t fIonScheme
Bool_t fFixCharmDKStatus
Bool_t fDropGeantEntries
Bool_t fDropTauDecayProducts
Bool_t fDropCharmDecayProducts
Bool_t fDropStatus999
std::string fStdHepEditString
Bool_t fForceNevHEPSnarl
Int_t fMakeBogusNeuKinEntries
Int_t fAddedLists
Int_t fAddedEntries
UtilHepevt::cunits_t fVtxConvert
UtilHepevt::cunits_t fTConvert
UtilHepevt::cunits_t fEConvert

Static Private Attributes

static Detector::Detector_t fgDefaultDetector = Detector::kUnknown
static VldTimeStamp fgDefaultStartTime = VldTimeStamp()
static Double_t fgDefaultDtSpill = 1.9

Detailed Description

Definition at line 33 of file HepevtModule.h.


Constructor & Destructor Documentation

HepevtModule::HepevtModule (  ) 

Definition at line 84 of file HepevtModule.cxx.

References LoadMinosPDG().

00085     : fDetector(fgDefaultDetector)
00086     , fTimeStampStart(fgDefaultStartTime)
00087     , fDtSpill(fgDefaultDtSpill)
00088     , fRun(1)
00089     , fSubRun(0)
00090     , fSnarl(-1)
00091     , fNSnarlsCreated(0)
00092     , fInputBinaryFD(-1)
00093     , fGetApplyRollback(true)
00094     , fAnaPrintStdHep(true)
00095     , fIonScheme(UtilPDG::kIonUnchanged)
00096     , fFixCharmDKStatus(true)
00097     , fDropGeantEntries(false)
00098     , fDropTauDecayProducts(false)
00099     , fDropCharmDecayProducts(false)
00100     , fDropStatus999(false)
00101     , fStdHepEditString("")
00102     , fForceNevHEPSnarl(false)
00103     , fMakeBogusNeuKinEntries(3)
00104     , fAddedLists(0)
00105     , fAddedEntries(0)
00106     , fVtxConvert(UtilHepevt::k_none)
00107     , fTConvert(UtilHepevt::k_none)
00108     , fEConvert(UtilHepevt::k_none)
00109 {
00110    // construct a new "HepevtModule" JobControl module
00111 
00112    // initialize detector to non-legal value
00113 
00114    LoadMinosPDG();
00115 
00116 }

HepevtModule::~HepevtModule (  ) 

Definition at line 120 of file HepevtModule.cxx.

References Msg::kVerbose, and MSG.

00121 {
00122   MSG("Hepevt", Msg::kVerbose) << "HepevtModule::Destructor\n";
00123 
00124 }


Member Function Documentation

void HepevtModule::AddBogusNeuKinEntries ( SimSnarlRecord record,
int  nneukin,
TClonesArray *  stdhep,
std::vector< int > &  splitIndices 
) [private]

Definition at line 513 of file HepevtModule.cxx.

References RecDataRecord< T >::AdoptComponent(), FillNeuKinStructFromStdHepRange(), RecDataRecord< T >::FindComponent(), and fMakeBogusNeuKinEntries.

Referenced by Get().

00516 {
00517   // Add REROOT_NeuKin entries to the "NeuKinList" in the SimSnarlRecord 
00518   // (create list if necessary).  Do this to keep PTSim happy...
00519 
00520   // if fMakeBogusNeuKinEntries is negative try to fill them in a meaningful way
00521 
00522   const TObject* const_obj = record->FindComponent("TClonesArray","NeuKinList");
00523   // cast away constness!!! so we can modify it ... bad, bad us!
00524   TObject* obj = const_cast<TObject*>(const_obj);
00525   if ( ! obj ) {
00526     // record didn't have a list ... make one
00527     TClonesArray* newarray = new TClonesArray("REROOT_NeuKin",0);
00528     newarray->SetName("NeuKinList");
00529     record->AdoptComponent(newarray); // add to the record
00530     obj = newarray;
00531   }
00532   // Now to the right type
00533   TClonesArray* neukinlist = dynamic_cast<TClonesArray*>(obj);  // this is already owned
00534   // Add entries
00535   int ientry = neukinlist->GetLast() + 1;
00536   for (int ikin = 0; ikin < nneukin; ++ikin) {
00537     if ( fMakeBogusNeuKinEntries < 0 ) {
00538       new((*neukinlist)[ientry++])REROOT_NeuKin();  // make bogus entries
00539     } else {
00540       // make bogus entries, but try to fill them in a meaningful way
00541       NEUKIN_DEF neukin;
00542       FillNeuKinStructFromStdHepRange(&neukin,stdhep,
00543                                       splitIndices[ikin],splitIndices[ikin+1]);
00544       new((*neukinlist)[ientry++])REROOT_NeuKin(&neukin);  
00545     }
00546   }
00547 }

JobCResult HepevtModule::Ana ( const MomNavigator mom  )  [virtual]

Implement this for read only access to the MomNavigator

Reimplemented from JobCModule.

Definition at line 753 of file HepevtModule.cxx.

References UtilHepevt::dump(), fAnaPrintStdHep, RecDataRecord< T >::FindComponent(), MomNavigator::GetFragment(), SimSnarlRecord::GetSimSnarlHeader(), JobCResult::kPassed, JobCResult::kWarning, Msg::kWarning, MSG, SimSnarlRecord::Print(), and SimSnarlHeader::Print().

00754 {
00755    // Check out current RecSimSnarl Record from the current REROOT event
00756 
00757    const TObject* obj = 0;
00758 
00759    SimSnarlRecord* simrec = 
00760       dynamic_cast<SimSnarlRecord*>(mom->GetFragment("SimSnarlRecord"));
00761    if (!simrec) {
00762       MSG("Hepevt", Msg::kWarning) << 
00763         "HepevtModule::Ana no SimSnarlRecord" << endl;
00764       return JobCResult::kWarning;
00765    }
00766 
00767    // leading space
00768    cout << endl;
00769    cout << "HepevtModule::Ana() begin ================================================= " << endl;
00770    // print the header
00771    simrec->GetSimSnarlHeader()->Print();
00772    cout << endl; // finish off header
00773 
00774    if (fAnaPrintStdHep) {
00775        obj = simrec->FindComponent("TClonesArray","StdHep");
00776        const TClonesArray* newstdhep = dynamic_cast<const TClonesArray*>(obj);
00777        if (!newstdhep) {
00778            MSG("Hepevt", Msg::kWarning) << 
00779                "HepevtModule::Ana no StdHep " << obj << endl;
00780            simrec->Print();
00781            return JobCResult::kWarning;
00782        }
00783        else UtilHepevt::dump(newstdhep,1);  //alt_print_tclones_stdhep(newstdhep);
00784    }
00785    cout << "HepevtModule::Ana() done ================================================== " << endl;
00786 
00787    return JobCResult::kPassed; // All Ok
00788 }

void HepevtModule::BeginJob (  )  [virtual]

Implement for notification of begin of job

Reimplemented from JobCModule.

Definition at line 1032 of file HepevtModule.cxx.

01033 {
01034 
01035 }

void HepevtModule::Config ( const Registry r  )  [virtual]

Return the actual configuration. If your module directly pulls its configuration from the fConfig Registry, you don't need to override this. Override if you have local config variables.

Reimplemented from JobCModule.

Definition at line 854 of file HepevtModule.cxx.

References UtilHepevt::asString(), UtilHepevt::closeBinary(), fAnaPrintStdHep, fDetector, fDropCharmDecayProducts, fDropGeantEntries, fDropStatus999, fDropTauDecayProducts, fDtSpill, fEConvert, fFixCharmDKStatus, fForceNevHEPSnarl, fGetApplyRollback, fInputBinaryFD, fIonScheme, fMakeBogusNeuKinEntries, fRun, fSnarl, fStdHepEditString, fStdHepInputFile, fStdHepInputFileName, fSubRun, fTConvert, fVtxConvert, fVtxOffset, Registry::Get(), Registry::GetCharString(), JobCModule::GetName(), UtilPDG::ionSchemeName(), Msg::kInfo, MSG, UtilHepevt::openBinary(), minos::PostOnWhiteBoard(), and UtilHepevt::string2cunits().

00855 {
00856 //======================================================================
00857 // Configure the module given the registry r
00858 //======================================================================
00859   const char*  tmps;
00860   double tmpd;
00861   int    tmpi;
00862 
00863   if (r.Get("Detector",   tmpi)) { fDetector = (Detector::Detector_t)tmpi; }
00864   if (r.Get("DtSpill",    tmpd)) { fDtSpill  = tmpd; }
00865   if (r.Get("Run",        tmpi)) { fRun      = tmpi; }
00866   if (r.Get("SubRun",     tmpi)) { fSubRun   = tmpi; }
00867   if (r.Get("FirstSnarl", tmpi)) { fSnarl    = tmpi-1; } // start -1 so ++ works
00868 
00869   // changing file or input binary mode triggers close/re-open
00870   bool new_file = false;
00871   if (r.Get("StdHepInputFile", tmps)) { 
00872     std::string fname = tmps;
00873     if ( fname != "" ) {
00874       if ( fname != fStdHepInputFileName ) new_file = true;
00875       fStdHepInputFileName = fname;
00876     }
00877   }
00878   int isbinary = 0;
00879   if (r.Get("InputBinary", tmpi)) { isbinary = tmpi; }
00880   int current_binary = ( fInputBinaryFD != -1 ) ? 1 : 0;
00881   bool switch_mode = ( current_binary != isbinary );
00882 
00883   if ( new_file || switch_mode ) {
00884     // close any binary file
00885     UtilHepevt::closeBinary(fInputBinaryFD);
00886     // close any open ascii file
00887     if ( fStdHepInputFile.is_open() ) fStdHepInputFile.close();
00888 
00889     if ( fStdHepInputFileName != "" ) {
00890       if ( isbinary ) {
00891         fInputBinaryFD = UtilHepevt::openBinary(fStdHepInputFileName.c_str(),false);
00892         if ( fInputBinaryFD != -1 ) {
00893           MSG("Hepevt",Msg::kInfo) 
00894             << "Successfully opened binary file " << fStdHepInputFileName
00895             << " for StdHep events to append to SimSnarl" << endl;
00896         }
00897       } else {
00898         fStdHepInputFile.open(fStdHepInputFileName.c_str(),ifstream::in);
00899         if ( fStdHepInputFile.is_open() ) {
00900           MSG("Hepevt",Msg::kInfo) 
00901             << "Successfully opened ascii file " << fStdHepInputFileName
00902             << " for StdHep events to append to SimSnarl" << endl;
00903         }
00904       }
00905     }
00906   }
00907 
00908   TLorentzVector voffset(fVtxOffset);
00909   if (r.Get("VtxOffsetX", tmpd)) { voffset.SetX(tmpd); }
00910   if (r.Get("VtxOffsetY", tmpd)) { voffset.SetY(tmpd); }
00911   if (r.Get("VtxOffsetZ", tmpd)) { voffset.SetZ(tmpd); }
00912   if (r.Get("VtxOffsetT", tmpd)) { voffset.SetT(tmpd); }
00913   if ( voffset != fVtxOffset ) {
00914     fVtxOffset = voffset;
00915     MSG("Hepevt",Msg::kInfo) 
00916       << "Using vtx offset of { " 
00917       << fVtxOffset.X() << ", "
00918       << fVtxOffset.Y() << ", "
00919       << fVtxOffset.Z() << ", "
00920       << fVtxOffset.T() << " }" << endl;
00921     // publish these on the whiteboard
00922     minos::PostOnWhiteBoard("EvtInfo","VtxOffsetX",fVtxOffset.X());
00923     minos::PostOnWhiteBoard("EvtInfo","VtxOffsetY",fVtxOffset.Y());
00924     minos::PostOnWhiteBoard("EvtInfo","VtxOffsetZ",fVtxOffset.Z());
00925     minos::PostOnWhiteBoard("EvtInfo","VtxOffsetT",fVtxOffset.T());
00926   }
00927 
00928   bool changeUnits = false;
00929   if ( r.Get("vtxConvert",tmps) ) {
00930     UtilHepevt::cunits_t vtxConvert = UtilHepevt::string2cunits(tmps);
00931     //MSG("Hepevt",Msg::kInfo) << " vtxC " << tmps << " " << vtxConvert << " " << fVtxConvert << endl;
00932     if ( fVtxConvert != vtxConvert ) {
00933       fVtxConvert = vtxConvert;
00934       changeUnits = true;
00935     }
00936   }
00937   if ( r.Get("tConvert",tmps) ) {
00938     UtilHepevt::cunits_t tConvert = UtilHepevt::string2cunits(tmps);
00939     //MSG("Hepevt",Msg::kInfo) << " vtxC " << tmps << " " << tConvert << " " << fTConvert << endl;
00940     if ( fTConvert != tConvert ) {
00941       fTConvert = tConvert;
00942       changeUnits = true;
00943     }
00944   }
00945   if ( r.Get("eConvert",tmps) ) {
00946     UtilHepevt::cunits_t eConvert = UtilHepevt::string2cunits(tmps);
00947     //MSG("Hepevt",Msg::kInfo) << " vtxC " << tmps << " " << eConvert << " " << fEConvert << endl;
00948     if ( fEConvert != eConvert ) {
00949       fEConvert = eConvert;
00950       changeUnits = true;
00951     }
00952   }
00953   if ( changeUnits ) {
00954     MSG("Hepevt",Msg::kInfo) 
00955       << "Setting unit conversion "
00956       << "vtx = " << UtilHepevt::asString(fVtxConvert)
00957       << ", t = " << UtilHepevt::asString(fTConvert)
00958       << ", e = " << UtilHepevt::asString(fEConvert)
00959       << endl;
00960   }
00961 
00962   if (r.Get("GetApplyRollback",    tmpi)) { fGetApplyRollback   = tmpi; }
00963   if (r.Get("AnaPrintStdHep",      tmpi)) { fAnaPrintStdHep     = tmpi; }
00964 
00965   if (r.Get("ConvertIonPDG",tmpi)) {
00966     if (fIonScheme != tmpi) {
00967       MSG("Hepevt",Msg::kInfo) 
00968         << GetName() << " will convert ions using the "
00969         << UtilPDG::ionSchemeName((UtilPDG::ionscheme_t)tmpi)
00970         << " scheme." << endl;
00971     }
00972     fIonScheme = tmpi;
00973   }
00974   
00975   bool changeEdit = false;
00976   if (r.Get("FixCharmDKStatus",      tmpi)) 
00977     { if ( fFixCharmDKStatus != tmpi ) 
00978       { fFixCharmDKStatus = tmpi; changeEdit=true; } }
00979   if (r.Get("DropGeantEntries",      tmpi)) 
00980     { if ( fDropGeantEntries != tmpi )
00981       { fDropGeantEntries = tmpi; changeEdit=true; } }
00982   if (r.Get("DropTauDecayProducts",  tmpi)) 
00983     { if ( fDropTauDecayProducts != tmpi ) 
00984       { fDropTauDecayProducts = tmpi; changeEdit=true; } }
00985   if (r.Get("DropCharmDecayProducts",tmpi)) 
00986     { if ( fDropCharmDecayProducts != tmpi )
00987       { fDropCharmDecayProducts = tmpi; changeEdit=true; } }
00988   if (r.Get("DropStatus999",         tmpi)) 
00989     { if ( fDropStatus999 != tmpi )
00990       { fDropStatus999 = tmpi; changeEdit=true; } }
00991 
00992   std::string tmpstr = r.GetCharString("StdHepEditString");
00993   if ( tmpstr != fStdHepEditString )
00994     { fStdHepEditString = tmpstr; changeEdit=true; }
00995 
00996   if ( changeEdit ) {
00997     MSG("Hepevt",Msg::kInfo)
00998       << GetName() << " StdHep list editing,"
00999       << " FixCharmDKStatus " << (fFixCharmDKStatus?"yes":"no")
01000       << endl <<  "    Drop:  "
01001       << " GeantEntries="       << (fDropGeantEntries?"yes":"no")
01002       << " TauDecayProducts="   << (fDropTauDecayProducts?"yes":"no")
01003       << " CharmDecayProducts=" << (fDropCharmDecayProducts?"yes":"no")
01004       << " Status999="          << (fDropStatus999?"yes":"no")
01005       << endl;
01006     if (fStdHepEditString != "") {
01007       MSG("Hepevt",Msg::kInfo)
01008         << " StdHepEditString: \"" << fStdHepEditString << "\""
01009         << endl;
01010     }
01011   }
01012 
01013   bool change2 = false;
01014   if (r.Get("ForceNevHEPSnarl",      tmpi)) 
01015     { if ( fForceNevHEPSnarl != tmpi ) 
01016       { fForceNevHEPSnarl = tmpi; change2=true; } }
01017   if (r.Get("BogusNeuKin",     tmpi)) 
01018     { if ( fMakeBogusNeuKinEntries != tmpi )
01019       { fMakeBogusNeuKinEntries = tmpi; change2=true; } }
01020   if ( change2 ) {
01021     MSG("Hepevt",Msg::kInfo)
01022       << GetName() << " ForceNevHEPSnarl = "
01023       << (fForceNevHEPSnarl?"true":"false")
01024       << ", MakeBogusNeuKinEntries = " << fMakeBogusNeuKinEntries
01025       << endl;
01026   }
01027 
01028 }

int HepevtModule::CountNeededBogusNeuKin ( TClonesArray *  stdhep,
std::vector< int > &  splitIndices 
) [private]

Add bogus REROOT_NeuKin entries to make PTSim happy.

Definition at line 419 of file HepevtModule.cxx.

References fMakeBogusNeuKinEntries, hepevtmdlns::isInitialState(), Msg::kWarning, and MAXMSG.

Referenced by Get().

00421 {
00422   // Determing # of "events" PTSim is going to consider this stdhep
00423   // as having based on an imitation of its algorithm for splitting.
00424 
00425 
00426   Int_t nstdhep = stdhep->GetEntriesFast();
00427 
00428   Int_t nevents = 0;
00429   splitIndices.clear();
00430 
00431   // how to count
00432   switch ( abs(fMakeBogusNeuKinEntries) ) {
00433   case  1:
00434     {
00435       // no splitting, always assume 1 
00436       nevents = 1;
00437       splitIndices.push_back(0);
00438       break; 
00439     }
00440   case  2: 
00441     {
00442       // try to approximate "simple" splitting scheme in PTSim 
00443       // each "event" is a unspecified series of status 0 
00444       // (or 1001, 2001 for Minerva)  entries followed by some w/ 
00445       // other status values.  Seeing status 0 again triggers new event.
00446       int mcindex = -1;
00447       bool ready_for_trigger = true;
00448       for ( Int_t istd = 0; istd < nstdhep; istd++ ) {
00449         TParticle* simstdhep = dynamic_cast<TParticle*>(stdhep->At(istd));
00450         Int_t status = simstdhep->GetStatusCode();
00451         // 0=neugen/genie initial state
00452         // 3=nuance initial state
00453         // 1001/2001 minerva/argoneut initial state 
00454         //   (after propagation through those detectors)
00455         if ( hepevtmdlns::isInitialState(status) ) {
00456           if ( ready_for_trigger ) {
00457             // start new event
00458             ++mcindex;
00459             splitIndices.push_back(istd);
00460             ready_for_trigger = false;
00461           }
00462         } else {
00463           ready_for_trigger = true;
00464         }
00465       }
00466       nevents = mcindex+1;
00467       break;
00468     }
00469   case  3: 
00470     {
00471       // try to approximate splitting scheme in PTSim
00472       int mcindex = -1;
00473       int nprim = 0;
00474       bool prevchild = true;
00475       
00476       for ( Int_t istd = 0; istd < nstdhep; istd++ ) {
00477         TParticle* simstdhep = dynamic_cast<TParticle*>(stdhep->At(istd));
00478         
00479         if ( simstdhep->GetMother(0) == -1 && simstdhep->GetMother(1) == -1 ) {
00480           // primary, check to make sure its new event
00481           nprim++;
00482           if ( nprim > 2 || prevchild ) {
00483             mcindex++;
00484             splitIndices.push_back(istd);
00485             nprim = 1;
00486           }
00487           prevchild = false;
00488         } else {
00489           prevchild = true;
00490           nprim = 0;
00491         }
00492       }
00493       nevents = mcindex+1;
00494       break;
00495     }
00496   default:
00497     {
00498       MAXMSG("Hepevt",Msg::kWarning,5)
00499         << "CountNeededBogusNeuKin switch=" << fMakeBogusNeuKinEntries
00500         << " not a recognized setting" << endl;
00501       nevents = 1;
00502       splitIndices.push_back(0);
00503     }
00504 
00505   }
00506   splitIndices.push_back(nstdhep);
00507 
00508   return nevents;
00509 }

const Registry & HepevtModule::DefaultConfig (  )  const [virtual]

Get the default configuration registry. This should normally be overridden. One useful idiom is to implement it like:

const Registry& MyModule::DefaultConfig() const { static Registry cfg; // never is destroyed if (cfg.Size()) return cfg; // already filled it // set defaults: cfg.Set("TheAnswer",42); cfg.Set("Units","unknown"); return cfg; }

Reimplemented from JobCModule.

Definition at line 791 of file HepevtModule.cxx.

References fDtSpill, fRun, fSubRun, JobCModule::GetName(), UtilPDG::kIonUnchanged, Detector::kUnknown, Registry::LockValues(), Registry::Set(), and Registry::UnLockValues().

00792 {
00793 //======================================================================
00794 // Create a registry which holds the default configuration and return it
00795 //======================================================================
00796   static Registry r;
00797  
00798   // Set name of config
00799   std::string name = this->GetName();
00800   name += ".config.default";
00801   r.SetName(name.c_str());
00802 
00803   // Set values of config
00804   r.UnLockValues();
00805 
00806   // if creating records out of whole cloth here's a starting point
00807   r.Set("Detector",   Detector::kUnknown); // user must set!
00808   r.Set("DtSpill",    fDtSpill);  // time between spills
00809   r.Set("Run",        fRun);  //
00810   r.Set("SubRun",     fSubRun);
00811   r.Set("FirstSnarl", 0);  // starting snarl #
00812 
00813   // This module assumes that the input file is in the minossoft
00814   // offline coordinate system (though stored internally the the StdHep
00815   // units of millimeters).  If the input file is from GMINOS (i.e. z=0
00816   // is the front of the hall rather than 2mm upstream of the front
00817   // of the plane 0 steel) then you must add the appropriate offset:
00818   //     NearDet:    VtxOffsetZ = -49.07 
00819   //     FarDet:     VtxOffsetZ = -14.02
00820   r.Set("VtxOffsetX", 0.0);
00821   r.Set("VtxOffsetY", 0.0);
00822   r.Set("VtxOffsetZ", 0.0);
00823   r.Set("VtxOffsetT", 0.0);
00824 
00825   r.Set("vtxConvert", "none");
00826   r.Set("tConvert",   "none");
00827   r.Set("eConvert",   "none");
00828 
00829   r.Set("StdHepInputFile",    "");
00830   r.Set("InputBinary",         0);
00831 
00832   r.Set("GetApplyRollback",    1);
00833   r.Set("AnaPrintStdHep",      1);
00834 
00835   r.Set("ConvertIonPDG",(int)UtilPDG::kIonUnchanged);
00836   r.Set("FixCharmDKStatus",       1);  // do *this* by default
00837   r.Set("DropGeantEntries",       0);
00838   r.Set("DropTauDecayProducts",   0);
00839   r.Set("DropCharmDecayProducts", 0);
00840   r.Set("DropStatus999",          0);
00841   r.Set("StdHepEditString",      "");
00842 
00843   r.Set("ForceNevHEPSnarl",       0);
00844 
00845   r.Set("BogusNeuKin",            3); // make bogus REROOT_NeuKin entries (PTSim default algorithm for splitting)
00846 
00847   r.LockValues();
00848 
00849   return r;
00850 }

void HepevtModule::EndJob (  )  [virtual]

Implement for notification of end of job

Reimplemented from JobCModule.

Definition at line 1039 of file HepevtModule.cxx.

References fAddedEntries, fAddedLists, Msg::kInfo, and MSG.

01040 {
01041 
01042   MSG("Hepevt",Msg::kInfo)
01043     << "HepevtModule Added " << fAddedEntries << " entries to " 
01044     << fAddedLists << " lists" << endl;
01045 
01046 }

void HepevtModule::FillNeuKinStructFromStdHepRange ( NEUKIN_DEF neukin,
TClonesArray *  stdhep,
int  ibeg,
int  iend 
) [private]

Definition at line 550 of file HepevtModule.cxx.

References NEUKIN_DEF::A, NEUKIN_DEF::EMFrac, UtilPDG::getIonAZJ(), NEUKIN_DEF::IAction, NEUKIN_DEF::IBoson, NEUKIN_DEF::ID, NEUKIN_DEF::IFlags, NEUKIN_DEF::INu, INULL, NEUKIN_DEF::INuNoOsc, NEUKIN_DEF::IResonance, UtilPDG::isElectron(), hepevtmdlns::isInitialState(), UtilPDG::isMuon(), UtilPDG::isNeutrino(), UtilPDG::isNeutron(), UtilPDG::isProton(), UtilPDG::isTau(), NEUKIN_DEF::IStruckQ, NEUKIN_DEF::ITg, NEUKIN_DEF::P4El1, NEUKIN_DEF::P4El2, NEUKIN_DEF::P4Mu1, NEUKIN_DEF::P4Mu2, NEUKIN_DEF::P4Neu, NEUKIN_DEF::P4NeuNoOsc, NEUKIN_DEF::P4Shw, NEUKIN_DEF::P4Tau, NEUKIN_DEF::P4Tgt, NEUKIN_DEF::Q2, RNULL, NEUKIN_DEF::Sigma, NEUKIN_DEF::SigmaDiff, NEUKIN_DEF::W2, NEUKIN_DEF::X, NEUKIN_DEF::Y, and NEUKIN_DEF::Z.

Referenced by AddBogusNeuKinEntries().

00553 {
00554 
00555   const int   INULL = 2147483647;  /* null values ala ADAMO */
00556   const float RNULL = 699050.*65536.*65536.*65536.*65536.*65536.*65536.*256.;
00557 
00558   // set default to what ADAMO nulwin would set the values to
00559   neukin->ID         = INULL;
00560   neukin->INu        = INULL;
00561   neukin->INuNoOsc   = INULL;
00562   neukin->ITg        = INULL;
00563   neukin->IBoson     = INULL;
00564   neukin->IResonance = INULL;
00565   neukin->IAction    = INULL;
00566   neukin->IStruckQ   = INULL;
00567   neukin->IFlags     = INULL;
00568   neukin->A          = RNULL;
00569   neukin->Z          = RNULL;
00570   neukin->Sigma      = RNULL;
00571   neukin->SigmaDiff  = RNULL;
00572   neukin->X          = RNULL;
00573   neukin->Y          = RNULL;
00574   neukin->Q2         = RNULL;
00575   neukin->W2         = RNULL;
00576   neukin->EMFrac     = RNULL;
00577 
00578 // Fill simple arrays from NeuKin struct.
00579   Int_t i;
00580   for (i=0; i<4; i++) {
00581         neukin->P4Neu[i]      = RNULL;
00582         neukin->P4NeuNoOsc[i] = RNULL;
00583         neukin->P4Tgt[i]      = RNULL;
00584         neukin->P4Shw[i]      = RNULL;
00585         neukin->P4Mu1[i]      = RNULL;
00586         neukin->P4Mu2[i]      = RNULL;
00587         neukin->P4El1[i]      = RNULL;
00588         neukin->P4El2[i]      = RNULL;
00589         neukin->P4Tau[i]      = RNULL;
00590   }
00591 
00592   neukin->IFlags       = INULL;
00593   neukin->IStruckQ     = INULL;
00594   neukin->SigmaDiff    = RNULL;
00595 
00596   int     tmp_nshw = 0;
00597   Float_t tmp_p4shw[4] = { 0, 0, 0, 0 };
00598 
00599   // work backward through the StdHep list
00600   for (int ihep=iend-1; ihep >= ibeg; --ihep) {
00601     const TParticle* apart = dynamic_cast<const TParticle*>(stdhep->At(ihep));
00602     if ( ! apart ) continue;
00603 
00604     int istatus = apart->GetStatusCode();
00605     int ipdg    = apart->GetPdgCode();
00606 
00607     bool isnu  = UtilPDG::isNeutrino(ipdg);
00608     bool isel  = UtilPDG::isElectron(ipdg);
00609     bool ismu  = UtilPDG::isMuon(ipdg);
00610     bool istau = UtilPDG::isTau(ipdg);
00611     
00612     if ( hepevtmdlns::isInitialState(istatus) ) {
00613       if ( isnu ) {
00614         // initial state neutrino
00615         if ( neukin->INu == INULL ) {
00616           neukin->INu = ipdg;
00617           neukin->P4Neu[0] = apart->Px();
00618           neukin->P4Neu[1] = apart->Py();
00619           neukin->P4Neu[2] = apart->Pz();
00620           neukin->P4Neu[3] = apart->Energy();
00621         }
00622         neukin->INuNoOsc = ipdg;
00623         neukin->P4NeuNoOsc[0] = apart->Px();
00624         neukin->P4NeuNoOsc[1] = apart->Py();
00625         neukin->P4NeuNoOsc[2] = apart->Pz();
00626         neukin->P4NeuNoOsc[3] = apart->Energy();
00627       } else {
00628         // initial state target
00629         neukin->ITg = ipdg;
00630         neukin->P4Tgt[0] = apart->Px();
00631         neukin->P4Tgt[1] = apart->Py();
00632         neukin->P4Tgt[2] = apart->Pz();
00633         neukin->P4Tgt[3] = apart->Energy();
00634         if ( ipdg >= 1000000000 && ipdg < 2000000000 ) {
00635           int ia, iz, ij;
00636           UtilPDG::getIonAZJ(ipdg,ia,iz,ij);
00637           neukin->A = ia;
00638           neukin->Z = iz;
00639         } else if ( UtilPDG::isProton(ipdg) ) {
00640           neukin->A = 1;
00641           neukin->Z = 1;
00642         } else if ( UtilPDG::isNeutron(ipdg) ) {
00643           neukin->A = 1;
00644           neukin->Z = 0;
00645         }
00646       }
00647     } // initial state
00648 
00649     if ( abs(ipdg) > 0 && abs(ipdg) < 9 ) neukin->IStruckQ = ipdg;
00650 
00651     if ( istatus == 1 ) {
00652       // final state particles
00653       // for now ASSUME no 2nd lepton
00654       if ( isel ) {
00655         neukin->P4El1[0] = apart->Px();
00656         neukin->P4El1[1] = apart->Py();
00657         neukin->P4El1[2] = apart->Pz();
00658         // sign of energy reflects sign of electron
00659         double esign = ( ipdg == 11 ) ? -1 : 1 ;
00660         neukin->P4El1[3] = apart->Energy() * esign;
00661       } else if ( ismu ) {
00662         neukin->P4Mu1[0] = apart->Px();
00663         neukin->P4Mu1[1] = apart->Py();
00664         neukin->P4Mu1[2] = apart->Pz();
00665         // sign of energy reflects sign of muon
00666         double esign = ( ipdg == 13 ) ? -1 : 1 ;
00667         neukin->P4Mu1[3] = apart->Energy() * esign;
00668       } else if ( istau ) {
00669         neukin->P4Tau[0] = apart->Px();
00670         neukin->P4Tau[1] = apart->Py();
00671         neukin->P4Tau[2] = apart->Pz();
00672         // sign of energy reflects sign of tau
00673         double esign = ( ipdg == 15 ) ? -1 : 1 ;
00674         neukin->P4Tau[3] = apart->Energy() * esign;
00675       } else if ( ! isnu ) {
00676         // everything else (that isn't a neutrino) is "shower"
00677         ++tmp_nshw;
00678         tmp_p4shw[0] += apart->Px();
00679         tmp_p4shw[1] += apart->Py();
00680         tmp_p4shw[2] += apart->Pz();
00681         tmp_p4shw[3] += apart->Energy();
00682       }
00683     }
00684 
00685   } // loop over particles
00686 
00687   if ( tmp_nshw > 0 ) {
00688     // saw something "shower-ish"
00689     for (int j=0; j<4; ++j ) neukin->P4Shw[j] = tmp_p4shw[j];
00690   }
00691 
00692 }

SimSnarlRecord * HepevtModule::FindOrCreateSimSnarlRecord ( MomNavigator mom  )  [private]

Find a record we can modify.

Definition at line 338 of file HepevtModule.cxx.

References VldTimeStamp::Add(), RecDataRecord< T >::AdoptComponent(), MomNavigator::AdoptFragment(), RecJobHistory::CreateJobRecord(), fDetector, fDtSpill, RecDataRecord< T >::FindComponent(), fNSnarlsCreated, MomNavigator::FragmentIter(), fRun, fSnarl, fSubRun, fTimeStampStart, UtilHepevt::getEmptyStdHep(), minos::GetFromWhiteBoard(), RecRecordImp< T >::GetJobHistory(), RecRecordImp< T >::GetTempTags(), gSystem(), Msg::kDebug, RecJobHistory::kGMinos, SimFlag::kMC, MSG, and Registry::Set().

Referenced by Get().

00339 {
00340    // Find SimSnarlRecord 
00341    // Ensure that it has a TClonesArray "StdHep" of TParticle objects
00342 
00343    SimSnarlRecord* record = 0;
00344 
00345    // See if a SimSnarlRecord already exists. 
00346    TObject* tobj;
00347    TIter    fragiter = mom->FragmentIter();
00348    while( ( tobj = fragiter.Next() ) ) {
00349      record = dynamic_cast<SimSnarlRecord*>(tobj);
00350      if (record) break;
00351    }
00352 
00353    // If not, make one.
00354    if ( record == 0 ) {
00355      ++fSnarl;
00356      ++fNSnarlsCreated;
00357 
00358      Short_t runtype = 0;
00359      UInt_t  trigsrc = 0;
00360      Int_t   timeframe = fSnarl; // ? what to choose
00361      Int_t   spilltype = -1;
00362 
00363      // a default method of choosing time stamps
00364      VldTimeStamp ts(fTimeStampStart);
00365      ts.Add(fDtSpill*fSnarl);
00366 
00367      // has someone dropped info onto the whiteboard for us to use?
00368      minos::GetFromWhiteBoard("EvtInfo","SnarlTimeStamp",ts);
00369      minos::GetFromWhiteBoard("EvtInfo","Snarl",fSnarl);
00370      minos::GetFromWhiteBoard("EvtInfo","RunType",runtype);
00371      minos::GetFromWhiteBoard("EvtInfo","TrigSrc",trigsrc);
00372          
00373      VldContext vldc(fDetector,SimFlag::kMC,ts);
00374 
00375      UInt_t  errcode = 0;
00376  
00377      VldTimeStamp mcGenTime;
00378      std::string  mcCodename("HepevtModule");
00379      std::string  mcHostname(gSystem->HostName());
00380      SimSnarlHeader simheader(vldc,fRun,fSubRun,runtype,errcode,
00381                               fSnarl,trigsrc,timeframe,spilltype,
00382                               mcGenTime,mcCodename,mcHostname);
00383      record = new SimSnarlRecord(simheader);
00384      // Add the history information to the record
00385      RecJobHistory& jobhist 
00386        = const_cast<RecJobHistory&>(record->GetJobHistory());
00387      jobhist.CreateJobRecord(RecJobHistory::kGMinos,mcCodename.c_str(),"",
00388                              mcHostname.c_str(),mcGenTime);
00389      
00390      MSG("Hepevt",Msg::kDebug)
00391        << "New SimSnarlRecord " << simheader << endl;
00392      
00393      // give the RecSimSnarl to MOM to hold as a "fragment"
00394      record->GetTempTags().Set("stream","SimSnarl");  
00395      record->GetTempTags().Set("tree","SimSnarl");  
00396      record->GetTempTags().Set("file","no-input-file");
00397      record->GetTempTags().Set("index",fSnarl);
00398      mom->AdoptFragment(record);
00399    }
00400    
00401    // Even if we didn't create the record make sure it has a StdHep list
00402    const TObject* const_obj = record->FindComponent("TClonesArray","StdHep");
00403    if ( ! const_obj ) {
00404      TClonesArray* stdhep = UtilHepevt::getEmptyStdHep();
00405      record->AdoptComponent(stdhep);
00406    }
00407 
00408    // Create a DigiRerootInfo to hold miscellaneous information about
00409    // the event generation.
00410    //DigiRerootInfo* drInfo = new DigiRerootInfo(fRun,fSnarl,fSnarl,vldc);
00411    //record->AdoptComponent(drInfo);
00412 
00413    return record;
00414 
00415 }

JobCResult HepevtModule::Get ( MomNavigator mom  )  [virtual]

Implement if your module needs to read data from some external source and fill mom

Reimplemented from JobCModule.

Definition at line 204 of file HepevtModule.cxx.

References AddBogusNeuKinEntries(), UtilHepevt::appendStdHep(), UtilHepevt::applyUnitConvert(), VldTimeStamp::AsString(), CountNeededBogusNeuKin(), UtilHepevt::dump(), fAddedEntries, fAddedLists, fEConvert, fForceNevHEPSnarl, fGetApplyRollback, RecDataRecord< T >::FindComponent(), FindOrCreateSimSnarlRecord(), fInputBinaryFD, fIonScheme, fMakeBogusNeuKinEntries, Form(), fRun, fSnarl, fStdHepInputFile, fStdHepInputFileName, fTConvert, fVtxConvert, fVtxOffset, CfgConfigurable::GetConfig(), UtilPDG::getDfltStdIonScheme(), UtilHepevt::getEmptyStdHep(), UtilHepevt::getNevHep(), MINFHeader::GetRun(), SimSnarlRecord::GetSimSnarlHeader(), gSystem(), header, DbiTableProxyRegistry::Instance(), MsgService::Instance(), MsgService::IsActive(), UtilHepevt::k_none, JobCResult::kAOK, Msg::kDebug, Msg::kError, JobCResult::kFailed, Msg::kInfo, Msg::kWarning, ModifyStdHep(), MSG, Registry::Print(), UtilHepevt::readAscii(), UtilHepevt::readBinary(), CfgConfigurable::Set(), MsgService::SetCurrentRunSnarl(), UtilPDG::setDfltStdIonScheme(), UtilHepevt::unpackCommon(), and CfgConfigurable::Update().

00205 {
00206   // Read input file for StdHep
00207   // Create SimSnarlRecord (if necessary)
00208   // Append StdHep
00209 
00210    const int sigEndJob = SIGTERM; // what signal to raise on EOF (or no file)
00211 
00212    TClonesArray* addon = 0;
00213    if ( fStdHepInputFileName != "" ) {
00214      bool isFail = gSystem->AccessPathName(fStdHepInputFileName.c_str());
00215      if ( isFail ) {
00216        MSG("Hepevt",Msg::kError) << "No such StdHep file: "
00217                                  << fStdHepInputFileName << endl;
00218        raise(sigEndJob);
00219        return JobCResult::kFailed; // signal this record is junk as well
00220      }
00221      // reading from some input file ...
00222      if ( fStdHepInputFile.is_open() || fInputBinaryFD != -1 ) {
00223        if ( fInputBinaryFD != -1 ) {
00224          addon = UtilHepevt::getEmptyStdHep();
00225          addon->SetName("StdHep");
00226          UtilHepevt::readBinary(fInputBinaryFD);
00227          // readBinary will set filedescriptor < 0 if EOF and file got closed
00228          if ( fInputBinaryFD != -1 ) {
00229            UtilHepevt::unpackCommon(addon);
00230          } else {
00231            delete addon; addon = 0;  // signal EOF
00232          }
00233        } else {
00234          addon = UtilHepevt::readAscii(fStdHepInputFile);
00235        }
00236        // end-of-file signalled by no TClonesArray
00237        if ( ! addon ) {
00238          MSG("Hepevt",Msg::kWarning)
00239            << "No StdHep list read in from "
00240            << fStdHepInputFileName << " assume EOF {"
00241            << fStdHepInputFile.is_open() << " " << fInputBinaryFD << "}"
00242            << endl;
00243          // signal processing to end ... leaves useless last entry intact
00244          raise(sigEndJob);  // signal no more passes through jobc path
00245          return JobCResult::kFailed; // signal this record is junk as well
00246        }
00247      }
00248    }
00249 
00251    // Find or make the SimSnarl
00252 
00253    if ( fForceNevHEPSnarl ) {
00254      int nevhep = UtilHepevt::getNevHep();
00255      // use only if it looks like it is being set
00256      if ( nevhep > 0 ) fSnarl = nevhep-1; // will pre-increment if record is created
00257    }
00258   
00259    SimSnarlRecord* record = FindOrCreateSimSnarlRecord(mom);
00260    const SimSnarlHeader* header = record->GetSimSnarlHeader();
00261    fRun   = header->GetRun();
00262    fSnarl = header->GetSnarl();
00263    VldContext vldc = header->GetVldContext();
00264 
00265    // if we created this one then we'll be wanting to update this
00266    MsgService::Instance()->SetCurrentRunSnarl(fRun,fSnarl);
00267 
00268    MSG("Hepevt",Msg::kDebug)
00269      << endl
00270      << "#slew FindOrCreateSimSnarlRecord returned " << vldc << endl;
00271 
00272    static VldTimeStamp rollbackTS;
00273    VldTimeStamp mcGenTime = header->GetMcGenTime();
00274    if ( fGetApplyRollback && mcGenTime < rollbackTS ) {
00275      rollbackTS = mcGenTime;
00276      // rollback the database for Ugli* and Bfld*
00277      DbiTableProxyRegistry& dbiCfg = DbiTableProxyRegistry::Instance();
00278      // something like: 
00279      //   dbiCfg.Set("Rollback:Ugli*         =  '2002-08-01'");
00280      dbiCfg.Set(Form("Rollback:UGLIDBI* = '%s'",rollbackTS.AsString("sql")));
00281      dbiCfg.Set(Form("Rollback:BFLDDBIPLANEMAP* = '%s'",rollbackTS.AsString("sql")));
00282      dbiCfg.Set("RollbackType:UGLIDBI* = 'CREATIONDATE'");
00283      dbiCfg.Set("RollbackType:BFLDDBIPLANEMAP* = 'CREATIONDATE'");
00284      
00285      MSG("Hepevt",Msg::kInfo)
00286        << "HepevtModule is setting dbiCfg to: " << endl;
00287      MsgService* msgserv = MsgService::Instance();
00288      if (msgserv->IsActive("Hepevt",Msg::kInfo))
00289        dbiCfg.GetConfig().Print();
00290      
00291      dbiCfg.Update();
00292    }
00293 
00294    const TObject* const_obj = record->FindComponent("TClonesArray","StdHep");
00295    // cast away constness!!! so we can modify it ... bad, bad us!
00296    TObject* obj = const_cast<TObject*>(const_obj);
00297    // now to the right type
00298    TClonesArray* stdhep = dynamic_cast<TClonesArray*>(obj);  // this is already owned
00299    
00300    // adjust units for what we read in (if need be)
00301    if ( fVtxConvert != UtilHepevt::k_none ||
00302         fTConvert   != UtilHepevt::k_none ||
00303         fEConvert   != UtilHepevt::k_none    )
00304      UtilHepevt::applyUnitConvert(addon,fVtxConvert,fTConvert,fEConvert);
00305 
00306    if ( fMakeBogusNeuKinEntries != 0 ) {
00307      // [i]=start, [i+1]=end [start,end) for separate events
00308      std::vector<int> splitIndices;  
00309      int nneukin = CountNeededBogusNeuKin(addon,splitIndices);
00310      AddBogusNeuKinEntries(record,nneukin,addon,splitIndices);
00311    }
00312 
00313    fAddedLists++;
00314    fAddedEntries += addon->GetLast()+1;
00315    UtilHepevt::appendStdHep(stdhep,addon,fVtxOffset);
00316    delete addon;  // delete unowned array
00317 
00318    // dump stuff at kDebug level
00319    if ( MsgService::Instance()->IsActive("Hepevt",Msg::kDebug) ) {
00320      MSG("Hepevt",Msg::kInfo)
00321        << " >>>>> Processing StdHep list:" << endl;
00322      UtilHepevt::dump(stdhep,1);
00323    }
00324 
00325    // Set/Reset the PDG scheme used for ions before/after conversion.
00326    UtilPDG::ionscheme_t old_ionscheme = UtilPDG::getDfltStdIonScheme();
00327    UtilPDG::setDfltStdIonScheme((UtilPDG::ionscheme_t)fIonScheme);
00328 
00329    ModifyStdHep(stdhep);
00330 
00331    UtilPDG::setDfltStdIonScheme(old_ionscheme);
00332 
00333    return JobCResult::kAOK; // All Ok
00334 }

Double_t HepevtModule::GetDefaultStartVldTimeInterval (  )  [static]

Definition at line 73 of file HepevtModule.cxx.

References fgDefaultDtSpill.

00074 { return fgDefaultDtSpill; }

VldTimeStamp HepevtModule::GetDefaultStartVldTimeStamp (  )  [static]

Definition at line 71 of file HepevtModule.cxx.

References fgDefaultStartTime.

00072 { return fgDefaultStartTime; }

void HepevtModule::ModifyStdHep ( TClonesArray *  stdhep  )  [private]

adjust status codes, squeeze out unwanted lines

Definition at line 694 of file HepevtModule.cxx.

References fDropCharmDecayProducts, fDropGeantEntries, fDropStatus999, fDropTauDecayProducts, fFixCharmDKStatus, fStdHepEditString, UtilHepevt::modStatusStdHep(), and UtilHepevt::squeezeStdHep().

Referenced by Get().

00695 {
00696   // Fix up decay chain of StdHep list 
00697   // Trim it appropriately
00698 
00699   if (fFixCharmDKStatus) {
00700     // Fix cases where charm hadron generated particles (e.g. delta-rays)
00701     // before it decayed.  In this case the original was tagged ist=2,
00702     // the decay point was ist=1205 but the daughters had ist=205
00703     // rather than 1.  Be a bit careful in case we have charm->charm->stuff
00704     // (perhaps a D* -> D + gamma/pi0, but I haven't seen any of those
00705     // come out of NEUGEN in my study of a few files...)
00706 
00707     // decay products of charm that are ist=205 should be 1
00708     string charmDKDaughters1("fromcharm && ( ! ischarm ) && ist==205 ");
00709     UtilHepevt::modStatusStdHep(stdhep_list,charmDKDaughters1,1);
00710     // in case of charm(2)->charm(1205)->charm(205)->stuff, tag last charm 2
00711     string charmDKDaughters2("fromcharm && ischarm && ist==205 && da0 > -1  ");
00712     UtilHepevt::modStatusStdHep(stdhep_list,charmDKDaughters2,2);
00713   }
00714 
00715   if (fDropGeantEntries) {
00716     // drop entries added in GEANT propagation that aren't charm/tau related
00717     string dropGeant("(  (ist> 200 && ist< 231) || "
00718                      "   (ist> 300 && ist< 310) || "
00719                      "   (ist>1200 && ist<1231) || "
00720                      "   (ist>1300 && ist<1310) )  "
00721                      " && !ischarm && !istau ");
00722     UtilHepevt::modStatusStdHep(stdhep_list,dropGeant);
00723     UtilHepevt::squeezeStdHep(stdhep_list);
00724   }
00725   if (fDropTauDecayProducts) {
00726     // flag and remove tau decay point entry and decay daughters
00727     string dropTauDK("(istau && ist==1205) || (fromtau && ist==1)");
00728     UtilHepevt::modStatusStdHep(stdhep_list,dropTauDK);
00729     UtilHepevt::squeezeStdHep(stdhep_list);
00730     // reactivate tau as an active particle subject to decay IST=1
00731     UtilHepevt::modStatusStdHep(stdhep_list,"istau && ist==2 && da0==-1",1);
00732   }
00733   if (fDropCharmDecayProducts) {
00734      // flag and remove charm decay point entry and decay daughters
00735     string dropCharmDK("(ischarm && ist==1205) || (fromcharm && ist==1)");
00736     UtilHepevt::modStatusStdHep(stdhep_list,dropCharmDK);
00737     UtilHepevt::squeezeStdHep(stdhep_list);
00738     // reactivate tau as an active particle subject to decay IST=1
00739     UtilHepevt::modStatusStdHep(stdhep_list,"ischarm && ist==2 && da0==-1",1);
00740   }
00741   if (fDropStatus999) {
00742     UtilHepevt::modStatusStdHep(stdhep_list,"ist==999");
00743     UtilHepevt::squeezeStdHep(stdhep_list);
00744   }
00745   if (fStdHepEditString != "") {
00746     UtilHepevt::modStatusStdHep(stdhep_list,fStdHepEditString);
00747     UtilHepevt::squeezeStdHep(stdhep_list);
00748   }
00749 
00750 }

void HepevtModule::SetDefaultDetector ( Detector::Detector_t  det  )  [static]

Definition at line 64 of file HepevtModule.cxx.

00065 { fgDefaultDetector = det; }

void HepevtModule::SetDefaultSpillTimeInterval ( Double_t  dt  )  [static]

Definition at line 68 of file HepevtModule.cxx.

References fgDefaultDtSpill.

00069 { fgDefaultDtSpill = dt; }

void HepevtModule::SetDefaultStartVldTimeStamp ( const VldTimeStamp vts  )  [static]

Definition at line 66 of file HepevtModule.cxx.

References fgDefaultStartTime.

00067 { fgDefaultStartTime = vts; }


Member Data Documentation

Int_t HepevtModule::fAddedEntries [private]

Definition at line 115 of file HepevtModule.h.

Referenced by EndJob(), and Get().

Int_t HepevtModule::fAddedLists [private]

Definition at line 114 of file HepevtModule.h.

Referenced by EndJob(), and Get().

Bool_t HepevtModule::fAnaPrintStdHep [private]

Definition at line 101 of file HepevtModule.h.

Referenced by Ana(), and Config().

Detector::Detector_t HepevtModule::fDetector [private]

Definition at line 87 of file HepevtModule.h.

Referenced by Config(), and FindOrCreateSimSnarlRecord().

Bool_t HepevtModule::fDropCharmDecayProducts [private]

Definition at line 107 of file HepevtModule.h.

Referenced by Config(), and ModifyStdHep().

Bool_t HepevtModule::fDropGeantEntries [private]

Definition at line 105 of file HepevtModule.h.

Referenced by Config(), and ModifyStdHep().

Bool_t HepevtModule::fDropStatus999 [private]

Definition at line 108 of file HepevtModule.h.

Referenced by Config(), and ModifyStdHep().

Bool_t HepevtModule::fDropTauDecayProducts [private]

Definition at line 106 of file HepevtModule.h.

Referenced by Config(), and ModifyStdHep().

Double_t HepevtModule::fDtSpill [private]

Definition at line 89 of file HepevtModule.h.

Referenced by Config(), DefaultConfig(), and FindOrCreateSimSnarlRecord().

UtilHepevt::cunits_t HepevtModule::fEConvert [private]

Definition at line 119 of file HepevtModule.h.

Referenced by Config(), and Get().

Bool_t HepevtModule::fFixCharmDKStatus [private]

Definition at line 104 of file HepevtModule.h.

Referenced by Config(), and ModifyStdHep().

Bool_t HepevtModule::fForceNevHEPSnarl [private]

Definition at line 111 of file HepevtModule.h.

Referenced by Config(), and Get().

Detector::Detector_t HepevtModule::fgDefaultDetector = Detector::kUnknown [static, private]

Definition at line 123 of file HepevtModule.h.

Double_t HepevtModule::fgDefaultDtSpill = 1.9 [static, private]

Definition at line 125 of file HepevtModule.h.

Referenced by GetDefaultStartVldTimeInterval(), and SetDefaultSpillTimeInterval().

VldTimeStamp HepevtModule::fgDefaultStartTime = VldTimeStamp() [static, private]

Definition at line 124 of file HepevtModule.h.

Referenced by GetDefaultStartVldTimeStamp(), and SetDefaultStartVldTimeStamp().

Bool_t HepevtModule::fGetApplyRollback [private]

Definition at line 100 of file HepevtModule.h.

Referenced by Config(), and Get().

Int_t HepevtModule::fInputBinaryFD [private]

Definition at line 98 of file HepevtModule.h.

Referenced by Config(), and Get().

Int_t HepevtModule::fIonScheme [private]

Definition at line 103 of file HepevtModule.h.

Referenced by Config(), and Get().

Int_t HepevtModule::fMakeBogusNeuKinEntries [private]

Definition at line 112 of file HepevtModule.h.

Referenced by AddBogusNeuKinEntries(), Config(), CountNeededBogusNeuKin(), and Get().

size_t HepevtModule::fNSnarlsCreated [private]

Definition at line 93 of file HepevtModule.h.

Referenced by FindOrCreateSimSnarlRecord().

Int_t HepevtModule::fRun [private]

Definition at line 90 of file HepevtModule.h.

Referenced by Config(), DefaultConfig(), FindOrCreateSimSnarlRecord(), and Get().

Int_t HepevtModule::fSnarl [private]

Definition at line 92 of file HepevtModule.h.

Referenced by Config(), FindOrCreateSimSnarlRecord(), and Get().

std::string HepevtModule::fStdHepEditString [private]

Definition at line 109 of file HepevtModule.h.

Referenced by Config(), and ModifyStdHep().

std::ifstream HepevtModule::fStdHepInputFile [private]

Definition at line 97 of file HepevtModule.h.

Referenced by Config(), and Get().

std::string HepevtModule::fStdHepInputFileName [private]

Definition at line 96 of file HepevtModule.h.

Referenced by Config(), and Get().

Int_t HepevtModule::fSubRun [private]

Definition at line 91 of file HepevtModule.h.

Referenced by Config(), DefaultConfig(), and FindOrCreateSimSnarlRecord().

UtilHepevt::cunits_t HepevtModule::fTConvert [private]

Definition at line 118 of file HepevtModule.h.

Referenced by Config(), and Get().

VldTimeStamp HepevtModule::fTimeStampStart [private]

Definition at line 88 of file HepevtModule.h.

Referenced by FindOrCreateSimSnarlRecord().

UtilHepevt::cunits_t HepevtModule::fVtxConvert [private]

Definition at line 117 of file HepevtModule.h.

Referenced by Config(), and Get().

TLorentzVector HepevtModule::fVtxOffset [private]

Definition at line 95 of file HepevtModule.h.

Referenced by Config(), and Get().


The documentation for this class was generated from the following files:
Generated on Wed Dec 10 22:49:39 2014 for loon by  doxygen 1.4.7