Changeset 209 in Idarraga


Ignore:
Timestamp:
Jul 14, 2011, 5:49:51 PM (13 years ago)
Author:
benoit
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • allpix/src/AllPixFEI3StandardDigitizer.cc

    r198 r209  
    4343        //////////////////////////
    4444
    45         biasVoltage=150.0; //[V]
     45        biasVoltage=100.0; //[V]
    4646        Temperature = 300.0;
    4747        detectorThickness = gD->GetSensorZ();
    48         resistivity=5000;
     48        resistivity=9000;
    4949
    5050        // true = p-type
     
    150150        dtIni = 0.01*ns;
    151151
    152         precision = 5;
     152        precision = 1;
    153153
    154154
     
    166166         */
    167167
    168         FEIX = 3;
     168        FEIX = 4;
    169169
    170170        switch (FEIX) {
     
    177177                chipNoise = 300*elec;
    178178                m_digitIn.thl = 3500*elec;
    179                 chargeSharingConstant =0.02;
     179                chargeSharingConstant =0.0;
    180180                break;
    181181
    182182
    183183        case 4 :
    184                 MipTOT=5;
    185                 MipCharge=20000;
     184                MipTOT=10;
     185                MipCharge=40000;
    186186                CounterDepth=15;
    187187                Lv1Unit = 25*ns;
    188188                chipNoise = 125*elec;
    189                 m_digitIn.thl = 2000*elec;
     189                m_digitIn.thl = 3200*elec;
    190190                chargeSharingConstant =0.02;
    191191                break;
     
    446446                eHitTotal = eHitTotal*depletedDepth/detectorThickness;
    447447
     448                tempPixel.first  = (*hitsCollection)[itr]->GetPixelNbX();
     449                tempPixel.second = (*hitsCollection)[itr]->GetPixelNbY();
     450
     451                G4double xpos = (*hitsCollection)[itr]->GetPosWithRespectToPixel().x();
     452                G4double ypos = (*hitsCollection)[itr]->GetPosWithRespectToPixel().y();
     453                G4double zpos = (*hitsCollection)[itr]->GetPosWithRespectToPixel().z()+detectorThickness/2.;
     454                //cout << TString::Format("x,y,z : %5.5f %5.5f %5.5f",xpos/um,ypos/um,zpos/um)<<endl;
     455
     456
    448457                for(G4int nQ  = 0 ; nQ < precision ; nQ++) {
    449458
    450459                double eHit = double(eHitTotal)/precision;
    451460                // Hit Info
    452 
    453                 tempPixel.first  = (*hitsCollection)[itr]->GetPixelNbX();
    454                 tempPixel.second = (*hitsCollection)[itr]->GetPixelNbY();
    455 
    456                 G4double xpos = (*hitsCollection)[itr]->GetPosWithRespectToPixel().x();
    457 
    458461                //Ugly Hack !!!
    459462                if(xpos>0)xpos=-pitchX/2+xpos;
    460463                else xpos=pitchX/2+xpos;
    461464
    462                 G4double ypos = (*hitsCollection)[itr]->GetPosWithRespectToPixel().y();
    463                 //G4double zpos = (*hitsCollection)[itr]->GetPosWithRespectToPixel().z();
    464                 G4double zpos = CLHEP::RandFlat::shoot()*depletedDepth;
     465                G4double zpos = CLHEP::RandGauss::shoot(zpos,10*um);
    465466
    466467
     
    620621                        digit->SetPixelCounts(EnergyToTOT((*pCItr).second,threshold));
    621622                        //digit->IncreasePixelCounts(); // Counting mode
     623                        cout << "TOT= "<< EnergyToTOT((*pCItr).second,threshold) << endl;
     624                        cout << "Energy= "<< (*pCItr).second/elec << endl;
    622625
    623626                        // MC only //
     
    748751{
    749752
    750         G4double dEdt = (MipCharge*elec- threshold)/(MipTOT*Lv1Unit*ns);
    751         G4int TOT = TMath::FloorNint((Energy-threshold)/(dEdt*Lv1Unit*ns));
     753        G4double dEdt = (MipCharge*elec- threshold)/(MipTOT*Lv1Unit);
     754        //G4int TOT = TMath::FloorNint((Energy-threshold)/(dEdt*Lv1Unit*ns));
     755        G4int TOT = TMath::FloorNint((Energy-threshold)/(dEdt*Lv1Unit));
     756
    752757        if(Energy<threshold) TOT=0;
    753758        if (TOT<0) TOT=0;
Note: See TracChangeset for help on using the changeset viewer.