#include <ANtpInfoObjectFillerBeam.h>
Inheritance diagram for ANtpInfoObjectFillerBeam:

Public Member Functions | |
| ANtpInfoObjectFillerBeam () | |
| virtual | ~ANtpInfoObjectFillerBeam () |
| void | FillBeamInformation (VldTimeStamp &timeStamp, DetectorType::Detector_t det, SimFlag::SimFlag_t dataType, ANtpBeamInfo *beamInfo) |
| void | FillBeamMCTruthInformation (NtpMCTruth *ntpMCTruth, TClonesArray *stdArray, ANtpTruthInfoBeam *truthInfo) |
|
|
Definition at line 36 of file ANtpInfoObjectFillerBeam.cxx. References MSG. 00037 {
00038
00039 MSG("ANtpInfoObjectFillerBeam", Msg::kDebug) << "ANtpInfoObjectFillerBeam::Constructor" << endl;
00040
00041 }
|
|
|
Definition at line 44 of file ANtpInfoObjectFillerBeam.cxx. References MSG. 00045 {
00046
00047 MSG("ANtpInfoObjectFillerBeam", Msg::kDebug) << "ANtpInfoObjectFillerBeam::Destructor" << endl;
00048
00049 }
|
|
||||||||||||||||||||
|
||||||||||||||||
|
Definition at line 114 of file ANtpInfoObjectFillerBeam.cxx. References NtpMCTruth::a, abs(), ANtpTruthInfoBeam::atomicNumber, ANtpTruthInfoBeam::atomicWeight, ANtpTruthInfoBeam::bjorkenX, NtpMCTruth::emfrac, ANtpTruthInfoBeam::emShowerFraction, ANtpTruthInfoBeam::hadronicFinalState, NtpMCStdHep::IdHEP, ANtpTruthInfoBeam::initialState, NtpMCTruth::inu, NtpMCTruth::inunoosc, NtpMCTruth::iresonance, NtpMCStdHep::IstHEP, ANtpTruthInfoBeam::nonOscNuDCosX, ANtpTruthInfoBeam::nonOscNuDCosY, ANtpTruthInfoBeam::nonOscNuDCosZ, ANtpTruthInfoBeam::nonOscNuEnergy, ANtpTruthInfoBeam::nonOscNuFlavor, ANtpTruthInfo::nuFlavor, NtpMCTruth::p4neunoosc, NtpMCTruth::q2, ANtpTruthInfoBeam::q2, ANtpTruthInfoBeam::resonanceCode, NtpMCTruth::sigma, ANtpTruthInfoBeam::sigma, NtpMCTruth::stdhep, NtpMCTruth::w2, ANtpTruthInfoBeam::w2, NtpMCTruth::x, and NtpMCTruth::z. Referenced by ANtpTruthInfoBeamAna::Analyze(), and MadAnalysis::CreateANtpPAN(). 00117 {
00118 //the NtpMCTruth object stdhep array tells you which entries in the stdhep array
00119 //are the first and last for the event
00120 Int_t lowIndex = (Int_t)ntpMCTruth->stdhep[0];
00121 Int_t highIndex = (Int_t)ntpMCTruth->stdhep[1];
00122
00123 //already fill this variable in the FillMCTruthInformation() method
00124 //but leave it in to quiet the compiler
00125 truthInfo->nuFlavor = ntpMCTruth->inu;
00126 truthInfo->nonOscNuEnergy = ntpMCTruth->p4neunoosc[3];
00127 truthInfo->nonOscNuDCosX = ntpMCTruth->p4neunoosc[0];
00128 truthInfo->nonOscNuDCosY = ntpMCTruth->p4neunoosc[1];
00129 truthInfo->nonOscNuDCosZ = ntpMCTruth->p4neunoosc[2];
00130 truthInfo->nonOscNuFlavor = ntpMCTruth->inunoosc;
00131 truthInfo->resonanceCode = ntpMCTruth->iresonance;
00132
00133 truthInfo->atomicWeight = ntpMCTruth->a;
00134 truthInfo->atomicNumber = ntpMCTruth->z;
00135 truthInfo->bjorkenX = ntpMCTruth->x;
00136 truthInfo->q2 = ntpMCTruth->q2;
00137 truthInfo->w2 = ntpMCTruth->w2;
00138 truthInfo->sigma = ntpMCTruth->sigma;
00139 truthInfo->emShowerFraction = ntpMCTruth->emfrac;
00140
00141 NtpMCStdHep *ntpMCStdHep = 0;
00142
00143 //loop over the entries to figure out the targert nucleon
00144 Int_t nucleon = 0;
00145 Int_t nuFlavor = ntpMCTruth->inu;
00146 bool gotOneAlreadyMate = false;
00147
00148 for(Int_t i = lowIndex; i < highIndex+1; ++i){
00149
00150 ntpMCStdHep = dynamic_cast<NtpMCStdHep *>(stdArray->At(i));
00151
00152 if(ntpMCStdHep->IstHEP == 11){
00153 if(ntpMCStdHep->IdHEP == 2212) nucleon = 1;
00154 else if(ntpMCStdHep->IdHEP == 2112) nucleon = 0;
00155 else if(abs(ntpMCStdHep->IdHEP) > 1000000000) nucleon = 2;
00156 else nucleon = 3;
00157 }
00158
00159 if(nucleon == 1 && nuFlavor > 0) truthInfo->initialState = 1; //p + v
00160 else if(nucleon == 0 && nuFlavor > 0) truthInfo->initialState = 2; //n + v
00161 else if(nucleon == 1 && nuFlavor < 0) truthInfo->initialState = 3; //p + vbar
00162 else if(nucleon == 0 && nuFlavor < 0) truthInfo->initialState = 4; //n + vbar
00163 else if(nucleon == 2 && nuFlavor > 0) truthInfo->initialState = 5; //N + v
00164 else if(nucleon == 3 && nuFlavor > 0) truthInfo->initialState = 6; //A + v
00165 else if(nucleon == 2 && nuFlavor < 0) truthInfo->initialState = 7; //N + vbar
00166 else if(nucleon == 3 && nuFlavor < 0) truthInfo->initialState = 8; //A + vbar
00167
00168 //figure out the hadronic final state too
00169 if(ntpMCTruth->iresonance == 1002){
00170 if(ntpMCStdHep->IstHEP == 3 && !(TMath::Abs(ntpMCStdHep->IdHEP)==15) && !gotOneAlreadyMate)
00171 //not a tau lepton and we dont have an IstHEP==3 yet
00172 {
00173 truthInfo->hadronicFinalState = ntpMCStdHep->IdHEP%1000;
00174 gotOneAlreadyMate = true;
00175 }
00176 }
00177 else if(ntpMCStdHep->IstHEP==3 && !gotOneAlreadyMate){
00178 truthInfo->hadronicFinalState = ntpMCStdHep->IdHEP%1000;
00179 gotOneAlreadyMate = true;
00180 }
00181
00182 }//end loop over stdhep array for this event
00183
00184 return;
00185 }
|
1.3.9.1