Fork me on GitHub

Changeset 29 in svn for trunk


Ignore:
Timestamp:
Nov 13, 2008, 4:07:16 PM (16 years ago)
Author:
severine ovyn
Message:

add IsolFlag

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Delphes.cpp

    r24 r29  
    6868{
    6969  int appargc = 2;
    70   char appName[100]; sprintf(appName,argv[0]);
     70  char *appName = "JetsSim";
    7171  char *appargv[] = {appName, "-b"};
    7272  TApplication app(appName, &appargc, appargv);
     
    259259      if((entry % 100) == 0 && entry > 0 )  cout << "** Processing element # " << entry << endl;
    260260     
    261       TSimpleArray<TRootGenParticle> bGen;
     261      TSimpleArray<TRootGenParticle> electron;
     262      TSimpleArray<TRootGenParticle> muon;
    262263      itGen.Reset();
    263264      TrackCentral.clear();
     
    301302                    case pE: // all electrons with eta < DET->MAX_CALO_FWD
    302303                      DET->SmearElectron(genMomentum);
    303                       if(genMomentum.E()!=0 && eta < DET->MAX_TRACKER) {
    304                           elementElec = (TRootElectron*) branchElectron->NewEntry();
    305                           elementElec->Set(genMomentum);
    306                           elementElec->Charge = sign(particle->PID);
    307                       }
     304                      electron.Add(particle);
    308305                      break; // case pE
    309 
    310306                    case pGAMMA: // all photons with eta < DET->MAX_CALO_FWD
    311307                      DET->SmearElectron(genMomentum);
     
    315311                      }
    316312                      break; // case pGAMMA
    317 
    318313                    case pMU: // all muons with eta < DET->MAX_MU
    319314                      DET->SmearMu(genMomentum);
    320                       if(genMomentum.E() !=0 ) {
    321                           elementMu = (TRootMuon*) branchMuon->NewEntry();
    322                           elementMu->Charge = sign(particle->PID);
    323                           elementMu->Set(genMomentum);
    324                       }
     315                      muon.Add(particle);
    325316                      break; // case pMU
    326 
    327317                    case pLAMBDA: // all lambdas with eta < DET->MAX_CALO_FWD
    328318                    case pK0S:    // all K0s with eta < DET->MAX_CALO_FWD
    329319                      DET->SmearHadron(genMomentum, 0.7);
    330320                      break; // case hadron
    331                      
    332321                    default:   // all other final particles with eta < DET->MAX_CALO_FWD
    333322                      DET->SmearHadron(genMomentum, 1.0);
     
    370359                  }
    371360          } // switch
    372          
     361
     362          //branchElectron->Reset();
     363         
     364          if(electron.GetEntries()>0) {
     365          for(int i=0; i < electron.GetEntries();i++) {
     366               genMomentum.SetPxPyPzE(electron[i]->Px,electron[i]->Py,electron[i]->Pz,electron[i]->E);
     367               if(genMomentum.E()!=0 && fabs(genMomentum.Eta()) < DET->MAX_TRACKER) {
     368               elementElec = (TRootElectron*) branchElectron->NewEntry();
     369               elementElec->Set(genMomentum);
     370               elementElec->Charge = sign(electron[i]->PID);
     371               if(fabs(genMomentum.Eta()))elementElec->IsolFlag = DET->Isolation(genMomentum.Phi(),genMomentum.Eta(),TrackCentral,2.0);
     372               }
     373          }}
     374          if(muon.GetEntries()>0) {
     375          for(int i=0; i < muon.GetEntries();i++) {
     376               genMomentum.SetPxPyPzE(muon[i]->Px,muon[i]->Py,muon[i]->Pz,muon[i]->E);
     377               if(genMomentum.E()!=0 && fabs(genMomentum.Eta()) < DET->MAX_MU) {
     378                 elementMu = (TRootMuon*) branchMuon->NewEntry();
     379                 elementMu->Charge = sign(particle->PID);
     380                 elementMu->Set(genMomentum);
     381                 elementMu->IsolFlag = DET->Isolation(genMomentum.Phi(),genMomentum.Eta(),TrackCentral,2.0);
     382               }
     383          }}
     384
    373385          // Forward particles in CASTOR ?
    374386          /*      if (particle->Status == 1 && (fabs(particle->Eta) > DET->MIN_CALO_VFWD)
  • trunk/Utilities/ExRootAnalysis/interface/BlockClasses.h

    r3 r29  
    1313 *  present in the data members of the Block TRoot class.
    1414 *
    15  *  $Date: 2008-11-04 10:32:25 $
    16  *  $Revision: 1.1 $
     15 *  $Date: 2008-11-13 15:07:16 $
     16 *  $Revision: 1.2 $
    1717 *
    1818 * 
     
    198198  static TCompare *fgCompare; //!
    199199
     200  bool IsolFlag;
     201
    200202  ClassDef(TRootElectron, 1)
    201203};
     
    220222  TRootMuon() {};
    221223  int Charge; // particle Charge [RawHepEventParticle::pid()]
     224  bool IsolFlag;
    222225  static TCompare *fgCompare; //!
    223226
Note: See TracChangeset for help on using the changeset viewer.