Changeset 232 in Idarraga


Ignore:
Timestamp:
Sep 5, 2011, 5:23:25 PM (13 years ago)
Author:
idarraga
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • allpix/src/AllPixFEI3StandardDigitizer.cc

    r231 r232  
    188188                MipTOT=10;
    189189                MipCharge=40000;
     190                //MipCharge=20000;
    190191                CounterDepth=15;
    191                 Lv1Unit = 25;
     192                Lv1Unit = 25*ns;
    192193                chipNoise = 125*elec;
    193194                m_digitIn.thl = 3200*elec;
     
    443444        //TF1 * f1 = new TF1("expint","exp((x-[0])*(x-[0])/2.*[1])",-100.,100.);
    444445
     446        G4double hitsETotal = 0.;
     447
    445448        for(G4int itr  = 0 ; itr < nEntries ; itr++) {
    446449
    447450                G4double eHitTotal = elec*CLHEP::RandGauss::shoot((*hitsCollection)[itr]->GetEdep()/elec,TMath::Sqrt((*hitsCollection)[itr]->GetEdep()/elec)*0.118);
     451                hitsETotal += eHitTotal;
    448452
    449453                //under-depletion
     
    453457                tempPixel.second = (*hitsCollection)[itr]->GetPixelNbY();
    454458
    455                 G4cout << "x : " << tempPixel.first << " ,  y : " << tempPixel.second << G4endl;
     459                G4cout << "x : " << tempPixel.first << " ,  y : " << tempPixel.second << ", E = " << eHitTotal/keV << G4endl;
     460
    456461
    457462                G4double xpos = (*hitsCollection)[itr]->GetPosWithRespectToPixel().x();
     
    566571
    567572        }
     573
     574        G4cout << "total = " << hitsETotal/keV << " keV" << G4endl;
     575
    568576        // Now create digits.  One per pixel
    569577        map<pair<G4int, G4int>, G4double >::iterator pCItr = pixelsContent.begin();
     
    573581                // If the charge in a given pixel is over the threshold
    574582                double threshold =CLHEP::RandGauss::shoot(m_digitIn.thl,chipNoise);
    575                 //cout << TString::Format("Threshold= %f", threshold/keV) << endl;
     583
     584                G4cout << "pixel : " << (*pCItr).first.first << " , " << (*pCItr).first.second
     585                                << ", E =  " << ((*pCItr).second)/keV << " keV | thl = "
     586                                << TString::Format("Threshold= %f keV", threshold/keV) << G4endl;
    576587                //if((*pCItr).second > m_digitIn.thl)
    577588                if((*pCItr).second > threshold)
Note: See TracChangeset for help on using the changeset viewer.