Ignore:
Timestamp:
Apr 6, 2009, 12:30:29 PM (15 years ago)
Author:
garnier
Message:

update processes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/parton_string/hadronization/src/G4VLongitudinalStringDecay.cc

    r819 r962  
    2525//
    2626//
    27 // $Id: G4VLongitudinalStringDecay.cc,v 1.8 2007/04/24 14:55:23 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4VLongitudinalStringDecay.cc,v 1.13 2008/06/23 08:35:55 vuzhinsk Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030// -----------------------------------------------------------------------------
     
    7575   
    7676   StrangeSuppress  = 0.44;    //  27 % strange quarks produced, ie. u:d:s=1:1:0.27
    77    DiquarkSuppress  = 0.1;
     77   DiquarkSuppress  = 0.07;
    7878   DiquarkBreakProb = 0.1;
    7979   
     
    106106   hadronizer = new G4HadronBuilder(pspin_meson,pspin_barion,
    107107                                scalarMesonMix,vectorMesonMix);
     108   Kappa = 1.0 * GeV/fermi;
     109
     110
    108111}
    109112   
     
    114117   }
    115118
    116 //=============================================================================================-------------
     119//=============================================================================
    117120
    118121// Operators
     
    122125//    }
    123126
    124 //----------------------------------------------------------------------------------------------------------
     127//-----------------------------------------------------------------------------
    125128
    126129int G4VLongitudinalStringDecay::operator==(const G4VLongitudinalStringDecay &) const
     
    130133    }
    131134
    132 //----------------------------------------------------------------------------------------------------------
     135//-------------------------------------------------------------------------------------
    133136
    134137int G4VLongitudinalStringDecay::operator!=(const G4VLongitudinalStringDecay &) const
     
    138141    }
    139142
    140 //==========================================================================================================
     143//***********************************************************************************
     144
     145// For changing Mass Cut used for selection of very small mass strings
     146void G4VLongitudinalStringDecay::SetMassCut(G4double aValue){MassCut=aValue;}
     147
     148//-----------------------------------------------------------------------------
     149
     150// For handling a string with very low mass
     151
     152G4KineticTrackVector* G4VLongitudinalStringDecay::LightFragmentationTest(const
     153                G4ExcitedString * const string)
     154{
     155   // Check string decay threshold
     156               
     157        G4KineticTrackVector * result=0;  // return 0 when string exceeds the mass cut
     158       
     159        pDefPair hadrons((G4ParticleDefinition *)0,(G4ParticleDefinition *)0);
     160
     161        G4FragmentingString aString(*string);
     162
     163        if ( sqr(FragmentationMass(&aString,0,&hadrons)+MassCut) < aString.Mass2()) {
     164                return 0;
     165        }
     166
     167// The string mass is very low ---------------------------
     168       
     169        result=new G4KineticTrackVector;
     170       
     171        if ( hadrons.second ==0 )
     172        {
     173// Substitute string by light hadron, Note that Energy is not conserved here!
     174
     175/*               
     176#ifdef DEBUG_LightFragmentationTest
     177               G4cout << "VlongSF Warning replacing string by single hadron " <<G4endl;
     178               G4cout << hadrons.first->GetParticleName()
     179                      << "string .. " << string->Get4Momentum() << " "
     180                      << string->Get4Momentum().m() << G4endl;
     181#endif               
     182G4cout << "VlongSF Warning replacing string by single hadron " <<G4endl;
     183G4cout << hadrons.first->GetParticleName() << " string .. " <<G4endl;
     184G4cout << string->Get4Momentum() << " " << string->Get4Momentum().m() << G4endl;
     185*/
     186               G4ThreeVector   Mom3 = string->Get4Momentum().vect();
     187               G4LorentzVector Mom(Mom3,
     188                                   std::sqrt(Mom3.mag2() +
     189                                             sqr(hadrons.first->GetPDGMass())));
     190               result->push_back(new G4KineticTrack(hadrons.first, 0,
     191                                                  string->GetPosition(),
     192                                                          Mom));
     193        } else
     194        {
     195//... string was qq--qqbar type: Build two stable hadrons,
     196
     197#ifdef DEBUG_LightFragmentationTest
     198               G4cout << "VlongSF Warning replacing qq-qqbar string by TWO hadrons "
     199                      << hadrons.first->GetParticleName() << " / "
     200                      << hadrons.second->GetParticleName()
     201                      << "string .. " << string->Get4Momentum() << " "
     202                      << string->Get4Momentum().m() << G4endl;
     203#endif               
     204
     205// Uzhi Formation time in the case???
     206
     207               G4LorentzVector  Mom1, Mom2;
     208               Sample4Momentum(&Mom1, hadrons.first->GetPDGMass(),
     209                               &Mom2,hadrons.second->GetPDGMass(),
     210                               string->Get4Momentum().mag());
     211
     212               result->push_back(new G4KineticTrack(hadrons.first, 0,
     213                                                    string->GetPosition(),
     214                                                            Mom1));
     215               result->push_back(new G4KineticTrack(hadrons.second, 0,
     216                                                    string->GetPosition(),
     217                                                    Mom2));
     218
     219               G4ThreeVector Velocity = string->Get4Momentum().boostVector();
     220               result->Boost(Velocity);         
     221        }
     222
     223        return result;
     224       
     225}
     226
     227//----------------------------------------------------------------------------------------
     228
     229G4double G4VLongitudinalStringDecay::FragmentationMass(
     230            const G4FragmentingString * const string,
     231                Pcreate build, pDefPair * pdefs       )
     232{
     233       
     234        G4double mass;
     235        static G4bool NeedInit(true);
     236        static std::vector<double> nomix;
     237        static G4HadronBuilder * minMassHadronizer;
     238        if ( NeedInit )
     239        {
     240           NeedInit = false;
     241           nomix.resize(6);
     242           for ( G4int i=0; i<6 ; i++ ) nomix[i]=0;
     243
     244//         minMassHadronizer=new G4HadronBuilder(pspin_meson,pspin_barion,nomix,nomix);
     245           minMassHadronizer=hadronizer;
     246        }
     247
     248        if ( build==0 ) build=&G4HadronBuilder::BuildLowSpin;
     249
     250        G4ParticleDefinition *Hadron1, *Hadron2=0;
     251
     252        if (!string->FourQuarkString() )
     253        {
     254           // spin 0 meson or spin 1/2 barion will be built
     255
     256           Hadron1 = (minMassHadronizer->*build)(string->GetLeftParton(),
     257                                                 string->GetRightParton());
     258           mass= (Hadron1)->GetPDGMass();
     259        } else
     260        {
     261           //... string is qq--qqbar: Build two stable hadrons,
     262           //...    with extra uubar or ddbar quark pair
     263           G4int iflc = (G4UniformRand() < 0.5)? 1 : 2;
     264           if (string->GetLeftParton()->GetPDGEncoding() < 0) iflc = -iflc;
     265
     266           //... theSpin = 4; spin 3/2 baryons will be built
     267           Hadron1 = (minMassHadronizer->*build)(string->GetLeftParton(),
     268                                                 FindParticle(iflc)       );
     269           Hadron2 = (minMassHadronizer->*build)(string->GetRightParton(),
     270                                                 FindParticle(-iflc)      );
     271           mass = (Hadron1)->GetPDGMass() + (Hadron2)->GetPDGMass();
     272        }
     273       
     274        if ( pdefs != 0 )
     275        { // need to return hadrons as well....
     276           pdefs->first  = Hadron1;
     277           pdefs->second = Hadron2;
     278        }
     279           
     280        return mass;
     281}
     282
     283//----------------------------------------------------------------------------
     284
     285G4ParticleDefinition* G4VLongitudinalStringDecay::FindParticle(G4int Encoding)
     286   {
     287   G4ParticleDefinition* ptr = G4ParticleTable::GetParticleTable()->FindParticle(Encoding);
     288      if (ptr == NULL)
     289       {
     290       G4cout << "Particle with encoding "<<Encoding<<" does not exist!!!"<<G4endl;
     291       throw G4HadronicException(__FILE__, __LINE__, "Check your particle table");
     292       }
     293   return ptr;   
     294   }
     295
     296//-----------------------------------------------------------------------------
     297//   virtual void Sample4Momentum(G4LorentzVector* Mom,     G4double Mass,
     298//                                G4LorentzVector* AntiMom, G4double AntiMass,
     299//                                G4double InitialMass)=0;
     300//-----------------------------------------------------------------------------
     301
     302//*********************************************************************************
     303//   For decision on continue or stop string fragmentation
     304//   virtual G4bool StopFragmenting(const G4FragmentingString  * const string)=0;
     305//   virtual G4bool IsFragmentable(const G4FragmentingString * const string)=0;
     306
     307//   If a string can not fragment, make last break into 2 hadrons
     308//   virtual G4bool SplitLast(G4FragmentingString * string,
     309//                            G4KineticTrackVector * LeftVector,
     310//                            G4KineticTrackVector * RightVector)=0;
     311//-----------------------------------------------------------------------------
     312//
     313//   If a string fragments, do the following
     314//
     315//   For transver of a string to its CMS frame
     316//-----------------------------------------------------------------------------
     317
     318G4ExcitedString *G4VLongitudinalStringDecay::CPExcited(const G4ExcitedString & in)
     319{
     320        G4Parton *Left=new G4Parton(*in.GetLeftParton());
     321        G4Parton *Right=new G4Parton(*in.GetRightParton());
     322        return new G4ExcitedString(Left,Right,in.GetDirection());
     323}
     324
     325//-----------------------------------------------------------------------------
     326
     327G4KineticTrack * G4VLongitudinalStringDecay::Splitup(
     328                        G4FragmentingString *string,
     329                        G4FragmentingString *&newString)
     330{
     331//G4cout<<"In G4VLong String Dec######################"<<G4endl;
     332
     333       //... random choice of string end to use for creating the hadron (decay)   
     334       SideOfDecay = (G4UniformRand() < 0.5)? 1: -1;
     335       if (SideOfDecay < 0)
     336       {
     337          string->SetLeftPartonStable();
     338       } else
     339       {
     340          string->SetRightPartonStable();
     341       }
     342
     343       G4ParticleDefinition *newStringEnd;
     344       G4ParticleDefinition * HadronDefinition;
     345       if (string->DecayIsQuark())
     346       {
     347           HadronDefinition= QuarkSplitup(string->GetDecayParton(), newStringEnd);
     348       } else {
     349           HadronDefinition= DiQuarkSplitup(string->GetDecayParton(), newStringEnd);
     350       }     
     351// create new String from old, ie. keep Left and Right order, but replace decay
     352
     353       newString=new G4FragmentingString(*string,newStringEnd); // To store possible
     354                                                                // quark containt of new string
     355       G4LorentzVector* HadronMomentum=SplitEandP(HadronDefinition, string, newString);
     356
     357       delete newString; newString=0;                          // Uzhi 20.06.08
     358       
     359       G4KineticTrack * Hadron =0;
     360       if ( HadronMomentum != 0 ) {   
     361
     362           G4ThreeVector   Pos;
     363           Hadron = new G4KineticTrack(HadronDefinition, 0,Pos, *HadronMomentum);
     364 
     365           newString=new G4FragmentingString(*string,newStringEnd,
     366                                        HadronMomentum);
     367
     368//G4cout<<"Out G4VLong String Dec######################"<<G4endl;         
     369//G4cout<<"newString 4Mom"<<newString->Get4Momentum()<<G4endl;
     370//G4cout<<"newString Pl  "<<newString->LightConePlus()<<G4endl;
     371//G4cout<<"newString Mi  "<<newString->LightConeMinus()<<G4endl;
     372//G4cout<<"newString Pts "<<newString->StablePt()<<G4endl;
     373//G4cout<<"newString Ptd "<<newString->DecayPt()<<G4endl;
     374//G4cout<<"newString M2  "<<newString->Mass2()<<G4endl;
     375//G4cout<<"newString M2  "<<newString->Mass()<<G4endl;
     376           delete HadronMomentum;
     377       }     
     378       return Hadron;
     379}
     380
     381//--------------------------------------------------------------------------------------
     382
     383G4ParticleDefinition *
     384                G4VLongitudinalStringDecay::QuarkSplitup(G4ParticleDefinition*
     385                decay, G4ParticleDefinition *&created)
     386{
     387    G4int IsParticle=(decay->GetPDGEncoding()>0) ? -1 : +1; // if we have a quark,
     388                                                            // we need antiquark
     389                                                            // (or diquark)
     390    pDefPair QuarkPair = CreatePartonPair(IsParticle);
     391    created = QuarkPair.second;
     392    return hadronizer->Build(QuarkPair.first, decay);
     393   
     394}
     395
     396//-----------------------------------------------------------------------------
     397
     398G4ParticleDefinition *G4VLongitudinalStringDecay::DiQuarkSplitup(
     399                                                        G4ParticleDefinition* decay,
     400                                                        G4ParticleDefinition *&created)
     401{
     402   //... can Diquark break or not?
     403   if (G4UniformRand() < DiquarkBreakProb ){
     404   //... Diquark break
     405
     406      G4int stableQuarkEncoding = decay->GetPDGEncoding()/1000;
     407      G4int decayQuarkEncoding = (decay->GetPDGEncoding()/100)%10;
     408      if (G4UniformRand() < 0.5)
     409         {
     410         G4int Swap = stableQuarkEncoding;
     411         stableQuarkEncoding = decayQuarkEncoding;
     412         decayQuarkEncoding = Swap;
     413         }
     414
     415      G4int IsParticle=(decayQuarkEncoding>0) ? -1 : +1;
     416                        // if we have a quark, we need antiquark)
     417      pDefPair QuarkPair = CreatePartonPair(IsParticle,false);  // no diquarks wanted
     418      //... Build new Diquark
     419      G4int QuarkEncoding=QuarkPair.second->GetPDGEncoding();
     420      G4int i10  = std::max(std::abs(QuarkEncoding), std::abs(stableQuarkEncoding));
     421      G4int i20  = std::min(std::abs(QuarkEncoding), std::abs(stableQuarkEncoding));
     422      G4int spin = (i10 != i20 && G4UniformRand() <= 0.5)? 1 : 3;
     423      G4int NewDecayEncoding = -1*IsParticle*(i10 * 1000 + i20 * 100 + spin);
     424      created = FindParticle(NewDecayEncoding);
     425      G4ParticleDefinition * decayQuark=FindParticle(decayQuarkEncoding);
     426      G4ParticleDefinition * had=hadronizer->Build(QuarkPair.first, decayQuark);
     427      return had;
     428//      return hadronizer->Build(QuarkPair.first, decayQuark);
     429   
     430   } else {
     431   //... Diquark does not break
     432 
     433      G4int IsParticle=(decay->GetPDGEncoding()>0) ? +1 : -1;
     434                        // if we have a diquark, we need quark)
     435      pDefPair QuarkPair = CreatePartonPair(IsParticle,false);  // no diquarks wanted
     436      created = QuarkPair.second;
     437
     438      G4ParticleDefinition * had=hadronizer->Build(QuarkPair.first, decay);
     439      return had;
     440//      return G4ParticleDefinition * had=hadronizer->Build(QuarkPair.first, decay);
     441   }
     442}
     443
     444//-----------------------------------------------------------------------------
    141445
    142446G4int G4VLongitudinalStringDecay::SampleQuarkFlavor(void)
     
    145449   }
    146450
    147 //----------------------------------------------------------------------------------------------------------
     451//-----------------------------------------------------------------------------
    148452
    149453G4VLongitudinalStringDecay::pDefPair G4VLongitudinalStringDecay::CreatePartonPair(G4int NeedParticle,G4bool AllowDiquarks)
     
    170474}
    171475
    172 //----------------------------------------------------------------------------------------------------------
     476//-----------------------------------------------------------------------------
    173477
    174478// G4ThreeVector G4VLongitudinalStringDecay::SampleQuarkPt()
     
    180484//    return G4ThreeVector(Pt * std::cos(phi),Pt * std::sin(phi),0);
    181485//    }
     486
    182487G4ThreeVector G4VLongitudinalStringDecay::SampleQuarkPt()
    183488   {
     
    188493   }
    189494
    190 //----------------------------------------------------------------------------------------------------------
     495//******************************************************************************
    191496
    192497void G4VLongitudinalStringDecay::CalculateHadronTimePosition(G4double theInitialStringMass, G4KineticTrackVector* Hadrons)
    193498   {
     499
    194500   // `yo-yo` formation time
    195    const G4double kappa = 1.0 * GeV/fermi;
     501//   const G4double kappa = 1.0 * GeV/fermi/4.;      // Uzhi String tension 1.06.08
     502     G4double kappa = GetStringTensionParameter();
     503//G4cout<<"Kappa "<<kappa<<G4endl;                   // Uzhi 20.06.08
     504//G4int Uzhi; G4cin>>Uzhi;                           // Uzhi 20.06.08
    196505   for(size_t c1 = 0; c1 < Hadrons->size(); c1++)
    197506      {
     
    211520   }
    212521
    213 //----------------------------------------------------------------------------------------------------------
     522//-----------------------------------------------------------------------------
    214523
    215524/*
     
    237546*/
    238547
     548
     549//*****************************************************************************
     550
     551void G4VLongitudinalStringDecay::SetSigmaTransverseMomentum(G4double aValue)
     552{
     553        if ( PastInitPhase ) {
     554                throw G4HadronicException(__FILE__, __LINE__, "4VLongitudinalStringDecay::SetSigmaTransverseMomentum after FragmentString() not allowed");
     555        } else {
     556                SigmaQT = aValue;
     557        }
     558}
     559
    239560//----------------------------------------------------------------------------------------------------------
    240561
    241 G4ParticleDefinition *
    242                 G4VLongitudinalStringDecay::QuarkSplitup(G4ParticleDefinition*
    243                 decay, G4ParticleDefinition *&created)
    244 {
    245     G4int IsParticle=(decay->GetPDGEncoding()>0) ? -1 : +1; // if we have a quark, we need antiquark (or diquark)
    246     pDefPair QuarkPair = CreatePartonPair(IsParticle);
    247     created = QuarkPair.second;
    248     return hadronizer->Build(QuarkPair.first, decay);
    249    
     562void G4VLongitudinalStringDecay::SetStrangenessSuppression(G4double aValue)
     563{
     564        if ( PastInitPhase ) {
     565                throw G4HadronicException(__FILE__, __LINE__, "4VLongitudinalStringDecay::SetStrangenessSuppression after FragmentString() not allowed");
     566        } else {
     567                StrangeSuppress = aValue;
     568        }
    250569}
    251570
    252571//----------------------------------------------------------------------------------------------------------
    253572
    254 G4ParticleDefinition *G4VLongitudinalStringDecay::DiQuarkSplitup(
    255                                                         G4ParticleDefinition* decay,
    256                                                         G4ParticleDefinition *&created)
    257 {
    258    //... can Diquark break or not?
    259    if (G4UniformRand() < DiquarkBreakProb ){
    260    //... Diquark break
    261 
    262       G4int stableQuarkEncoding = decay->GetPDGEncoding()/1000;
    263       G4int decayQuarkEncoding = (decay->GetPDGEncoding()/100)%10;
    264       if (G4UniformRand() < 0.5)
    265          {
    266          G4int Swap = stableQuarkEncoding;
    267          stableQuarkEncoding = decayQuarkEncoding;
    268          decayQuarkEncoding = Swap;
    269          }
    270 
    271       G4int IsParticle=(decayQuarkEncoding>0) ? -1 : +1;
    272                         // if we have a quark, we need antiquark)
    273       pDefPair QuarkPair = CreatePartonPair(IsParticle,false);  // no diquarks wanted
    274       //... Build new Diquark
    275       G4int QuarkEncoding=QuarkPair.second->GetPDGEncoding();
    276       G4int i10  = std::max(std::abs(QuarkEncoding), std::abs(stableQuarkEncoding));
    277       G4int i20  = std::min(std::abs(QuarkEncoding), std::abs(stableQuarkEncoding));
    278       G4int spin = (i10 != i20 && G4UniformRand() <= 0.5)? 1 : 3;
    279       G4int NewDecayEncoding = -1*IsParticle*(i10 * 1000 + i20 * 100 + spin);
    280       created = FindParticle(NewDecayEncoding);
    281       G4ParticleDefinition * decayQuark=FindParticle(decayQuarkEncoding);
    282       G4ParticleDefinition * had=hadronizer->Build(QuarkPair.first, decayQuark);
    283       return had;
    284 //      return hadronizer->Build(QuarkPair.first, decayQuark);
    285    
    286    } else {
    287    //... Diquark does not break
    288  
    289       G4int IsParticle=(decay->GetPDGEncoding()>0) ? +1 : -1;
    290                         // if we have a diquark, we need quark)
    291       pDefPair QuarkPair = CreatePartonPair(IsParticle,false);  // no diquarks wanted
    292       created = QuarkPair.second;
    293 
    294       G4ParticleDefinition * had=hadronizer->Build(QuarkPair.first, decay);
    295       return had;
    296 //      return G4ParticleDefinition * had=hadronizer->Build(QuarkPair.first, decay);
    297    }
    298 }
    299 
    300 //-----------------------------------------------------------------------------------------
    301 
    302 G4KineticTrack * G4VLongitudinalStringDecay::Splitup(
    303                         G4FragmentingString *string,
    304                         G4FragmentingString *&newString)
    305 {
    306 
    307        //... random choice of string end to use for creating the hadron (decay)   
    308        SideOfDecay = (G4UniformRand() < 0.5)? 1: -1;
    309        if (SideOfDecay < 0)
    310        {
    311           string->SetLeftPartonStable();
    312        } else
    313        {
    314           string->SetRightPartonStable();
    315        }
    316 
    317        G4ParticleDefinition *newStringEnd;
    318        G4ParticleDefinition * HadronDefinition;
    319        if (string->DecayIsQuark())
    320        {
    321            HadronDefinition= QuarkSplitup(string->GetDecayParton(), newStringEnd);
    322        } else {
    323            HadronDefinition= DiQuarkSplitup(string->GetDecayParton(), newStringEnd);
    324        }     
    325 // create new String from old, ie. keep Left and Right order, but replace decay
    326        G4LorentzVector* HadronMomentum=SplitEandP(HadronDefinition, string);
    327        
    328        G4KineticTrack * Hadron =0;
    329        if ( HadronMomentum != 0 ) {   
    330 
    331            G4ThreeVector   Pos;
    332            Hadron = new G4KineticTrack(HadronDefinition, 0,Pos, *HadronMomentum);
    333  
    334            newString=new G4FragmentingString(*string,newStringEnd,
    335                                         HadronMomentum);
    336            
    337            delete HadronMomentum;
    338        }     
    339        return Hadron;
    340 }
    341 
    342 //----------------------------------------------------------------------------------------------------------
    343 
    344 G4ExcitedString *G4VLongitudinalStringDecay::CPExcited(const G4ExcitedString & in)
    345 {
    346         G4Parton *Left=new G4Parton(*in.GetLeftParton());
    347         G4Parton *Right=new G4Parton(*in.GetRightParton());
    348         return new G4ExcitedString(Left,Right,in.GetDirection());
    349 }
    350 
    351 G4double G4VLongitudinalStringDecay::FragmentationMass(
    352                 const G4FragmentingString *
    353                 const string,
    354                 Pcreate build,
    355                 pDefPair * pdefs)
    356 {
    357        
    358         G4double mass;
    359         static G4bool NeedInit(true);
    360         static std::vector<double> nomix;
    361         static G4HadronBuilder * minMassHadronizer;
    362         if ( NeedInit )
    363         {
    364            NeedInit = false;
    365            nomix.resize(6);
    366            for ( G4int i=0; i<6 ; i++ ) nomix[i]=0;
    367 //         minMassHadronizer=new G4HadronBuilder(pspin_meson,pspin_barion,nomix,nomix);
    368            minMassHadronizer=hadronizer;
    369         }
    370 
    371         if ( build==0 ) build=&G4HadronBuilder::BuildLowSpin;
    372 
    373         G4ParticleDefinition *Hadron1, *Hadron2=0;
    374 
    375         if (!string->FourQuarkString() )
    376         {
    377            // spin 0 meson or spin 1/2 barion will be built
    378 
    379            Hadron1 = (minMassHadronizer->*build)(string->GetLeftParton(),
    380                                       string->GetRightParton());
    381            mass= (Hadron1)->GetPDGMass();
    382         } else
    383         {
    384            //... string is qq--qqbar: Build two stable hadrons,
    385            //...    with extra uubar or ddbar quark pair
    386            G4int iflc = (G4UniformRand() < 0.5)? 1 : 2;
    387            if (string->GetLeftParton()->GetPDGEncoding() < 0) iflc = -iflc;
    388 
    389            //... theSpin = 4; spin 3/2 baryons will be built
    390            Hadron1 = (minMassHadronizer->*build)(string->GetLeftParton(),FindParticle(iflc));
    391            Hadron2 =(minMassHadronizer->*build)(string->GetRightParton(),FindParticle(-iflc));
    392            mass = (Hadron1)->GetPDGMass() + (Hadron2)->GetPDGMass();
    393         }
    394        
    395         if ( pdefs != 0 )
    396         { // need to return hadrons as well....
    397            pdefs->first  = Hadron1;
    398            pdefs->second = Hadron2;
    399         }
    400            
    401         return mass;
    402 }
    403 
    404 G4KineticTrackVector* G4VLongitudinalStringDecay::LightFragmentationTest(const
    405                 G4ExcitedString * const string)
    406 {
    407    // Check string decay threshold
    408                
    409         G4KineticTrackVector * result=0;  // return 0 when string exceeds the mass cut
    410        
    411         pDefPair hadrons((G4ParticleDefinition *)0,(G4ParticleDefinition *)0);
    412         G4FragmentingString aString(*string);
    413         if ( sqr(FragmentationMass(&aString,0,&hadrons)+MassCut) < aString.Mass2()) {
    414                 return 0;
    415         }
    416        
    417         result=new G4KineticTrackVector;
    418        
    419         if ( hadrons.second ==0 )
    420         {
    421                  // Substitute string by light hadron, Note that Energy is not conserved here!
    422                  
    423 #ifdef DEBUG_LightFragmentationTest
    424                G4cout << "VlongSF Warning replacing string by single hadron "
    425                       << hadrons.first->GetParticleName()
    426                       << "string .. " << string->Get4Momentum() << " "
    427                       << string->Get4Momentum().m() << G4endl;
    428 #endif               
    429 
    430                G4ThreeVector Mom3 = string->Get4Momentum().vect();
    431                G4LorentzVector Mom(Mom3,
    432                                    std::sqrt(Mom3.mag2() + sqr(hadrons.first->GetPDGMass())));
    433                result->push_back(new G4KineticTrack(hadrons.first, 0, string->GetPosition(), Mom));
    434         } else
    435         {
    436            //... string was qq--qqbar type: Build two stable hadrons,
    437 
    438 #ifdef DEBUG_LightFragmentationTest
    439                G4cout << "VlongSF Warning replacing qq-qqbar string by TWO hadrons "
    440                       << hadrons.first->GetParticleName() << " / "
    441                       << hadrons.second->GetParticleName()
    442                       << "string .. " << string->Get4Momentum() << " "
    443                       << string->Get4Momentum().m() << G4endl;
    444 #endif               
    445 
    446                G4LorentzVector  Mom1, Mom2;
    447                Sample4Momentum(&Mom1, hadrons.first->GetPDGMass(),
    448                                &Mom2,hadrons.second->GetPDGMass(),
    449                                 string->Get4Momentum().mag());
    450                result->push_back(new G4KineticTrack(hadrons.first, 0, string->GetPosition(), Mom1));
    451                result->push_back(new G4KineticTrack(hadrons.second, 0, string->GetPosition(), Mom2));
    452                G4ThreeVector Velocity = string->Get4Momentum().boostVector();
    453                result->Boost(Velocity);         
    454         }
    455 
    456         return result;
    457        
    458 }
    459 
    460 //----------------------------------------------------------------------------------------------------------
    461 
    462 G4ParticleDefinition* G4VLongitudinalStringDecay::FindParticle(G4int Encoding)
    463    {
    464    G4ParticleDefinition* ptr = G4ParticleTable::GetParticleTable()->FindParticle(Encoding);
    465       if (ptr == NULL)
    466        {
    467        G4cout << "Particle with encoding "<<Encoding<<" does not exist!!!"<<G4endl;
    468        throw G4HadronicException(__FILE__, __LINE__, "Check your particle table");
    469        }
    470    return ptr;   
    471    }
    472 
    473 //----------------------------------------------------------------------------------------------------------
    474 
    475 void G4VLongitudinalStringDecay::SetSigmaTransverseMomentum(G4double aValue)
    476 {
    477         if ( PastInitPhase ) {
    478                 throw G4HadronicException(__FILE__, __LINE__, "4VLongitudinalStringDecay::SetSigmaTransverseMomentum after FragmentString() not allowed");
    479         } else {
    480                 SigmaQT = aValue;
    481         }
    482 }
    483 
    484 //----------------------------------------------------------------------------------------------------------
    485 
    486 void G4VLongitudinalStringDecay::SetStrangenessSuppression(G4double aValue)
    487 {
    488         if ( PastInitPhase ) {
    489                 throw G4HadronicException(__FILE__, __LINE__, "4VLongitudinalStringDecay::SetStrangenessSuppression after FragmentString() not allowed");
    490         } else {
    491                 StrangeSuppress = aValue;
    492         }
    493 }
    494 
    495 //----------------------------------------------------------------------------------------------------------
    496 
    497573void G4VLongitudinalStringDecay::SetDiquarkSuppression(G4double aValue)
    498574{
     
    503579        }
    504580}
     581
     582//----------------------------------------------------------------------------------------
    505583
    506584void G4VLongitudinalStringDecay::SetDiquarkBreakProbability(G4double aValue)
     
    582660 
    583661        }
     662}
     663
     664//-------------------------------------------------------------------------------------------
     665void G4VLongitudinalStringDecay::SetStringTensionParameter(G4double aValue)// Uzhi 20 June 08
     666{
     667          Kappa = aValue * GeV/fermi;
    584668}       
    585 //*******************************************************************************************************
     669//**************************************************************************************
     670
Note: See TracChangeset for help on using the changeset viewer.