105 pythia =
new Pythia8::Pythia();
120 for(
size_t i = 0;
i<
pids.size();++
i){
125 if(!pdt.isParticle(pid)){
126 std::cout <<
"ERROR: BAD PARTICLE, pythia is not aware of pid " << pid << std::endl;
129 Pythia8::ParticleDataEntry * pd = pdt.particleDataEntryPtr(pid);
132 double m0 = pd->m0();
133 double w = pd->mWidth();
136 mmin = m0 - m0/1000.;
137 mmax = m0 + m0/1000.;
143 std::stringstream strstr;
144 strstr <<
"mass_" <<
pid;
145 h_mass[
pid] =
new TH1D(strstr.str().c_str(),strstr.str().c_str(),100,mmin,mmax);
147 h_mass_ref[
pid]->SetTitle(h_mass_ref[pid]->GetName());
149 h_mass_ref[
pid]->Fill(m0);
151 for(
int b =1;
b<=h_mass_ref[
pid]->GetNbinsX();++
b){
152 double _val = h_mass_ref[
pid]->GetBinCenter(
b);
153 h_mass_ref[
pid]->SetBinContent(
b,TMath::BreitWigner(_val,m0,w));
159 strstr <<
"p_" <<
pid;
160 h_p[
pid] =
new TH1D(strstr.str().c_str(),strstr.str().c_str(),100,0,20);
164 strstr <<
"v_" <<
pid;
165 h_v[
pid] =
new TH1D(strstr.str().c_str(),strstr.str().c_str(),100,0,1.);
168 double ctau0 = pd->tau0()/10.;
170 strstr <<
"plt_" <<
pid;
171 h_plt[
pid] =
new TH1D(strstr.str().c_str(),strstr.str().c_str(),100,0,
std::min(5.*ctau0,500.));
173 h_plt_ref[
pid]->SetTitle(h_plt_ref[pid]->GetName());
174 for(
int b =1;
b<=h_plt_ref[
pid]->GetNbinsX();++
b){
175 double _val = h_plt_ref[
pid]->GetBinCenter(
b);
176 h_plt_ref[
pid]->SetBinContent(
b,TMath::Exp(-_val/ctau0));
182 strstr <<
"br_" <<
pid;
183 h_br[
pid] =
new TH1D(strstr.str().c_str(),strstr.str().c_str(),0,0,0);
184 h_br[
pid]->SetBit(TH1::kCanRebin);
188 for(
int d = 0;d<pd->sizeChannels();++d){
189 Pythia8::DecayChannel & channel = pd->channel(d);
190 std::vector<int>
prod;
191 for(
int p = 0;
p<channel.multiplicity();++
p){
192 int pId =
abs(channel.product(
p));
194 bool particleCut = ( pId > 10 && pId != 12 && pId != 14 &&
195 pId != 16 && pId != 18 && pId != 21 &&
196 (pId < 23 || pId > 40 ) &&
197 (pId < 81 || pId > 100 ) && pId != 2101 &&
198 pId != 3101 && pId != 3201 && pId != 1103 &&
199 pId != 2103 && pId != 2203 && pId != 3103 &&
200 pId != 3203 && pId != 3303 );
202 prod.push_back(
abs(channel.product(
p)));
206 for(
size_t p = 0;
p<prod.size();++
p){
207 strstr <<
"_" << prod[
p];
210 h_br[
pid]->Fill(label.c_str(),0.);
211 h_br_ref[
pid]->Fill(label.c_str(),channel.bRatio());
218 strstr <<
"originVertexRho_" <<
pid;
221 strstr <<
"originVertexZ_" <<
pid;
224 strstr <<
"decayVertexRho_" <<
pid;
227 strstr <<
"decayVertexZ_" <<
pid;
228 h_decayVertexZ[
pid] =
new TH1D(strstr.str().c_str(),strstr.str().c_str(),100,0,400);
T getParameter(std::string const &) const
std::map< int, std::vector< string > > knownDecayModes
std::map< int, TH1D * > h_v
std::map< int, TH1D * > h_decayVertexZ
std::map< int, TH1D * > h_br_ref
std::map< int, TH1D * > h_plt_ref
std::map< int, TH1D * > h_decayVertexRho
std::map< int, TH1D * > h_originVertexZ
Abs< T >::type abs(const T &t)
HepPDT::ParticleData ParticleData
std::map< int, TH1D * > h_plt
std::map< int, TH1D * > h_br
std::map< int, TH1D * > h_mass
std::map< int, TH1D * > h_p
std::map< int, TH1D * > h_mass_ref
std::map< int, TH1D * > h_originVertexRho