Changeset View
Changeset View
Standalone View
Standalone View
test/evtgenlhc_test1.cc
Show First 20 Lines • Show All 863 Lines • ▼ Show 20 Lines | void runDDK( int nevent, EvtGen& myGenerator ) | ||||
static EvtId k0 = EvtPDL::getId( std::string( "K0" ) ); | static EvtId k0 = EvtPDL::getId( std::string( "K0" ) ); | ||||
static EvtId kb = EvtPDL::getId( std::string( "anti-K0" ) ); | static EvtId kb = EvtPDL::getId( std::string( "anti-K0" ) ); | ||||
static EvtId d0 = EvtPDL::getId( std::string( "D0" ) ); | static EvtId d0 = EvtPDL::getId( std::string( "D0" ) ); | ||||
static EvtId dp = EvtPDL::getId( std::string( "D+" ) ); | static EvtId dp = EvtPDL::getId( std::string( "D+" ) ); | ||||
static EvtId dm = EvtPDL::getId( std::string( "D-" ) ); | static EvtId dm = EvtPDL::getId( std::string( "D-" ) ); | ||||
static EvtId db = EvtPDL::getId( std::string( "anti-D0" ) ); | static EvtId db = EvtPDL::getId( std::string( "anti-D0" ) ); | ||||
static EvtIdSet theKs( kp, km, ks, kl, k0, kb ); | static EvtIdSet theKs{ kp, km, ks, kl, k0, kb }; | ||||
static EvtIdSet theDs( d0, dp, dm, db ); | static EvtIdSet theDs{ d0, dp, dm, db }; | ||||
static EvtId B0 = EvtPDL::getId( std::string( "B0" ) ); | static EvtId B0 = EvtPDL::getId( std::string( "B0" ) ); | ||||
static EvtId B0B = EvtPDL::getId( std::string( "anti-B0" ) ); | static EvtId B0B = EvtPDL::getId( std::string( "anti-B0" ) ); | ||||
static EvtId BP = EvtPDL::getId( std::string( "B+" ) ); | static EvtId BP = EvtPDL::getId( std::string( "B+" ) ); | ||||
static EvtId BM = EvtPDL::getId( std::string( "B-" ) ); | static EvtId BM = EvtPDL::getId( std::string( "B-" ) ); | ||||
static EvtIdSet theBs( B0B, B0, BP, BM ); | static EvtIdSet theBs{ B0B, B0, BP, BM }; | ||||
int nDDK = 0; | int nDDK = 0; | ||||
do { | do { | ||||
EvtVector4R p_init( EvtPDL::getMass( UPS4 ), 0.0, 0.0, 0.0 ); | EvtVector4R p_init( EvtPDL::getMass( UPS4 ), 0.0, 0.0, 0.0 ); | ||||
EvtParticle* root_part = EvtParticleFactory::particleFactory( UPS4, | EvtParticle* root_part = EvtParticleFactory::particleFactory( UPS4, | ||||
p_init ); | p_init ); | ||||
root_part->setVectorSpinDensity(); | root_part->setVectorSpinDensity(); | ||||
▲ Show 20 Lines • Show All 560 Lines • ▼ Show 20 Lines | void runTrackMult( int nevent, EvtGen& myGenerator ) | ||||
static EvtId mum = EvtPDL::getId( std::string( "mu-" ) ); | static EvtId mum = EvtPDL::getId( std::string( "mu-" ) ); | ||||
static EvtId pip = EvtPDL::getId( std::string( "pi+" ) ); | static EvtId pip = EvtPDL::getId( std::string( "pi+" ) ); | ||||
static EvtId pim = EvtPDL::getId( std::string( "pi-" ) ); | static EvtId pim = EvtPDL::getId( std::string( "pi-" ) ); | ||||
static EvtId kp = EvtPDL::getId( std::string( "K+" ) ); | static EvtId kp = EvtPDL::getId( std::string( "K+" ) ); | ||||
static EvtId km = EvtPDL::getId( std::string( "K-" ) ); | static EvtId km = EvtPDL::getId( std::string( "K-" ) ); | ||||
static EvtId pp = EvtPDL::getId( std::string( "p+" ) ); | static EvtId pp = EvtPDL::getId( std::string( "p+" ) ); | ||||
static EvtId pm = EvtPDL::getId( std::string( "anti-p-" ) ); | static EvtId pm = EvtPDL::getId( std::string( "anti-p-" ) ); | ||||
static EvtIdSet theTracks( ep, em, mup, mum, pip, pim, kp, km, pp, pm ); | static EvtIdSet theTracks{ ep, em, mup, mum, pip, pim, kp, km, pp, pm }; | ||||
static EvtIdSet theLeptons( ep, em, mup, mum ); | static EvtIdSet theLeptons{ ep, em, mup, mum }; | ||||
static EvtIdSet theBs( B0, B0B, BP, BM ); | static EvtIdSet theBs{ B0, B0B, BP, BM }; | ||||
int count = 1; | int count = 1; | ||||
EvtParticle* p; | EvtParticle* p; | ||||
myGenerator.readUDecay( "exampleFiles/GENERIC.DEC" ); | myGenerator.readUDecay( "exampleFiles/GENERIC.DEC" ); | ||||
int totTracks = 0; | int totTracks = 0; | ||||
▲ Show 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | void runGeneric( int neventOrig, EvtGen& myGenerator, std::string listfile ) | ||||
static EvtId UPS4 = EvtPDL::getId( std::string( "Upsilon(4S)" ) ); | static EvtId UPS4 = EvtPDL::getId( std::string( "Upsilon(4S)" ) ); | ||||
static EvtId VPHO = EvtPDL::getId( std::string( "vpho" ) ); | static EvtId VPHO = EvtPDL::getId( std::string( "vpho" ) ); | ||||
static EvtId B0 = EvtPDL::getId( std::string( "B0" ) ); | static EvtId B0 = EvtPDL::getId( std::string( "B0" ) ); | ||||
static EvtId B0B = EvtPDL::getId( std::string( "anti-B0" ) ); | static EvtId B0B = EvtPDL::getId( std::string( "anti-B0" ) ); | ||||
static EvtId BP = EvtPDL::getId( std::string( "B+" ) ); | static EvtId BP = EvtPDL::getId( std::string( "B+" ) ); | ||||
static EvtId BM = EvtPDL::getId( std::string( "B-" ) ); | static EvtId BM = EvtPDL::getId( std::string( "B-" ) ); | ||||
static EvtIdSet theBs( B0B, B0, BP, BM ); | static EvtIdSet theBs{ B0B, B0, BP, BM }; | ||||
static EvtIdSet theB0B( B0B ); | static EvtIdSet theB0B{ B0B }; | ||||
static EvtIdSet theB0( B0 ); | static EvtIdSet theB0{ B0 }; | ||||
static EvtIdSet theBP( BP ); | static EvtIdSet theBP{ BP }; | ||||
static EvtIdSet theBM( BM ); | static EvtIdSet theBM{ BM }; | ||||
static EvtId D0 = EvtPDL::getId( std::string( "D0" ) ); | static EvtId D0 = EvtPDL::getId( std::string( "D0" ) ); | ||||
static EvtId D0B = EvtPDL::getId( std::string( "anti-D0" ) ); | static EvtId D0B = EvtPDL::getId( std::string( "anti-D0" ) ); | ||||
static EvtId DP = EvtPDL::getId( std::string( "D+" ) ); | static EvtId DP = EvtPDL::getId( std::string( "D+" ) ); | ||||
static EvtId DM = EvtPDL::getId( std::string( "D-" ) ); | static EvtId DM = EvtPDL::getId( std::string( "D-" ) ); | ||||
static EvtIdSet theDs( D0B, D0, DP, DM ); | static EvtIdSet theDs{ D0B, D0, DP, DM }; | ||||
static EvtIdSet theD0B( D0B ); | static EvtIdSet theD0B{ D0B }; | ||||
static EvtIdSet theD0( D0 ); | static EvtIdSet theD0{ D0 }; | ||||
static EvtIdSet theDP( DP ); | static EvtIdSet theDP{ DP }; | ||||
static EvtIdSet theDM( DM ); | static EvtIdSet theDM{ DM }; | ||||
int count; | int count; | ||||
char udecay_name[100]; | char udecay_name[100]; | ||||
strcpy( udecay_name, "exampleFiles/GENERIC.DEC" ); | strcpy( udecay_name, "exampleFiles/GENERIC.DEC" ); | ||||
myGenerator.readUDecay( udecay_name ); | myGenerator.readUDecay( udecay_name ); | ||||
if ( listfile != "" ) { | if ( listfile != "" ) { | ||||
Show All 14 Lines | if ( listfile != "" ) { | ||||
tk = parser.getToken( 2 * ik ); | tk = parser.getToken( 2 * ik ); | ||||
tkname = parser.getToken( 1 + 2 * ik ); | tkname = parser.getToken( 1 + 2 * ik ); | ||||
histo1[ik] = new TH1F( tkname.c_str(), tkname.c_str(), 30, 0.0, 3.0 ); | histo1[ik] = new TH1F( tkname.c_str(), tkname.c_str(), 30, 0.0, 3.0 ); | ||||
char* directName; | char* directName; | ||||
directName = new char[( strlen( tkname.c_str() ) + 8 )]; | directName = new char[( strlen( tkname.c_str() ) + 8 )]; | ||||
directName = strcpy( directName, tkname.c_str() ); | directName = strcpy( directName, tkname.c_str() ); | ||||
directName = strcat( directName, "Direct" ); | directName = strcat( directName, "Direct" ); | ||||
histo2[ik] = new TH1F( directName, directName, 30, 0.0, 3.0 ); | histo2[ik] = new TH1F( directName, directName, 30, 0.0, 3.0 ); | ||||
delete directName; | delete[] directName; | ||||
char* massName; | char* massName; | ||||
massName = new char[( strlen( tkname.c_str() ) + 4 )]; | massName = new char[( strlen( tkname.c_str() ) + 4 )]; | ||||
massName = strcpy( massName, tkname.c_str() ); | massName = strcpy( massName, tkname.c_str() ); | ||||
massName = strcat( massName, "Mass" ); | massName = strcat( massName, "Mass" ); | ||||
massHisto[ik] = new TH1F( massName, massName, 3000, 0.0, 5.0 ); | massHisto[ik] = new TH1F( massName, massName, 3000, 0.0, 5.0 ); | ||||
delete massName; | delete[] massName; | ||||
} | } | ||||
count = 1; | count = 1; | ||||
std::vector<int> temp( parser.getNToken() / 2, 0 ); | std::vector<int> temp( parser.getNToken() / 2, 0 ); | ||||
std::vector<int> tempB( parser.getNToken() / 2, 0 ); | std::vector<int> tempB( parser.getNToken() / 2, 0 ); | ||||
std::vector<int> tempB0B( parser.getNToken() / 2, 0 ); | std::vector<int> tempB0B( parser.getNToken() / 2, 0 ); | ||||
std::vector<int> tempB0( parser.getNToken() / 2, 0 ); | std::vector<int> tempB0( parser.getNToken() / 2, 0 ); | ||||
std::vector<int> tempBP( parser.getNToken() / 2, 0 ); | std::vector<int> tempBP( parser.getNToken() / 2, 0 ); | ||||
▲ Show 20 Lines • Show All 275 Lines • ▼ Show 20 Lines | void runSemic( int nevent, EvtGen& myGenerator ) | ||||
static EvtId D3P00 = EvtPDL::getId( std::string( "D_0*0" ) ); | static EvtId D3P00 = EvtPDL::getId( std::string( "D_0*0" ) ); | ||||
static EvtId D3P0B = EvtPDL::getId( std::string( "anti-D_0*0" ) ); | static EvtId D3P0B = EvtPDL::getId( std::string( "anti-D_0*0" ) ); | ||||
static EvtId D23S1P = EvtPDL::getId( std::string( "D*(2S)+" ) ); | static EvtId D23S1P = EvtPDL::getId( std::string( "D*(2S)+" ) ); | ||||
static EvtId D23S1N = EvtPDL::getId( std::string( "D*(2S)-" ) ); | static EvtId D23S1N = EvtPDL::getId( std::string( "D*(2S)-" ) ); | ||||
static EvtId D23S10 = EvtPDL::getId( std::string( "D*(2S)0" ) ); | static EvtId D23S10 = EvtPDL::getId( std::string( "D*(2S)0" ) ); | ||||
static EvtId D23S1B = EvtPDL::getId( std::string( "anti-D*(2S)0" ) ); | static EvtId D23S1B = EvtPDL::getId( std::string( "anti-D*(2S)0" ) ); | ||||
static EvtIdSet radExitDstar( D23S1P, D23S1N, D23S10, D23S1B ); | static EvtIdSet radExitDstar{ D23S1P, D23S1N, D23S10, D23S1B }; | ||||
TFile* file = new TFile( "semic.root", "RECREATE" ); | TFile* file = new TFile( "semic.root", "RECREATE" ); | ||||
TH1F* Dpe_q2 = new TH1F( "h11", "q2 for B0B ->D+ e- nu", 50, 0.0, 12.0 ); | TH1F* Dpe_q2 = new TH1F( "h11", "q2 for B0B ->D+ e- nu", 50, 0.0, 12.0 ); | ||||
TH1F* Dpe_elep = new TH1F( "h12", "Elep for B0B ->D+ e- nu", 50, 0.0, 2.5 ); | TH1F* Dpe_elep = new TH1F( "h12", "Elep for B0B ->D+ e- nu", 50, 0.0, 2.5 ); | ||||
TH1F* Dme_q2 = new TH1F( "h13", "q2 for B0 ->D- e+ nu", 50, 0.0, 12.0 ); | TH1F* Dme_q2 = new TH1F( "h13", "q2 for B0 ->D- e+ nu", 50, 0.0, 12.0 ); | ||||
TH1F* Dme_elep = new TH1F( "h14", "Elep for B0 ->D- e+ nu", 50, 0.0, 2.5 ); | TH1F* Dme_elep = new TH1F( "h14", "Elep for B0 ->D- e+ nu", 50, 0.0, 2.5 ); | ||||
TH1F* D0e_q2 = new TH1F( "h15", "q2 for B- ->D0 e- nu", 50, 0.0, 12.0 ); | TH1F* D0e_q2 = new TH1F( "h15", "q2 for B- ->D0 e- nu", 50, 0.0, 12.0 ); | ||||
▲ Show 20 Lines • Show All 3,966 Lines • Show Last 20 Lines |