Changeset 210 in Idarraga


Ignore:
Timestamp:
Jul 15, 2011, 2:00:46 PM (13 years ago)
Author:
benoit
Message:

Fixed Digitizer for FEI4

Location:
allpix
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • allpix/flags.gmk

    r102 r210  
    11# ROOT paths and libs
    22INCFLAGS += $(shell $(ROOTSYS)/bin/root-config --cflags)
    3 LDLIBS   += $(shell $(ROOTSYS)/bin/root-config --libs) -lGeom -lVMC -lEG -lXMLIO -lXMLParser
     3LDLIBS   += $(shell $(ROOTSYS)/bin/root-config --libs) -lGeom -lVMC -lEG -lXMLIO -lXMLParser -ljpeg -lFL -limage
    44
    55# If OpenInventor is installed in user-space from vp1 snapshot
  • allpix/macros/telescope1_Inventor_vis.in

    r181 r210  
    134134####################################################################
    135135# Bz field
    136 /allpix/extras/setPeakField 3.0 tesla
     136#/allpix/extras/setPeakField 3.0 tesla
    137137
    138138####################################################################
     
    145145/vis/viewer/set/style s
    146146
    147 /vis/open OIX 1024x768-100+100
     147#/vis/open OIX 1024x768-100+100
    148148#/vis/open OGLIXm 1024x768-100+100
    149149
     
    152152#/vis/open OGLSQt
    153153#/vis/open OIX
    154 #/vis/open OGLIX 1024x768-100+100
     154/vis/open OGLIX 1024x768-100+100
    155155#/vis/open OGLSXm
    156156#/vis/open DAWNFILE
  • allpix/models/pixeldetector.xml

    r195 r210  
    8787<pixeldet id="200,201">
    8888
    89 <digitizer>Medipix2</digitizer>
     89<digitizer>FEI3Standard</digitizer>
    9090
    9191<npix_x>80</npix_x>
  • allpix/src/AllPixDetectorConstruction.cc

    r192 r210  
    719719
    720720                // FIXME !!! --> feed this value from the macro
    721                 m_magField = new MorourgoMagField(fieldValue, 252.5*mm);
     721                //m_magField = new MorourgoMagField(fieldValue, 252.5*mm);
    722722
    723723                //m_magField = new G4UniformMagField(G4ThreeVector(0., fieldValue, 0.));
  • allpix/src/AllPixFEI3StandardDigitizer.cc

    r209 r210  
    166166         */
    167167
     168//      double calib_A=1;
     169//      double calib_B=1;
     170//      double calib_C=1;
     171
    168172        FEIX = 4;
    169173
     
    175179                CounterDepth=255;
    176180                Lv1Unit = 25*ns;
    177                 chipNoise = 300*elec;
    178                 m_digitIn.thl = 3500*elec;
    179                 chargeSharingConstant =0.0;
     181                chipNoise = 300;
     182                m_digitIn.thl = 3500;
     183                chargeSharingConstant = 0.0;
    180184                break;
    181185
     
    185189                MipCharge=40000;
    186190                CounterDepth=15;
    187                 Lv1Unit = 25*ns;
     191                Lv1Unit = 25;
    188192                chipNoise = 125*elec;
    189193                m_digitIn.thl = 3200*elec;
    190                 chargeSharingConstant =0.02;
     194                chargeSharingConstant =0.0;
    191195                break;
    192196
     
    460464                // Hit Info
    461465                //Ugly Hack !!!
    462                 if(xpos>0)xpos=-pitchX/2+xpos;
    463                 else xpos=pitchX/2+xpos;
     466                //if(xpos>0)xpos=-pitchX/2+xpos;
     467                //else xpos=pitchX/2+xpos;
    464468
    465469                G4double zpos = CLHEP::RandGauss::shoot(zpos,10*um);
     
    498502                //if(fabs(xpos)>=pitchX/2.-10*sigma && fabs(ypos)>pitchY/2.0-10*sigma){
    499503
    500                 if( (fabs(xpos) >= pitchX/2.-6*sigma || fabs(ypos) >=pitchY/2.-6*sigma) ){
     504                if( (fabs(xpos) >= pitchX/2.-3*sigma || fabs(ypos) >=pitchY/2.-3*sigma) ){
    501505
    502506//              if( (fabs(xpos) >= pitchX/2.-3*sigma || fabs(ypos) >=pitchY/2.-3*sigma) ){
     
    555559                                };
    556560
    557 
    558 
    559 
    560 //              if(xpos - maxIntegration < -pitchX/2){ // left pixel
    561 //                      extraPixel.first -= 1;
    562 //                      if(extraPixel.first >= 0){
    563 //                              pixelsContent[extraPixel] += eHit/10.;
    564 //                      }
    565 //              }else if(xpos + maxIntegration > pitchX/2){ // right
    566 //                      extraPixel.first += 1;
    567 //                      if(extraPixel.first < 18){
    568 //                              pixelsContent[extraPixel] += eHit/10.;
    569 //                      }
    570 //              }else if(ypos - maxIntegration < -pitchY/2){ // up
    571 //                      extraPixel.second += 1;
    572 //                      if(extraPixel.second < 164){
    573 //                              pixelsContent[extraPixel] += eHit/10.;
    574 //                      }
    575 //              }else if(ypos + maxIntegration > pitchY/2){ // down
    576 //                      extraPixel.second -= 1;
    577 //                      if(extraPixel.second >= 0){
    578 //                              pixelsContent[extraPixel] += eHit/10.;
    579 //                      }
    580 //              }else{}
    581 
    582                 //G4cout << "Sigma : " << sigma << G4endl;
    583                 // Let's integrate up to 3 sigma
    584                 //G4double nCharges = (*hitsCollection)[itr]->GetEdep()/3.6; // [eV]
    585                 /*
    586                 // Integrate in X
    587                 f1->SetParameters((*hitsCollection)[itr]->GetPosWithRespectToPixel().x(),
    588                                 sigma);
    589                 f1->Integral(0, (*hitsCollection)[itr]->GetPosWithRespectToPixel().x() + maxIntegration);
    590 
    591                 // Integrate in Y
    592                 f1->SetParameters((*hitsCollection)[itr]->GetPosWithRespectToPixel().y(),
    593                                 sigma);
    594                 f1->Integral(0, (*hitsCollection)[itr]->GetPosWithRespectToPixel().y() + maxIntegration);
    595                  */
    596 
    597                 // Is here a good place to calculate the charge sharing ?
    598 //              G4double erfVal = Erf(eHit);
    599                 //G4cout << eHit << " : " << erfVal << G4endl;
    600                 //G4cout << "  pre  " << tempPixel.first << ", " << tempPixel.second << G4endl;
    601                 //G4cout << "  post " << postPosX << ", " << postPosY << G4endl;
    602 
    603561        }
    604562
    605 
     563        }
    606564        // Now create digits.  One per pixel
    607565        map<pair<G4int, G4int>, G4double >::iterator pCItr = pixelsContent.begin();
     
    619577                        digit->SetPixelIDX((*pCItr).first.first);
    620578                        digit->SetPixelIDY((*pCItr).first.second);
    621                         digit->SetPixelCounts(EnergyToTOT((*pCItr).second,threshold));
     579                        digit->SetPixelCounts(EnergyToTOT((*pCItr).second/elec,threshold));
    622580                        //digit->IncreasePixelCounts(); // Counting mode
    623                         cout << "TOT= "<< EnergyToTOT((*pCItr).second,threshold) << endl;
    624                         cout << "Energy= "<< (*pCItr).second/elec << endl;
     581                        //cout << "TOT= "<< EnergyToTOT((*pCItr).second/elec,threshold/elec) << endl;
     582                        //cout << "Energy= "<< (*pCItr).second/elec << endl;
    625583
    626584                        // MC only //
     
    636594        }
    637595
    638         }
     596
    639597
    640598        G4int dc_entries = m_digitsCollection->entries();
     
    751709{
    752710
    753         G4double dEdt = (MipCharge*elec- threshold)/(MipTOT*Lv1Unit);
     711        G4double dEdt = (MipCharge- threshold)/(MipTOT*Lv1Unit);
    754712        //G4int TOT = TMath::FloorNint((Energy-threshold)/(dEdt*Lv1Unit*ns));
    755713        G4int TOT = TMath::FloorNint((Energy-threshold)/(dEdt*Lv1Unit));
     
    763721
    764722
     723//G4int AllPixFEI3StandardDigitizer::EnergyToTOTFEI4(G4double Energy, G4double threshold)
     724//{
     725//      double ToT=(1.0/(Energy+calib_C)+ calib_A)*calib_B;
     726//
     727//      return TMath::Floor(ToT);
     728//}
    765729
    766730//______________________________________________________________________________
Note: See TracChangeset for help on using the changeset viewer.